1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
--- configure.ac 2009-08-28 21:12:22.000000000 +0200
+++ configure.ac.new 2009-08-29 01:42:42.000000000 +0200
@@ -50,16 +50,32 @@
libgnome-2.0 >= $LIBGNOME_REQUIRED
libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED])
-# Check for libnotify (optional)
+# support for libnotify
LIBNOTIFY_CFLAGS=
LIBNOTIFY_LIBS=
-PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= $LIBNOTIFY_REQUIRED,
- HAVE_LIBNOTIFY="yes", HAVE_LIBNOTIFY="no")
-if test "x$HAVE_LIBNOTIFY" = "xyes"; then
- AC_DEFINE(HAVE_LIBNOTIFY, 1, [libnotify available])
+# enable support even if not specifically asked for
+AC_ARG_ENABLE(libnotify, [ --enable-libnotify enable libnotify support], [
+ enable_libnotify=$enableval], [
+ enable_libnotify="yes"
+])
+
+if test "$enable_libnotify" = "no"
+then
+ HAVE_LIBNOTIFY="no"
+ echo "Disabling libnotify support"
+else
+ PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= $LIBNOTIFY_REQUIRED,
+ HAVE_LIBNOTIFY="yes", HAVE_LIBNOTIFY="no")
+
+ if test "x$HAVE_LIBNOTIFY" = "xyes"
+ then
+ AC_DEFINE(HAVE_LIBNOTIFY, 1, [libnotify available])
+ fi
fi
+AM_CONDITIONAL(LIBNOTIFY, test -n "$LIBNOTIFY_LIBS")
+
AC_SUBST(LIBNOTIFY_CFLAGS)
AC_SUBST(LIBNOTIFY_LIBS)
|