From 1f1648691de6687e748c5b8267f43cf196bd7cc9 Mon Sep 17 00:00:00 2001 From: Petr Spacek Date: Oct 24 2016 11:30:12 +0000 Subject: 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 --- diff --git a/configure.ac b/configure.ac index 7effd86..217f815 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