First merge of Trond's patches (cherry picking).
[awesomized/libmemcached] / configure.ac
index c594d67f9360ffc72b3329e119e9e293592fccab..98557c2fe70943881580627963fee306aa88aa6f 100644 (file)
@@ -17,11 +17,12 @@ PANDORA_CANONICAL_TARGET
 AC_SEARCH_LIBS(getopt_long, gnugetopt)
 AC_SEARCH_LIBS(gethostbyname, nsl)
 
+AC_CHECK_FUNCS_ONCE([getline])
+
 PANDORA_HAVE_LIBEVENT
 PANDORA_REQUIRE_PTHREAD
 PANDORA_CXX_DEMANGLE
 
-
 dnl Specialty checks
 DETECT_BYTEORDER
 ENABLE_UTILLIB
@@ -32,6 +33,16 @@ PROTOCOL_BINARY_TEST
 WITH_MEMCACHED
 ENABLE_DEPRECATED
 PANDORA_HAVE_LIBINNODB
+PANDORA_PRINT_CALLSTACK
+
+AC_CHECK_HEADERS([atomic.h])
+AS_IF([test "x$ac_cv_header_atomic_h" = "xyes"],
+      AC_CHECK_FUNCS(atomic_add_64)
+      AC_CHECK_FUNCS(atomic_add_32)
+      AS_IF([test "x$ac_cv_func_atomic_add_64" = "xyes" -a "x$ac_cv_func_atomic_add_32" = "xyes"],
+            AC_DEFINE([USE_ATOMIC_H],
+                     [1],
+                      [Define to true if you want to use functions from atomic.h])))
 
 AC_CONFIG_FILES([
   Makefile