[blam/blam-1.8: 11/11] configure: Allow the user to disable notification suport



commit 07cbef6f0571bb5dd2caa25f85d88c6b450f6833
Author: Carlos MartÃn Nieto <carlos cmartin tk>
Date:   Sat May 12 21:13:47 2012 +0200

    configure: Allow the user to disable notification suport

 configure.in |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/configure.in b/configure.in
index c14fdc5..d0b4316 100644
--- a/configure.in
+++ b/configure.in
@@ -70,10 +70,19 @@ AM_CONDITIONAL(ENABLE_DBUS, test "x$have_dbus" = "xyes")
 #
 # Use libnotify is available
 #
-PKG_CHECK_MODULES(NOTIFY, notify-sharp, ENABLE_NOTIFY="yes", ENABLE_NOTIFY="no")
-AM_CONDITIONAL(ENABLE_NOTIFY, test "$ENABLE_NOTIFY" = "yes")
-AC_SUBST(NOTIFY_LIBS)
+AC_ARG_WITH([notify],
+	AC_HELP_STRING([--without-notify], [Remove notification support]))
 
+AS_IF([test "x$with_notify" != "xno"],
+      [PKG_CHECK_EXISTS([notify-sharp], [have_notify=yes], [have_notify=no])],
+      [have_notify=no])
+
+AS_IF([test "x$have_notify" = "xyes"],
+      [PKG_CHECK_MODULES(NOTIFY, notify-sharp, ENABLE_NOTIFY="yes", ENABLE_NOTIFY="no")
+       AC_SUBST(NOTIFY_LIBS)],
+       [])
+
+AM_CONDITIONAL(ENABLE_NOTIFY, test "x$have_notify" = "xyes")
 
 dnl Intl
 ALL_LINGUAS="ar bg bs ca cs da de dz el en_CA en_GB es et eu fi fr ga gl gu he hr hu it lt lv ja nb ne nl oc pa pl pt_BR pt ru rw sk sl sq sr Latn sr sv tr uk vi zh_CN zh_HK zh_TW"
@@ -109,5 +118,5 @@ echo
 echo "Installing in prefix: $prefix"
 echo 
 echo "Enable D-Bus: $have_dbus"
-echo "Enable notifications: $ENABLE_NOTIFY"
+echo "Enable notifications: $have_notify"
 echo



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]