Fix automagic dependencies for PST [1] and gtreamer [2] [1] https://bugs.gentoo.org/show_bug.cgi?id=271451 [2] https://bugs.gentoo.org/show_bug.cgi?id=204300 --- configure.in | 127 +++++++++++++++++++++++++++++++++------------------------- 1 files changed, 73 insertions(+), 54 deletions(-) diff --git a/configure.in b/configure.in index 4e36e01..fe03ff8 100644 --- a/configure.in +++ b/configure.in @@ -1773,9 +1773,9 @@ dnl Add any new plugins here plugins_base_always="calendar-file calendar-http $CALENDAR_WEATHER itip-formatter plugin-manager default-source addressbook-file startup-wizard mark-all-read groupwise-features groupwise-account-setup mail-account-disable publish-calendar caldav imap-features google-account-setup webdav-account-setup" plugins_base="$plugins_base_always $SA_JUNK_PLUGIN $BF_JUNK_PLUGIN $EXCHANGE_PLUGIN $MONO_PLUGIN " -all_plugins_base="$plugins_base_always sa-junk-plugin bogo-junk-plugin exchange-operations mono" +all_plugins_base="$plugins_base_always sa-junk-plugin bogo-junk-plugin mono" -plugins_standard_always="bbdb subject-thread save-calendar select-one-source copy-tool mail-to-task audio-inline mailing-list-actions default-mailer import-ics-attachments prefer-plain mail-notification attachment-reminder face backup-restore email-custom-header templates pst-import" +plugins_standard_always="bbdb subject-thread save-calendar select-one-source copy-tool mail-to-task mailing-list-actions default-mailer import-ics-attachments prefer-plain mail-notification attachment-reminder face backup-restore email-custom-header templates" plugins_standard="$plugins_standard_always" all_plugins_standard="$plugins_standard" @@ -1830,53 +1830,89 @@ if test "x${enable_python}" = "xyes"; then msg_plugins="$msg_plugins (and python)" fi -AC_SUBST(plugins_enabled) -AC_SUBST(all_plugins_base) -AC_SUBST(all_plugins_standard) -AC_SUBST(all_plugins_experimental) +dnl ********************* +dnl gstreamer +dnl ********************* +AC_ARG_ENABLE([audio-inline], + AC_HELP_STRING([--disable-audio-inline], + [Disable audio-inline plugin @<:@default=yes@:>@]), + [enable_audio_inline="$enableval"], [enable_audio_inline=yes]) -if echo ${plugins_enabled} | grep "audio-inline" > /dev/null +if test "x$enable_audio_inline" = "xyes" 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) + PKG_CHECK_MODULES(GSTREAMER, gstreamer-0.10, have_gst=yes, have_gst=no) + AC_SUBST(GSTREAMER_CFLAGS) + AC_SUBST(GSTREAMER_LIBS) + + if test "$have_gst" = "yes"; then + plugins_enabled="$plugins_enabled audio-inline" + msg_plugins="$msg_plugins (audio-inline)" 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." + AC_MSG_WARN([gstreamer was not found, audio-inline plugin will not be built. +You are probably missing gstreamer-devel package.]) fi fi -if ${PKG_CONFIG} --exists dbus-glib-1 ; then +dnl ********************* +dnl libpst +dnl ********************* + +AC_ARG_ENABLE([pst-import], + AC_HELP_STRING([--disable-pst-import], + [Disable pst import plugin @<:@default=yes@:>@]), + [enable_pst="$enableval"], [enable_pst=yes]) + +if test "x$enable_pst" = "xyes" +then + PKG_CHECK_MODULES(LIBPST, libpst, have_pst=yes, have_pst=no) + AC_SUBST(LIBPST_CFLAGS) + AC_SUBST(LIBPST_LIBS) + + if test "$have_pst" = "yes"; then + plugins_enabled="$plugins_enabled pst-import" + msg_plugins="$msg_plugins (pst-import)" + else + AC_MSG_WARN([libpst was not found, pst-import plugin will not be built. +You are probably missing libpst-devel package.]) + fi +fi + +AC_SUBST(plugins_enabled) +AC_SUBST(all_plugins_base) +AC_SUBST(all_plugins_standard) +AC_SUBST(all_plugins_experimental) + +AC_ARG_ENABLE([dbus], + AC_HELP_STRING([--disable-dbus], [Disable mail notification DBus messages plugin @<:@default=yes@:>@]), + [enable_dbus="$enableval"], [enable_dbus=yes]) + +if test "x$enable_dbus" = "xyes"; then dnl ************************************************** dnl * Mail Notification plugin's DBus messages dnl ************************************************** - 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) - -else - echo "warning: dbus-glib-1 was not found, Mail notification plugins's dbus message support not built" - AM_CONDITIONAL(ENABLE_DBUS, false) + if $PKG_CONFIG --exists dbus-glib-1; 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) + else + echo "warning: dbus-glib-1 was not found, Mail notification plugins's dbus message support not built" + fi fi -if echo ${plugins_enabled} | grep "exchange-operations" > /dev/null ; then - PKG_CHECK_MODULES(LIBEXCHANGESTORAGE, libexchange-storage-$EDS_PACKAGE >= eds_minimum_version, have_libexchange="yes", have_libexchange="no") +AM_CONDITIONAL(ENABLE_DBUS, test x$enable_dbus = xyes) + +if test "x$enable_exchange" = "xyes"; then + PKG_CHECK_MODULES(LIBEXCHANGESTORAGE, libexchange-storage-$EDS_PACKAGE >= eds_minimum_version, + have_libexchange="yes", have_libexchange="no") if test "x$have_libexchange" = "xyes"; then dnl ************************************************** dnl * Exchange Operations plugin @@ -1890,23 +1926,6 @@ if echo ${plugins_enabled} | grep "exchange-operations" > /dev/null ; then fi fi -if echo ${plugins_enabled} | grep "pst-import" > /dev/null -then - if ${PKG_CONFIG} --exists libpst - then - dnl ********************* - dnl libpst - dnl ********************* - PKG_CHECK_MODULES(LIBPST, libpst) - AC_SUBST(LIBPST_CFLAGS) - AC_SUBST(LIBPST_LIBS) - else - plugins_enabled=`echo $plugins_enabled | sed -e "s/pst-import//g"` - echo "warning: libpst was not found, pst-import plugin will not be built." - echo "you are probably missing libpst-devel package." - fi -fi - dnl *********** dnl GConf stuff dnl ***********