Allow building even if libxml2 doesn't ship /usr/bin/xml2-config
Howdy,
It seems to be common practice to use pkg-config for these options, but currently if libxml2-dev doesn't contain xml2-config, the package fails to build. The patch below moves to using pkg-config directly.
Description: Migrate from using xml2-config to pkg-config
Author: Unit 193 <unit193@debian.org>
---
configure.ac | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--- a/configure.ac 2020-10-07 20:29:12.654454622 -0400
+++ b/configure.ac 2020-10-07 20:29:12.646454694 -0400
@@ -166,9 +166,12 @@
AC_CHECK_FUNCS([gettimeofday ftime])
-XIPH_PATH_XML
-XIPH_VAR_APPEND([XIPH_CFLAGS], [$XML_CFLAGS])
-XIPH_VAR_PREPEND([XIPH_LIBS], [$XML_LIBS])
+PKG_CHECK_MODULES([LIBXML2], [libxml-2.0], [], [
+ AC_MSG_ERROR([${LIBXML2_PKG_ERRORS}. libxml2 is required.])
+])
+
+CFLAGS="${CFLAGS} ${LIBXML2_CFLAGS}"
+LIBS="${LIBS} ${LIBXML2_LIBS}"
XIPH_PATH_SHOUT(, AC_MSG_ERROR([must have libshout installed!]))
if test "$SHOUT_THREADSAFE" != "yes"