1 # If not 1, append datestamp to the version number
2 m4_define([folks_released], [0])
4 m4_define([folks_major_version], [0])
5 m4_define([folks_minor_version], [1])
6 m4_define([folks_micro_version], [17])
7 m4_define([folks_nano_version], [0])
9 # If library source has changed since last release, increment revision
10 # If interfaces have been added, removed or changed since last release,
11 # increment current and set revision to 0
12 # If interfaces have been added since last release, increment age
13 # If interfaces have been removed since last release, set age to 0
14 m4_define([folks_lt_current], [13])
15 m4_define([folks_lt_revision], [1])
16 m4_define([folks_lt_age], [13])
18 # Display the nano_version only if it's not '0'
19 m4_define([folks_base_version],
20 folks_major_version.folks_minor_version.folks_micro_version)
21 m4_define([folks_full_version],
22 [m4_if(folks_nano_version, [0],
23 folks_base_version, folks_base_version.folks_nano_version)])
25 m4_define([folks_maybe_datestamp],
26 m4_if(folks_released, [1],
27 [], [m4_esyscmd([date +.%Y%m%d | tr -d '\n\r'])]))
29 m4_define([folks_version], folks_full_version[]folks_maybe_datestamp)
30 m4_define([folks_module_version], folks_lt_current)
32 AC_INIT([folks], folks_version,
33 [https://bugzilla.gnome.org/browse.cgi?product=folks], [folks],
34 [http://telepathy.freedesktop.org/wiki/Folks])
35 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
38 AC_COPYRIGHT([Copyright (C) 2010 Collabora Ltd.])
40 AC_CONFIG_MACRO_DIR([m4])
41 AC_CONFIG_SRCDIR([Makefile.am])
42 AC_CONFIG_HEADERS(config.h)
43 AC_CONFIG_SRCDIR([configure.ac])
44 AM_INIT_AUTOMAKE([1.11 dist-bzip2 no-define
45 no-dist-gzip tar-ustar -Wno-portability])
52 PKG_PROG_PKG_CONFIG([0.21])
58 LT_CURRENT=folks_lt_current
59 LT_REVISION=folks_lt_revision
61 AC_SUBST([LT_CURRENT])
62 AC_SUBST([LT_REVISION])
65 # -----------------------------------------------------------
67 # -----------------------------------------------------------
70 TP_GLIB_REQUIRED=0.11.11
71 # FIXME: remove the machinery using this once it's safe to require this version
72 # (be sure to remove the HAVE_TP_GLIB_FOR_TESTS conditionals in Makefile.am
74 TP_GLIB_TESTS_REQUIRED=0.11.14.1
77 AM_PROG_VALAC([$VALA_REQUIRED])
79 # require GLib >= 2.24 so GLib.Array, etc. reffing is handled automatically
80 VALACFLAGS="$VALACFLAGS --target-glib=2.24"
81 AC_SUBST([VALACFLAGS])
85 AC_PATH_PROG([VAPIGEN], [vapigen], [vapigen])
86 AS_IF([test "$VAPIGEN" = ""],
87 [AC_MSG_ERROR([Vala must be built with --enable-vapigen])])
89 GOBJECT_INTROSPECTION_REQUIRE([0.6.7])
91 PKG_CHECK_MODULES([GLIB],
92 [glib-2.0 >= $GLIB_REQUIRED
93 gobject-2.0 >= $GLIB_REQUIRED])
94 PKG_CHECK_MODULES([GIO], [gio-2.0 >= $GLIB_REQUIRED])
95 PKG_CHECK_MODULES([DBUS_GLIB], [dbus-glib-1])
97 # FIXME: We depend on libgee < 0.7 because 0.7 breaks API. bgo#627746
98 PKG_CHECK_MODULES([GEE], [gee-1.0 < 0.7])
99 PKG_CHECK_MODULES([TP_GLIB], [telepathy-glib >= $TP_GLIB_REQUIRED])
100 VALA_CHECK_PACKAGES([telepathy-glib
105 # Various functions that we need (used in C code generated from Vala)
106 AC_CHECK_FUNCS([memset])
107 AC_CHECK_FUNCS([strstr])
109 # -----------------------------------------------------------
111 # -----------------------------------------------------------
113 FOLKS_MODULE_VERSION=folks_module_version
114 AC_SUBST([FOLKS_MODULE_VERSION])
115 AC_DEFINE([MODULE_VERSION], "folks_module_version", [Module interface version])
117 BACKEND_DIR='$(libdir)/folks/$(FOLKS_MODULE_VERSION)/backends'
118 AC_SUBST([BACKEND_DIR])
120 # -----------------------------------------------------------
122 # -----------------------------------------------------------
124 PKG_CHECK_MODULES([TP_GLIB_FOR_TESTS],
125 [telepathy-glib >= $TP_GLIB_TESTS_REQUIRED],
126 [have_tp_glib_for_tests=true], [have_tp_glib_for_tests=false])
127 AM_CONDITIONAL([HAVE_TP_GLIB_FOR_TESTS], [$have_tp_glib_for_tests])
129 # -----------------------------------------------------------
131 # -----------------------------------------------------------
133 AC_ARG_ENABLE([docs],
134 AS_HELP_STRING([--enable-docs],[Enable documentation generation]),
135 [enable_docs=$enableval], [enable_docs=no])
136 AM_CONDITIONAL([ENABLE_DOCS], [test x$enable_docs = xyes])
138 AS_IF([test "x$enable_docs" != xno],
139 [AC_PATH_PROG([VALADOC], [valadoc], [:])
140 AS_IF([test "$VALADOC" = :],
141 [AC_MSG_ERROR([valadoc not found])])])
143 # -----------------------------------------------------------
145 # -----------------------------------------------------------
147 AS_COMPILER_FLAG([-Wall], [ERROR_CFLAGS="-Wall"], [ERROR_CFLAGS=""])
148 AS_COMPILER_FLAG([-Werror], [werror=yes], [werror=no])
150 AC_ARG_ENABLE([debug],
151 AS_HELP_STRING([--disable-debug],[compile without debug code]),
152 [enable_debug=$enableval], [enable_debug=yes])
154 AC_ARG_ENABLE([Werror],
155 AS_HELP_STRING([--disable-Werror],
156 [compile without -Werror (normally enabled in
157 development builds)]),
158 [werror=$enableval], [werror=yes])
160 AS_COMPILER_FLAG([-Wextra], [wextra=yes], [wextra=no])
161 AS_COMPILER_FLAG([-Wno-missing-field-initializers],
162 [wno_missing_field_initializers=yes],
163 [wno_missing_field_initializers=no])
164 AS_COMPILER_FLAG([-Wno-unused-parameter],
165 [wno_unused_parameter=yes], [wno_unused_parameter=no])
167 m4_if(folks_released, [1], [],
169 if test x$werror = xyes; then
170 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
172 if test x$wextra = xyes -a \
173 x$wno_missing_field_initializers = xyes -a \
174 x$wno_unused_parameter = xyes; then
175 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra \
176 -Wno-missing-field-initializers -Wno-unused-parameter"
180 AS_COMPILER_FLAG([-D_POSIX_SOURCE], [ERROR_CFLAGS="$ERROR_CFLAGS -D_POSIX_SOURCE"])
181 AS_COMPILER_FLAG([-std=c99], [ERROR_CFLAGS="$ERROR_CFLAGS -std=c99"])
182 AS_COMPILER_FLAG([-Wshadow], [ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow"])
183 AS_COMPILER_FLAG([-Wmissing-prototypes], [ERROR_CFLAGS="$ERROR_CFLAGS \
184 -Wmissing-prototypes"])
185 AS_COMPILER_FLAG([-Wmissing-declarations], [ERROR_CFLAGS="$ERROR_CFLAGS \
186 -Wmissing-declarations"])
187 AS_COMPILER_FLAG([-Wstrict-prototypes], [ERROR_CFLAGS="$ERROR_CFLAGS \
188 -Wstrict-prototypes"])
190 AC_SUBST([ERROR_CFLAGS])
192 # -----------------------------------------------------------
194 # -----------------------------------------------------------
197 backends/telepathy/lib/folks-telepathy.pc
198 backends/telepathy/lib/folks-telepathy-uninstalled.pc
200 folks/folks-uninstalled.pc
203 backends/key-file/Makefile
204 backends/telepathy/Makefile
205 backends/telepathy/lib/Makefile
209 tests/telepathy/Makefile
211 tests/lib/telepathy/Makefile
212 tests/lib/telepathy/contactlist/Makefile
213 tests/lib/telepathy/contactlist/session.conf
222 Compiler....................: ${VALAC}
223 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
224 Prefix......................: ${prefix}
225 Bugreporting URL............: ${PACKAGE_BUGREPORT}
226 Documentation...............: ${enable_docs}
227 Tests.......................: ${have_tp_glib_for_tests}