ENABLE_MEMASLAP
PROTOCOL_BINARY_TEST
ENABLE_DEPRECATED
-PANDORA_HAVE_SASL
AC_CHECK_FUNCS([alarm])
AC_CHECK_FUNCS([dup2])
AC_DEFINE([HAVE_CXXABI_H], [0], [Have cxxabi.h]))
AX_COMPILER_VENDOR
-AC_CXX_HEADER_STDCXX_98
AC_FUNC_ALLOCA
AC_FUNC_ERROR_AT_LINE
AX_CXX_GCC_ABI_DEMANGLE
+AX_SASL_OPTION
+
+dnl
+dnl The sasl functions should only be visible if we build with sasl support
+dnl
+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)
+
AX_CHECK_LIBRARY([LIBUUID], [uuid/uuid.h], [uuid],
[
LIBUUID_LDFLAGS="-luuid"
AC_CHECK_LIB([m], [floor])
-dnl The sasl functions should only be visible if we build with sasl support
-AS_IF([test "x$ac_cv_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_HEADERS([atomic.h])
AS_IF([test "x$ac_cv_header_atomic_h" = "xyes"],[
AC_CHECK_FUNCS(atomic_add_64)
echo " * Assertions enabled: $ac_cv_assert"
echo " * Debug enabled: $with_debug"
echo " * Warnings as failure: $ac_cv_warnings_as_errors"
+echo " * SASL support: $ac_enable_sasl"
echo ""
echo "---"
libmemcached/namespace.h \
libmemcached/options.hpp \
libmemcached/response.h \
+ libmemcached/sasl.hpp \
libmemcached/server.hpp \
libmemcached/server_instance.h \
libmemcached/socket.hpp \
libmemcached/quit.hpp \
libmemcached/response.cc \
libmemcached/result.cc \
- libmemcached/sasl.hpp \
+ libmemcached/sasl.cc \
libmemcached/server.cc \
libmemcached/server_list.cc \
libmemcached/server_list.hpp \
libmemcached_libmemcached_la_LDFLAGS=
libmemcached_libmemcached_la_LDFLAGS+= -version-info ${MEMCACHED_LIBRARY_VERSION}
-libmemcached_libmemcached_la_LIBADD+= $(LTLIBSASL) $(LTLIBSASL2)
-libmemcached_libmemcached_la_SOURCES += libmemcached/sasl.cc
if HAVE_SASL
-libmemcached_libmemcached_la_CXXFLAGS+= ${PTHREAD_CFLAGS}
-libmemcached_libmemcached_la_LIBADD+= ${PTHREAD_LIBS}
+libmemcached_libmemcached_la_CXXFLAGS+= $(LIBSASL_CPPFLAGS)
+libmemcached_libmemcached_la_CXXFLAGS+= $(PTHREAD_CFLAGS)
+libmemcached_libmemcached_la_LIBADD+= $(PTHREAD_LIBS)
+libmemcached_libmemcached_la_LIBADD+= $(LIBSASL_LDFLAGS)
endif
if HAVE_DTRACE
#if defined(LIBMEMCACHED_WITH_SASL_SUPPORT) && LIBMEMCACHED_WITH_SASL_SUPPORT
+#if defined(HAVE_LIBSASL) && HAVE_LIBSASL
#include <sasl/sasl.h>
+#endif
+
#include <pthread.h>
void memcached_set_sasl_callbacks(memcached_st *ptr,
+++ /dev/null
-# ===========================================================================
-# http://autoconf-archive.cryp.to/ac_cxx_header_stdcxx_98.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AC_CXX_HEADER_STDCXX_98
-#
-# DESCRIPTION
-#
-# Check for complete library coverage of the C++1998/2003 standard.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved.
-
-AC_DEFUN([AC_CXX_HEADER_STDCXX_98], [
- AC_CACHE_CHECK(for ISO C++ 98 include files,
- ac_cv_cxx_stdcxx_98,
- [AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([
- #include <cassert>
- #include <cctype>
- #include <cerrno>
- #include <cfloat>
- #include <ciso646>
- #include <climits>
- #include <clocale>
- #include <cmath>
- #include <csetjmp>
- #include <csignal>
- #include <cstdarg>
- #include <cstddef>
- #include <cstdio>
- #include <cstdlib>
- #include <cstring>
- #include <ctime>
-
- #include <algorithm>
- #include <bitset>
- #include <complex>
- #include <deque>
- #include <exception>
- #include <fstream>
- #include <functional>
- #include <iomanip>
- #include <ios>
- #include <iosfwd>
- #include <iostream>
- #include <istream>
- #include <iterator>
- #include <limits>
- #include <list>
- #include <locale>
- #include <map>
- #include <memory>
- #include <new>
- #include <numeric>
- #include <ostream>
- #include <queue>
- #include <set>
- #include <sstream>
- #include <stack>
- #include <stdexcept>
- #include <streambuf>
- #include <string>
- #include <typeinfo>
- #include <utility>
- #include <valarray>
- #include <vector>
- ],,
- ac_cv_cxx_stdcxx_98=yes, ac_cv_cxx_stdcxx_98=no)
- AC_LANG_RESTORE
- ])
- if test "$ac_cv_cxx_stdcxx_98" = yes; then
- AC_DEFINE(STDCXX_98_HEADERS,,[Define if ISO C++ 1998 header files are present. ])
- fi
-])
--- /dev/null
+# ===========================================================================
+# http://www.tangent.org/
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_SASL
+#
+# DESCRIPTION
+#
+# Check for sasl version one or two support.
+#
+# LICENSE
+#
+# Copyright (c) 2012 Brian Aker <brian@tangent.org>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 1
+
+AC_DEFUN([AX_SASL_OPTION],[
+ 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"])
+
+ AS_IF([test "x$ac_enable_sasl" = "xyes"], [
+ AS_IF([test "x$ax_cv_sasl" = "xyes"], [
+ AC_DEFINE([HAVE_LIBSASL], [ 1 ], [Have libsasl2])
+ ], [
+ AC_DEFINE([HAVE_LIBSASL], [ 0 ], [Have libsasl2])
+ ac_enable_sasl= no
+ ])
+ ], [
+ AC_DEFINE([HAVE_LIBSASL], [ 0 ], [Have libsasl2])
+ ])
+
+ AM_CONDITIONAL(HAVE_SASL, test "x${ac_enable_sasl}" = "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
+ ])
+ ])
+++ /dev/null
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems, Inc.
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_SASL],[
- AC_REQUIRE([AC_LIB_PREFIX])
-
- dnl --------------------------------------------------------------------
- dnl Check for sasl
- dnl --------------------------------------------------------------------
- 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_LIB_HAVE_LINKFLAGS(sasl,,[
- #include <stdlib.h>
- #include <sasl/sasl.h>
- ],[
- sasl_server_init(NULL, NULL);
- ])
-
- AS_IF([test "x${ac_cv_libsasl}" != "xyes" ],
- [
- AC_LIB_HAVE_LINKFLAGS(sasl2,,[
- #include <stdlib.h>
- #include <sasl/sasl.h>
- ],[
- sasl_server_init(NULL, NULL);
- ])
- HAVE_LIBSASL="$HAVE_LIBSASL2"
- LIBSASL="$LIBSASL2"
- LIBSASL_PREFIX="$LIBSASL2_PREFIX"
- LTLIBSASL="$LT_LIBSASL2"
- ])
- ])
-
- AS_IF([test "x${ac_cv_libsasl}" = "xyes" -o "x${ac_cv_libsasl2}" = "xyes"],
- [ac_cv_sasl=yes],
- [ac_cv_sasl=no])
-
- AM_CONDITIONAL(HAVE_LIBSASL, [test "x${ac_cv_libsasl}" = "xyes"])
- AM_CONDITIONAL(HAVE_LIBSASL2, [test "x${ac_cv_libsasl2}" = "xyes"])
- AM_CONDITIONAL(HAVE_SASL, [test "x${ac_cv_sasl}" = "xyes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_SASL],[
- AC_REQUIRE([_PANDORA_SEARCH_SASL])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_SASL],[
- AC_REQUIRE([_PANDORA_SEARCH_SASL])
- AS_IF([test "x${ac_cv_sasl}" = "xno"],
- AC_MSG_ERROR([SASL (libsasl or libsasl2) is required for ${PACKAGE}]))
-])
-
-AC_DEFUN([_PANDORA_SEARCH_LIBSASL],[
- AC_REQUIRE([AC_LIB_PREFIX])
-
- dnl --------------------------------------------------------------------
- dnl Check for libsasl
- dnl --------------------------------------------------------------------
-
- AC_ARG_ENABLE([libsasl],
- [AS_HELP_STRING([--disable-libsasl],
- [Build with libsasl support @<:@default=on@:>@])],
- [ac_enable_libsasl="$enableval"],
- [ac_enable_libsasl="yes"])
-
- AS_IF([test "x$ac_enable_libsasl" = "xyes"],[
- AC_LIB_HAVE_LINKFLAGS(sasl,,[
- #include <stdlib.h>
- #include <sasl/sasl.h>
- ],[
- sasl_server_init(NULL, NULL);
- ])
- ],[
- ac_cv_libsasl="no"
- ])
-
- AM_CONDITIONAL(HAVE_LIBSASL, [test "x${ac_cv_libsasl}" = "xyes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBSASL],[
- AC_REQUIRE([_PANDORA_SEARCH_LIBSASL])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBSASL],[
- AC_REQUIRE([_PANDORA_SEARCH_LIBSASL])
- AS_IF([test "x${ac_cv_libsasl}" = "xno"],
- AC_MSG_ERROR([libsasl is required for ${PACKAGE}]))
-])
-
-AC_DEFUN([_PANDORA_SEARCH_LIBSASL2],[
- AC_REQUIRE([AC_LIB_PREFIX])
-
- dnl --------------------------------------------------------------------
- dnl Check for libsasl2
- dnl --------------------------------------------------------------------
-
- AC_ARG_ENABLE([libsasl2],
- [AS_HELP_STRING([--disable-libsasl2],
- [Build with libsasl2 support @<:@default=on@:>@])],
- [ac_enable_libsasl2="$enableval"],
- [ac_enable_libsasl2="yes"])
-
- AS_IF([test "x$ac_enable_libsasl2" = "xyes"],[
- AC_LIB_HAVE_LINKFLAGS(sasl2,,[
- #include <stdlib.h>
- #include <sasl2/sasl2.h>
- ],[
- sasl2_server_init(NULL, NULL);
- ])
- ],[
- ac_cv_libsasl2="no"
- ])
-
- AM_CONDITIONAL(HAVE_LIBSASL2, [test "x${ac_cv_libsasl2}" = "xyes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBSASL2],[
- AC_REQUIRE([_PANDORA_SEARCH_LIBSASL2])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBSASL2],[
- AC_REQUIRE([_PANDORA_SEARCH_LIBSASL2])
- AS_IF([test "x${ac_cv_libsasl2}" = "xno"],
- AC_MSG_ERROR([libsasl2 is required for ${PACKAGE}]))
-])