1 # ===========================================================================
2 # http://www.tangent.org/
3 # ===========================================================================
12 # Check to see if libsasl is requested and available.
16 # Copyright (c) 2012 Brian Aker <brian@tangent.org>
18 # Copying and distribution of this file, with or without modification, are
19 # permitted in any medium without royalty provided the copyright notice
20 # and this notice are preserved. This file is offered as-is, without any
25 AC_DEFUN([AX_SASL_OPTION],
26 [AC_ARG_ENABLE([sasl],
27 [AS_HELP_STRING([--disable-sasl], [Build with sasl support @<:@default=on@:>@])],
28 [ac_enable_sasl="$enableval"],
32 AS_IF([test "x${ac_enable_sasl}" = xyes],
35 AS_IF([test "x${ax_sasl_check}" = xyes],
37 [AC_MSG_WARN([request to add sasl support failed, please see config.log])
41 AC_MSG_CHECKING([checking to see if enabling sasl])
42 AC_MSG_RESULT(["$ax_sasl_option"])
43 AM_CONDITIONAL([HAVE_SASL],[test "x${ax_sasl_option}" = xyes])
46 AC_DEFUN([AX_SASL_CHECK],
48 AX_CHECK_LIBRARY([LIBSASL],[sasl/sasl.h],[sasl2],
50 AC_SUBST([SASL_LIB],[[-lsasl2]])
52 AC_MSG_CHECKING([checking to see if sasl works])
53 AC_MSG_RESULT(["$ax_sasl_check"])