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], [2])
6 m4_define([folks_micro_version], [0])
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], [14])
15 m4_define([folks_lt_revision], [0])
16 m4_define([folks_lt_age], [14])
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.11.15.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(LIBXML, libxml-2.0, [have_libxml=yes], [have_libxml=no])
125 AM_CONDITIONAL([HAVE_LIBXML], [test "$have_libxml" = "yes"])
127 # -----------------------------------------------------------
129 # -----------------------------------------------------------
131 AC_ARG_ENABLE([docs],
132 AS_HELP_STRING([--enable-docs],[Enable documentation generation]),
133 [enable_docs=$enableval], [enable_docs=no])
134 AM_CONDITIONAL([ENABLE_DOCS], [test x$enable_docs = xyes])
136 AS_IF([test "x$enable_docs" != xno],
137 [AC_PATH_PROG([VALADOC], [valadoc], [:])
138 AS_IF([test "$VALADOC" = :],
139 [AC_MSG_ERROR([valadoc not found])])])
141 # -----------------------------------------------------------
143 # -----------------------------------------------------------
145 AS_COMPILER_FLAG([-Wall], [ERROR_CFLAGS="-Wall"], [ERROR_CFLAGS=""])
146 AS_COMPILER_FLAG([-Werror], [werror=yes], [werror=no])
148 AC_ARG_ENABLE([debug],
149 AS_HELP_STRING([--disable-debug],[compile without debug code]),
150 [enable_debug=$enableval], [enable_debug=yes])
152 AC_ARG_ENABLE([Werror],
153 AS_HELP_STRING([--disable-Werror],
154 [compile without -Werror (normally enabled in
155 development builds)]),
156 [werror=$enableval], [werror=yes])
158 AS_COMPILER_FLAG([-Wextra], [wextra=yes], [wextra=no])
159 AS_COMPILER_FLAG([-Wno-missing-field-initializers],
160 [wno_missing_field_initializers=yes],
161 [wno_missing_field_initializers=no])
162 AS_COMPILER_FLAG([-Wno-unused-parameter],
163 [wno_unused_parameter=yes], [wno_unused_parameter=no])
165 m4_if(folks_released, [1], [],
167 if test x$werror = xyes; then
168 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
170 if test x$wextra = xyes -a \
171 x$wno_missing_field_initializers = xyes -a \
172 x$wno_unused_parameter = xyes; then
173 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra \
174 -Wno-missing-field-initializers -Wno-unused-parameter"
178 AS_COMPILER_FLAG([-D_POSIX_SOURCE], [ERROR_CFLAGS="$ERROR_CFLAGS -D_POSIX_SOURCE"])
179 AS_COMPILER_FLAG([-std=c99], [ERROR_CFLAGS="$ERROR_CFLAGS -std=c99"])
180 AS_COMPILER_FLAG([-Wshadow], [ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow"])
181 AS_COMPILER_FLAG([-Wmissing-prototypes], [ERROR_CFLAGS="$ERROR_CFLAGS \
182 -Wmissing-prototypes"])
183 AS_COMPILER_FLAG([-Wmissing-declarations], [ERROR_CFLAGS="$ERROR_CFLAGS \
184 -Wmissing-declarations"])
185 AS_COMPILER_FLAG([-Wstrict-prototypes], [ERROR_CFLAGS="$ERROR_CFLAGS \
186 -Wstrict-prototypes"])
188 AC_SUBST([ERROR_CFLAGS])
190 # -----------------------------------------------------------
192 # -----------------------------------------------------------
195 backends/telepathy/lib/folks-telepathy.pc
196 backends/telepathy/lib/folks-telepathy-uninstalled.pc
198 folks/folks-uninstalled.pc
201 backends/key-file/Makefile
202 backends/telepathy/Makefile
203 backends/telepathy/lib/Makefile
207 tests/telepathy/Makefile
209 tests/lib/telepathy/Makefile
210 tests/lib/telepathy/contactlist/Makefile
211 tests/lib/telepathy/contactlist/session.conf
221 Compiler....................: ${VALAC}
222 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
223 Prefix......................: ${prefix}
224 Bugreporting URL............: ${PACKAGE_BUGREPORT}
225 Documentation...............: ${enable_docs}
226 Tests.......................: ${have_tp_glib_for_tests}
227 Import tool.................: ${have_libxml}