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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
AC_PREREQ([2.59])
# Making releases:
# set the new version number:
# odd minor -> development series
# even minor -> stable series
# increment micro for each release within a series
# set gabble_release to 1.
m4_define([gabble_major_version], [0])
m4_define([gabble_minor_version], [3])
m4_define([gabble_micro_version], [13])
m4_define([gabble_nano_version], [0])
# Some magic
m4_define([gabble_base_version],
[gabble_major_version.gabble_minor_version.gabble_micro_version])
m4_define([gabble_version],
[m4_if(gabble_nano_version, 0, [gabble_base_version], [gabble_base_version].[gabble_nano_version])])dnl
AC_INIT([Telepathy Gabble], [gabble_version], [https://bugs.freedesktop.org/enter_bug.cgi?product=Telepathy])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.8])
AM_PROG_LIBTOOL
AM_CONFIG_HEADER(config.h)
dnl check for tools
AC_PROG_CC
AC_PROG_CC_STDC
AM_PROG_AS
dnl decide error flags
AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
ifelse(gabble_nano_version, 0,
[],
[AS_COMPILER_FLAG(-Werror,ERROR_CFLAGS="$ERROR_CFLAGS -Werror",ERROR_CFLAGS="$ERROR_CFLAGS")
])
AC_SUBST(ERROR_CFLAGS)
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--disable-debug],[compile without debug code]),
enable_debug=$enableval, enable_debug=yes )
AC_ARG_ENABLE(handle-leak-debug,
AC_HELP_STRING([--enable-handle-leak-debug],[compile with handle leak debugging code]),
enable_handle_leak_debug=$enableval, enable_handle_leak_debug=no )
if test x$enable_debug = xyes; then
AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
fi
if test x$enable_handle_leak_debug = xyes; then
AC_DEFINE(ENABLE_HANDLE_LEAK_DEBUG, [], [Enable handle leak debug code])
HANDLE_LEAK_DEBUG_CFLAGS="-rdynamic"
fi
AC_SUBST(HANDLE_LEAK_DEBUG_CFLAGS)
AC_HEADER_STDC([])
AC_C_INLINE
dnl GTK docs
GTK_DOC_CHECK
dnl Check for Glib
PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.4, gobject-2.0 >= 2.4])
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
AC_SUBST(GLIB_GENMARSHAL)
dnl Check for D-Bus
PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.61, dbus-glib-1 >= 0.61])
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
AS_AC_EXPAND(DATADIR, $datadir)
DBUS_SERVICES_DIR="$DATADIR/dbus-1/services"
AC_SUBST(DBUS_SERVICES_DIR)
AC_DEFINE_UNQUOTED(DBUS_SERVICES_DIR, "$DBUS_SERVICES_DIR", [DBus services directory])
dnl Check for Loudmouth
AC_ARG_ENABLE(loudmouth-versioning,
AC_HELP_STRING([--disable-loudmouth-versioning],
[Stops configure checking the version of loudmouth to use.]),
enable_loudmouth_versioning=$enableval,
enable_loudmouth_versioning=yes)
if test x$enable_loudmouth_versioning = xyes; then
LOUDMOUTH_VERSION_STR=" >= 1.1.1"
else
LOUDMOUTH_VERSION_STR=""
fi
PKG_CHECK_MODULES(LOUDMOUTH, loudmouth-1.0$LOUDMOUTH_VERSION_STR)
AC_SUBST(LOUDMOUTH_CFLAGS)
AC_SUBST(LOUDMOUTH_LIBS)
dnl glibc backtrace functions
AC_CHECK_FUNCS(backtrace backtrace_symbols_fd)
AC_CHECK_HEADERS(execinfo.h)
dnl signal functions
AC_CHECK_FUNCS(signal)
AC_CHECK_HEADERS(signal.h)
AC_OUTPUT( Makefile \
src/Makefile \
m4/Makefile \
data/Makefile \
generate/Makefile \
tests/Makefile
)
|