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], [3])
6 m4_define([folks_micro_version], [1])
7 m4_define([folks_nano_version], [1])
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], [17])
15 m4_define([folks_lt_revision], [0])
16 m4_define([folks_lt_age], [1])
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_major_minor_version], folks_major_version.folks_minor_version)
31 m4_define([folks_module_version], folks_lt_current)
33 AC_INIT([folks], folks_version,
34 [https://bugzilla.gnome.org/browse.cgi?product=folks], [folks],
35 [http://telepathy.freedesktop.org/wiki/Folks])
36 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
39 AC_COPYRIGHT([Copyright (C) 2010 Collabora Ltd.])
41 AC_CONFIG_MACRO_DIR([m4])
42 AC_CONFIG_SRCDIR([Makefile.am])
43 AC_CONFIG_HEADERS(config.h)
44 AC_CONFIG_SRCDIR([configure.ac])
45 AM_INIT_AUTOMAKE([1.11 dist-bzip2 no-define
46 no-dist-gzip tar-ustar -Wno-portability])
53 PKG_PROG_PKG_CONFIG([0.21])
59 LT_CURRENT=folks_lt_current
60 LT_REVISION=folks_lt_revision
62 AC_SUBST([LT_CURRENT])
63 AC_SUBST([LT_REVISION])
66 FOLKS_MAJOR_MINOR_VERSION=folks_major_minor_version
67 AC_SUBST([FOLKS_MAJOR_MINOR_VERSION])
69 # -----------------------------------------------------------
71 # -----------------------------------------------------------
74 TP_GLIB_REQUIRED=0.13.1
77 AM_PROG_VALAC([$VALA_REQUIRED])
79 # require GLib >= 2.24 so GLib.Array, etc. reffing is handled automatically
80 VALAFLAGS="$VALAFLAGS --target-glib=2.24"
82 AC_SUBST([VAPIGENFLAGS])
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.9.12])
91 PKG_CHECK_MODULES([GLIB],
92 [glib-2.0 >= $GLIB_REQUIRED
93 gobject-2.0 >= $GLIB_REQUIRED])
94 PKG_CHECK_MODULES([GMODULE], [gmodule-no-export-2.0])
95 PKG_CHECK_MODULES([GIO], [gio-2.0 >= $GLIB_REQUIRED])
96 PKG_CHECK_MODULES([DBUS_GLIB], [dbus-glib-1])
98 # FIXME: We depend on libgee < 0.7 because 0.7 breaks API. bgo#627746
99 PKG_CHECK_MODULES([GEE], [gee-1.0 < 0.7])
100 PKG_CHECK_MODULES([TP_GLIB], [telepathy-glib >= $TP_GLIB_REQUIRED])
101 VALA_CHECK_PACKAGES([telepathy-glib
106 # Various functions that we need (used in C code generated from Vala)
107 AC_CHECK_FUNCS([memset])
108 AC_CHECK_FUNCS([strstr])
110 # -----------------------------------------------------------
112 # -----------------------------------------------------------
114 FOLKS_MODULE_VERSION=folks_module_version
115 AC_SUBST([FOLKS_MODULE_VERSION])
116 AC_DEFINE([MODULE_VERSION], "folks_module_version", [Module interface version])
118 BACKEND_DIR='$(libdir)/folks/$(FOLKS_MODULE_VERSION)/backends'
119 AC_SUBST([BACKEND_DIR])
121 BACKEND_KF='$(top_builddir)/backends/key-file/.libs/libfolks-backend-key-file.so'
122 AC_SUBST([BACKEND_KF])
123 BACKEND_TP='$(top_builddir)/backends/telepathy/.libs/libfolks-backend-telepathy.so'
124 AC_SUBST([BACKEND_TP])
126 # All of the backend libraries in our tree; to be used by the tests
127 BACKEND_UNINST_PATH='$(BACKEND_KF):$(BACKEND_TP)'
128 AC_SUBST([BACKEND_UNINST_PATH])
130 # -----------------------------------------------------------
132 # -----------------------------------------------------------
134 AC_ARG_ENABLE([import-tool],
135 AS_HELP_STRING([--enable-import-tool],
136 [Enable building the meta-contact import tool]),
137 [enable_import_tool=$enableval with_import_tool=$enableval],
138 [enable_import_tool=maybe with_import_tool=no])
139 AS_IF([test "$enable_import_tool" != "no"],
140 [PKG_CHECK_MODULES([LIBXML], [libxml-2.0],
141 [with_import_tool=yes], [with_import_tool=no])])
142 AS_IF([test "$enable_import_tool" = "yes" -a "$with_import_tool" = "no"],
143 [AC_MSG_ERROR([Import tool explicitly enabled, but libxml2 not found])])
144 AM_CONDITIONAL([ENABLE_IMPORT_TOOL], [test "$with_import_tool" = "yes"])
146 # -----------------------------------------------------------
148 # -----------------------------------------------------------
150 AC_ARG_ENABLE([docs],
151 AS_HELP_STRING([--enable-docs],[Enable documentation generation]),
152 [enable_docs=$enableval], [enable_docs=no])
153 AM_CONDITIONAL([ENABLE_DOCS], [test x$enable_docs = xyes])
155 AS_IF([test "x$enable_docs" != xno],
156 [AC_PATH_PROG([VALADOC], [valadoc], [:])
157 AS_IF([test "$VALADOC" = :],
158 [AC_MSG_ERROR([valadoc not found])])])
160 # -----------------------------------------------------------
162 # -----------------------------------------------------------
164 GETTEXT_PACKAGE=AC_PACKAGE_NAME
165 AC_SUBST(GETTEXT_PACKAGE)
166 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define the gettext package to be used])
167 AM_GNU_GETTEXT_VERSION([0.17])
168 AM_GNU_GETTEXT([external])
169 IT_PROG_INTLTOOL([0.35.0])
171 # -----------------------------------------------------------
173 # -----------------------------------------------------------
175 AS_COMPILER_FLAG([-Wall], [ERROR_CFLAGS="-Wall"], [ERROR_CFLAGS=""])
176 AS_COMPILER_FLAG([-Werror], [werror=yes], [werror=no])
178 AC_ARG_ENABLE([debug],
179 AS_HELP_STRING([--disable-debug],[compile without debug code]),
180 [enable_debug=$enableval], [enable_debug=yes])
182 AC_ARG_ENABLE([Werror],
183 AS_HELP_STRING([--disable-Werror],
184 [compile without -Werror (normally enabled in
185 development builds)]),
186 [werror=$enableval], [werror=yes])
188 AS_COMPILER_FLAG([-Wextra], [wextra=yes], [wextra=no])
189 AS_COMPILER_FLAG([-Wno-missing-field-initializers],
190 [wno_missing_field_initializers=yes],
191 [wno_missing_field_initializers=no])
192 AS_COMPILER_FLAG([-Wno-unused-parameter],
193 [wno_unused_parameter=yes], [wno_unused_parameter=no])
195 m4_if(folks_released, [1], [],
197 ERROR_INTROSPECTION_SCANNER_ARGS="$ERROR_INTROSPECTION_SCANNER_ARGS \
199 ERROR_VALAFLAGS="$ERROR_VALAFLAGS --fatal-warnings"
200 if test x$werror = xyes; then
201 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
203 if test x$wextra = xyes -a \
204 x$wno_missing_field_initializers = xyes -a \
205 x$wno_unused_parameter = xyes; then
206 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra \
207 -Wno-missing-field-initializers -Wno-unused-parameter"
211 AS_COMPILER_FLAG([-D_POSIX_SOURCE], [ERROR_CFLAGS="$ERROR_CFLAGS -D_POSIX_SOURCE"])
212 AS_COMPILER_FLAG([-std=c99], [ERROR_CFLAGS="$ERROR_CFLAGS -std=c99"])
213 AS_COMPILER_FLAG([-Wshadow], [ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow"])
214 AS_COMPILER_FLAG([-Wmissing-prototypes], [ERROR_CFLAGS="$ERROR_CFLAGS \
215 -Wmissing-prototypes"])
216 AS_COMPILER_FLAG([-Wmissing-declarations], [ERROR_CFLAGS="$ERROR_CFLAGS \
217 -Wmissing-declarations"])
218 AS_COMPILER_FLAG([-Wstrict-prototypes], [ERROR_CFLAGS="$ERROR_CFLAGS \
219 -Wstrict-prototypes"])
221 AC_SUBST([ERROR_INTROSPECTION_SCANNER_ARGS])
222 AC_SUBST([ERROR_VALAFLAGS])
223 AC_SUBST([ERROR_CFLAGS])
225 # -----------------------------------------------------------
227 # -----------------------------------------------------------
230 backends/telepathy/lib/folks-telepathy.pc
231 backends/telepathy/lib/folks-telepathy-uninstalled.pc
233 folks/folks-uninstalled.pc
236 backends/key-file/Makefile
237 backends/telepathy/Makefile
238 backends/telepathy/lib/Makefile
244 tests/key-file/Makefile
245 tests/telepathy/Makefile
247 tests/lib/folks-test-uninstalled.pc
248 tests/lib/key-file/Makefile
249 tests/lib/telepathy/Makefile
250 tests/lib/telepathy/contactlist/Makefile
251 tests/lib/telepathy/contactlist/session.conf
261 Compiler....................: ${VALAC}
262 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
263 Prefix......................: ${prefix}
264 Bugreporting URL............: ${PACKAGE_BUGREPORT}
265 Documentation...............: ${enable_docs}
266 Tests.......................: ${have_tp_glib_for_tests}
267 Import tool.................: ${with_import_tool}