summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2012-03-06 09:24:15 +0100
committerPatrick Ohly <patrick.ohly@intel.com>2012-03-09 07:24:59 +0000
commiteafc49cb353ee75096633d8922f02853226c15dd (patch)
tree15c278182c6fd9f1ee0ae22a22d96be022b07c1f /configure.ac
parent962cf4be1ea56df0f84fd829832285f32dafd4e4 (diff)
KDE + GNOME: moved keyring/kwallet and KDE init into modules
The platform specific code which is of no value unless you run a specific desktop now gets compiled as part of shared libraries, just like the storage backends. The advantage is that the rest of SyncEvolution keeps running even if one of these shared libraries cannot be loaded due to missing depdendencies. syncevolution.org packages will not declared these dependencies, to allow installing each package without forcing the installation of unwanted libraries. Distros can package the platform code separately. Another advantage is reduced code duplication (password load/store was duplicated in command line and D-Bus server). Technically this uses almost the same mechnism as loadable sync sources. The code resides in src/backends/[kde|gnome], where the autotool magic finds the *Register.cpp files automatically and includes them into executables. These files contain global singletons which, when initialized, connect platform specific code to new signals in the core (init, password load/save). The actual code is in the backend libraries. Because SE_ARG_ENABLE_BACKEND() is not used (in favor of the traditional enable macros), linking against these libs must be set up by adding them to the (now slightly misnamed) SYNCSOURCES variable in the configure fragments.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac80
1 files changed, 0 insertions, 80 deletions
diff --git a/configure.ac b/configure.ac
index 235a036a..7f1f8da4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -468,84 +468,6 @@ AS_IF([test "x$with_gio_gdbus" = "xyes"],
AC_DEFINE(NEED_DBUS_WATCH_GET_UNIX_FD, 1,
[Define to 1 if you need the dbus_watch_get_unix_fd() function.]))])
-PKG_CHECK_MODULES(KEYRING, [gnome-keyring-1], HAVE_KEYRING=yes, HAVE_KEYRING=no)
-AC_ARG_ENABLE(gnome-keyring,
- AS_HELP_STRING([--enable-gnome-keyring],
- [enables or disables support for the GNOME keyring; default is on if development files are available]),
- [enable_gnome_keyring="$enableval"
- test "$enable_gnome_keyring" = "yes" || test "$enable_gnome_keyring" = "no" || AC_MSG_ERROR([invalid value for --enable-gnome-keyring: $enable_gnome_keyring])
- test "$enable_gnome_keyring" = "no" || test "$HAVE_KEYRING" = "yes" || AC_MSG_ERROR([gnome-keyring-1 pkg not found, needed for --enable-gnome-keyring])],
- enable_gnome_keyring="$HAVE_KEYRING")
-if test $enable_gnome_keyring = "yes"; then
- AC_DEFINE(USE_GNOME_KEYRING, 1, [define if gnome keyring should be used in dbus service])
- 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
-fi
-
-
-## Begin KWallet ##############################
-
-# first check for qmake-qt4, because qmake may point to qmake-qt3.
-AC_CHECK_PROGS([QMAKE], [qmake-qt4 qmake])
-
-if test "x$QMAKE" != 'x'
-then
- AC_PATH_PROG([KDE4_CONFIG], [kde4-config], [no])
-
- if test "x$KDE4_CONFIG" != 'xno'
- then
- KDEKWALLETFOUND=yes
- if ! test "$KDE_KWALLET_CFLAGS"; then
- KDE_KWALLET_CFLAGS="-I`$KDE4_CONFIG --path include` -I`$KDE4_CONFIG --path include`/KDE `pkg-config --cflags QtDBus QtCore`"
- fi
- if ! test "$KDE_KWALLET_LIBS"; then
- KDE_KWALLET_LIBS="-lkdeui -lkdecore -L`kde4-config --install lib` `pkg-config --libs QtDBus QtCore`"
- fi
- AC_LANG_PUSH(C++)
- old_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $KDE_KWALLET_CFLAGS"
- AC_CHECK_HEADERS(kwallet.h, [], [KDEKWALLETFOUND=no])
- CPPFLAGS="$old_CPPFLAGS"
- AC_LANG_POP(C++)
- else
- KDEKWALLETFOUND=no
- fi
-else
- KDEKWALLETFOUND=no
-fi
-
-# In contrast to the GNOME KEYRING, the KWallet is
-# currently considered optional. "configure" will never enable
-# by default, because that is a change that might not be
-# expected by traditional users.
-AC_ARG_ENABLE(kwallet,
- AS_HELP_STRING([--enable-kwallet], [enable access to KWallet]),
- [use_kde_kwallet="$enableval"
- test $KDEKWALLETFOUND = "yes" || test "$use_kde_kwallet" = "no" || AC_MSG_ERROR([kwallet.pc not found. Install it to compile with the KWallet enabled.])],
- [use_kde_kwallet="no"])
-
-if test "$use_kde_kwallet" = "yes"; then
- # conditional compilation in preprocessor
- AC_DEFINE(USE_KDE_KWALLET, 1, [KWallet available])
- # TODO: KWallet needs Qt. Enable the Qt check in
- # configure-post.in, otherwise it fails to compiler
- # when none of the backends ask for Qt.
-else
- # avoid unneeded dependencies on KWallet
- KDE_KWALLET_CFLAGS=
- KDE_KWALLET_LIBS=
-fi
-AC_SUBST(KDE_KWALLET_LIBS)
-AC_SUBST(KDE_KWALLET_CFLAGS)
-
-# conditional compilation in make
-AM_CONDITIONAL([USE_KDE_KWALLET], [test "$use_kde_kwallet" = "yes"])
-
-## End KWallet ################################
-
-
if test $enable_dbus_service = "yes"; then
if test -z "$XSLT"; then
AC_MSG_ERROR([xsltproc not found, is required for D-Bus service])
@@ -600,8 +522,6 @@ AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
AC_SUBST(DBUS_GLIB_CFLAGS)
AC_SUBST(DBUS_GLIB_LIBS)
-AC_SUBST(KEYRING_CFLAGS)
-AC_SUBST(KEYRING_LIBS)
AC_SUBST(LIBNOTIFY_CFLAGS)
AC_SUBST(LIBNOTIFY_LIBS)
AC_SUBST(LIBEXECDIR)