First pass through fixing SASL.
authorBrian Aker <brian@tangent.org>
Tue, 13 Nov 2012 12:52:03 +0000 (07:52 -0500)
committerBrian Aker <brian@tangent.org>
Tue, 13 Nov 2012 12:52:03 +0000 (07:52 -0500)
16 files changed:
clients/include.am
clients/memping.cc
clients/memstat.cc
configure.ac
libmemcached/connect.cc
libmemcached/include.am
libmemcached/sasl.cc
libtest/memcached.cc
libtest/server_container.cc
m4/ax_sasl.m4
m4/gearmand.m4
m4/libgearman.m4
m4/memcached_sasl.m4 [deleted file]
tests/include.am
tests/libmemcached-1.0/include.am
tests/libmemcached_world.h

index 98319e1e528bc5ab86e7c9002826fda2770c2b77..7758e483d01f404fc3ca078bb0c2d1ffd8586727 100644 (file)
@@ -6,10 +6,6 @@ CLIENTS_LDADDS=
 CLIENTS_LDADDS+= clients/libutilities.la
 CLIENTS_LDADDS+= libmemcached/libmemcached.la
 
-if HAVE_SASL
-CLIENTS_LDADDS+= $(LIBSASL)
-endif
-
 bin_PROGRAMS+= clients/memcapable 
 bin_PROGRAMS+= clients/memcat 
 bin_PROGRAMS+= clients/memcp 
index 983447f1c097765a5b15f82373cff473ebc8a3a8..39b4fbe64cae7c12cd09414bd765d2b593eb6cc5 100644 (file)
@@ -144,6 +144,7 @@ void options_parse(int argc, char *argv[])
 
     case OPT_USERNAME:
       opt_username= optarg;
+      opt_binary= true;
       break;
 
     case OPT_PASSWD:
index e50f24530e3bdf9f419e01c4df0079e833a18d7c..ae6a356584c35007b5c07c5c3febfac4318c3beb 100644 (file)
@@ -47,6 +47,8 @@ static bool opt_analyze= false;
 static char *opt_servers= NULL;
 static char *stat_args= NULL;
 static char *analyze_mode= NULL;
+static char *opt_username;
+static char *opt_passwd;
 
 static struct option long_options[]=
 {
@@ -60,6 +62,8 @@ static struct option long_options[]=
   {(OPTIONSTRING)"server-version", no_argument, NULL, OPT_SERVER_VERSION},
   {(OPTIONSTRING)"servers", required_argument, NULL, OPT_SERVERS},
   {(OPTIONSTRING)"analyze", optional_argument, NULL, OPT_ANALYZE},
+  {(OPTIONSTRING)"username", required_argument, NULL, OPT_USERNAME},
+  {(OPTIONSTRING)"password", required_argument, NULL, OPT_PASSWD},
   {0, 0, 0, 0},
 };
 
@@ -124,6 +128,24 @@ int main(int argc, char *argv[])
   memcached_return_t rc= memcached_server_push(memc, servers);
   memcached_server_list_free(servers);
 
+  if (opt_username and LIBMEMCACHED_WITH_SASL_SUPPORT == 0)
+  {
+    memcached_free(memc);
+    std::cerr << "--username was supplied, but binary was not built with SASL support." << std::endl;
+    return EXIT_FAILURE;
+  }
+
+  if (opt_username)
+  {
+    memcached_return_t ret;
+    if (memcached_failed(ret= memcached_set_sasl_auth_data(memc, opt_username, opt_passwd)))
+    {
+      std::cerr << memcached_last_error_message(memc) << std::endl;
+      memcached_free(memc);
+      return EXIT_FAILURE;
+    }
+  }
+
   if (rc != MEMCACHED_SUCCESS and rc != MEMCACHED_SOME_ERRORS)
   {
     printf("Failure to communicate with servers (%s)\n",
@@ -394,6 +416,15 @@ static void options_parse(int argc, char *argv[])
       close_stdio();
       break;
 
+    case OPT_USERNAME:
+      opt_username= optarg;
+      opt_binary= true;
+      break;
+
+    case OPT_PASSWD:
+      opt_passwd= optarg;
+      break;
+
     case '?':
       /* getopt_long already printed an error message. */
       exit(1);
index 0d421155b193b60771b7b578714ed3a27cae74d3..451d139d9607035227f8b3530b50047f18212961 100644 (file)
@@ -75,18 +75,17 @@ LIBMEMCACHED_PROTOCOL
 # Adding support for libtest
 m4_include([libtest/yatl.m4])
 
-m4_include([m4/memcached_sasl.m4])
-m4_include([m4/gearmand.m4])
-m4_include([m4/libgearman.m4])
+CHECK_FOR_GEARMAND
+CHECK_FOR_LIBGEARMAND
 
-AM_CONDITIONAL([BUILDING_LIBMEMCACHED], [true])
-AM_CONDITIONAL([HAVE_LIBMEMCACHED], [false])
-AM_CONDITIONAL([HAVE_LIBDRIZZLE], [false])
-AC_DEFINE([HAVE_LIBMEMCACHED], [1], [Enables libmemcached Support])
+AM_CONDITIONAL([BUILDING_LIBMEMCACHED],[true])
+AM_CONDITIONAL([HAVE_LIBMEMCACHED],[false])
+AM_CONDITIONAL([HAVE_LIBDRIZZLE],[false])
+AC_DEFINE([HAVE_LIBMEMCACHED],[1],[Enables libmemcached Support])
 
-AM_CONDITIONAL([BUILDING_GEARMAN], [false])
+AM_CONDITIONAL([BUILDING_GEARMAN],[false])
 
-dnl Specialty checks
+# Specialty checks
 AX_CXX_CINTTYPES
 CONFIG_EXTRA
 DETECT_BYTEORDER
@@ -207,30 +206,19 @@ AC_C_RESTRICT
 
 AX_CXX_GCC_ABI_DEMANGLE
 
-AX_SASL_CHECK
 AX_LIBEVENT
 
-#
-# The sasl functions should only be visible if we build with sasl support
-#
-AS_IF([test "x$ac_enable_sasl" = "xyes"],
-      [LIBMEMCACHED_WITH_SASL_SUPPORT="#define LIBMEMCACHED_WITH_SASL_SUPPORT 1"],
-      [LIBMEMCACHED_WITH_SASL_SUPPORT="#define LIBMEMCACHED_WITH_SASL_SUPPORT 0"])
-AC_SUBST([LIBMEMCACHED_WITH_SASL_SUPPORT])
-
 AC_CHECK_LIB([rt],[clock_gettime],
-             [RT_LIB="-lrt"
-              AC_SUBST(RT_LIB)
-              AC_DEFINE([HAVE_CLOCK_GETTIME], [ 1 ], [Have clock_gettime])],
-              [AC_DEFINE([HAVE_CLOCK_GETTIME], [ 0 ], [Have clock_gettime])])
+             [AC_SUBST([RT_LIB],[-lrt])
+             AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Have clock_gettime])],
+             [AC_DEFINE([HAVE_CLOCK_GETTIME],[0],[Have clock_gettime])])
 
 # Check for the ability to call dlopen
 AS_IF([test "x$enable_static" = "xyes"],
       [AC_CHECK_LIB([dl],[dlopen],
-                    [DL_LIB="-ldl"
-                     AC_SUBST([DL_LIB])
-                     AC_DEFINE([HAVE_LIBDL],[1],[Have dlopen])])],
-                     [AC_DEFINE([HAVE_LIBDL], [0], [Have dlopen])])
+                    [AC_SUBST([DL_LIB],[-ldl])
+                    AC_DEFINE([HAVE_LIBDL],[1],[Have dlopen])])],
+                    [AC_DEFINE([HAVE_LIBDL], [0], [Have dlopen])])
 
 AC_CHECK_LIB([m],[floor])
 AC_CHECK_FUNCS([sigignore])
@@ -249,12 +237,12 @@ AC_DEFINE([GEARMAND_BLOBSLAP_WORKER],[0],[Support for Gearman Blobslap worker])
 AC_DEFINE([HAVE_LIBPQ],[0],[Support for Postgres])
 AC_DEFINE([HAVE_LIBCURL],[0],[Support for libcurl])
 
-dnl Check for the requirements for running memcached with less privileges
-dnl than the default privilege set. On Solaris we need setppriv and priv.h
-dnl If you want to add support for other platforms you should check for
-dnl your requirements, define HAVE_DROP_PRIVILEGES, and make sure you add
-dnl the source file containing the implementation into memcached_SOURCE
-dnl in Makefile.am
+# Check for the requirements for running memcached with less privileges
+# than the default privilege set. On Solaris we need setppriv and priv.h
+# If you want to add support for other platforms you should check for
+# your requirements, define HAVE_DROP_PRIVILEGES, and make sure you add
+# the source file containing the implementation into memcached_SOURCE
+# in Makefile.am
 AC_CHECK_FUNCS([setppriv],
                [AC_CHECK_HEADER([priv.h],
                                 [AC_DEFINE([HAVE_DROP_PRIVILEGES],
@@ -276,8 +264,20 @@ SOCKET_SEND_FLAGS
 AX_UUID_GENERATE_TIME_SAFE
 
 
-AX_PTHREAD(, [AC_MSG_ERROR([could not find libpthread])])
-AX_PTHREAD_TIMEDJOIN_NP
+AC_DEFUN([CHECK_FOR_PTHREAD_AND_SASL],
+         [AX_PTHREAD(, [AC_MSG_ERROR([could not find libpthread])])
+         AX_PTHREAD_TIMEDJOIN_NP
+
+         # The sasl functions should only be visible if we build with sasl support
+         #
+         AX_SASL_OPTION
+         AS_IF([test "x$ac_enable_sasl" = xyes],
+               [LIBMEMCACHED_WITH_SASL_SUPPORT="#define LIBMEMCACHED_WITH_SASL_SUPPORT 1"],
+               [LIBMEMCACHED_WITH_SASL_SUPPORT="#define LIBMEMCACHED_WITH_SASL_SUPPORT 0"])
+         AC_SUBST([LIBMEMCACHED_WITH_SASL_SUPPORT])
+         ])
+CHECK_FOR_PTHREAD_AND_SASL
+
 
 # backtrace() does not work with static builds.
 AS_IF([test "x$enable_static" = "xyes"],
@@ -313,7 +313,7 @@ echo "   * LIB Flags:                 $LIB"
 echo "   * Assertions enabled:        $ax_enable_assert"
 echo "   * Debug enabled:             $ax_enable_debug"
 echo "   * Warnings as failure:       $ac_cv_warnings_as_errors"
-echo "   * SASL support:              $ac_enable_sasl"
+echo "   * SASL support:              $ax_sasl_option"
 echo "   * make -j:                   $enable_jobserver"
 echo "   * VCS checkout:              $ac_cv_vcs_checkout"
 echo ""
index da6cf80229a38863727dff15539b0c010fcd2122..7efdd8fe6d52f3a5b89e9ddaaf94e91d4064a557 100644 (file)
@@ -734,6 +734,7 @@ static memcached_return_t _memcached_connect(org::libmemcached::Instance* server
       if (server->fd != INVALID_SOCKET and server->root->sasl.callbacks)
       {
         rc= memcached_sasl_authenticate_connection(server);
+        fprintf(stderr, "%s:%d %s\n", __FILE__, __LINE__, memcached_strerror(NULL, rc));
         if (memcached_failed(rc) and server->fd != INVALID_SOCKET)
         {
           WATCHPOINT_ASSERT(server->fd != INVALID_SOCKET);
index 13304e62ad5ad3497e842b17b518ac011730da72..20be40f9e04893947450f70b977417d45def8da4 100644 (file)
@@ -118,10 +118,9 @@ libmemcached_libmemcached_la_LDFLAGS+= -version-info ${MEMCACHED_LIBRARY_VERSION
 libmemcached_libmemcached_la_LDFLAGS+= $(DL_LIB)
 
 if HAVE_SASL
-libmemcached_libmemcached_la_CXXFLAGS+= $(LIBSASL_CPPFLAGS)
-libmemcached_libmemcached_la_CXXFLAGS+= $(PTHREAD_CFLAGS)
-libmemcached_libmemcached_la_LIBADD+= $(PTHREAD_LIBS)
-libmemcached_libmemcached_la_LIBADD+= $(LIBSASL_LDFLAGS)
+libmemcached_libmemcached_la_CXXFLAGS+= @PTHREAD_CFLAGS@
+libmemcached_libmemcached_la_LIBADD+= @PTHREAD_LIBS@
+libmemcached_libmemcached_la_LIBADD+= @SASL_LDFLAGS@
 endif
 
 if HAVE_DTRACE
index 67a31bbd132c5f4f5ac73779df1887c2e215c5ce..721ff79130fdf4f82886d5b605ae5d8b9e77c99d 100644 (file)
@@ -2,7 +2,7 @@
  * 
  *  Libmemcached library
  *
- *  Copyright (C) 2011 Data Differential, http://datadifferential.com/
+ *  Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/
  *  Copyright (C) 2006-2009 Brian Aker All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without
@@ -35,7 +35,7 @@
  *
  */
 
-#include <libmemcached/common.h>
+#include "libmemcached/common.h"
 #include <cassert>
 
 #if defined(LIBMEMCACHED_WITH_SASL_SUPPORT) && LIBMEMCACHED_WITH_SASL_SUPPORT
@@ -65,7 +65,7 @@ sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr)
  * @param raddr remote address (out)
  * @return true on success false otherwise (errno contains more info)
  */
-static memcached_return_t resolve_names(memcached_instance_st& server, char *laddr, size_t laddr_length, char *raddr, size_t raddr_length)
+static memcached_return_t resolve_names(org::libmemcached::Instance& server, char *laddr, size_t laddr_length, char *raddr, size_t raddr_length)
 {
   char host[NI_MAXHOST];
   char port[NI_MAXSERV];
@@ -148,15 +148,15 @@ memcached_return_t memcached_sasl_authenticate_connection(org::libmemcached::Ins
  */
   protocol_binary_request_no_extras request= { };
 
-  initialize_binary_request(ptr, request.message.header);
+  initialize_binary_request(server, request.message.header);
 
   request.message.header.request.opcode= PROTOCOL_BINARY_CMD_SASL_LIST_MECHS;
 
-  if (memcached_io_write(server, request.bytes,
-                         sizeof(request.bytes), 1) != sizeof(request.bytes))
+  if (memcached_io_write(server, request.bytes, sizeof(request.bytes), true) != sizeof(request.bytes))
   {
     return MEMCACHED_WRITE_FAILURE;
   }
+  assert_msg(server->fd != INVALID_SOCKET, "Programmer error, invalid socket");
 
   memcached_server_response_increment(server);
 
@@ -177,6 +177,7 @@ memcached_return_t memcached_sasl_authenticate_connection(org::libmemcached::Ins
 
     return rc;
   }
+  assert_msg(server->fd != INVALID_SOCKET, "Programmer error, invalid socket");
 
   /* set ip addresses */
   char laddr[NI_MAXHOST + NI_MAXSERV];
@@ -242,19 +243,23 @@ memcached_return_t memcached_sasl_authenticate_connection(org::libmemcached::Ins
       { data, len }
     };
 
+    assert_msg(server->fd != INVALID_SOCKET, "Programmer error, invalid socket");
     if (memcached_io_writev(server, vector, 3, true) == false)
     {
       rc= MEMCACHED_WRITE_FAILURE;
       break;
     }
+    assert_msg(server->fd != INVALID_SOCKET, "Programmer error, invalid socket");
     memcached_server_response_increment(server);
 
     /* read the response */
+    assert_msg(server->fd != INVALID_SOCKET, "Programmer error, invalid socket");
     rc= memcached_response(server, NULL, 0, NULL);
     if (rc != MEMCACHED_AUTH_CONTINUE)
     {
       break;
     }
+    assert_msg(server->fd != INVALID_SOCKET, "Programmer error, invalid socket");
 
     ret= sasl_client_step(conn, memcached_result_value(&server->root->result),
                           (unsigned int)memcached_result_length(&server->root->result),
index b59dc22fa03c7efed4658828aad5a1dc410b5b96..d2ce941ea54147a3cc1ea630f4c18bc5c4e91aae 100644 (file)
@@ -89,7 +89,7 @@ public:
 
   virtual const char *sasl() const
   {
-    return NULL;
+    return "-S";
   }
 
   const std::string& password() const
@@ -210,7 +210,7 @@ bool Memcached::build(size_t argc, const char *argv[])
   add_option("-M");
 #endif
 
-  if (sasl())
+  if (_username.size())
   {
     add_option(sasl());
   }
index 113f085c9ff113b3880278defbe3e3ab927832e4..05997238bb2379624f048217d9d4b488639f22f1 100644 (file)
@@ -241,7 +241,7 @@ bool server_startup_st::start_server(const std::string& server_type, in_port_t t
     }
     else if (server_type.compare("memcached-sasl") == 0)
     {
-      if (MEMCACHED_SASL_BINARY)
+      if (MEMCACHED_BINARY)
       {
         if (HAVE_LIBMEMCACHED)
         {
index b2b91de79d88a7985c3bc0b06c5e575d8ab7721b..48b05c7474b2e505f6e8897fe852059459746ead 100644 (file)
@@ -5,10 +5,11 @@
 # SYNOPSIS
 #
 #   AX_SASL
+#   AX_SASL_CHECK
 #
 # DESCRIPTION
 #
-#   Check for sasl version one or two support.
+#   Check to see if libsasl is requested and available.
 #
 # LICENSE
 #
 #   and this notice are preserved. This file is offered as-is, without any
 #   warranty.
 
-#serial 1
+#serial 2
 
-AC_DEFUN([AX_SASL_OPTION],[
-    AC_REQUIRE([AX_SASL_CHECK])
-    AC_ARG_ENABLE([sasl],
+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"])
-
-    AS_IF([test "x$ac_enable_sasl" = "xyes"],
-      [ac_enable_sasl="yes"],
-      [ac_enable_sasl="no"])
-
-    AS_IF([test "x$ac_enable_sasl" = "xyes"], [
-      AC_DEFINE([HAVE_LIBSASL], [ 1 ], [Have libsasl2])
-      ], [
-      AC_DEFINE([HAVE_LIBSASL], [ 0 ], [Have libsasl2])
+      [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])])
       ])
 
-    AM_CONDITIONAL(HAVE_SASL, test "x${ac_enable_sasl}" = "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_CHECK_LIBRARY([LIBSASL], [sasl/sasl.h], [sasl2],[
-      LIBSASL_LDFLAGS="-lsasl2"
-      ax_cv_sasl=yes
-      ], [
-      ax_cv_sasl=no 
+AC_DEFUN([AX_SASL_CHECK],
+    [ax_sasl_check=no
+    AX_CHECK_LIBRARY([LIBSASL],[sasl/sasl.h],[sasl2],
+      [ax_sasl_check=yes
+      AC_SUBST([SASL_LDFLAGS],[[-lsasl2]])
       ])
-
-    AM_CONDITIONAL(HAVE_SASL, test "x${ac_enable_sasl}" = "xyes")
+    AC_MSG_CHECKING([checking to see if sasl works])
+    AC_MSG_RESULT(["$ax_sasl_check"])
     ])
index 7765acec98752003643485d933c83d5a624deada..8b1659dc5e3a22a23c61d5ce187541f95ff883ea 100644 (file)
@@ -1,11 +1,9 @@
-AX_WITH_PROG(GEARMAND_BINARY,gearmand)
-AS_IF([test -f "$ac_cv_path_GEARMAND_BINARY"],
-      [
-        AC_DEFINE([HAVE_GEARMAND_BINARY], [1], [If Gearmand binary is available])
-        AC_DEFINE_UNQUOTED([GEARMAND_BINARY], "$ac_cv_path_GEARMAND_BINARY", [Name of the gearmand binary used in make test])
-       ],
-       [
-        AC_DEFINE([HAVE_GEARMAND_BINARY], [0], [If Gearmand binary is available])
-        AC_DEFINE([GEARMAND_BINARY], [0], [Name of the gearmand binary used in make test])
-      ])
-
+# serial 1
+AC_DEFUN([CHECK_FOR_GEARMAND],
+    [AX_WITH_PROG([GEARMAND_BINARY],[gearmand])
+    AS_IF([test -f "$ac_cv_path_GEARMAND_BINARY"],
+      [AC_DEFINE([HAVE_GEARMAND_BINARY],[1],[If Gearmand binary is available])
+      AC_DEFINE_UNQUOTED([GEARMAND_BINARY], "$ac_cv_path_GEARMAND_BINARY", [Name of the gearmand binary used in make test])],
+      [AC_DEFINE([HAVE_GEARMAND_BINARY],[0],[If Gearmand binary is available])
+      AC_DEFINE([GEARMAND_BINARY],[0],[Name of the gearmand binary used in make test])])
+    ])
index a7bf493e56d792a2e861d9c4e43b895e430f9f5e..0501ed3e736116fd03aaef58bf0747122efb99a3 100644 (file)
@@ -1,9 +1,10 @@
-AX_CHECK_LIBRARY([LIBGEARMAN], [libgearman/gearmand.h], [gearman], 
-                  [
-                    AM_CONDITIONAL(HAVE_LIBGEARMAN, true)
-                    AC_DEFINE([HAVE_LIBGEARMAN], [1], [Enables libgearman Support])
-                  ], 
-                  [
-                    AM_CONDITIONAL(HAVE_LIBGEARMAN, false)
-                    AC_DEFINE([HAVE_LIBGEARMAN], [0], [Enables libgearman Support])
-                  ])
+# serial 1
+AC_DEFUN([CHECK_FOR_LIBGEARMAND],
+    [AX_CHECK_LIBRARY([LIBGEARMAN], [libgearman/gearmand.h], [gearman], 
+      [ax_check_for_libgearman=yes],
+      [ax_check_for_libgearman=no])
+    AS_IF([test "$ax_check_for_libgearman" = xyes],
+      [AC_DEFINE([HAVE_LIBGEARMAN],[1],[Enables libgearman Support])],
+      [AC_DEFINE([HAVE_LIBGEARMAN],[0],[Enables libgearman Support])])
+    AM_CONDITIONAL(HAVE_LIBGEARMAN,[test "$ax_check_for_libgearman" = xyes])
+    ])
diff --git a/m4/memcached_sasl.m4 b/m4/memcached_sasl.m4
deleted file mode 100644 (file)
index a43e453..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-AX_WITH_PROG(MEMCACHED_SASL_BINARY,memcached_sasl)
-AS_IF([test -f "$ac_cv_path_MEMCACHED_SASL_BINARY"],
-      [
-        AC_DEFINE([HAVE_MEMCACHED_SASL_BINARY], [1], [Name of the memcached_sasl binary used in make test])
-        AC_DEFINE_UNQUOTED([MEMCACHED_SASL_BINARY], "$ac_cv_path_MEMCACHED_SASL_BINARY", [Name of the memcached_sasl binary used in make test])
-       ],
-       [
-        AC_DEFINE([HAVE_MEMCACHED_SASL_BINARY], [0], [Name of the memcached_sasl binary used in make test])
-        AC_DEFINE([MEMCACHED_SASL_BINARY], [0], [Name of the memcached_sasl binary used in make test])
-      ])
index 3a8c8efab76012b40ee532ec5c04b45b5f3c9961..8f064c65f669b30b25ad98a51e60cda7c814859e 100644 (file)
@@ -89,9 +89,6 @@ test: check
 test-mem: tests/libmemcached-1.0/testapp
        @tests/libmemcached-1.0/testapp
 
-test-sasl: tests/sasl
-       @tests/sasl
-
 test-atom: tests/atomsmasher
        @tests/atomsmasher
 
@@ -113,9 +110,6 @@ pahole-mem: tests/testapp
 gdb-mem: tests/libmemcached-1.0/testapp
        @$(DEBUG_COMMAND)  tests/libmemcached-1.0/testapp
 
-gdb-sasl: tests/sasl
-       @$(DEBUG_COMMAND)  tests/sasl
-
 gdb-atom: tests/atomsmasher
        @$(DEBUG_COMMAND) tests/atomsmasher
 
index 6ffc2986190652334245325519dce8a832c181e4..9b023a5ad2bc074ef49aace00ee03c21153b415e 100644 (file)
@@ -47,12 +47,12 @@ tests_libmemcached_1_0_internals_SOURCES=
 tests_libmemcached_1_0_internals_SOURCES+= tests/libmemcached-1.0/internals.cc
 tests_libmemcached_1_0_internals_SOURCES+= tests/libmemcached-1.0/string.cc
 tests_libmemcached_1_0_internals_CXXFLAGS+= $(AM_CXXFLAGS)
-tests_libmemcached_1_0_internals_CXXFLAGS+= ${PTHREAD_CFLAGS}
+tests_libmemcached_1_0_internals_CXXFLAGS+= @PTHREAD_CFLAGS@
 tests_libmemcached_1_0_internals_DEPENDENCIES+= libmemcachedinternal/libmemcachedinternal.la
 tests_libmemcached_1_0_internals_DEPENDENCIES+= libtest/libtest.la
 tests_libmemcached_1_0_internals_DEPENDENCIES+= libmemcachedinternal/libmemcachedutilinternal.la
 tests_libmemcached_1_0_internals_LDADD+= libmemcachedinternal/libmemcachedinternal.la
-tests_libmemcached_1_0_internals_LDADD+= ${PTHREAD_LIBS}
+tests_libmemcached_1_0_internals_LDADD+= @PTHREAD_LIBS@
 tests_libmemcached_1_0_internals_LDADD+= libmemcachedinternal/libmemcachedutilinternal.la
 tests_libmemcached_1_0_internals_LDADD+= libtest/libtest.la
 check_PROGRAMS+= tests/libmemcached-1.0/internals
@@ -66,7 +66,7 @@ tests_libmemcached_1_0_testapp_DEPENDENCIES=
 tests_libmemcached_1_0_testapp_LDADD=
 
 tests_libmemcached_1_0_testapp_CXXFLAGS+= $(AM_CXXFLAGS)
-tests_libmemcached_1_0_testapp_CXXFLAGS+= ${PTHREAD_CFLAGS}
+tests_libmemcached_1_0_testapp_CXXFLAGS+= @PTHREAD_CFLAGS@
 tests_libmemcached_1_0_testapp_CFLAGS+= $(AM_CFLAGS)
 tests_libmemcached_1_0_testapp_CFLAGS+= $(NO_CONVERSION)
 tests_libmemcached_1_0_testapp_CFLAGS+= $(NO_STRICT_ALIASING)
@@ -102,8 +102,8 @@ tests_libmemcached_1_0_testapp_DEPENDENCIES+= libtest/libtest.la
 tests_libmemcached_1_0_testapp_DEPENDENCIES+= libhashkit/libhashkit.la
 tests_libmemcached_1_0_testapp_DEPENDENCIES+= libmemcached/libmemcachedutil.la
 
-tests_libmemcached_1_0_testapp_LDADD+= $(LIBUUID_LDFLAGS)
-tests_libmemcached_1_0_testapp_LDADD+= ${PTHREAD_LIBS}
+tests_libmemcached_1_0_testapp_LDADD+= @LIBUUID_LDFLAGS@
+tests_libmemcached_1_0_testapp_LDADD+= @PTHREAD_LIBS@
 tests_libmemcached_1_0_testapp_LDADD+= libmemcached/libmemcached.la
 tests_libmemcached_1_0_testapp_LDADD+= libmemcached/libmemcachedutil.la
 tests_libmemcached_1_0_testapp_LDADD+= libtest/libtest.la
@@ -118,7 +118,7 @@ tests_libmemcached_1_0_testsocket_SOURCES=
 tests_libmemcached_1_0_testsocket_DEPENDENCIES=
 tests_libmemcached_1_0_testsocket_LDADD=
 
-tests_libmemcached_1_0_testsocket_CXXFLAGS+= ${PTHREAD_CFLAGS}
+tests_libmemcached_1_0_testsocket_CXXFLAGS+= @PTHREAD_CFLAGS@
 tests_libmemcached_1_0_testsocket_CXXFLAGS+= $(AM_CXXFLAGS)
 tests_libmemcached_1_0_testsocket_CFLAGS+= $(AM_CFLAGS)
 tests_libmemcached_1_0_testsocket_CFLAGS+= $(NO_CONVERSION)
@@ -158,8 +158,8 @@ tests_libmemcached_1_0_testsocket_DEPENDENCIES+= libtest/libtest.la
 tests_libmemcached_1_0_testsocket_DEPENDENCIES+= libhashkit/libhashkit.la
 tests_libmemcached_1_0_testsocket_DEPENDENCIES+= libmemcached/libmemcachedutil.la
 
-tests_libmemcached_1_0_testsocket_LDADD+= $(LIBUUID_LDFLAGS)
-tests_libmemcached_1_0_testsocket_LDADD+= ${PTHREAD_LIBS}
+tests_libmemcached_1_0_testsocket_LDADD+= @LIBUUID_LDFLAGS@
+tests_libmemcached_1_0_testsocket_LDADD+= @PTHREAD_LIBS@
 tests_libmemcached_1_0_testsocket_LDADD+= libmemcached/libmemcached.la
 tests_libmemcached_1_0_testsocket_LDADD+= libmemcached/libmemcachedutil.la
 tests_libmemcached_1_0_testsocket_LDADD+= libtest/libtest.la
@@ -181,7 +181,7 @@ tests_libmemcached_1_0_sasl_CXXFLAGS=
 tests_libmemcached_1_0_sasl_CFLAGS=
 
 tests_libmemcached_1_0_sasl_CXXFLAGS+= $(AM_CXXFLAGS)
-tests_libmemcached_1_0_sasl_CXXFLAGS+= ${PTHREAD_CFLAGS}
+tests_libmemcached_1_0_sasl_CXXFLAGS+= @PTHREAD_CFLAGS@
 tests_libmemcached_1_0_sasl_CFLAGS+= $(AM_CFLAGS)
 tests_libmemcached_1_0_sasl_CFLAGS+= $(NO_CONVERSION)
 tests_libmemcached_1_0_sasl_CFLAGS+= $(NO_STRICT_ALIASING)
@@ -206,7 +206,7 @@ tests_libmemcached_1_0_sasl_SOURCES+= tests/libmemcached-1.0/generate.cc
 tests_libmemcached_1_0_sasl_DEPENDENCIES+= libmemcached/libmemcached.la
 tests_libmemcached_1_0_sasl_DEPENDENCIES+= libtest/libtest.la
 
-tests_libmemcached_1_0_sasl_LDADD+= ${PTHREAD_LIBS}
+tests_libmemcached_1_0_sasl_LDADD+= @PTHREAD_LIBS@
 tests_libmemcached_1_0_sasl_LDADD+= libmemcached/libmemcached.la
 tests_libmemcached_1_0_sasl_LDADD+= libmemcached/libmemcachedutil.la
 tests_libmemcached_1_0_sasl_LDADD+= libtest/libtest.la
@@ -215,6 +215,12 @@ tests_libmemcached_1_0_sasl_LDADD+= libhashkit/libhashkit.la
 check_PROGRAMS+= tests/libmemcached-1.0/sasl
 noinst_PROGRAMS+= tests/libmemcached-1.0/sasl
 
+test-sasl: tests/libmemcached-1.0/sasl
+       @tests/libmemcached-1.0/sasl
+
+gdb-sasl: tests/libmemcached-1.0/sasl
+       @$(DEBUG_COMMAND)  tests/libmemcached-1.0/sasl
+
 tests_atomsmasher_SOURCES=
 tests_atomsmasher_DEPENDENCIES=
 tests_atomsmasher_LDADD=
index e6f782f76227dd4721d2cd8c07745bf2b1f19371..8b3ba64136ddef4c9c39de9522870d805b85f58a 100644 (file)
@@ -49,7 +49,7 @@ static void *world_create(libtest::server_startup_st& servers, test_return_t& er
     return NULL;
   }
 
-  if ((servers.sasl()) and ((LIBMEMCACHED_WITH_SASL_SUPPORT == 0) or (MEMCACHED_SASL_BINARY == 0)))
+  if ((servers.sasl()) and ((LIBMEMCACHED_WITH_SASL_SUPPORT == 0)))
   {
     error= TEST_SKIPPED;
     return NULL;