Build: modernize SASL 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:08:30 +02:00 committed by David Kupka
parent 1f1648691d
commit fd3176a729

View File

@ -214,11 +214,7 @@ PKG_CHECK_MODULES([POPT], [popt])
dnl ---------------------------------------------------------------------------
dnl - Check for SASL
dnl ---------------------------------------------------------------------------
SASL_LIBS=
AC_CHECK_HEADER(sasl/sasl.h, [], [AC_MSG_ERROR([sasl/sasl.h not found])])
AC_CHECK_LIB(sasl2, sasl_client_init, [SASL_LIBS="-lsasl2"])
AC_SUBST(SASL_LIBS)
PKG_CHECK_MODULES([SASL], [libsasl2])
dnl ---------------------------------------------------------------------------
dnl - Check for CURL