--- 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 "