summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dartiguelongue <eva@gentoo.org>2009-08-08 23:34:01 +0200
committerVincent Untz <vuntz@gnome.org>2009-09-08 03:13:09 +0200
commit78c009e5c822524372d6513c923ee45defdd3514 (patch)
tree74846a79dc05c557e726645fcd0435216800aa64
parent9cb8932328670a012389b995cde289cd53de9841 (diff)
downloadlibwnck-78c009e5c822524372d6513c923ee45defdd3514.tar.gz
[build] Make startup-notification non-automagic
See description at http://www.gentoo.org/proj/en/qa/automagic.xml This patch makes startup-notification properly switchable at configure time while retaining auto-detection capability. Gentoo: https://bugs.gentoo.org/show_bug.cgi?id=278464 http://bugzilla.gnome.org/show_bug.cgi?id=591188
-rw-r--r--configure.in30
1 files changed, 21 insertions, 9 deletions
diff --git a/configure.in b/configure.in
index 731ac3f..75fad2d 100644
--- a/configure.in
+++ b/configure.in
@@ -82,15 +82,27 @@ AC_SUBST(wncklocaledir)
AC_PATH_PROG(PKG_CONFIG, pkg-config)
-AC_MSG_CHECKING([if building with libstartup-notification])
-STARTUP_NOTIFICATION_REQUIRED=0.4
-if $PKG_CONFIG --atleast-version $STARTUP_NOTIFICATION_REQUIRED libstartup-notification-1.0; then
- AC_MSG_RESULT([yes])
- AC_DEFINE_UNQUOTED(HAVE_STARTUP_NOTIFICATION, 1, [Define if you have libstartup-notification])
- STARTUP_NOTIFICATION_PACKAGE=libstartup-notification-1.0
-else
- AC_MSG_RESULT([no])
- STARTUP_NOTIFICATION_PACKAGE=
+AC_ARG_ENABLE(startup-notification,
+ [AC_HELP_STRING([--enable-startup-notification],
+ [startup notification library @<:@default=auto@:>@])],,
+ [enable_startup_notification=auto])
+
+STARTUP_NOTIFICATION_PACKAGE=
+if test "$enable_startup_notification" != "no"; then
+ STARTUP_NOTIFICATION_REQUIRED=0.4
+ PKG_CHECK_MODULES(STARTUP_NOTIFICATION,
+ [libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_REQUIRED],
+ [have_sn=yes]
+ [have_sn=no])
+
+ if test "$have_sn" = "no" -a "$enable_start_notification" = "yes"; then
+ AC_MSG_ERROR([startup-notification support required but not found])
+ fi
+
+ if test "$have_sn" = "yes"; then
+ AC_DEFINE_UNQUOTED(HAVE_STARTUP_NOTIFICATION, 1, [Define if you have libstartup-notification])
+ STARTUP_NOTIFICATION_PACKAGE=libstartup-notification-1.0
+ fi
fi
AC_SUBST(STARTUP_NOTIFICATION_PACKAGE)