c3889e5a101a075defe533d81f5296d5e680f639Lukas SlebodnikAC_SUBST(SASL_LIBS)
c3889e5a101a075defe533d81f5296d5e680f639Lukas SlebodnikAC_SUBST(SASL_CFLAGS)
c3889e5a101a075defe533d81f5296d5e680f639Lukas SlebodnikPKG_CHECK_MODULES([SASL], [libsasl2], [found_sasl=yes], [found_sasl=no])
c3889e5a101a075defe533d81f5296d5e680f639Lukas SlebodnikSSS_AC_EXPAND_LIB_DIR()
c3889e5a101a075defe533d81f5296d5e680f639Lukas SlebodnikAS_IF([test x"$found_sasl" != xyes],
c3889e5a101a075defe533d81f5296d5e680f639Lukas Slebodnik [AC_CHECK_HEADERS([sasl/sasl.h],
c3889e5a101a075defe533d81f5296d5e680f639Lukas Slebodnik [AC_CHECK_LIB([sasl2],
c3889e5a101a075defe533d81f5296d5e680f639Lukas Slebodnik [sasl_client_init],
c3889e5a101a075defe533d81f5296d5e680f639Lukas Slebodnik [SASL_LIBS="-L$sss_extra_libdir -lsasl2"],
c3889e5a101a075defe533d81f5296d5e680f639Lukas Slebodnik [AC_MSG_ERROR([SASL library must support sasl_client_init])],
c3889e5a101a075defe533d81f5296d5e680f639Lukas Slebodnik [-L$sss_extra_libdir])],
c3889e5a101a075defe533d81f5296d5e680f639Lukas Slebodnik [AC_MSG_ERROR([SASL header files are not installed])])]