Update/fix for SASL
authorBrian Aker <brian@tangent.org>
Thu, 13 Dec 2012 02:48:43 +0000 (21:48 -0500)
committerBrian Aker <brian@tangent.org>
Thu, 13 Dec 2012 02:48:43 +0000 (21:48 -0500)
configure.ac
libmemcached/include.am
m4/ax_sasl.m4

index 19e56af84cd143fdf52086e0481c8903cbbd06ca..b66c05fa966d005919a06ea8b9d53eb0ccd56098 100644 (file)
@@ -312,7 +312,7 @@ echo "   * Assertions enabled:        $ax_enable_assert"
 echo "   * Debug enabled:             $ax_enable_debug"
 echo "   * Shared:                    $enable_shared"
 echo "   * Warnings as failure:       $ac_cv_warnings_as_errors"
-echo "   * SASL support:              $ax_sasl_option"
+echo "   * SASL support:              $ac_enable_sasl"
 echo "   * make -j:                   $enable_jobserver"
 echo "   * VCS checkout:              $ac_cv_vcs_checkout"
 echo ""
index 2465b058c228ade522f9962458b03e7efea255f6..e026e1a0226be24b09a463378afa937a48e337da 100644 (file)
@@ -116,9 +116,11 @@ libmemcached_libmemcached_la_LDFLAGS+= -version-info ${MEMCACHED_LIBRARY_VERSION
 libmemcached_libmemcached_la_LIBADD+= @DL_LIB@
 
 if HAVE_SASL
+if HAVE_LIBSASL
 libmemcached_libmemcached_la_CXXFLAGS+= @PTHREAD_CFLAGS@
 libmemcached_libmemcached_la_LIBADD+= @PTHREAD_LIBS@
-libmemcached_libmemcached_la_LIBADD+= @SASL_LIB@
+libmemcached_libmemcached_la_LIBADD+= @LIBSASL_LIB@
+endif
 endif
 
 if HAVE_DTRACE
index 00aaa124a4f868146aee9d3955e931c5c6794fcd..aa0bd1b770f5b83c5517c66b09d9edc2861d5f3b 100644 (file)
 #serial 2
 
 AC_DEFUN([AX_SASL_OPTION],
-    [AC_ARG_ENABLE([sasl],
+    [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"
+      [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])
+        ac_enable_sasl=no
+        ax_sasl_option=no])
+      AC_MSG_RESULT(["$ax_sasl_option"])
       ])
-
-    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])
     ])