X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=m4%2Fax_sasl.m4;h=44bb65e3c54b296cd190c225a919c7a7dc9711c7;hb=8cfbdaa050b95dff77505eaabfa72d1e4640faa4;hp=303fbd2bef5e1046ae6cca911a2132f6cf7cd9c3;hpb=ac46009041afe0134d3719e7ab6bc467d136ac0b;p=awesomized%2Flibmemcached diff --git a/m4/ax_sasl.m4 b/m4/ax_sasl.m4 index 303fbd2b..44bb65e3 100644 --- a/m4/ax_sasl.m4 +++ b/m4/ax_sasl.m4 @@ -20,34 +20,32 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 2 +#serial 3 AC_DEFUN([AX_SASL_OPTION], - [AC_ARG_ENABLE([sasl], - [AS_HELP_STRING([--disable-sasl], [Build with sasl support @<:@default=on@:>@])], - [ac_enable_sasl="$enableval"], - [ac_enable_sasl=yes]) + [AC_REQUIRE([AX_SASL_CHECK]) + AC_ARG_ENABLE([sasl], + [AS_HELP_STRING([--disable-sasl], [Build with sasl support @<:@default=on@:>@])], + [ac_enable_sasl="$enableval"], + [ac_enable_sasl=yes]) - ax_sasl_option=no - AS_IF([test "x${ac_enable_sasl}" = xyes], - [AX_SASL_CHECK - echo "$ax_sasl_check" - AS_IF([test "x${ax_sasl_check}" = xyes], - [ax_sasl_option=yes], - [AC_MSG_WARN([request to add sasl support failed, please see config.log])]) - ]) + AS_IF([test "x${ac_enable_sasl}" = xyes],[ + AC_MSG_CHECKING([checking to see if enabling sasl]) + AS_IF([test "x${ax_sasl_check}" = xyes],[ + ax_sasl_option=yes],[ + AC_MSG_WARN([request to add sasl support failed, please see config.log]) + ac_enable_sasl=no + ax_sasl_option=no]) + AC_MSG_RESULT(["$ax_sasl_option"])],[ + ax_sasl_option=no]) + AM_CONDITIONAL([HAVE_SASL],[test "x${ax_sasl_option}" = xyes]) + ]) - AC_MSG_CHECKING([checking to see if enabling sasl]) - AC_MSG_RESULT(["$ax_sasl_option"]) - AM_CONDITIONAL([HAVE_SASL],[test "x${ax_sasl_option}" = xyes]) - ]) - -AC_DEFUN([AX_SASL_CHECK], - [ax_sasl_check=no - AX_CHECK_LIBRARY([LIBSASL],[sasl/sasl.h],[sasl2], - [ax_sasl_check=yes - AC_SUBST([SASL_LIB],[[-lsasl2]]) - ]) - AC_MSG_CHECKING([checking to see if sasl works]) - AC_MSG_RESULT(["$ax_sasl_check"]) - ]) +AC_DEFUN([AX_SASL_CHECK],[ + AX_CHECK_LIBRARY([LIBSASL],[sasl/sasl.h],[sasl2],[ + ax_sasl_check=yes + AC_SUBST([SASL_LIB],[[-lsasl2]])],[ + ax_sasl_check=no]) + AC_MSG_CHECKING([checking to see if sasl works]) + AC_MSG_RESULT(["$ax_sasl_check"]) + ])