From: Francesco Chemolli Date: Mon, 26 Apr 2010 22:18:43 +0000 (+0200) Subject: Compatibility fix: improve detection of SASL libraries. X-Git-Tag: SQUID_3_2_0_1~267 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=28d80d0a6ecae728595a55d43b6ccfd0d58a0c53;p=thirdparty%2Fsquid.git Compatibility fix: improve detection of SASL libraries. --- diff --git a/configure.in b/configure.in index 8bcba74fe7..d3231ae6e0 100644 --- a/configure.in +++ b/configure.in @@ -1979,19 +1979,13 @@ AC_ARG_ENABLE(win32-service, # Check for Cyrus SASL if test "$squid_require_sasl" = "yes"; then - AC_CHECK_HEADERS(sasl/sasl.h sasl.h) - if test "$ac_cv_header_sasl_sasl_h" = "yes"; then - AC_MSG_NOTICE([using SASL2]) - LIBSASL="-lsasl2" - else - if test "$ac_cv_header_sasl_h" = "yes"; then - AC_MSG_NOTICE([using SASL]) - LIBSASL="-lsasl" - else - AC_MSG_ERROR(Neither SASL nor SASL2 found) - fi - fi - AC_SUBST(LIBSASL) + AC_CHECK_HEADERS(sasl/sasl.h sasl.h) + AC_CHECK_LIB(sasl2,sasl_errstring,[LIBSASL="-lsasl2"],[ + AC_CHECK_LIB(sasl,sasl_errstring,[LIBSASL="-lsasl"], [ + AC_MSG_ERROR(Neither SASL nor SASL2 found) + ]) + ]) + AC_SUBST(LIBSASL) fi # Disable "unlinkd" code