Fix case where we initialize a packet we will never actually use.
[awesomized/libmemcached] / configure.ac
index b66c05fa966d005919a06ea8b9d53eb0ccd56098..8808ad266fb19cf35cd9fb02ee9f2c56d162ac43 100644 (file)
@@ -1,12 +1,12 @@
 # LibmemcacheD
-# Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/
+# Copyright (C) 2011-2013 Data Differential, http://datadifferential.com/
 # Copyright (C) 2006-2010 Brian Aker, Monty Taylor, Trond Norbye
 # All rights reserved.
 #
 # Use and distribution licensed under the BSD license.  See
 # the COPYING file in this directory for full text.
 
-AC_INIT([libmemcached],[1.0.15],[http://libmemcached.org/])
+AC_INIT([libmemcached],[1.0.16],[http://libmemcached.org/])
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])
 
@@ -113,6 +113,7 @@ AC_CHECK_HEADERS_ONCE([arpa/inet.h])
 AC_CHECK_HEADERS_ONCE([errno.h])
 AC_CHECK_HEADERS_ONCE([execinfo.h])
 AC_CHECK_HEADERS_ONCE([fcntl.h])
+AC_CHECK_HEADERS_ONCE([features.h])
 AC_CHECK_HEADERS_ONCE([fnmatch.h])
 AC_CHECK_HEADERS_ONCE([inttypes.h])
 AC_CHECK_HEADERS_ONCE([libintl.h])
@@ -133,6 +134,7 @@ AC_CHECK_HEADERS_ONCE([stdlib.h])
 AC_CHECK_HEADERS_ONCE([sys/socket.h])
 AC_CHECK_HEADERS_ONCE([sys/sysctl.h])
 AC_CHECK_HEADERS_ONCE([sys/time.h])
+AC_CHECK_HEADERS_ONCE([sys/types.h])
 AC_CHECK_HEADERS_ONCE([sys/un.h])
 AC_CHECK_HEADERS_ONCE([sys/wait.h])
 AC_CHECK_HEADERS_ONCE([syslog.h])
@@ -189,6 +191,16 @@ AM_CONDITIONAL([BUILD_CACHE],[test "x$build_cache" = "xyes"])
 
 AX_COMPILER_VENDOR
 
+AC_CHECK_TYPES([in_port_t],,,[[
+                #ifdef HAVE_SYS_TYPES_H
+                # include <sys/types.h>
+                #endif
+                #ifdef HAVE_NETINET_IN_H
+                # include <netinet/in.h>
+                #endif
+                #ifdef HAVE_NETDB_H
+                # include <netdb.h>
+                #endif]])
 AC_CHECK_TYPES([ptrdiff_t])
 AC_HEADER_STDBOOL
 AC_TYPE_INT16_T
@@ -218,6 +230,7 @@ AC_CHECK_LIB([rt],[clock_gettime],
              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 (used in libhostile)
 AX_DLOPEN
 
@@ -274,10 +287,12 @@ AC_DEFUN([CHECK_FOR_PTHREAD_AND_SASL],
          ])
 CHECK_FOR_PTHREAD_AND_SASL
 
-
 # backtrace(), others require shared builds
-AS_IF([test "x$enable_shared" = "xyes"],
-      [AC_DEFINE([HAVE_SHARED_ENABLED],[1],[Enable code which requires shared library support. Like backtrace().])])
+AC_DEFUN([__ENABLE_SHARED],
+         [AC_REQUIRE([AX_PLATFORM])
+         AS_IF([test "x${TARGET_WINDOWS}" = "xtrue"],[enable_shared=no])
+         AS_IF([test "x$enable_shared" = "xyes"],
+               [AC_DEFINE([HAVE_SHARED_ENABLED],[1],[Enable code which requires shared library support. Like backtrace().])])])
 AM_CONDITIONAL([SHARED_ENABLED],[test "x$enable_shared" = "xyes"])
 
 PANDORA_ENABLE_DTRACE