1 dnl -*- mode: Autoconf; -*-
2 dnl Invoke autogen.sh to produce a configure script.
3 dnl configure-pre.in and src/backends/*/configure-sub.in and configure-post.in come before this part
5 AC_SUBST(BACKEND_CPPFLAGS)
8 backend_is_enabled () {
9 eval echo \${enable_${1}}
11 for backend in $BACKENDS; do
12 if test `backend_is_enabled $backend` == "yes"; then
14 SYNCEVOLUTION_MODULES="$SYNCEVOLUTION_MODULES src/backends/sync${backend}.la"
18 if test "$enable_any" = "no"; then
19 AC_MSG_ERROR([no backend enabled - refusing to continue: $anymissing])
22 dnl check for glib - calling g_type_init() is expected on Maemo
23 PKG_CHECK_MODULES(GLIB, "glib-2.0", GLIBFOUND=yes, GLIBFOUND=no)
24 # This check here is broken on Ubuntu 8.04: it calls glib-config,
25 # which isn't found, but the error is not detected by configure.
26 #if test "x${GLIBFOUND}" = "xno"; then
27 # PKG_CHECK_MODULES(GLIB, "glib", GLIBFOUND=yes, GLIBFOUND=no)
32 dnl check for programs.
37 dnl glib initialization is done only if requested by some configure-sub.in,
38 dnl for not needed otherwise even if found
39 if test "$need_glib" != "yes"; then
43 if test "x${GLIBFOUND}" = "xyes"; then
44 AC_DEFINE(HAVE_GLIB, 1, [glib found])
46 BACKEND_CPPFLAGS="$BACKEND_CPPFLAGS $GLIB_CFLAGS"
49 dnl figure out whether we link all code statically or as modules
50 AM_CONDITIONAL([ENABLE_MODULES], [test "$enable_shared" == "yes"])
51 if test "$enable_shared" == "yes"; then
52 AC_DEFINE(ENABLE_MODULES, 1, [enable dynamically opening sync source backends])
54 AC_SUBST(SYNCEVOLUTION_LDADD)
56 dnl CXXFLAGS gets applied to SyncEvolution and the client library.
57 dnl For e.g. "-Wall -Werror" this might not be such a good idea;
58 dnl SYNCEVOLUTION_CXXFLAGS can be used instead. It applies only
59 dnl to the sources in the SyncEvolution repository.
60 AC_SUBST(SYNCEVOLUTION_CXXFLAGS)
62 dnl a quick-and-dirty way to detect compilation for the iPhone
63 if test "$host" == "arm-apple-darwin"; then
64 AC_DEFINE(IPHONE, 1, [compiling for iPhone])
68 dnl --enable-evolution-compatibility
69 if test "$enable_evolution_compatibility" == "yes"; then
70 AC_DEFINE(EVOLUTION_COMPATIBILITY, 1, [avoid hard dependency on Evolution shared objects])
72 AM_CONDITIONAL([ENABLE_EVOLUTION_COMPATIBILITY], [test "$enable_evolution_compatibility" == "yes"])
74 dnl --enable-developer-mode
75 if test "$enable_developer_mode" == "yes"; then
76 backendsearchdir="`pwd`/src/backends/"
78 backendsearchdir='$(libdir)'/syncevolution/backends/
81 backenddir='$(libdir)'/syncevolution/backends/
83 AC_SUBST(backendsearchdir)
85 dnl This string is sent as part of the SyncML DevInf (device
86 dnl information) structure to the server. All SyncEvolution platforms
87 dnl use "SyncEvolution" as HTTP user agent and "Mod" (model), so the
88 dnl device type is the only way how different kinds of clients can be
90 AC_DEFINE_UNQUOTED(DEVICE_TYPE, "$DEVICE_TYPE", "SyncML DevInf DevType")
92 AC_CHECK_HEADERS(stdarg.h valgrind/valgrind.h execinfo.h)
94 AC_DEFINE(SYNTHESIS, 1, "using Synthesis engine")
96 AC_CONFIG_FILES(Makefile src/dbus/interfaces/Makefile src/dbus/Makefile src/Makefile src/syncevo/Makefile src/syncevo/syncevolution.pc src/gtk-ui/Makefile po/Makefile.in test/Makefile src/dbus/syncevo-dbus.pc)
100 echo CONFIGURATION SUMMARY
101 for backend in $BACKENDS; do
102 eval echo $backend: \${enable_${backend}}
104 echo "DBus service: $enable_dbus_service"
105 echo "UI (DBus client): $enable_gui"