--- configure.in.orig 2009-01-11 11:43:01.000000000 +0100 +++ configure.in 2009-01-11 14:57:57.000000000 +0100 @@ -1515,21 +1515,31 @@ dnl --- evolution (shell) flags -NM_SUPPORT_PACKAGES="" +AC_ARG_ENABLE([networkmanager], AS_HELP_STRING([--disable-networkmanager], [Disable NetworkManager support (default: enabled)])) +AC_ARG_ENABLE([dbus], AS_HELP_STRING([--disable-dbus], [Disable dbus support (default: enabled)])) -PKG_CHECK_MODULES(NM, dbus-glib-1 libnm_glib, NM_SUPPORT_GLIB="yes", NM_SUPPORT_GLIB="no") -if test "x$NM_SUPPORT_GLIB" = "xyes"; then - AC_DEFINE(NM_SUPPORT_GLIB, 1, [network manager available]) - NM_SUPPORT_PACKAGES="dbus-1 dbus-glib-1 libnm_glib" -else - PKG_CHECK_MODULES(NM, dbus-glib-1, NM_SUPPORT="yes", NM_SUPPORT="no") - AC_CHECK_HEADER(NetworkManager/NetworkManager.h, [ nm_header="yes" ] ) - if test "x$NM_SUPPORT" = "xyes" -a "x$nm_header" = "xyes"; then - AC_DEFINE(NM_SUPPORT, 1, [network manager available]) - NM_SUPPORT_PACKAGES="dbus-1 dbus-glib-1" - else - NM_SUPPORT=no - fi +if test "x$enable_networkmanager" != "xno"; then + if test "x$enable_dbus" != "xno"; then + NM_SUPPORT_PACKAGES="" + + PKG_CHECK_MODULES(NM, dbus-glib-1 libnm_glib, NM_SUPPORT_GLIB="yes", NM_SUPPORT_GLIB="no") + if test "x$NM_SUPPORT_GLIB" = "xyes"; then + AC_DEFINE(NM_SUPPORT_GLIB, 1, [network manager available]) + NM_SUPPORT_PACKAGES="dbus-1 dbus-glib-1 libnm_glib" + else + PKG_CHECK_MODULES(NM, dbus-glib-1, NM_SUPPORT="yes", NM_SUPPORT="no") + AC_CHECK_HEADER(NetworkManager/NetworkManager.h, [ nm_header="yes" ] ) + if test "x$NM_SUPPORT" = "xyes" -a "x$nm_header" = "xyes"; then + AC_DEFINE(NM_SUPPORT, 1, [network manager available]) + NM_SUPPORT_PACKAGES="dbus-1 dbus-glib-1" + else + NM_SUPPORT=no + fi + fi + else + echo "warning: dbus support was disabled, NetworkManager support not built" + NM_SUPPORT=no + fi fi AM_CONDITIONAL(NM_SUPPORT_GLIB, test x$NM_SUPPORT_GLIB = xyes) @@ -1800,42 +1810,33 @@ if echo ${plugins_enabled} | grep "audio-inline" > /dev/null then - if ${PKG_CONFIG} --exists gstreamer-0.10 - then - dnl ********************* - dnl gstreamer - dnl ********************* - PKG_CHECK_MODULES(GSTREAMER, gstreamer-0.10) - AC_SUBST(GSTREAMER_CFLAGS) - AC_SUBST(GSTREAMER_LIBS) + AC_ARG_WITH([gstreamer], AS_HELP_STRING([--without-gstreamer], [Build without gstreamer library (default: enabled])) + if test "x$with_gstreamer" != "xno"; then + PKG_CHECK_MODULES(GSTREAMER, gstreamer-0.10) + AC_SUBST(GSTREAMER_CFLAGS) + AC_SUBST(GSTREAMER_LIBS) else - plugins_enabled=`echo $plugins_enabled | sed -e "s/audio-inline//g"` - echo "warning: gstreamer was not found, audio-inline plugin will not be built." - echo "you are probably missing gstreamer-devel package." + plugins_enabled=`echo $plugins_enabled | sed -e "s/audio-inline//g"` + echo "warning: gstreamer was disabled, audio-inline plugin will not be built." fi fi -if ${PKG_CONFIG} --exists dbus-glib-1 ; then - dnl ************************************************** - dnl * Mail Notification plugin's DBus messages - dnl ************************************************** +if test "x$enable_dbus" != "xno"; then PKG_CHECK_MODULES(NMN, dbus-glib-1) AC_SUBST(NMN_CFLAGS) AC_SUBST(NMN_LIBS) - + # Get the version of the DBus API, so we can hack around API changes until the API stabilises: - # multiply by 1000 to convert decimal to integer; so e.g. 0.31 become 310 - # since preprocessor values must be integral - FOUND_DBUS_VERSION="`$PKG_CONFIG --modversion dbus-1 | $AWK '{print 1000 * $1}'`" - AC_SUBST(FOUND_DBUS_VERSION) - AC_DEFINE(HAVE_DBUS,1,[Define if you have DBUS support]) - AC_SUBST(HAVE_DBUS) - AM_CONDITIONAL(ENABLE_DBUS, true) - + # multiply by 1000 to convert decimal to integer; so e.g. 0.31 become 310 + # since preprocessor values must be integral + FOUND_DBUS_VERSION="`$PKG_CONFIG --modversion dbus-1 | $AWK '{print 1000 * $1}'`" + AC_SUBST(FOUND_DBUS_VERSION) + AC_DEFINE(HAVE_DBUS,1,[Define if you have DBUS support]) + AC_SUBST(HAVE_DBUS) + AM_CONDITIONAL(ENABLE_DBUS, true) else - echo "warning: dbus-glib-1 was not found, Mail notification plugins's dbus message support not built" - AM_CONDITIONAL(ENABLE_DBUS, false) - + echo "warning: dbus support was disabled, Mail notification plugins's dbus message support not built" + AM_CONDITIONAL(ENABLE_DBUS, false) fi if echo ${plugins_enabled} | grep "exchange-operations" > /dev/null ; then