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 PKG_CHECK_MODULES(LIBXML, libxml-2.0, [have_libxml=yes], [have_libxml=no])
134 AM_CONDITIONAL([HAVE_LIBXML], [test "$have_libxml" = "yes"])
136 # -----------------------------------------------------------
138 # -----------------------------------------------------------
140 AC_ARG_ENABLE([docs],
141 AS_HELP_STRING([--enable-docs],[Enable documentation generation]),
142 [enable_docs=$enableval], [enable_docs=no])
143 AM_CONDITIONAL([ENABLE_DOCS], [test x$enable_docs = xyes])
145 AS_IF([test "x$enable_docs" != xno],
146 [AC_PATH_PROG([VALADOC], [valadoc], [:])
147 AS_IF([test "$VALADOC" = :],
148 [AC_MSG_ERROR([valadoc not found])])])
150 # -----------------------------------------------------------
152 # -----------------------------------------------------------
154 AS_COMPILER_FLAG([-Wall], [ERROR_CFLAGS="-Wall"], [ERROR_CFLAGS=""])
155 AS_COMPILER_FLAG([-Werror], [werror=yes], [werror=no])
157 AC_ARG_ENABLE([debug],
158 AS_HELP_STRING([--disable-debug],[compile without debug code]),
159 [enable_debug=$enableval], [enable_debug=yes])
161 AC_ARG_ENABLE([Werror],
162 AS_HELP_STRING([--disable-Werror],
163 [compile without -Werror (normally enabled in
164 development builds)]),
165 [werror=$enableval], [werror=yes])
167 AS_COMPILER_FLAG([-Wextra], [wextra=yes], [wextra=no])
168 AS_COMPILER_FLAG([-Wno-missing-field-initializers],
169 [wno_missing_field_initializers=yes],
170 [wno_missing_field_initializers=no])
171 AS_COMPILER_FLAG([-Wno-unused-parameter],
172 [wno_unused_parameter=yes], [wno_unused_parameter=no])
174 m4_if(folks_released, [1], [],
176 if test x$werror = xyes; then
177 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
179 if test x$wextra = xyes -a \
180 x$wno_missing_field_initializers = xyes -a \
181 x$wno_unused_parameter = xyes; then
182 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra \
183 -Wno-missing-field-initializers -Wno-unused-parameter"
187 AS_COMPILER_FLAG([-D_POSIX_SOURCE], [ERROR_CFLAGS="$ERROR_CFLAGS -D_POSIX_SOURCE"])
188 AS_COMPILER_FLAG([-std=c99], [ERROR_CFLAGS="$ERROR_CFLAGS -std=c99"])
189 AS_COMPILER_FLAG([-Wshadow], [ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow"])
190 AS_COMPILER_FLAG([-Wmissing-prototypes], [ERROR_CFLAGS="$ERROR_CFLAGS \
191 -Wmissing-prototypes"])
192 AS_COMPILER_FLAG([-Wmissing-declarations], [ERROR_CFLAGS="$ERROR_CFLAGS \
193 -Wmissing-declarations"])
194 AS_COMPILER_FLAG([-Wstrict-prototypes], [ERROR_CFLAGS="$ERROR_CFLAGS \
195 -Wstrict-prototypes"])
197 AC_SUBST([ERROR_CFLAGS])
199 # -----------------------------------------------------------
201 # -----------------------------------------------------------
204 backends/telepathy/lib/folks-telepathy.pc
205 backends/telepathy/lib/folks-telepathy-uninstalled.pc
207 folks/folks-uninstalled.pc
210 backends/key-file/Makefile
211 backends/telepathy/Makefile
212 backends/telepathy/lib/Makefile
216 tests/telepathy/Makefile
218 tests/lib/telepathy/Makefile
219 tests/lib/telepathy/contactlist/Makefile
220 tests/lib/telepathy/contactlist/session.conf
230 Compiler....................: ${VALAC}
231 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
232 Prefix......................: ${prefix}
233 Bugreporting URL............: ${PACKAGE_BUGREPORT}
234 Documentation...............: ${enable_docs}
235 Tests.......................: ${have_tp_glib_for_tests}
236 Import tool.................: ${have_libxml}