configure.ac: Use pkg-config to detect libxml2

Use pkg-config to detect libxml2, falling back to xml2-config if the
former is not available.

This patch ensures Asterisk continues to build on systems without
xml2-config installed.

The patch also updates the associated 'configure' files.

ASTERISK-29970 #close

Change-Id: I3c90dfe0b0590486cbb8e6d426a7c5c4199410c0
This commit is contained in:
Hugh McMaster
2022-03-16 11:06:44 +11:00
committed by Friendly Automation
parent 287a1a9126
commit 64f11e0d18
4 changed files with 11861 additions and 9562 deletions

View File

@@ -737,6 +737,7 @@ fi
# See if clock_gettime is in librt
AST_EXT_LIB_CHECK([RT], [rt], [clock_gettime], [])
AST_PKG_CONFIG_CHECK([LIBXML2], [libxml-2.0])
AST_EXT_TOOL_CHECK([LIBXML2], [xml2-config], , ,
[#include <libxml/tree.h>
#include <libxml/parser.h>],