1 # ===========================================================================
2 # http://www.tangent.org/
3 # ===========================================================================
11 # Check for sasl version one or two support.
15 # Copyright (c) 2012 Brian Aker <brian@tangent.org>
17 # Copying and distribution of this file, with or without modification, are
18 # permitted in any medium without royalty provided the copyright notice
19 # and this notice are preserved. This file is offered as-is, without any
24 AC_DEFUN([AX_SASL_OPTION],[
25 AC_REQUIRE([AX_SASL_CHECK])
27 [AS_HELP_STRING([--disable-sasl], [Build with sasl support @<:@default=on@:>@])],
28 [ac_enable_sasl="$enableval"],
29 [ac_enable_sasl="yes"])
31 AS_IF([test "x$ac_enable_sasl" = "xyes"], [
35 AS_IF([test "x$ac_enable_sasl" = "xyes"], [
36 AC_DEFINE([HAVE_LIBSASL], [ 1 ], [Have libsasl2])
38 AC_DEFINE([HAVE_LIBSASL], [ 0 ], [Have libsasl2])
41 AM_CONDITIONAL(HAVE_SASL, test "x${ac_enable_sasl}" = "xyes")
45 AC_DEFUN([AX_SASL_CHECK],[
47 AX_CHECK_LIBRARY([LIBSASL], [sasl/sasl.h], [sasl2],[
48 LIBSASL_LDFLAGS="-lsasl2"