From 28d80d0a6ecae728595a55d43b6ccfd0d58a0c53 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Tue, 27 Apr 2010 00:18:43 +0200 Subject: [PATCH] Compatibility fix: improve detection of SASL libraries. --- configure.in | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) 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 -- 2.47.3