diff options
author | Lukas Slebodnik <lslebodn@redhat.com> | 2017-02-22 09:39:20 +0100 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2017-03-15 08:55:44 +0000 |
commit | 4fe9166ac9f9a100d69ce37f19ae1ae971bb2ce1 (patch) | |
tree | f6970bdfcef26851c7aedbfc32de5cd701daceea | |
parent | b7329e31f5c985b9721e3a21b1cd1bec6430129d (diff) | |
download | freeipa-4fe9166ac9f9a100d69ce37f19ae1ae971bb2ce1.tar.gz freeipa-4fe9166ac9f9a100d69ce37f19ae1ae971bb2ce1.tar.xz freeipa-4fe9166ac9f9a100d69ce37f19ae1ae971bb2ce1.zip |
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 "
Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
-rw-r--r-- | configure.ac | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 4a3ba15a5..28f6f1359 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 |