configure: --enable-gui implies --enable-dbus-service, docs

Compiling the GUI only works if the dbus library was built first,
so changed the default of --enable-dbus-service to "yes" if the GUI
is enabled. Added error check for conflicting configure options.

Documented dependency on GNOME keyring.
This commit is contained in:
Patrick Ohly 2009-07-09 15:03:43 +02:00
parent b6230cf43b
commit b6339214a3
2 changed files with 36 additions and 27 deletions

1
README
View file

@ -697,6 +697,7 @@ For the GUI and its D-Bus based service backend:
apt-get install libdbus-glib-1-dev \
libgtk2.0-dev libglade2-dev \
libgio2.0-dev \
libgnome-keyring-dev \
libgconf2-dev libgnomevfs2-dev
The build system is the normal autotools system. See INSTALL for

View file

@ -190,38 +190,13 @@ AC_SUBST(TRANSPORT_CFLAGS)
# for dbus interface file mangling
AC_PATH_PROG(XSLT, xsltproc)
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", enable_dbus_service="no")
AM_CONDITIONAL([COND_DBUS], [test "$enable_dbus_service" = "yes"])
if test $enable_dbus_service == "yes"; then
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])
fi
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)
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])
AC_ARG_ENABLE(gui,
AS_HELP_STRING([--enable-gui[=gui type]],
[enables building the GTK+ UI that uses the SyncEvolution DBus API.
Options: gtk, moblin.
"gtk" is the default for --enable-gui without type. No GUI is
built when --enable-gui is not used.]),
built when --enable-gui is not used.
--enable-gui implies --enable-dbus.]),
[ if test "$enableval" = "gtk" ; then
enable_gui=gtk
elif test "$enableval" = "yes" ; then
@ -242,6 +217,39 @@ if test $enable_gui == "moblin"; then
AC_DEFINE(USE_MOBLIN_UX, 1, [Use the MUX widget library])
fi
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
if test $enable_dbus_service == "yes"; then
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])
fi
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)
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])
if test $enable_gui != "no"; then
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"