# Copyright (C) 2001-2023 Zabbix SIA
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
AC_DEFUN([LIBXML2_CHECK_CONFIG],
If you want to use XML library:
AS_HELP_STRING([--with-libxml2@<:@=ARG@:>@],
[use libxml2 client library @<:@default=no@:>@, see PKG_CONFIG_PATH environment variable to specify .pc file location]
if test "$withval" = "no"; then
elif test "$withval" = "yes"; then
dnl Check libxml2 libraries
if test "$want_libxml2" = "yes"; then
AC_REQUIRE([PKG_PROG_PKG_CONFIG])
m4_ifdef([PKG_PROG_PKG_CONFIG], [PKG_PROG_PKG_CONFIG()], [:])
if test -x "$PKG_CONFIG"; then
LIBXML2_CFLAGS="`$PKG_CONFIG --cflags libxml-2.0`"
_full_libxml2_libs="`$PKG_CONFIG --libs libxml-2.0`"
for i in $_full_libxml2_libs; do