[libgda] Avoid Libsoup automagic dependency, fixes bug #584398



commit 568cf3ded8a9c066a4da54ba3672d8b968522c66
Author: Vivien Malerba <malerba gnome-db org>
Date:   Wed Jun 3 22:44:15 2009 +0200

    Avoid Libsoup automagic dependency, fixes bug #584398
---
 configure.in |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/configure.in b/configure.in
index fb46e5a..0d3a2a9 100644
--- a/configure.in
+++ b/configure.in
@@ -1348,12 +1348,23 @@ export LD_LIBRARY_PATH="$save_LD_LIBRARY_PATH"
 dnl ************************
 dnl Check for libsoup
 dnl ************************
-PKG_CHECK_MODULES(LIBSOUP, libsoup-2.4, have_libsoup=yes, have_libsoup=no)
-AM_CONDITIONAL(LIBSOUP, test x"$have_libsoup" = "xyes")
-if test x"$have_libsoup" = "xyes"
+
+AC_ARG_WITH(libsoup,
+	AS_HELP_STRING([--with-libsoup], [Enable libsoup support]),
+	,with_libsoup=auto)
+
+if test "$with_libsoup" = "auto" -o "$with_libsoup" = "yes"
 then
-        LIBSOUP_CFLAGS="$LIBSOUP_CFLAGS -DHAVE_LIBSOUP"
+	PKG_CHECK_MODULES(LIBSOUP, libsoup-2.4, [
+		AC_DEFINE(HAVE_LIBSOUP, [1], [libsoup support enable])
+		have_libsoup=yes], [
+		if test "$with_libsoup" = "yes"
+		then
+			AC_MSG_ERROR([libsoup support requested but not found.])
+		fi
+		have_libsoup=no])
 fi
+AM_CONDITIONAL(LIBSOUP, test "$have_libsoup" = "yes")
 AC_SUBST(LIBSOUP_CFLAGS)
 AC_SUBST(LIBSOUP_LIBS)
 



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