From 1f1648691de6687e748c5b8267f43cf196bd7cc9 Mon Sep 17 00:00:00 2001 From: Petr Spacek Date: Fri, 14 Oct 2016 12:07:56 +0200 Subject: [PATCH] Build: modernize POPT library detection Use package config instead of checking headers. Package config is faster because it does not invoke compiler and guarantees proper linking flags because these are provided by package maintainer instead of hardcoded into build system. https://fedorahosted.org/freeipa/ticket/6418 Reviewed-By: Lukas Slebodnik Reviewed-By: Stanislav Laznicka Reviewed-By: Christian Heimes --- configure.ac | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 7effd8686..217f81536 100644 --- a/configure.ac +++ b/configure.ac @@ -209,11 +209,7 @@ PKG_CHECK_MODULES([SSSNSSIDMAP], [sss_nss_idmap >= 1.13.90]) dnl --------------------------------------------------------------------------- dnl - Check for POPT dnl --------------------------------------------------------------------------- - -POPT_LIBS= -AC_CHECK_HEADER(popt.h, [], [AC_MSG_ERROR([popt.h not found])]) -AC_CHECK_LIB(popt, poptGetContext, [POPT_LIBS="-lpopt"]) -AC_SUBST(POPT_LIBS) +PKG_CHECK_MODULES([POPT], [popt]) dnl --------------------------------------------------------------------------- dnl - Check for SASL