-
Notifications
You must be signed in to change notification settings - Fork 5
/
configure.ac
71 lines (56 loc) · 2.27 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# - If the library source code has changed at all since the last update,
# then increment revision.
# - If any interfaces have been added, removed, or changed since the last
# update, increment current, and set revision to 0.
# - If any interfaces have been added since the last public release, then
# increment age.
# - If any interfaces have been removed since the last public release, then
# set age to 0.
m4_define([lib_current],2)
m4_define([lib_revision],0)
m4_define([lib_age],2)
# Setup Automake
AC_INIT(mcpanel,[1.1],nicolas.bourdaud@gmail.com)
AC_CONFIG_SRCDIR([src/mcpanel.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config/config.h])
# Initialize Automake
AM_INIT_AUTOMAKE([subdir-objects no-dist-gzip dist-bzip2 color-tests])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CANONICAL_HOST
AC_CANONICAL_BUILD
# Checks for programs.
AC_PROG_CC_C99
LT_INIT([win32-dll disable-static])
AC_SUBST(LIBTOOL_DEPS)
gl_LD_OUTPUT_DEF
AC_DEF_API_EXPORT_ATTRS
PKG_CHECK_MODULES_EXT(GTK2, gtk+-2.0)
PKG_CHECK_MODULES_EXT(GTHREAD2, gthread-2.0)
MM_CHECK_LIB([mm_relative_sleep_ms], [mmlib], MMLIB, [], [AC_MSG_WARN([The tests will not be executed -> mmlib is required for the tests.])])
AC_SEARCH_LIBS([rtf_create_filter], [rtfilter], [], AC_MSG_ERROR([The rtfilter library must be installed.]))
AC_SEARCH_LIBS([cos], [m])
AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug@<:@=ARG@:>@],[Enable debugging @<:@DEFAULT=no@:>@]),
[case "${enableval}" in
yes) debug=true ;;
no) debug=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
esac], [debug=false])
if test "x$debug" = "xfalse"; then
AC_DEFINE([G_DISABLE_CAST_CHECKS], [], [Define to disable the glib checks])
fi
# Replacement checks
AC_SEARCH_LIBS([clock_gettime], [rt posix4])
AC_SEARCH_LIBS([clock_nanosleep], [rt posix4])
AC_CHECK_TYPES([struct timespec, clockid_t])
AC_CHECK_DECLS([clock_gettime, clock_nanosleep],,,[#include <time.h>])
AC_CHECK_FUNCS([nanosleep gettimeofday ftime _ftime])
AC_CHECK_FUNC_FNARG([GetSystemTimeAsFileTime], [0], [#include <windows.h>])
AC_REPLACE_FUNCS([clock_gettime clock_nanosleep])
AC_SUBST([CURRENT],[lib_current])
AC_SUBST([REVISION],[lib_revision])
AC_SUBST([AGE],[lib_age])
AC_CONFIG_FILES([Makefile src/Makefile test/Makefile])
AC_OUTPUT