URL: https://github.com/freeipa/freeipa/pull/588 Author: HonzaCholasta Title: #588: CONFIGURE: Properly detect libpopt on el7 Action: opened
PR body: """ libpopt added pkg-config file in 1.16 but there are still distributions which has older version of library (el6, el7). And new features from libpopt are not used anywhere. Configure should try to detect as much as possible and users should not use workarounds with explicitely enabled variables as parameters e.g. ./configure POPT_LIBS="-lpopt " This change originating from PR #494 is required to make building upstream IPA possible on RHEL/CentOS 7. """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/588/head:pr588 git checkout pr588
From 7caede3c79d2053727c33754273ed6826dc26294 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik <lsleb...@redhat.com> Date: Wed, 22 Feb 2017 09:39:20 +0100 Subject: [PATCH] CONFIGURE: Properly detect libpopt on el7 libpopt added pkg-config file in 1.16 but there are still distributions which has older version of library (el6, el7). And new features from libpopt are not used anywhere. Configure should try to detect as much as possible and users should not use workarounds with explicitely enabled variables as parameters e.g. ./configure POPT_LIBS="-lpopt " --- configure.ac | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 4a3ba15..28f6f13 100644 --- a/configure.ac +++ b/configure.ac @@ -155,7 +155,13 @@ AM_CHECK_WRAPPER(nss_wrapper, HAVE_NSS_WRAPPER) dnl --------------------------------------------------------------------------- dnl - Check for POPT dnl --------------------------------------------------------------------------- -PKG_CHECK_MODULES([POPT], [popt]) +POPT_LIBS= +PKG_CHECK_MODULES([POPT], [popt], [], + [AC_CHECK_HEADER([popt.h], [], [AC_MSG_ERROR([popt.h not found])]) + AC_CHECK_LIB([popt], [poptGetContext], [POPT_LIBS="-lpopt"]) + AC_SUBST(POPT_LIBS) + ] +) dnl --------------------------------------------------------------------------- dnl - Check for SASL
-- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code