# Use and distribution licensed under the BSD license. See
# the COPYING file in this directory for full text.
-AC_INIT([libmemcached],[1.0.13],[http://libmemcached.org/])
+AC_INIT([libmemcached],[1.0.14],[http://libmemcached.org/])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_ARG_PROGRAM
AC_USE_SYSTEM_EXTENSIONS
-AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability subdir-objects foreign tar-ustar])
+AM_INIT_AUTOMAKE([1.11 color-tests -Wno-portability subdir-objects foreign tar-ustar])
AC_PREREQ([2.61])
-AC_CONFIG_HEADERS([config.h:config.in])dnl Keep filename to 8.3 for MS-DOS.
+AC_CONFIG_HEADERS([mem_config.h:mem_config.in])dnl Keep filename to 8.3 for MS-DOS.
AC_CONFIG_SRCDIR([libmemcached/memcached.cc])
#shared library versioning
AX_PLATFORM
-gl_VISIBILITY
-AS_IF([ test -n "$CFLAG_VISIBILITY" ], [ CPPFLAGS="$CPPFLAGS $CFLAG_VISIBILITY" ])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AX_CXX_HEADER_STDCXX_98
AC_MSG_ERROR([Your system lacks a new enough C++ compiler])
])
+AC_DEFUN([LIBMEMCACHED_PROTOCOL],
+ [AC_ARG_ENABLE([libmemcachedprotocol],
+ [AS_HELP_STRING([--enable-libmemcachedprotocol],
+ [Enable libmemcachedprotocol])],
+ [ax_enable_libmemcachedprotocol=yes],
+ [ax_enable_libmemcachedprotocol=no])
+
+ AM_CONDITIONAL([BUILD_LIBMEMCACHED_PROTOCOL],[test "$ax_enable_libmemcachedprotocol" = "yes"])
+
+ AC_MSG_CHECKING([for libmemcachedprotocol])
+ AC_MSG_RESULT([$ax_enable_libmemcachedprotocol])
+ ])
+LIBMEMCACHED_PROTOCOL
+
# Adding support for libtest
m4_include([libtest/yatl.m4])
AC_CHECK_HEADERS([inttypes.h])
AC_CHECK_HEADERS([libintl.h])
AC_CHECK_HEADERS([limits.h])
-AC_CHECK_HEADERS([malloc.h])
AC_CHECK_HEADERS([math.h])
AC_CHECK_HEADERS([netdb.h])
AC_CHECK_HEADERS([netinet/in.h])
AC_CHECK_HEADERS([netinet/tcp.h])
AC_CHECK_HEADERS([pthread.h])
+AC_CHECK_HEADERS([spawn.h])
AC_CHECK_HEADERS([stdarg.h])
AC_CHECK_HEADERS([stddef.h])
AC_CHECK_HEADERS([stdio.h])
AC_CHECK_HEADERS([sys/socket.h])
AC_CHECK_HEADERS([sys/sysctl.h])
AC_CHECK_HEADERS([sys/time.h])
+AC_CHECK_HEADERS([sys/un.h])
AC_CHECK_HEADERS([time.h])
AC_CHECK_HEADERS([unistd.h])
-AC_HEADER_TIME
+
+# Windows only
+AC_CHECK_HEADERS([winsock2.h])
+AC_CHECK_HEADERS([ws2tcpip.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_FUNCS([alarm])
AC_CHECK_FUNCS([dup2])
+AC_CHECK_FUNCS([fcntl])
AC_CHECK_FUNCS([getline])
AC_CHECK_FUNCS([gettimeofday])
AC_CHECK_FUNCS([memchr])
AC_FUNC_ALLOCA
AC_FUNC_ERROR_AT_LINE
AC_FUNC_FORK
-AC_FUNC_MALLOC
-AC_FUNC_REALLOC
AC_FUNC_STRERROR_R
-AC_CHECK_HEADER(umem.h, [
+AC_CHECK_HEADER([umem.h], [
AC_DEFINE([HAVE_UMEM_H], 1,
[Define this if you have umem.h])
build_cache=no
],[ LIBMEMCACHED_WITH_SASL_SUPPORT="#define LIBMEMCACHED_WITH_SASL_SUPPORT 0" ])
AC_SUBST(LIBMEMCACHED_WITH_SASL_SUPPORT)
-AC_CHECK_LIB([rt], [clock_gettime], [
+AC_CHECK_LIB([rt],[clock_gettime], [
RT_LIB="-lrt"
AC_SUBST(RT_LIB)
AC_DEFINE([HAVE_CLOCK_GETTIME], [ 1 ], [Have clock_gettime])
])
# Check for the ability to call dlopen
-AC_CHECK_LIB([dl], [dlopen], [
+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_CHECK_LIB([m], [floor])
+AC_CHECK_LIB([m],[floor])
AC_CHECK_FUNCS([sigignore])
AC_CHECK_HEADERS([atomic.h])
AC_DEFINE([HAVE_LIBPQ], [0], [Support for Postgres])
AC_DEFINE([HAVE_LIBCURL], [0], [Support for libcurl])
-AC_DEFINE([HAVE_MEMCACHED_LIGHT_BINARY], [1], [Support for memcached_light])
-AC_DEFINE([MEMCACHED_LIGHT_BINARY], ["example/memcached_light"], [Support for memcached_light])
-
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
-AC_CHECK_FUNCS([setppriv], [
- AC_CHECK_HEADER([priv.h], [
- AC_DEFINE([HAVE_DROP_PRIVILEGES], 1,
- [Define this if you have an implementation of drop_privileges()])
- build_solaris_privs=yes
- ], [])
-],[])
-
-AC_CHECK_HEADERS_ONCE(winsock2.h poll.h sys/wait.h fnmatch.h)
-AM_CONDITIONAL(BUILD_POLL, test "x$ac_cv_header_poll_h" = "xno")
-AM_CONDITIONAL(BUILD_WIN32_WRAPPERS, test "x$ac_cv_header_winsock2_h" = "xyes")
+AC_CHECK_FUNCS([setppriv],
+ [AC_CHECK_HEADER([priv.h],
+ [AC_DEFINE([HAVE_DROP_PRIVILEGES],
+ [1],
+ [Define this if you have an implementation of drop_privileges()])
+ build_solaris_privs=yes])
+ ])
+
+AC_CHECK_HEADERS_ONCE([winsock2.h poll.h sys/wait.h fnmatch.h])
+AM_CONDITIONAL([BUILD_POLL],[test "x$ac_cv_header_poll_h" = "xno"])
+AM_CONDITIONAL([BUILD_WIN32_WRAPPERS],[test "x$ac_cv_header_winsock2_h" = "xyes"])
AS_IF(test "x$ac_cv_header_winsock2_h" = "xyes",
[AM_LDFLAGS="$AM_LDFLAGS -lws2_32"
AM_CFLAGS="$AM_CFLAGS $NO_WERROR"
echo " * C++ Compiler: $CXX_VERSION"
echo " * C++ Flags: $CXXFLAGS"
echo " * CPP Flags: $CPPFLAGS"
+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"