2008-10-08 23:30:06 +02:00
dnl -*- mode: Autoconf; -*-
2008-07-29 23:06:11 +02:00
dnl Invoke autogen.sh to produce a configure script.
2005-10-08 14:03:24 +02:00
2009-09-24 15:22:15 +02:00
AC_INIT([syncevolution], [0.9+0.9.1beta1])
2009-02-24 16:12:02 +01:00
AM_INIT_AUTOMAKE([tar-ustar])
2009-03-13 15:59:46 +01:00
AC_CONFIG_MACRO_DIR([m4])
2009-02-24 16:12:02 +01:00
define([SYNTHESISSRC_REPO], [])
2008-10-11 10:25:45 +02:00
dnl Specify git revisions/branches without prefix, i.e., without 'origin'.
dnl We'll sort that out below.
2009-02-24 16:12:02 +01:00
define([SYNTHESISSRC_REVISION], [syncevolution-0.9])
2005-10-08 14:03:24 +02:00
AM_CONFIG_HEADER(config.h)
2007-03-11 23:13:13 +01:00
AC_LIBTOOL_DLOPEN
2005-10-08 14:03:24 +02:00
2008-03-08 11:02:33 +01:00
dnl default device type (see AC_DEFINE below)
DEVICE_TYPE=desktop
2009-02-24 16:12:02 +01:00
AC_ARG_WITH(synthesis-src,
AS_HELP_STRING([--with-synthesis-src=<base directory|svn URL|git URL>],
[Specifies location of the Synthesis root directory.
Use this when the Synthesis library is to
be compiled as part of the SyncEvolution compilation. In release
versions of SyncEvolution, a copy of the Synthesis code is bundled
under 'src/synthesis' and compiled unless something else is
specified. --with-synthesis-src can be given a path to sources
checked out already, a Subversion repository URL or a git repository
URL. When given a repository URL, then the configure script
will checkout the sources into 'src/synthesis-workdir' or
update that working copy if the directory already exists.
Default: bundled source in src/synthesis (in released SyncEvolution sources),
SYNTHESISSRC_REPO otherwise.]),
[SYNTHESISSRC="$withval"], [SYNTHESISSRC="$SYNTHESISSRC_DEF"; REVISION="SYNTHESISSRC_REVISION"])
AC_ARG_WITH(synthesis-username,
AS_HELP_STRING([--with-synthesis-username=<svn username>],
[username to use when checking out --with-synthesis-src sources from Subversion, default 'guest']),
[USERNAME="$withval"], [USERNAME="guest"])
AC_ARG_WITH(synthesis-revision,
AS_HELP_STRING([--with-synthesis-revision=<git tag/branch/hash or Subversion revision>],
[Identifies which source revision to use from --with-synthesis-src repository, empty string stands for latest. Default for default --synthesis-src: SYNTHESISSRC_REVISION]),
[REVISION="$withval"])
2008-09-14 19:52:08 +02:00
2007-03-11 23:13:13 +01:00
AC_ARG_ENABLE(shared,
AS_HELP_STRING([--enable-shared],
[build backends as dynamically loadable modules]),
enable_shared="$enableval", enable_shared="no")
AC_ARG_ENABLE(static,
AS_HELP_STRING([--enable-static],
[build backends also as static libraries]),
enable_static="$enableval", enable_static="no")
2006-12-01 23:50:17 +01:00
AC_ARG_ENABLE(unit-tests,
AS_HELP_STRING([--enable-unit-tests],
[enables tests embedded in the source code of the library (changes content of executable)]),
enable_unit_tests="$enableval", enable_unit_tests="no")
AC_ARG_ENABLE(integration-tests,
AS_HELP_STRING([--enable-integration-tests],
[enables tests outside of the library (can be used together with normal builds of the library)]),
enable_integration_tests="$enableval", enable_integration_tests="no")
2007-01-21 17:14:48 +01:00
AC_ARG_ENABLE(static-cxx,
AS_HELP_STRING([--enable-static-cxx],
[build executables which contain libstdc++ instead of requiring suitable libstdc++.so to run]),
enable_static_cxx="$enableval", enable_static_cxx="no")
2008-10-08 23:30:06 +02:00
AC_ARG_ENABLE(evolution-compatibility,
AS_HELP_STRING([--enable-evolution-compatibility],
[build executables which only call Evolution via dlopen/dlsym: this avoids all hard dependencies on EDS shared objects, but might lead to crashes when their ABI changes]),
enable_evolution_compatibility="$enableval", enable_evolution_compatibility="no")
2009-09-02 05:13:10 +02:00
AC_ARG_ENABLE(developer-mode,
AC_HELP_STRING([--enable-developer-mode],
[The dynamic loadble backend libraries is loaded from current build directory instead of the standard library path]),
enable_developer_mode="$enableval", enable_developer_mode="no")
2007-03-24 16:47:22 +01:00
# Maemo hacks:
# - set the (non-standard!) DBUS_DEFAULT_TIMEOUT
# - wrap e_book_from_string() to fix invalid parameter
# - don't use UTF-8 encoding in Perl script
AC_ARG_ENABLE(maemo,
AS_HELP_STRING([--enable-maemo],
[enables some hacks which work around problems with the Maemo 2.0 until at least 3.0 EDS-Dbus]),
[AC_DEFINE(ENABLE_MAEMO, 1, [enable Maemo hacks])
2008-03-08 11:02:33 +01:00
DEVICE_TYPE=Maemo
2007-03-25 22:19:42 +02:00
MODIFY_SYNCCOMPARE='-e "s/use encoding/#use encoding/;" -e "s/:utf8//;"'])
2007-03-24 16:47:22 +01:00
AC_SUBST(MODIFY_SYNCCOMPARE)
2008-05-02 21:05:37 +02:00
AC_CHECK_HEADERS(signal.h dlfcn.h)
2007-01-03 21:12:47 +01:00
2006-12-01 23:50:17 +01:00
# cppunit needed?
if test $enable_unit_tests == "yes" || test $enable_integration_tests == yes; then
CPPUNIT_CXXFLAGS=`cppunit-config --cflags` || AC_MSG_ERROR("cppunit-config --cflags failed - is it installed?")
CPPUNIT_LDFLAGS=`cppunit-config --libs` || AC_MSG_ERROR("cppunit-config --libs failed - is it installed?")
fi
AC_SUBST(CPPUNIT_CXXFLAGS)
AC_SUBST(CPPUNIT_LDFLAGS)
2009-03-13 15:59:46 +01:00
if test "$enable_unit_tests" = "yes"; then
2006-12-01 23:50:17 +01:00
AC_DEFINE(ENABLE_UNIT_TESTS, 1, [enable unit tests inside the library's source code])
fi
2009-03-13 15:59:46 +01:00
AM_CONDITIONAL([ENABLE_UNIT_TESTS], [test "$enable_unit_tests" = "yes"])
AM_CONDITIONAL([ENABLE_TESTING], [test "$enable_unit_tests" = "yes" || test "$enable_integration_tests" = "yes" ])
2006-12-01 23:50:17 +01:00
2007-01-21 17:14:48 +01:00
if test $enable_static_cxx == "yes"; then
LIBS="$LIBS -L."
CORE_LDADD_DEP=libstdc++.a
fi
AC_SUBST(CORE_LDADD_DEP)
2009-02-24 16:12:02 +01:00
# preserve src/synthesis by default,
2008-09-14 19:52:08 +02:00
# always
2009-02-24 16:12:02 +01:00
CLEAN_SYNTHESIS_SRC=
SYNTHESIS_LIB=$PWD/src/build-synthesis/src/libsynthesissdk.la
2008-04-06 12:07:04 +02:00
2007-03-26 21:09:12 +02:00
AC_SUBST(CLEAN_CLIENT_SRC)
2009-02-15 15:22:07 +01:00
# Check for transport layer.
# Both curl and libsoup can be enabled and disabled explicitly.
# The default is to use libsoup if available, otherwise curl.
2008-08-17 11:26:34 +02:00
AC_MSG_CHECKING([for libcurl])
2009-02-15 15:22:07 +01:00
if LIBCURL_LIBS=`sh -c 'curl-config --libs' 2>&AS_MESSAGE_LOG_FD` && \
LIBCURL_CFLAGS=`sh -c 'curl-config --cflags' 2>&AS_MESSAGE_LOG_FD`; then
AC_MSG_RESULT([yes])
have_libcurl="yes"
2008-08-17 11:26:34 +02:00
else
2009-02-15 15:22:07 +01:00
AC_MSG_RESULT([no])
have_libcurl="no"
fi
2009-05-08 10:33:06 +02:00
PKG_CHECK_MODULES(LIBSOUP, libsoup-gnome-2.4,
[have_libsoup="yes"
AC_DEFINE(HAVE_LIBSOUP_SOUP_GNOME_FEATURES_H, 1, [enable GNOME specific libsoup])],
[PKG_CHECK_MODULES(LIBSOUP, libsoup-2.4,
have_libsoup="yes",
have_libsoup="no")])
2009-02-15 15:22:07 +01:00
TRANSPORT=
TRANSPORT_LIBS=
TRANSPORT_CFLAGS=
2009-07-09 18:58:21 +02:00
AC_ARG_WITH(ca-certificates,
AS_HELP_STRING([--with-ca-certificates=<colon separated list of files>],
[Specifies location of one or more CA certificate files.
This sets the default value for the SSLServerCertificates option.
Default: empty when using libcurl (because it has its own default),
a list of paths known to work for Debian and Red Hat otherwise.]),
[CA_CERTIFICATES="$withval"])
2009-02-15 15:22:07 +01:00
# choose default transport (mirrors code in EvolutionSyncClient::createTransportAgent())
if test "$have_libsoup" = "yes"; then
default_transport="libsoup"
elif test "$have_libcurl" = "yes"; then
default_transport="libcurl"
2008-08-17 11:26:34 +02:00
fi
2009-02-15 15:22:07 +01:00
AC_ARG_ENABLE(libcurl,
AC_HELP_STRING([--enable-libcurl],
[enable libcurl as transport layer]),
[ if test "$enableval" = "yes"; then
test "$have_libcurl" = "yes" || AC_MSG_ERROR([libcurl not found])
TRANSPORT="$TRANSPORT libcurl"
TRANSPORT_LIBS="$TRANSPORT_LIBS $LIBCURL_LIBS"
TRANSPORT_CFLAGS="$TRANSPORT_CFLAGS $LIBCURL_CFLAGS"
AC_DEFINE(ENABLE_LIBCURL, 1, [enable libcurl transport])
else
libcurl_disabled="yes"
fi ],
[ if test "$have_libcurl" = "yes" && test "$default_transport" = "libcurl" ; then
TRANSPORT="$TRANSPORT libcurl"
TRANSPORT_LIBS="$TRANSPORT_LIBS $LIBCURL_LIBS"
TRANSPORT_CFLAGS="$TRANSPORT_CFLAGS $LIBCURL_CFLAGS"
AC_DEFINE(ENABLE_LIBCURL, 1, [enable libcurl transport])
fi ])
AC_ARG_ENABLE(libsoup,
AC_HELP_STRING([--enable-libsoup],
[enable libsoup as transport layer]),
[ if test "$enableval" = "yes"; then
test "$have_libsoup" = "yes" || AC_MSG_ERROR([libsoup not found])
TRANSPORT="$TRANSPORT libsoup"
TRANSPORT_LIBS="$TRANSPORT_LIBS $LIBSOUP_LIBS"
TRANSPORT_CFLAGS="$TRANSPORT_CFLAGS $LIBSOUP_CFLAGS"
AC_DEFINE(ENABLE_LIBSOUP, 1, [enable libsoup transport])
else
libsoup_disabled="yes"
fi ],
[ if test "$have_libsoup" = "yes" && test "$default_transport" = "libsoup"; then
TRANSPORT="$TRANSPORT libsoup"
TRANSPORT_LIBS="$TRANSPORT_LIBS $LIBSOUP_LIBS"
TRANSPORT_CFLAGS="$TRANSPORT_CFLAGS $LIBSOUP_CFLAGS"
AC_DEFINE(ENABLE_LIBSOUP, 1, [enable libsoup transport])
fi ])
if test ! "$TRANSPORT" &&
test "$libsoup_disabled" != "yes" &&
test "$libcurl_disabled" != "yes"; then
AC_ERROR([no transport library found, configure with --disable-libcurl --disable-libsoup to continue anyway (only useful if users of libsyncevolution provide transport implementation)])
2008-08-17 11:26:34 +02:00
fi
2009-07-09 18:58:21 +02:00
# for libsoup we must specify the SSL certificate file outself
if test "$libsoup_disabled" != "yes" && test -z "$CA_CERTIFICATES"; then
# Debian and Red Hat paths
2009-07-17 16:21:25 +02:00
CA_CERTIFICATES="/etc/ssl/certs/ca-certificates.crt:/etc/pki/tls/certs/ca-bundle.crt:/usr/share/ssl/certs/ca-bundle.crt"
2009-07-09 18:58:21 +02:00
fi
AC_DEFINE_UNQUOTED(SYNCEVOLUTION_SSL_SERVER_CERTIFICATES, "$CA_CERTIFICATES", [default value for SSLServerCertificates option])
2009-02-15 15:22:07 +01:00
AC_SUBST(TRANSPORT_LIBS)
AC_SUBST(TRANSPORT_CFLAGS)
2009-04-07 21:11:55 +02:00
# for dbus interface file mangling
AC_PATH_PROG(XSLT, xsltproc)
2009-04-07 14:36:02 +02:00
AC_ARG_ENABLE(gui,
2009-04-24 17:23:03 +02:00
AS_HELP_STRING([--enable-gui[=gui type]],
2009-04-29 10:01:35 +02:00
[enables building the GTK+ UI that uses the SyncEvolution DBus API.
2009-07-27 12:38:53 +02:00
Options: gtk, moblin, all (builds sync-ui-gtk and sync-ui-moblin)
2009-04-29 10:01:35 +02:00
"gtk" is the default for --enable-gui without type. No GUI is
2009-07-09 15:03:43 +02:00
built when --enable-gui is not used.
--enable-gui implies --enable-dbus.]),
2009-04-24 17:23:03 +02:00
[ if test "$enableval" = "gtk" ; then
enable_gui=gtk
elif test "$enableval" = "yes" ; then
enable_gui=gtk
elif test "$enableval" = "moblin" ; then
enable_gui=moblin
elif test "$enableval" = "no" ; then
enable_gui=no
2009-07-27 12:38:53 +02:00
elif test "$enableval" = "all" ; then
enable_gui=all
2009-04-24 17:23:03 +02:00
else
AC_ERROR([Unknown gui type: '$enableval'])
fi
2009-04-29 10:01:35 +02:00
],
[ enable_gui=no ])
2009-04-24 17:23:03 +02:00
AM_CONDITIONAL([COND_GUI], [test "$enable_gui" != "no"])
2009-04-07 14:36:02 +02:00
2009-04-24 17:23:03 +02:00
if test $enable_gui == "moblin"; then
AC_DEFINE(USE_MOBLIN_UX, 1, [Use the MUX widget library])
fi
2009-04-07 14:36:02 +02:00
2009-07-09 15:03:43 +02:00
AC_ARG_ENABLE(dbus-service,
AS_HELP_STRING([--enable-dbus-service],
[enables building the dbus service executable and the wrapper library for it]),
enable_dbus_service="$enableval",
[if test $enable_gui == "no"; then
enable_dbus_service="no"
else
enable_dbus_service="yes"
fi])
AM_CONDITIONAL([COND_DBUS], [test "$enable_dbus_service" = "yes"])
if test $enable_gui != "no" && test $enable_dbus_service == "no"; then
AC_ERROR([cannot build GUI without building the D-Bus service])
fi
2009-09-21 10:07:05 +02:00
PKG_CHECK_MODULES(KEYRING, [gnome-keyring-1], HAVE_KEYRING=yes, HAVE_KEYRING=no)
if test $HAVE_KEYRING == "yes"; then
AC_DEFINE(USE_GNOME_KEYRING, 1, [define if gnome keyring should be used in dbus service])
2009-09-25 04:21:03 +02:00
PKG_CHECK_MODULES([KEYRING_2_20], [gnome-keyring-1 >= 2.20 ], KEYRING220=yes, KEYRING220=no)
if test $KEYRING220 == "yes"; then
AC_DEFINE(GNOME_KEYRING_220, 1, [define if gnome keyring version is above 2.20])
fi
2009-09-21 10:07:05 +02:00
fi
2009-07-09 15:03:43 +02:00
if test $enable_dbus_service == "yes"; then
PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 glib-2.0)
AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
2009-07-14 11:02:47 +02:00
if test -z "$XSLT"; then
AC_ERROR([xsltproc not found, is required for D-Bus service])
fi
2009-07-09 15:03:43 +02:00
fi
AC_SUBST(DBUS_GLIB_CFLAGS)
AC_SUBST(DBUS_GLIB_LIBS)
AC_SUBST(KEYRING_CFLAGS)
AC_SUBST(KEYRING_LIBS)
AC_SUBST(LIBEXECDIR)
DBUS_SERVICES_DIR="${datadir}/dbus-1/services"
AC_SUBST(DBUS_SERVICES_DIR)
AC_DEFINE_UNQUOTED(DBUS_SERVICES_DIR, "$DBUS_SERVICES_DIR", [Location of D-Bus services directory])
2009-06-03 18:16:13 +02:00
2009-07-27 12:38:53 +02:00
# decide which sync-ui(s) we are building:
# sync-ui (in either GTK or Moblin mode) or both (in separate binaries)
case $enable_gui in
all) GUI_PROGRAMS='sync-ui-gtk${EXEEXT} sync-ui-moblin${EXEEXT}'; GUI_DESKTOP_FILES="sync-gtk.desktop sync-moblin.desktop";;
gtk|moblin) GUI_PROGRAMS='sync-ui${EXEEXT}'; GUI_DESKTOP_FILES="sync.desktop";;
no) GUI_PROGRAMS=; GUI_DESKTOP_FILES=;;
*) AC_ERROR([Unknown enable_gui type: '$enable_gui'])
esac
2009-04-24 17:23:03 +02:00
if test $enable_gui != "no"; then
2009-06-17 16:17:59 +02:00
gui_modules="glib-2.0 dbus-glib-1 >= 0.60 gtk+-2.0 libglade-2.0 gconf-2.0 gio-2.0 gnome-keyring-1"
2009-06-03 18:16:13 +02:00
PKG_CHECK_MODULES(UNIQUE, unique-1.0,
have_unique="yes",
have_unique="no")
if test $have_unique == "yes"; then
gui_modules="$gui_modules unique-1.0"
AC_DEFINE(ENABLE_UNIQUE, 1, [enable single-app-instance functionality])
fi
PKG_CHECK_MODULES(GUI, $gui_modules)
2009-04-07 14:36:02 +02:00
AC_PATH_PROG([GTK_BUILDER_CONV], gtk-builder-convert)
2009-05-06 17:51:59 +02:00
IT_PROG_INTLTOOL([0.37.1])
2009-05-06 09:44:40 +02:00
GETTEXT_PACKAGE=syncevolution
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [The gettext package name])
AM_GLIB_GNU_GETTEXT
SYNCEVOLUTION_LOCALEDIR=[${datadir}/locale]
2009-05-06 16:56:04 +02:00
else
INTLTOOL_UPDATE="true"
USE_NLS="no"
2009-04-07 14:36:02 +02:00
fi
2009-05-06 09:44:40 +02:00
AC_SUBST(SYNCEVOLUTION_LOCALEDIR)
AC_SUBST(GETTEXT_PACKAGE)
2009-04-07 14:36:02 +02:00
AC_SUBST(GUI_CFLAGS)
AC_SUBST(GUI_LIBS)
2009-07-27 12:38:53 +02:00
AC_SUBST(GUI_PROGRAMS)
AC_SUBST(GUI_DESKTOP_FILES)
2009-04-07 14:36:02 +02:00
2009-06-10 17:28:45 +02:00
# Boost headers: boost/foreach.hpp is needed (1.33/Debian Etch
# doesn't have it, 1.34/Ubuntu 8.10 Hardy does). 1.35 is available
# as Debian Etch backport.
AX_BOOST_BASE(1.34)
2009-03-27 16:18:32 +01:00
2009-02-24 16:12:02 +01:00
# absolute patch to source of Synthesis client library
SYNTHESIS_SRC=no-synthesis-source
AC_SUBST(SYNTHESIS_SRC)
if test "$SYNTHESISSRC" && test "$SYNTHESISSRC" != "none"; then
# default: checkout a copy of the sources, remove it during maintainer-clean and distclean
CLEAN_CLIENT_SRC=synthesis-workdir
SYNTHESIS_SRC=$PWD/src/synthesis-workdir
AC_MSG_NOTICE( [updating the content of $SYNTHESIS_SRC from $SYNTHESISSRC] )
case "$SYNTHESISSRC" in
2009-05-08 15:21:51 +02:00
*.git) protocol=git;;
2009-02-24 16:12:02 +01:00
*://*) protocol="`echo $SYNTHESISSRC | sed -e 's;://.*;;'`";;
*) protocol="file";;
esac
mkdir -p src
case $protocol in
file)
# use existing copy of the sources
CLEAN_CLIENT_SRC=
case "$SYNTHESISSRC" in
/*) SYNTHESIS_SRC="$SYNTHESISSRC";;
*) SYNTHESIS_SRC="$PWD/$SYNTHESISSRC";;
esac
;;
*svn*|*http*)
SYNTHESISSRCREV="$SYNTHESISSRC"
if test "$REVISION"; then
revarg="-r $REVISION "
if `echo $SYNTHESISSRC | grep '@[0123456789]*'` >/dev/null; then
:
else
SYNTHESISSRCREV="$SYNTHESISSRC@$REVISION"
fi
fi
if test -d $SYNTHESIS_SRC ; then
( set -x; cd $SYNTHESIS_SRC && svn --username=$USERNAME switch $revarg "$SYNTHESISSRC" ) || AC_ERROR([updating from $SYNTHESISSRC failed])
else
(set -x; svn --username=$USERNAME checkout $revarg "$SYNTHESISSRCREV" $SYNTHESIS_SRC ) || AC_ERROR([checking out $SYNTHESISSRC failed])
fi
;;
2009-04-03 15:31:25 +02:00
*)
2009-02-24 16:12:02 +01:00
if test -d $SYNTHESIS_SRC ; then
( set -x; cd $SYNTHESIS_SRC && git fetch "$SYNTHESISSRC" ) || AC_ERROR([updating from $SYNTHESISSRC failed])
else
( set -x; git clone "$SYNTHESISSRC" $SYNTHESIS_SRC ) || AC_ERROR([cloning $SYNTHESISSRC failed])
fi
if test "$REVISION"; then
# git 1.6 finds tags and branches without explicit prefix, 1.4.4.4 doesn't
( set -x; cd $SYNTHESIS_SRC &&
(git checkout "$REVISION" ||
git checkout "tags/$REVISION" ||
git checkout "origin/$REVISION") ) || AC_ERROR([checking out $SYNTHESISSRC failed])
fi
;;
esac
elif test "$SYNTHESISSRC" != "none" && test -d $srcdir/src/synthesis; then
# use existing copy of the sources; beware of
# out-of-tree compilation
case $srcdir in
/*) SYNTHESIS_SRC="$srcdir/src/synthesis";;
*) SYNTHESIS_SRC="$PWD/$srcdir/src/synthesis";;
esac
else
PKG_CHECK_MODULES(SYNTHESIS, "synthesis")
fi
2009-02-15 15:22:07 +01:00
2009-02-24 16:12:02 +01:00
if test $SYNTHESIS_SRC != "no-synthesis-source"; then
( cd $SYNTHESIS_SRC && ( test -f configure || sh autogen.sh ) ) || AC_MSG_ERROR([no configure script in $SYNTHESIS_SRC])
SYNTHESIS_CONFIGURE="$SYNTHESIS_SRC/configure"
chmod u+x $SYNTHESIS_SRC/configure $SYNTHESIS_SRC/config.sub $SYNTHESIS_SRC/config.guess
# use local copy of the sources, with dependencies
# to trigger building the synthesis library
SYNTHESIS_SUBDIR=$PWD/src/build-synthesis
SYNTHESIS_DEP=$PWD/src/build-synthesis/src/libsynthesissdk.la
SYNTHESIS_CFLAGS="-I$SYNTHESIS_SUBDIR/src"
SYNTHESIS_LIBS="-L$SYNTHESIS_SUBDIR/src -lsynthesissdk -lsynthesis"
AC_MSG_NOTICE( [configuring the Synthesis library] )
2009-02-27 09:56:13 +01:00
if (set -x; mkdir -p $SYNTHESIS_SUBDIR && cd $SYNTHESIS_SUBDIR && eval "\$SHELL \"\$SYNTHESIS_CONFIGURE\" $ac_configure_args \"--srcdir=\$SYNTHESIS_SRC\" " ); then true; else
2009-02-24 16:12:02 +01:00
AC_MSG_ERROR( [configuring Synthesis library failed] )
fi
fi
AC_SUBST(SYNTHESIS_CFLAGS)
AC_SUBST(SYNTHESIS_LIBS)
AC_SUBST(SYNTHESIS)
AC_SUBST(SYNTHESIS_SUBDIR)
AC_SUBST(SYNTHESIS_DEP)
AC_SUBST(SYNTHESIS_LIB)
AC_SUBST(SYNTHESISSRC)
2005-10-08 14:03:24 +02:00
2007-08-13 22:46:49 +02:00
dnl select backends
2008-07-28 22:48:26 +02:00
BACKENDS=""
2008-07-29 23:06:11 +02:00
2008-07-30 19:30:10 +02:00
# AC_ARG_ENABLE_BACKEND(BACKEND, DIR, HELP-STRING, [ACTION-IF-GIVEN],
2008-07-28 22:48:26 +02:00
# [ACTION-IF-NOT-GIVEN])
#
# Same as AC_ARG_ENABLE(), but also tells configure that the
# backend exists.
2008-07-30 19:30:10 +02:00
#
# BACKEND = name of modules built in that dir as .la files without the
# obligatory sync prefix, e.g. "ebook"
# DIR = name of the directory inside src/backends, e.g., "evolution"
2008-07-28 22:48:26 +02:00
AC_DEFUN([AC_ARG_ENABLE_BACKEND],
[
2008-07-30 19:30:10 +02:00
AC_ARG_ENABLE($1, $3, $4, $5)
2008-07-28 22:48:26 +02:00
BACKENDS="$BACKENDS $1"
2008-07-30 22:11:12 +02:00
BACKEND_DEFINES="$BACKEND_DEFINES ENABLE_`echo $1 | tr a-z A-Z`"
2008-07-30 19:30:10 +02:00
for source in $2; do
SYNCSOURCES="$SYNCSOURCES backends/$2/sync$1.la"
done
2008-07-28 22:48:26 +02:00
])
2008-07-30 19:30:10 +02:00
AC_SUBST(SYNCSOURCES)
2008-07-30 22:11:12 +02:00
AC_SUBST(BACKEND_DEFINES)
2008-07-28 22:48:26 +02:00
2009-02-24 16:12:02 +01:00
BACKEND_CPPFLAGS="$SYNTHESIS_CFLAGS $EPACKAGE_CFLAGS $EBOOK_CFLAGS $ECAL_CFLAGS $GLIB_CFLAGS"
AC_SUBST(BACKEND_CPPFLAGS)
2008-07-29 23:06:11 +02:00
dnl src/backends/*/configure-sub.in and configure-post.in follow