From 1998bd2d36609dbd746f5dde647beadf4e0ff61d Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Mon, 18 Feb 2013 01:40:15 +0100 Subject: Switch libxml2 detection to pkg-config macros --- configure.ac | 10 ++++------ libcsoap.pc.in | 4 ++-- wsdl2c/Makefile.am | 4 ++-- xsd2c/Makefile.am | 4 ++-- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index 18943df..eab2517 100644 --- a/configure.ac +++ b/configure.ac @@ -344,12 +344,10 @@ AC_CHECK_LIB(nsl, inet_ntoa, [LIBNSL="-lnsl"]) AC_CHECK_LIB(nsl, gethostbyname, [LIBNSL="-lnsl"]) AC_SUBST(LIBNSL) -AM_PATH_XML2(2.6.0, - CFLAGS="$CFLAGS $XML_CPPFLAGS"; - LDFLAGS="$LDFLAGS $XML_LIBS" -, - exit 1 -) +PKG_CHECK_MODULES(libxml2, libxml-2.0 >= 2.6.0) + +CFLAGS="$CFLAGS $libxml2_CFLAGS" +LDFLAGS="$LDFLAGS $libxml2_LIBS" # ------------------------------------------ # Check ssl library diff --git a/libcsoap.pc.in b/libcsoap.pc.in index c210155..3c4af44 100644 --- a/libcsoap.pc.in +++ b/libcsoap.pc.in @@ -6,6 +6,6 @@ includedir=@includedir@ Name: csoap Description: C API for SOAP applications Version: @csoap_major@.@csoap_minor@.@csoap_patch@ -Libs: -L${libdir} -lcsoap-@csoap_release@ -lnanohttp-@nanohttp_release@ @XML_LIBS@ -Cflags: @XML_CPPFLAGS@ -I${includedir}/libcsoap-@csoap_release@ -I${includedir}/nanohttp-@nanohttp_release@ +Libs: -L${libdir} -lcsoap-@csoap_release@ -lnanohttp-@nanohttp_release@ @libxml2_LIBS@ +Cflags: @libxml2_CFLAGS@ -I${includedir}/libcsoap-@csoap_release@ -I${includedir}/nanohttp-@nanohttp_release@ diff --git a/wsdl2c/Makefile.am b/wsdl2c/Makefile.am index e56ab0b..74a1ac0 100755 --- a/wsdl2c/Makefile.am +++ b/wsdl2c/Makefile.am @@ -4,8 +4,8 @@ bin_PROGRAMS=wsdl2c -INCLUDES=$(LIBXML_CFLAGS) -I$(top_srcdir) -wsdl2cl_LDFLAG=$(LIBXML_LIBS) +INCLUDES=$(libxml2_CFLAGS) -I$(top_srcdir) +wsdl2cl_LDFLAG=$(libxml2_LIBS) xsd2c_root= $(top_srcdir)/xsd2c diff --git a/xsd2c/Makefile.am b/xsd2c/Makefile.am index 85bd8cf..8a19b30 100755 --- a/xsd2c/Makefile.am +++ b/xsd2c/Makefile.am @@ -3,8 +3,8 @@ # bin_PROGRAMS=xsd2c -INCLUDES=$(LIBXML_CFLAGS) -x_LDFLAG=$(LIBXML_LIBS) +INCLUDES=$(libxml2_CFLAGS) -I$(top_srcdir) +x_LDFLAG=$(libxml2_LIBS) xsd2c_SOURCES=tr.c Enumeration.c util.c obj.c formatter.c xsd2c.c main.c xsd2c_LDFLAGS=$(x_LDFLAG) -- cgit v1.1-32-gdbae