1neon: Change the neon configure to use pkg-config instead of xml2-config 2 3xml2-config is broken for neon 4if packageconfig libxml2, webdav, zlib is enabled for neon 5we get the following configure error in the yocto build 6 7| configure: WebDAV support is enabled 8| checking for xml2-config... xml2-config 9| ERROR: /usr/bin/xml2-config should not be used, use an alternative such as pkg-config 10| ERROR: /usr/bin/xml2-config should not be used, use an alternative such as pkg-config 11| ERROR: /usr/bin/xml2-config should not be used, use an alternative such as pkg-config 12| checking libxml/xmlversion.h usability... no 13| checking libxml/xmlversion.h presence... no 14| checking for libxml/xmlversion.h... no 15| configure: error: could not find parser.h, libxml installation problem? 16| WARNING: exit code 1 from a shell command. 17 18The patch lets configure use pkg-config 19 20Upstream-Status: inappropriate 21(Upstream suggests to use latest 0.31 as per the discussion 22https://github.com/notroj/neon/discussions/47) 23 24Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com> 25--- a/macros/neon-xml-parser.m4 2008-07-19 23:52:35.000000000 +0200 26+++ b/macros/neon-xml-parser.m4 2021-02-15 23:56:59.202751257 +0100 27@@ -44,17 +44,17 @@ 28 29 dnl Find libxml2: run $1 if found, else $2 30 AC_DEFUN([NE_XML_LIBXML2], [ 31-AC_CHECK_PROG(XML2_CONFIG, xml2-config, xml2-config) 32+AC_CHECK_PROG(XML2_CONFIG, pkg-config, pkg-config) 33 if test -n "$XML2_CONFIG"; then 34- neon_xml_parser_message="libxml `$XML2_CONFIG --version`" 35 AC_DEFINE(HAVE_LIBXML, 1, [Define if you have libxml]) 36- # xml2-config in some versions erroneously includes -I/include 37- # in the --cflags output. 38- CPPFLAGS="$CPPFLAGS `$XML2_CONFIG --cflags | sed 's| -I/include||g'`" 39- NEON_LIBS="$NEON_LIBS `$XML2_CONFIG --libs | sed 's|-L/usr/lib ||g'`" 40+ PKG_CHECK_MODULES(XML, libxml-2.0 >= 2.4) 41+ AC_MSG_NOTICE([libxmlfound CFlags : , ${XML_CFLAGS}]) 42+ CPPFLAGS="$CPPFLAGS ${XML_CFLAGS}" 43+ NEON_LIBS="$NEON_LIBS ${XML_LIBS}" 44 AC_CHECK_HEADERS(libxml/xmlversion.h libxml/parser.h,,[ 45 AC_MSG_ERROR([could not find parser.h, libxml installation problem?])]) 46 neon_xml_parser=libxml2 47+ neon_xml_parser_message="libxml2" 48 else 49 $1 50 fi 51