[libwnck] [build] Make startup-notification non-automagic
- From: Vincent Untz <vuntz src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libwnck] [build] Make startup-notification non-automagic
- Date: Tue, 8 Sep 2009 01:23:52 +0000 (UTC)
commit 78c009e5c822524372d6513c923ee45defdd3514
Author: Gilles Dartiguelongue <eva gentoo org>
Date: Sat Aug 8 23:34:01 2009 +0200
[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
configure.in | 30 +++++++++++++++++++++---------
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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]