From 79c72fc860553b85df51cedb580342fe765cda00 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Wed, 12 Jun 2013 11:26:32 +0200 Subject: [PATCH] libxml2 is now mandatory. --- configure.ac | 13 ++++--------- coreapi/Makefile.am | 6 ++++-- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 5c3b8bb92..5bbb5f645 100644 --- a/configure.ac +++ b/configure.ac @@ -202,15 +202,10 @@ if test "$build_upnp" != "false" ; then AC_DEFINE(BUILD_UPNP, 1, [Define if upnp enabled]) fi -dnl check libxml2 (needed for tools) -if test "$build_tools" != "false" ; then - PKG_CHECK_MODULES(LIBXML2, [libxml-2.0],[], - [if test "$build_tools" = "true" ; then - AC_MSG_ERROR([Could not found libxml2, tools cannot be compiled.]) - else - build_tools=false - fi] - ) +dnl check libxml2 +PKG_CHECK_MODULES(LIBXML2, [libxml-2.0],[libxml2_found=yes],foo=bar) +if test "$libxml2_found" != "yes" ; then + AC_MSG_ERROR([libxml2 not found. Install it and try again (the package is usually named libxml2-dev in the Linux distributions)]) fi AM_CONDITIONAL(BUILD_TOOLS, test x$build_tools != xfalse) diff --git a/coreapi/Makefile.am b/coreapi/Makefile.am index c9c1b62b8..8184a3df0 100644 --- a/coreapi/Makefile.am +++ b/coreapi/Makefile.am @@ -92,7 +92,8 @@ liblinphone_la_LIBADD= \ $(ORTP_LIBS) $(OPENSSL_LIBS) \ $(TUNNEL_LIBS) \ $(LIBSOUP_LIBS) \ - $(SQLITE3_LIBS) + $(SQLITE3_LIBS) \ + $(LIBXML2_LIBS) if ENABLE_TESTS @@ -126,7 +127,8 @@ AM_CFLAGS=\ -DORTP_INET6 \ $(VIDEO_CFLAGS) \ $(TUNNEL_CFLAGS) \ - $(SQLITE3_CFLAGS) + $(SQLITE3_CFLAGS) \ + $(LIBXML2_CFLAGS) if BUILD_WIZARD AM_CFLAGS+= -DBUILD_WIZARD