[PATCH 2/5] connectivity: Add libxml2 as a dependency



From: Jonh Wendell <jonh wendell oiwifi com br>

libsoup already depends on libxml2 but we need to explicitly link
to it.

Signed-off-by: Jonh Wendell <jonh wendell oiwifi com br>
---
 configure.ac    | 14 +++++++++++---
 src/Makefile.am |  4 ++--
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 916561a..49a6203 100644
--- a/configure.ac
+++ b/configure.ac
@@ -573,15 +573,23 @@ fi
 AC_DEFINE_UNQUOTED(KERNEL_FIRMWARE_DIR, "$KERNEL_FIRMWARE_DIR", [Define to path of the kernel firmware directory])
 AC_SUBST(KERNEL_FIRMWARE_DIR)
 
+PKG_CHECK_MODULES(LIBXML, [libxml-2.0], [have_libxml=yes],[have_libxml=no])
 PKG_CHECK_MODULES(LIBSOUP, [libsoup-2.4 >= 2.26], [have_libsoup=yes],[have_libsoup=no])
+if test x"$have_libsoup" = x"yes" -a x"$have_libxml" = x"yes"; then
+    can_have_connectivity="yes"
+else
+    can_have_connectivity="no"
+fi
 AC_ARG_ENABLE(concheck, AS_HELP_STRING([--enable-concheck], [enable connectivity checking support]),
-                     [enable_concheck=${enableval}], [enable_concheck=${have_libsoup}])
+                     [enable_concheck=${enableval}], [enable_concheck=${can_have_connectivity}])
 if (test "${enable_concheck}" = "yes"); then
-	if test x"$have_libsoup" = x"no"; then
-		AC_MSG_ERROR(Connectivity checking requires libsoup development headers)
+	if test x"$can_have_connectivity" = x"no"; then
+		AC_MSG_ERROR(Connectivity checking requires libsoup and libxml2 development headers)
 	fi
 	AC_SUBST(LIBSOUP_CFLAGS)
 	AC_SUBST(LIBSOUP_LIBS)
+	AC_SUBST(LIBXML_CFLAGS)
+	AC_SUBST(LIBXML_LIBS)
 	AC_DEFINE(WITH_CONCHECK, 1, [Define if you want connectivity checking support])
 else
 	AC_DEFINE(WITH_CONCHECK, 0, [Define if you want connectivity checking support])
diff --git a/src/Makefile.am b/src/Makefile.am
index 9d306a7..54eaea9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -316,7 +316,7 @@ NetworkManager_CPPFLAGS = \
 	-DARP_DEBUG
 
 if WITH_CONCHECK
-NetworkManager_CPPFLAGS += $(LIBSOUP_CFLAGS)
+NetworkManager_CPPFLAGS += $(LIBSOUP_CFLAGS) $(LIBXML_CFLAGS)
 endif
 
 if SESSION_TRACKING_CK
@@ -350,7 +350,7 @@ NetworkManager_LDADD = \
 	$(LIBDL)
 
 if WITH_CONCHECK
-NetworkManager_LDADD += $(LIBSOUP_LIBS)
+NetworkManager_LDADD += $(LIBSOUP_LIBS) $(LIBXML_LIBS)
 endif
 
 NetworkManager_LDFLAGS = -rdynamic
-- 
1.8.1.2



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