summaryrefslogtreecommitdiff
blob: 095dc2577ffc26806845ee8f0720e4bf9afa8f0b (plain)
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
41
42
43
44
45
46
47
48
---
 Fix automagic libcanberra detection.

 Gentoo: https://bugs.gentoo.org/show_bug.cgi?id=266232
 Gnome: https://bugzilla.gnome.org/show_bug.cgi?id=579031

 configure.ac |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 90ed936..61b10de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -118,13 +118,24 @@ LIBCANBERRA_GTK_REQUIRED=0.3
 DBUS_GLIB_REQUIRED=0.35
 
 PKG_CHECK_EXISTS([libnotify >= $LIBNOTIFY_REQUIRED],[have_libnotify=yes],[have_libnotify=no])
-PKG_CHECK_EXISTS([libcanberra-gtk >= $LIBCANBERRA_GTK_REQUIRED],[have_libcanberra_gtk=yes],[have_libcanberra_gtk=no])
+
+AC_ARG_ENABLE([canberra],
+	AC_HELP_STRING([--enable-canberra],
+	[Enable canberra support @<:@default=yes@:>@]),
+	enable_canberra=$enableval, enable_canberra=yes)
 
 LIBCANBERRA_GTK_PACKAGE=
-if test "$have_libcanberra_gtk" = "yes"; then
-  LIBCANBERRA_GTK_PACKAGE="libcanberra-gtk >= $LIBCANBERRA_GTK_REQUIRED"
-  AC_DEFINE([HAVE_LIBCANBERRA_GTK],[1],[Define if libcanberra-gtk is available])
+have_libcanberra_gtk=no
+if test "$enable_canberra" = "yes"; then
+   PKG_CHECK_EXISTS([libcanberra-gtk >= $LIBCANBERRA_GTK_REQUIRED],[have_libcanberra_gtk=yes],
+   [have_libcanberra_gtk=no])
+
+   if test "$have_libcanberra_gtk" = "yes"; then
+      LIBCANBERRA_GTK_PACKAGE="libcanberra-gtk >= $LIBCANBERRA_GTK_REQUIRED"
+      AC_DEFINE([HAVE_LIBCANBERRA_GTK],[1],[Define if libcanberra-gtk is available])
+   fi
 fi
+
 LIBNOTIFY_PACKAGE=
 if test "$have_libnotify" = "yes"; then
   LIBNOTIFY_PACKAGE="libnotify >= $LIBNOTIFY_REQUIRED"
@@ -772,4 +783,5 @@ Epiphany was configured with the following options:
  
 	Gecko backend              : $gecko_cv_gecko version $gecko_cv_gecko_version
 	PSM support                : $enable_psm
+	Canberra support	   : $have_libcanberra_gtk
 "