summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2017-02-22 09:39:25 +0100
committerMartin Basti <mbasti@redhat.com>2017-03-15 16:13:00 +0100
commit2a4f7f2cfaf6ac5ffaf4cc2b43fa0e9b5fa3ebe4 (patch)
treef1b1e076204138a41bdb2846a0ad57ae4b16c7fd
parent990ce9eef314622440b2036742bbf34f57ba2699 (diff)
downloadfreeipa-2a4f7f2cfaf6ac5ffaf4cc2b43fa0e9b5fa3ebe4.tar.gz
freeipa-2a4f7f2cfaf6ac5ffaf4cc2b43fa0e9b5fa3ebe4.tar.xz
freeipa-2a4f7f2cfaf6ac5ffaf4cc2b43fa0e9b5fa3ebe4.zip
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 <abokovoy@redhat.com>
-rw-r--r--configure.ac15
1 files changed, 14 insertions, 1 deletions
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