[Asterisk-code-review] configure.ac: Use pkg-config to detect libxml2 (asterisk[18.10])

Hugh McMaster asteriskteam at digium.com
Tue Mar 15 05:39:12 CDT 2022


Hugh McMaster has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/18241 )


Change subject: configure.ac: Use pkg-config to detect libxml2
......................................................................

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.

ASTERISK-29970 #close

Change-Id: I3c90dfe0b0590486cbb8e6d426a7c5c4199410c0
---
M configure.ac
M menuselect/configure.ac
2 files changed, 3 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/41/18241/1

diff --git a/configure.ac b/configure.ac
index 9eb62b8..196bae3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -744,6 +744,7 @@
 # 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>],
diff --git a/menuselect/configure.ac b/menuselect/configure.ac
index 4629d52..589f082 100644
--- a/menuselect/configure.ac
+++ b/menuselect/configure.ac
@@ -45,6 +45,7 @@
 AC_PROG_CC
 AST_CHECK_GNU_MAKE
 
+PKG_PROG_PKG_CONFIG
 
 AC_LANG(C)
 AC_ARG_ENABLE([debug],
@@ -90,6 +91,7 @@
   AST_EXT_LIB_CHECK([TINFO], [tinfo], [keypad], [curses.h])
 fi
 
+AST_PKG_CONFIG_CHECK([LIBXML2], [libxml-2.0])
 AST_EXT_TOOL_CHECK([LIBXML2], [xml2-config], , ,
         [#include <libxml/tree.h>
         #include <libxml/parser.h>],

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18241
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 18.10
Gerrit-Change-Id: I3c90dfe0b0590486cbb8e6d426a7c5c4199410c0
Gerrit-Change-Number: 18241
Gerrit-PatchSet: 1
Gerrit-Owner: Hugh McMaster <hugh.mcmaster at outlook.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220315/3fee9ecc/attachment.html>


More information about the asterisk-code-review mailing list