CONFIGURE: Improve detection of xmlrpc_c flags

The pkg-config files for xmlrpc_c libraries are shipped just
in fedora/rhel due to downstream patch. Debian does not have
pkg-config files for xmlrpc_c. Therefore we need to fallback to older
method of detection XMLRPC_*FLAGS which was reverted
by the commit 1e0143c159

https://fedorahosted.org/freeipa/ticket/6418

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Lukas Slebodnik 2017-02-22 09:39:25 +01:00 committed by Martin Basti
parent 990ce9eef3
commit 2a4f7f2cfa

View File

@ -171,7 +171,20 @@ PKG_CHECK_MODULES([SASL], [libsasl2])
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl - Check for XMLRPC-C dnl - Check for XMLRPC-C
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
PKG_CHECK_MODULES([XMLRPC], [xmlrpc xmlrpc_client xmlrpc_util]) PKG_CHECK_MODULES([XMLRPC], [xmlrpc xmlrpc_client xmlrpc_util], [],
[try_xmlrpc_fallback=true])
if test x"$try_xmlrpc_fallback" = xtrue; then
XMLRPC_LIBS=
AC_CHECK_HEADER([xmlrpc-c/base.h], [],
[AC_MSG_ERROR([xmlrpc-c/base.h not found])])
AC_CHECK_LIB([xmlrpc_client], [xmlrpc_client_init2],
[XMLRPC_LIBS="-lxmlrpc -lxmlrpc_client -lxmlrpc_util"])
if test "x$XMLRPC_LIBS" = "x" ; then
AC_MSG_ERROR([xmlrpc-c not found])
fi
AC_SUBST(XMLRPC_LIBS)
fi
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl - Check for libintl dnl - Check for libintl