summaryrefslogtreecommitdiff
path: root/x11-plugins/compiz-plugins-extra/files/compiz-plugins-extra-0.8.8-libnotify.patch
blob: 9287d706ac8ee15f4b51177ab9260f6f9ad519f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- configure.ac	2011-04-21 15:51:08.000000000 +0400
+++ configure.ac	2012-08-16 21:37:46.894173595 +0400
@@ -136,7 +136,15 @@
 PKG_CHECK_MODULES(COMPIZMOUSEPOLL, compiz-mousepoll, [have_compiz_mousepoll=yes], [have_compiz_mousepoll=no])
 AM_CONDITIONAL(SHOWMOUSE_PLUGIN, test "x$have_compiz_mousepoll" = "xyes")
 
-PKG_CHECK_MODULES(LIBNOTIFY, libnotify gtk+-2.0, [have_libnotify=yes], [have_libnotify=no])
+AC_ARG_ENABLE(notifications, AS_HELP_STRING([--enable-notifications], [Build notification plugin]), [enable_notifications=$enableval], [enable_notification=auto])
+if test "$enable_notification" = auto; then
+    PKG_CHECK_MODULES(LIBNOTIFY, libnotify gtk+-2.0, [have_libnotify=yes], [have_libnotify=no])
+fi
+if test "$enable_notification" = yes; then
+    PKG_CHECK_MODULES(LIBNOTIFY, libnotify gtk+-2.0, [have_libnotify=yes], AC_MSG_ERROR([Libnotify is not installed]))
+else
+    have_libnotify=no
+fi
 AM_CONDITIONAL(NOTIFICATION_PLUGIN, test "x$have_libnotify" = "xyes")
 if test "$have_libnotify" = yes; then
   AC_DEFINE(USE_NOTIFICATION, 1, [Build notification plugin])