From fd3176a72951a2baece36620341991feb94b230a Mon Sep 17 00:00:00 2001 From: Petr Spacek Date: Oct 24 2016 11:30:12 +0000 Subject: 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 Reviewed-By: Stanislav Laznicka Reviewed-By: Christian Heimes --- diff --git a/configure.ac b/configure.ac index 217f815..aa01783 100644 --- a/configure.ac +++ b/configure.ac @@ -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