dnl Process this file with autoconf to produce a configure script. AC_INIT(src/syncevolution.cpp) AM_INIT_AUTOMAKE(syncevolution, 0.4-CVS) AM_CONFIG_HEADER(config.h) AC_ARG_WITH(sync4j, AS_HELP_STRING([--with-sync4j=], [specifies location of Sync4j client library]), [SYNC4J="$withval"]) AC_ARG_WITH(sync4j-src, AS_HELP_STRING([--with-sync4j-src=], [specifies location of the Sync4j '3x/client-api/native' source code]), [SYNC4JSRC="$withval"]) if test ! "$SYNC4J"; then if test "$SYNC4JSRC"; then # make a copy of the sources AC_MSG_NOTICE( [updating the content of src/client-api from $SYNC4JSRC] ) mkdir -p src/client-api if cp --update --archive $SYNC4JSRC/* src/client-api; then ( cd src/client-api/build/autotools && ( test -f configure || sh autogen.sh ) ) else AC_MSG_ERROR( [copying $SYNC4JSRC into src/client-api failed] ) fi 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 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 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 # use local copy of the sources SYNC4J_SUBDIR=$PWD/src/client-api.build SYNC4J_CFLAGS="-I$SYNC4J_SUBDIR/include/common -I$SYNC4J_SUBDIR/include" SYNC4J_LIBS="-L$SYNC4J_SUBDIR/src -lsync4j" AC_MSG_NOTICE( [configuring the client library] ) CLIENT_CONFIGURE=$PWD/src/client-api/build/autotools/configure if (mkdir -p $SYNC4J_SUBDIR && cd $SYNC4J_SUBDIR && $CLIENT_CONFIGURE --disable-shared); then true; else AC_MSG_ERROR( [configuring client library failed] ) fi else AC_MSG_ERROR( [either --with-sync4j or --with-sync4j-src have to be used] ) fi else if test -f $SYNC4J/include/sync4j/common/spds/SyncItem.h; then SYNC4J_CFLAGS="-I$SYNC4J/include/sync4j/common -I$SYNC4J/include/sync4j" SYNC4J_LIBS="-L$SYNC4J/lib -lsync4j" else AC_MSG_ERROR( [$SYNC4J does seem to be valid (e.g. include/sync4j/spds/common/SyncItem.h is missing)] ) fi fi AC_SUBST(SYNC4J_CFLAGS) AC_SUBST(SYNC4J_LIBS) AC_SUBST(SYNC4J) AC_SUBST(SYNC4J_SUBDIR) AC_SUBST(SYNC4JSRC) pkg_emodules_10="evolution-data-server-1.0 libedataserver-1.0" pkg_emodules_11="evolution-data-server-1.1 libedataserver-1.1" pkg_emodules_12="evolution-data-server-1.2 libedataserver-1.2" AC_ARG_ENABLE(ebook, AS_HELP_STRING([--disable-ebook], [disable access to addressbooks (default on)]), [enable_ebook="$enableval"], [enable_ebook=yes]) AC_ARG_ENABLE(ecal, AS_HELP_STRING([--disable-ecal], [disable access to calendars and tasks (default on)]), [enable_ecal="$enableval"], [enable_ecal=yes]) if test "$enable_ebook" = "yes"; then AC_DEFINE(ENABLE_EBOOK, 1, [libebook available]) pkg_emodules_10="$pkg_emodules_10 libebook-1.0" pkg_emodules_11="$pkg_emodules_11 libebook-1.1" pkg_emodules_12="$pkg_emodules_12 libebook-1.2" fi if test "$enable_ecal" = "yes"; then AC_DEFINE(ENABLE_ECAL, 1, [libecal available]) pkg_emodules_10="$pkg_emodules_10 libecal-1.0 libedata-cal-1.0" pkg_emodules_11="$pkg_emodules_11 libecal-1.1 libedata-cal-1.1" pkg_emodules_12="$pkg_emodules_12 libecal-1.2 libedata-cal-1.2" fi export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/lib/pkgconfig:$prefix/lib/pkgconfig:/usr/local/lib/pkgconfig evomissing="No compatible evolution-data-server was found. Please install the development packages of Evolution and/or set the PKG_CONFIG_PATH variable so that it points towards the .pc files of libecal, libedata, evolution-data-server and libedataserver. You can check that these packages are available by running pkg-config --list-all." dnl check for Evolution PKG_CHECK_MODULES(EPACKAGE, [$pkg_emodules_12], EDSFOUND=1, [EDSFOUND=0]) if test "x${EDSFOUND}" = "x0"; then PKG_CHECK_MODULES(EPACKAGE, [$pkg_emodules_11], EDSFOUND=1, [EDSFOUND=0]) if test "x${EDSFOUND}" = "x0"; then PKG_CHECK_MODULES(EPACKAGE, [$pkg_emodules_10],,AC_MSG_ERROR($evomissing)) fi fi AC_SUBST(EPACKAGE_CFLAGS) AC_SUBST(EPACKAGE_LIBS) dnl check for glib - calling g_type_init() is expected on Maemo PKG_CHECK_MODULES(GLIB, "glib-2.0", GLIBFOUND=1, GLIBFOUND=0) if test "x${GLIBFOUND}" = "x0"; then PKG_CHECK_MODULES(GLIB, "glib", GLIBFOUND=1, GLIBFOUND=0) fi if test "x${GLIBFOUND}" = "x1"; then AC_DEFINE(HAVE_GLIB, 1, [glib found]) fi AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) dnl check for programs. AC_PROG_CXX AC_PROG_LIBTOOL AC_PROG_MAKE_SET AC_CHECK_HEADERS(stdarg.h) AC_OUTPUT([ Makefile src/Makefile etc/Makefile ])