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 <lslebodn@redhat.com>
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
Petr Spacek 2016-10-14 12:07:56 +02:00 committed by David Kupka
parent 0d7d6f3904
commit 1f1648691d

View File

@ -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