[banshee] build: Add a --disable-webkit flag to configure (bgo#628518)



commit 00c17118323a3519ae0e05b1fd431c5672925ff7
Author: Arun Raghavan <ford_prefect gentoo org>
Date:   Tue May 24 01:20:29 2011 +0000

    build: Add a --disable-webkit flag to configure (bgo#628518)
    
    This option allows you to disable all extensions that depend on webkit,
    which brings reality closer to what is said in README.
    
    Signed-off-by: Bertrand Lorentz <bertrand lorentz gmail com>

 build/m4/banshee/libwebkit.m4 |   43 ++++++++++++++++++++++++----------------
 1 files changed, 26 insertions(+), 17 deletions(-)
---
diff --git a/build/m4/banshee/libwebkit.m4 b/build/m4/banshee/libwebkit.m4
index 656762f..6c8c6eb 100644
--- a/build/m4/banshee/libwebkit.m4
+++ b/build/m4/banshee/libwebkit.m4
@@ -4,24 +4,33 @@ AC_DEFUN([BANSHEE_CHECK_LIBWEBKIT],
 	SOUP_MIN_VERSION=2.26
 	SOUP_GNOME_MIN_VERSION=2.26
 
-	have_libwebkit=no
-	PKG_CHECK_MODULES(LIBWEBKIT,
-		webkit-1.0 >= $WEBKIT_MIN_VERSION
-		libsoup-2.4 >= $SOUP_MIN_VERSION,
-		have_libwebkit=yes, have_libwebkit=no)
-	AC_SUBST(LIBWEBKIT_LIBS)
-	AC_SUBST(LIBWEBKIT_CFLAGS)
-	AM_CONDITIONAL(HAVE_LIBWEBKIT, [test x$have_libwebkit = xyes])
+	AC_ARG_ENABLE(webkit, AC_HELP_STRING([--disable-webkit], [Disable extensions which require WebKit]), , enable_webkit="yes")
 
-	have_libsoup_gnome=no
-	PKG_CHECK_MODULES(LIBSOUP_GNOME,
-		libsoup-gnome-2.4 >= $SOUP_GNOME_MIN_VERSION,
-		have_libsoup_gnome=$have_libwebkit, have_libsoup_gnome=no)
-	AC_SUBST(LIBSOUP_GNOME_LIBS)
-	AC_SUBST(LIBSOUP_GNOME_CFLAGS)
-	AM_CONDITIONAL(HAVE_LIBSOUP_GNOME, [test x$have_libsoup_gnome = xyes])
-	if test x$have_libsoup_gnome = xyes; then
-		AC_DEFINE(HAVE_LIBSOUP_GNOME, 1, [libsoup-gnome-2.4 detected])
+	if test "x$enable_webkit" = "xyes"; then
+		have_libwebkit=no
+		PKG_CHECK_MODULES(LIBWEBKIT,
+			webkit-1.0 >= $WEBKIT_MIN_VERSION
+			libsoup-2.4 >= $SOUP_MIN_VERSION,
+			have_libwebkit=yes, have_libwebkit=no)
+		AC_SUBST(LIBWEBKIT_LIBS)
+		AC_SUBST(LIBWEBKIT_CFLAGS)
+		AM_CONDITIONAL(HAVE_LIBWEBKIT, [test x$have_libwebkit = xyes])
+
+		have_libsoup_gnome=no
+		PKG_CHECK_MODULES(LIBSOUP_GNOME,
+			libsoup-gnome-2.4 >= $SOUP_GNOME_MIN_VERSION,
+			have_libsoup_gnome=$have_libwebkit, have_libsoup_gnome=no)
+		AC_SUBST(LIBSOUP_GNOME_LIBS)
+		AC_SUBST(LIBSOUP_GNOME_CFLAGS)
+		AM_CONDITIONAL(HAVE_LIBSOUP_GNOME, [test x$have_libsoup_gnome = xyes])
+		if test x$have_libsoup_gnome = xyes; then
+			AC_DEFINE(HAVE_LIBSOUP_GNOME, 1, [libsoup-gnome-2.4 detected])
+		fi
+	else
+		have_libwebkit=no
+		have_libsoup_gnome=no
+		AM_CONDITIONAL(HAVE_LIBWEBKIT, false)
+		AM_CONDITIONAL(HAVE_LIBSOUP_GNOME, false)
 	fi
 ])
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]