From 2a4f7f2cfaf6ac5ffaf4cc2b43fa0e9b5fa3ebe4 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Wed, 22 Feb 2017 09:39:25 +0100 Subject: 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 1e0143c159134337a00a91d4ae64e614f72da62e https://fedorahosted.org/freeipa/ticket/6418 Reviewed-By: Alexander Bokovoy --- configure.ac | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 81f74f1e9..2d84426d1 100644 --- a/configure.ac +++ b/configure.ac @@ -171,7 +171,20 @@ PKG_CHECK_MODULES([SASL], [libsasl2]) dnl --------------------------------------------------------------------------- dnl - Check for XMLRPC-C 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 - Check for libintl -- cgit