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 33 34 35 36 37
|
Description: Use pkgconfig to configure libxml-2.0
xml2-config to be removed from Debian packaging
Author: Valentin Vidic <vvidic@debian.org>
Last-Update: 2020-02-15
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/configure.ac
+++ b/configure.ac
@@ -516,7 +516,6 @@
AC_PATH_PROGS(MAILCMD, mailx mail)
AC_PATH_PROGS(EGREP, egrep)
AC_PATH_PROGS(PKGCONFIG, pkg-config)
-AC_PATH_PROGS(XML2CONFIG, xml2-config)
AC_ARG_ENABLE([doc],
AS_HELP_STRING([--enable-doc], [build documentation (default is yes)]),
@@ -726,16 +725,11 @@
dnl AC_CHECK_HEADERS(netinet/ip_icmp.h)
AC_MSG_CHECKING(for special libxml2 includes)
-if test "x$XML2CONFIG" = "x"; then
- AC_MSG_ERROR(libxml2 config not found)
-else
- XML2HEAD="`$XML2CONFIG --cflags`"
- AC_MSG_RESULT($XML2HEAD)
- AC_CHECK_LIB(xml2, xmlReadMemory)
-fi
-
-CPPFLAGS="$CPPFLAGS $XML2HEAD"
+PKG_CHECK_MODULES(XML, [libxml-2.0])
+CPPFLAGS="$CPPFLAGS $XML_CFLAGS"
+LIBS="$LIBS $XML_LIBS"
+AC_CHECK_LIB(xml2, xmlReadMemory)
AC_CHECK_HEADERS(libxml/xpath.h)
if test "$ac_cv_header_libxml_xpath_h" != "yes"; then
AC_MSG_ERROR(The libxml developement headers were not found)
|