2005-10-08 14:03:24 +02:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
|
2006-03-11 20:23:43 +01:00
|
|
|
AC_INIT(src/syncevolution.cpp)
|
2008-07-02 23:08:38 +02:00
|
|
|
AM_INIT_AUTOMAKE(syncevolution, 0.8-beta1)
|
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
|
|
|
|
|
2006-12-01 23:50:17 +01:00
|
|
|
# command used to configure client library, including options
|
|
|
|
CLIENT_CONFIGURE=$PWD/src/client-api/build/autotools/configure
|
|
|
|
|
2008-07-21 21:12:32 +02:00
|
|
|
AC_ARG_WITH(funambol,
|
|
|
|
AS_HELP_STRING([--with-funambol=<base directory>],
|
|
|
|
[specifies location of Funambol client library]),
|
|
|
|
[FUNAMBOL="$withval"])
|
|
|
|
|
2005-10-08 14:03:24 +02:00
|
|
|
AC_ARG_WITH(sync4j,
|
2008-07-21 21:12:32 +02:00
|
|
|
AS_HELP_STRING([--with-funambol=<base directory>],
|
|
|
|
[alias for --with-funambol]),
|
|
|
|
[FUNAMBOL="$withval"])
|
|
|
|
|
|
|
|
AC_ARG_WITH(funambol-src,
|
|
|
|
AS_HELP_STRING([--with-funambol-src=<base directory>],
|
|
|
|
[specifies location of the Funambol '3x/client-api/native' source code]),
|
|
|
|
[FUNAMBOLSRC="$withval"])
|
2006-03-12 10:48:59 +01:00
|
|
|
|
|
|
|
AC_ARG_WITH(sync4j-src,
|
|
|
|
AS_HELP_STRING([--with-sync4j-src=<base directory>],
|
2008-07-21 21:12:32 +02:00
|
|
|
[alias for --with-funambol-src]),
|
|
|
|
[FUNAMBOLSRC="$withval"])
|
2006-03-12 10:48:59 +01: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")
|
|
|
|
|
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)
|
|
|
|
|
2007-03-25 22:19:42 +02:00
|
|
|
# Another Maemo hack:
|
|
|
|
# - link main binaries against precompiled, patched libdbus-1.a
|
|
|
|
AC_ARG_WITH(patched-libdbus,
|
|
|
|
AS_HELP_STRING([--with-patched-libdbus=<absolute path of directory with patched libdbus-1.a/so>],
|
|
|
|
[link main executables against special libdbus-1.a, for example one which supports DBUS_DEFAULT_TIMEOUT (required for Maemo)]),
|
|
|
|
[LIBDBUS="-L$withval"])
|
|
|
|
AC_SUBST(LIBDBUS)
|
|
|
|
|
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?")
|
|
|
|
CPPUNIT_TESTS=client-test
|
|
|
|
fi
|
|
|
|
AC_SUBST(CPPUNIT_CXXFLAGS)
|
|
|
|
AC_SUBST(CPPUNIT_LDFLAGS)
|
|
|
|
AC_SUBST(CPPUNIT_TESTS)
|
|
|
|
|
|
|
|
if test $enable_unit_tests == "yes"; then
|
|
|
|
CLIENT_CONFIGURE="$CLIENT_CONFIGURE --enable-unit-tests"
|
|
|
|
AC_DEFINE(ENABLE_UNIT_TESTS, 1, [enable unit tests inside the library's source code])
|
|
|
|
fi
|
|
|
|
if test $enable_integration_tests == "yes"; then
|
|
|
|
CLIENT_CONFIGURE="$CLIENT_CONFIGURE --enable-integration-tests"
|
|
|
|
AC_DEFINE(ENABLE_INTEGRATION_TESTS, 1, [enable unit tests outside of the library's source code])
|
|
|
|
fi
|
|
|
|
|
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)
|
|
|
|
|
2007-03-26 21:09:12 +02:00
|
|
|
# preserve src/client-api by default
|
|
|
|
CLEAN_CLIENT_SRC=
|
2008-07-21 21:12:32 +02:00
|
|
|
FUNAMBOL_LIB=$PWD/src/client-api.build/src/libfunambol.la
|
2008-04-06 12:07:04 +02:00
|
|
|
|
2007-03-26 21:09:12 +02:00
|
|
|
AC_SUBST(CLEAN_CLIENT_SRC)
|
|
|
|
|
2008-07-28 22:48:26 +02:00
|
|
|
# list of backend names (--enable-<name>, $enable_<name>)
|
|
|
|
BACKENDS=
|
|
|
|
|
2008-07-21 21:12:32 +02:00
|
|
|
if test ! "$FUNAMBOL"; then
|
|
|
|
if test "$FUNAMBOLSRC"; then
|
2007-03-26 21:09:12 +02:00
|
|
|
# make a copy of the sources, remove it during maintainer-clean and distclean
|
|
|
|
CLEAN_CLIENT_SRC=client-api
|
|
|
|
|
2008-07-21 21:12:32 +02:00
|
|
|
AC_MSG_NOTICE( [updating the content of src/client-api from $FUNAMBOLSRC] )
|
2006-03-12 10:48:59 +01:00
|
|
|
mkdir -p src/client-api
|
2007-08-19 21:11:20 +02:00
|
|
|
if cp --help 2>/dev/null | grep >/dev/null -e "--update"; then
|
|
|
|
# GNU cp
|
|
|
|
cp_opts="--update --archive"
|
|
|
|
else
|
|
|
|
cp_opts="-r"
|
|
|
|
fi
|
|
|
|
|
2008-07-21 21:12:32 +02:00
|
|
|
if cp $cp_opts $FUNAMBOLSRC/* src/client-api; then
|
2006-08-06 16:42:13 +02:00
|
|
|
( cd src/client-api/build/autotools && ( test -f configure || sh autogen.sh ) )
|
|
|
|
else
|
2008-07-21 21:12:32 +02:00
|
|
|
AC_MSG_ERROR( [copying $FUNAMBOLSRC into src/client-api failed] )
|
2006-03-12 10:48:59 +01:00
|
|
|
fi
|
2007-01-04 21:52:38 +01:00
|
|
|
find src/client-api/build/autotools/win* -name output | xargs rm -rf
|
2006-06-10 14:21:35 +02:00
|
|
|
find src/client-api/build/autotools/include/* src/client-api/build/autotools/src/* -type d | xargs rm -rf
|
|
|
|
find src/client-api -name "*~*" -o -name ".#*" -o -name "*.orig" -o -name "stamp-*" -o -name "*.o" -o -name "*.lo" -o -name .libs -o -name autom4te.cache -o -name config.status | xargs rm -rf
|
2006-03-12 10:48:59 +01:00
|
|
|
else
|
|
|
|
if test ! -d src/client-api; then
|
|
|
|
if test -d $srcdir/src/client-api; then
|
|
|
|
mkdir -p src
|
|
|
|
case $srcdir in
|
|
|
|
/*) ln -s $srcdir/src/client-api src/client-api;;
|
|
|
|
*) ln -s $PWD/$srcdir/src/client-api src/client-api;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2006-04-06 19:02:43 +02:00
|
|
|
if test -f src/client-api/build/autotools/configure; then
|
|
|
|
chmod u+x src/client-api/build/autotools/configure src/client-api/build/autotools/config.sub src/client-api/build/autotools/config.guess
|
|
|
|
|
2008-04-06 12:07:04 +02:00
|
|
|
# use local copy of the sources, with dependencies
|
|
|
|
# to trigger building the client library
|
2008-07-21 21:12:32 +02:00
|
|
|
FUNAMBOL_SUBDIR=$PWD/src/client-api.build
|
|
|
|
FUNAMBOL_DEP=$PWD/src/client-api.build/src/libfunambol.la
|
2006-03-12 10:48:59 +01:00
|
|
|
|
2008-07-21 21:12:32 +02:00
|
|
|
FUNAMBOL_CFLAGS="-I$FUNAMBOL_SUBDIR/include/posix -I$FUNAMBOL_SUBDIR/include/common -I$FUNAMBOL_SUBDIR/include -I$FUNAMBOL_SUBDIR/test"
|
|
|
|
FUNAMBOL_LIBS="-L$FUNAMBOL_SUBDIR/src -lfunambol"
|
2006-03-12 10:48:59 +01:00
|
|
|
|
|
|
|
AC_MSG_NOTICE( [configuring the client library] )
|
2008-07-12 20:44:15 +02:00
|
|
|
# Passing some specific configure arguments to the client library's
|
|
|
|
# configure makes sense (e.g., --enable-unit-tests) or is
|
|
|
|
# required (--disable-dependency-tracking when compiling for
|
|
|
|
# multiple architectures on Mac OS X).
|
|
|
|
cxx_lib_args=`for i in --disable-dependency-tracking --enable-unit-tests; do
|
|
|
|
if echo $ac_configure_args | grep -e $i >/dev/null; then
|
|
|
|
echo $i;
|
|
|
|
fi;
|
|
|
|
done`
|
2008-07-21 21:12:32 +02:00
|
|
|
if (set -x; mkdir -p $FUNAMBOL_SUBDIR && cd $FUNAMBOL_SUBDIR && $CLIENT_CONFIGURE --build=$build_alias --host=$host_alias --target=$target_alias --disable-shared $cxx_lib_args); then true; else
|
2006-03-12 10:48:59 +01:00
|
|
|
AC_MSG_ERROR( [configuring client library failed] )
|
|
|
|
fi
|
|
|
|
else
|
2008-07-21 21:12:32 +02:00
|
|
|
AC_MSG_ERROR( [either --with-funambol or --with-funambol-src have to be used] )
|
2006-03-12 10:48:59 +01:00
|
|
|
fi
|
|
|
|
else
|
2008-07-21 21:12:32 +02:00
|
|
|
if test -f $FUNAMBOL/include/funambol/common/spds/SyncItem.h; then
|
|
|
|
FUNAMBOL_CFLAGS="-I$FUNAMBOL/include/funambol/posix -I$FUNAMBOL/include/funambol/common -I$FUNAMBOL/include/funambol"
|
|
|
|
FUNAMBOL_LIBS="-L$FUNAMBOL/lib -lfunambol"
|
2006-03-12 10:48:59 +01:00
|
|
|
else
|
2008-07-21 21:12:32 +02:00
|
|
|
AC_MSG_ERROR( [$FUNAMBOL does seem to be valid (e.g. include/funambol/spds/common/SyncItem.h is missing)] )
|
2006-03-12 10:48:59 +01:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2008-07-21 21:12:32 +02:00
|
|
|
AC_SUBST(FUNAMBOL_CFLAGS)
|
|
|
|
AC_SUBST(FUNAMBOL_LIBS)
|
|
|
|
AC_SUBST(FUNAMBOL)
|
|
|
|
AC_SUBST(FUNAMBOL_SUBDIR)
|
|
|
|
AC_SUBST(FUNAMBOL_DEP)
|
|
|
|
AC_SUBST(FUNAMBOL_LIB)
|
|
|
|
AC_SUBST(FUNAMBOLSRC)
|
2005-10-08 14:03:24 +02:00
|
|
|
|
2007-03-26 21:43:24 +02:00
|
|
|
pkg_emodules_10="libedataserver-1.0"
|
|
|
|
pkg_emodules_11="libedataserver-1.1"
|
|
|
|
pkg_emodules_12="libedataserver-1.2"
|
2007-03-11 23:13:13 +01:00
|
|
|
pkg_ebook_10="libebook-1.0"
|
|
|
|
pkg_ebook_11="libebook-1.1"
|
|
|
|
pkg_ebook_12="libebook-1.2"
|
2007-03-26 21:43:24 +02:00
|
|
|
pkg_ecal_10="libecal-1.0"
|
|
|
|
pkg_ecal_11="libecal-1.1"
|
|
|
|
pkg_ecal_12="libecal-1.2"
|
2005-10-08 14:03:24 +02:00
|
|
|
|
|
|
|
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/lib/pkgconfig:$prefix/lib/pkgconfig:/usr/local/lib/pkgconfig
|
|
|
|
|
2007-03-26 21:43:24 +02:00
|
|
|
anymissing="
|
2006-08-19 14:37:30 +02:00
|
|
|
Please install the development packages of Evolution and/or
|
|
|
|
set the PKG_CONFIG_PATH variable so that it points towards
|
2007-03-26 21:43:24 +02:00
|
|
|
the .pc files of libedataserver, libecal and libebook (the
|
|
|
|
latter two are optional).
|
2006-08-19 14:37:30 +02:00
|
|
|
|
|
|
|
You can check that these packages are available by running
|
|
|
|
pkg-config --list-all."
|
|
|
|
|
2007-03-26 21:43:24 +02:00
|
|
|
evomissing="No compatible evolution-data-server was found.
|
|
|
|
$anymissing"
|
|
|
|
|
2007-03-11 23:13:13 +01:00
|
|
|
dnl check for Evolution core packages
|
|
|
|
PKG_CHECK_MODULES(EPACKAGE, [$pkg_emodules_12], EDSFOUND=yes, [EDSFOUND=no])
|
|
|
|
if test "x${EDSFOUND}" = "xno"; then
|
2007-03-26 21:43:24 +02:00
|
|
|
PKG_CHECK_MODULES(EPACKAGE, [$pkg_emodules_11], EDSFOUND=yes, [EDSFOUND=no])
|
|
|
|
if test "x${EDSFOUND}" = "xno"; then
|
2007-08-13 22:46:49 +02:00
|
|
|
PKG_CHECK_MODULES(EPACKAGE, [$pkg_emodules_10], EDSFOUND=yes, [EDSFOUND=no])
|
2007-03-26 21:43:24 +02:00
|
|
|
fi
|
2005-10-08 14:03:24 +02:00
|
|
|
fi
|
|
|
|
AC_SUBST(EPACKAGE_CFLAGS)
|
|
|
|
AC_SUBST(EPACKAGE_LIBS)
|
|
|
|
|
2007-03-11 23:13:13 +01:00
|
|
|
dnl check for Evolution calendar packages
|
|
|
|
PKG_CHECK_MODULES(ECAL, [$pkg_ecal_12], ECALFOUND=yes, [ECALFOUND=no])
|
|
|
|
if test "x${ECALFOUND}" = "xno"; then
|
|
|
|
PKG_CHECK_MODULES(ECAL, [$pkg_ecal_11], ECALFOUND=yes, [ECALFOUND=no])
|
|
|
|
if test "x${ECALFOUND}" = "xno"; then
|
|
|
|
PKG_CHECK_MODULES(ECAL, [$pkg_ecal_10], ECALFOUND=yes, [ECALFOUND=no])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_SUBST(ECAL_CFLAGS)
|
|
|
|
AC_SUBST(ECAL_LIBS)
|
|
|
|
|
|
|
|
dnl check for Evolution contact packages
|
|
|
|
PKG_CHECK_MODULES(EBOOK, [$pkg_ebook_12], EBOOKFOUND=yes, [EBOOKFOUND=no])
|
|
|
|
if test "x${EBOOKFOUND}" = "xno"; then
|
|
|
|
PKG_CHECK_MODULES(EBOOK, [$pkg_ebook_11], EBOOKFOUND=yes, [EBOOKFOUND=no])
|
|
|
|
if test "x${EBOOKFOUND}" = "xno"; then
|
|
|
|
PKG_CHECK_MODULES(EBOOK, [$pkg_ebook_10], EBOOKFOUND=yes, [EBOOKFOUND=no])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_SUBST(EBOOK_CFLAGS)
|
|
|
|
AC_SUBST(EBOOK_LIBS)
|
|
|
|
|
2007-08-13 22:46:49 +02:00
|
|
|
|
|
|
|
dnl check for sqlite
|
|
|
|
PKG_CHECK_MODULES(SQLITE, sqlite3, SQLITEFOUND=yes, [SQLITEFOUND=no])
|
|
|
|
AC_SUBST(SQLITE_CFLAGS)
|
|
|
|
AC_SUBST(SQLITE_LIBS)
|
|
|
|
|
2007-08-19 21:11:20 +02:00
|
|
|
dnl hard-coded settings for Mac OS X AddressBook
|
|
|
|
ADDRESSBOOK_CFLAGS=
|
2007-10-04 22:54:27 +02:00
|
|
|
|
2007-08-19 21:11:20 +02:00
|
|
|
ADDRESSBOOK_LIBS="-framework AddressBook -framework CoreFoundation"
|
|
|
|
AC_SUBST(ADDRESSBOOK_CFLAGS)
|
|
|
|
AC_SUBST(ADDRESSBOOK_LIBS)
|
|
|
|
|
2007-08-13 22:46:49 +02:00
|
|
|
dnl select backends
|
2008-07-28 22:48:26 +02:00
|
|
|
BACKENDS=""
|
|
|
|
# AC_ARG_ENABLE_BACKEND(BACKEND, HELP-STRING, [ACTION-IF-GIVEN],
|
|
|
|
# [ACTION-IF-NOT-GIVEN])
|
|
|
|
#
|
|
|
|
# Same as AC_ARG_ENABLE(), but also tells configure that the
|
|
|
|
# backend exists.
|
|
|
|
AC_DEFUN([AC_ARG_ENABLE_BACKEND],
|
|
|
|
[
|
|
|
|
AC_ARG_ENABLE($1, $2, $3, $4)
|
|
|
|
BACKENDS="$BACKENDS $1"
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE_BACKEND(ebook, AS_HELP_STRING([--disable-ebook], [disable access to Evolution addressbooks (default on if available)]),
|
|
|
|
[enable_ebook="$enableval"], [enable_ebook=$EBOOKFOUND])
|
|
|
|
AC_ARG_ENABLE_BACKEND(ecal, AS_HELP_STRING([--disable-ecal], [disable access to Evolution calendars and tasks (default on if available)]),
|
|
|
|
[enable_ecal="$enableval"], [enable_ecal=$ECALFOUND])
|
|
|
|
AC_ARG_ENABLE_BACKEND(sqlite, AS_HELP_STRING([--enable-sqlite], [enable access to PIM data stored in SQLite files (experimental, default off)]),
|
2007-08-13 22:46:49 +02:00
|
|
|
[enable_sqlite="$enableval"], [enable_sqlite="no"])
|
2008-07-28 22:48:26 +02:00
|
|
|
AC_ARG_ENABLE_BACKEND(addressbook, AS_HELP_STRING([--enable-addressbook], [enable access to Mac OS X address book (default off)]),
|
2007-08-19 21:11:20 +02:00
|
|
|
[enable_addressbook="$enableval"], [enable_addressbook="no"])
|
2007-03-11 23:13:13 +01:00
|
|
|
|
2007-08-13 22:46:49 +02:00
|
|
|
enable_evo="no"
|
2007-03-26 21:43:24 +02:00
|
|
|
enable_any="no"
|
2007-03-11 23:13:13 +01:00
|
|
|
if test "$enable_ebook" = "yes"; then
|
2008-01-13 00:22:43 +01:00
|
|
|
test "x${EBOOKFOUND}" == "xyes" || AC_MSG_ERROR([--enable-ebook requires pkg-config information for libebook, which was not found])
|
2007-03-11 23:13:13 +01:00
|
|
|
AC_DEFINE(ENABLE_EBOOK, 1, [libebook available])
|
2007-08-13 22:46:49 +02:00
|
|
|
enable_evo="yes"
|
2007-03-26 21:43:24 +02:00
|
|
|
enable_any="yes"
|
2007-03-11 23:13:13 +01:00
|
|
|
fi
|
|
|
|
|
2008-04-16 19:37:10 +02:00
|
|
|
AM_CONDITIONAL([ENABLE_ECAL], [test "$enable_ecal" == "yes"])
|
2007-03-11 23:13:13 +01:00
|
|
|
if test "$enable_ecal" = "yes"; then
|
2008-01-13 00:22:43 +01:00
|
|
|
test "x${ECALFOUND}" == "xyes" || AC_MSG_ERROR([--enable-ecal requires pkg-config information for libecal, which was not found"])
|
2007-03-11 23:13:13 +01:00
|
|
|
AC_DEFINE(ENABLE_ECAL, 1, [libecal available])
|
2007-08-13 22:46:49 +02:00
|
|
|
enable_evo="yes"
|
|
|
|
enable_any="yes"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$enable_sqlite" = "yes"; then
|
2008-01-13 00:22:43 +01:00
|
|
|
test "x${SQLITEFOUND}" == "xyes" || AC_MSG_ERROR([--enable-sqlite requires pkg-config information for sqlite3, which was not found])
|
2007-08-13 22:46:49 +02:00
|
|
|
AC_DEFINE(ENABLE_SQLITE, 1, [sqlite available])
|
2007-03-26 21:43:24 +02:00
|
|
|
enable_any="yes"
|
|
|
|
fi
|
|
|
|
|
2007-08-19 21:11:20 +02:00
|
|
|
if test "$enable_addressbook" = "yes"; then
|
|
|
|
AC_DEFINE(ENABLE_ADDRESSBOOK, 1, [addressbook available])
|
2008-03-08 11:02:33 +01:00
|
|
|
DEVICE_TYPE=MacOS_X
|
2007-08-19 21:11:20 +02:00
|
|
|
enable_any="yes"
|
2007-08-25 16:03:30 +02:00
|
|
|
else
|
|
|
|
ADDRESSBOOK_LIBS=
|
2007-08-19 21:11:20 +02:00
|
|
|
fi
|
|
|
|
|
2007-03-26 21:43:24 +02:00
|
|
|
if test "$enable_any" = "no"; then
|
|
|
|
AC_MSG_ERROR([no backend enabled - refusing to continue: $anymissing])
|
2007-03-11 23:13:13 +01:00
|
|
|
fi
|
|
|
|
|
2007-08-13 22:46:49 +02:00
|
|
|
if test "$enable_evo" = "yes"; then
|
|
|
|
if test "$EDSFOUND" = "yes"; then
|
|
|
|
AC_DEFINE(HAVE_EDS, 1, [evolution-dataserver available])
|
|
|
|
else
|
|
|
|
AC_MSG_ERROR($evomissing)
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
EPACKAGE_CFLAGS=
|
|
|
|
EPACKAGE_LIBS=
|
|
|
|
fi
|
|
|
|
|
2006-08-06 17:48:58 +02:00
|
|
|
dnl check for glib - calling g_type_init() is expected on Maemo
|
2007-03-11 23:13:13 +01:00
|
|
|
PKG_CHECK_MODULES(GLIB, "glib-2.0", GLIBFOUND=yes, GLIBFOUND=no)
|
|
|
|
if test "x${GLIBFOUND}" = "xno"; then
|
|
|
|
PKG_CHECK_MODULES(GLIB, "glib", GLIBFOUND=yes, GLIBFOUND=no)
|
2006-08-06 17:48:58 +02:00
|
|
|
fi
|
|
|
|
AC_SUBST(GLIB_CFLAGS)
|
|
|
|
AC_SUBST(GLIB_LIBS)
|
|
|
|
|
2005-10-08 14:03:24 +02:00
|
|
|
dnl check for programs.
|
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_LIBTOOL
|
2006-03-11 20:23:43 +01:00
|
|
|
AC_PROG_MAKE_SET
|
2005-10-08 14:03:24 +02:00
|
|
|
|
2007-08-13 22:46:49 +02:00
|
|
|
if test "$enable_sqlite" == "yes"; then
|
|
|
|
SYNCEVOLUTION_MODULES="$SYNCEVOLUTION_MODULES syncsqlite.la"
|
|
|
|
fi
|
2007-08-19 21:11:20 +02:00
|
|
|
if test "$enable_addressbook" == "yes"; then
|
|
|
|
SYNCEVOLUTION_MODULES="$SYNCEVOLUTION_MODULES syncaddressbook.la"
|
|
|
|
fi
|
2007-03-11 23:13:13 +01:00
|
|
|
|
2007-10-04 22:54:27 +02:00
|
|
|
dnl glib initialization is done only for libebook and libecal, not needed
|
|
|
|
dnl otherwise even if found
|
|
|
|
if test "$enable_ebook" != "yes" && test "$enable_ecal" != "yes"; then
|
|
|
|
GLIB_CFLAGS=
|
|
|
|
GLIB_LIBS=
|
|
|
|
else
|
|
|
|
if test "x${GLIBFOUND}" = "xyes"; then
|
|
|
|
AC_DEFINE(HAVE_GLIB, 1, [glib found])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2007-03-11 23:13:13 +01:00
|
|
|
dnl figure out whether we link all code statically or as modules
|
2008-03-10 23:45:36 +01:00
|
|
|
AM_CONDITIONAL([ENABLE_MODULES], [test "$enable_shared" == "yes"])
|
2007-03-11 23:13:13 +01:00
|
|
|
if test "$enable_shared" == "yes"; then
|
|
|
|
SYNCEVOLUTION_LDADD="-Wl,-export-dynamic -rpath '\$(pkglibdir)'"
|
2008-03-10 23:45:36 +01:00
|
|
|
AC_DEFINE(ENABLE_MODULES, 1, [enable dynamically opening sync source backends])
|
2007-03-11 23:13:13 +01:00
|
|
|
else
|
2008-03-10 23:45:36 +01:00
|
|
|
SYNCEVOLUTION_LDADD="\$(EXTRA_LTLIBRARIES)"
|
2007-03-11 23:13:13 +01:00
|
|
|
fi
|
|
|
|
AC_SUBST(SYNCEVOLUTION_LDADD)
|
|
|
|
|
2008-03-24 22:41:20 +01:00
|
|
|
dnl CXXFLAGS gets applied to SyncEvolution and the client library.
|
|
|
|
dnl For e.g. "-Wall -Werror" this might not be such a good idea;
|
|
|
|
dnl SYNCEVOLUTION_CXXFLAGS can be used instead. It applies only
|
|
|
|
dnl to the sources in the SyncEvolution repository.
|
|
|
|
AC_SUBST(SYNCEVOLUTION_CXXFLAGS)
|
|
|
|
|
2007-10-07 21:06:01 +02:00
|
|
|
dnl a quick-and-dirty way to detect compilation for the iPhone
|
|
|
|
if test "$host" == "arm-apple-darwin"; then
|
|
|
|
AC_DEFINE(IPHONE, 1, [compiling for iPhone])
|
2008-03-08 11:02:33 +01:00
|
|
|
DEVICE_TYPE=iPhone
|
2007-10-07 21:06:01 +02:00
|
|
|
fi
|
|
|
|
|
2008-03-08 11:02:33 +01:00
|
|
|
dnl This string is sent as part of the SyncML DevInf (device
|
|
|
|
dnl information) structure to the server. All SyncEvolution platforms
|
|
|
|
dnl use "SyncEvolution" as HTTP user agent and "Mod" (model), so the
|
|
|
|
dnl device type is the only way how different kinds of clients can be
|
|
|
|
dnl distinguished.
|
|
|
|
AC_DEFINE_UNQUOTED(DEVICE_TYPE, "$DEVICE_TYPE", "SyncML DevInf DevType")
|
|
|
|
|
2007-11-21 23:09:06 +01:00
|
|
|
AC_CHECK_HEADERS(stdarg.h valgrind/valgrind.h execinfo.h)
|
2006-04-06 19:02:43 +02:00
|
|
|
|
2008-07-28 22:48:26 +02:00
|
|
|
echo
|
|
|
|
echo CONFIGURATION SUMMARY
|
|
|
|
for backend in $BACKENDS; do
|
|
|
|
eval echo $backend: \${enable_${backend}}
|
|
|
|
done
|
|
|
|
echo
|
|
|
|
|
2005-10-08 14:03:24 +02:00
|
|
|
AC_OUTPUT([
|
|
|
|
Makefile
|
|
|
|
src/Makefile
|
2007-10-18 10:03:45 +02:00
|
|
|
test/Makefile
|
2005-10-08 14:03:24 +02:00
|
|
|
])
|