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
|
diff --git a/configure.in b/configure.in
index 548667d..9b58cb2 100644
--- a/configure.in
+++ b/configure.in
@@ -1339,12 +1316,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_soup=auto)
+
+if test "$with_libsoup" = "auto" -a "$with_libsoup" = "yes"
then
- LIBSOUP_CFLAGS="$LIBSOUP_CFLAGS -DHAVE_LIBSOUP"
+ PKG_CHECK_MODULES(LIBSOUP, libsoup-2.4, [
+ AC_DEFINE(HAVE_LIBSOUP, [], [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)
|