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_REQUIRE([AX_SASL_CHECK])
28 [AS_HELP_STRING([--disable-sasl], [Build with sasl support @<:@default=on@:>@])],
29 [ac_enable_sasl="$enableval"],
32 AS_IF([test "x${ac_enable_sasl}" = xyes],[
33 AC_MSG_CHECKING([checking to see if enabling sasl])
34 AS_IF([test "x${ax_sasl_check}" = xyes],[
36 AC_MSG_WARN([request to add sasl support failed, please see config.log])
39 AC_MSG_RESULT(["$ax_sasl_option"])],[
41 AM_CONDITIONAL([HAVE_SASL],[test "x${ax_sasl_option}" = xyes])
44 AC_DEFUN([AX_SASL_CHECK],[
45 AX_CHECK_LIBRARY([LIBSASL],[sasl/sasl.h],[sasl2],[
47 AC_SUBST([SASL_LIB],[[-lsasl2]])],[
49 AC_MSG_CHECKING([checking to see if sasl works])
50 AC_MSG_RESULT(["$ax_sasl_check"])