First merge of Trond's patches (cherry picking).
[m6w6/libmemcached] / configure.ac
1 # libmemcached
2 # Copyright (C) 2008 Brian Aker, Monty Taylor
3 # All rights reserved.
4 #
5 # Use and distribution licensed under the BSD license. See
6 # the COPYING file in this directory for full text.
7
8 AC_PREREQ(2.59)
9 AC_INIT([libmemcached],[0.35],[http://tangent.org/552/libmemcached.html])
10 AC_CONFIG_SRCDIR([libmemcached/memcached.c])
11 AC_CONFIG_AUX_DIR(config)
12 AM_CONFIG_HEADER([config.h])
13 AC_CONFIG_MACRO_DIR([m4])
14
15 PANDORA_CANONICAL_TARGET
16
17 AC_SEARCH_LIBS(getopt_long, gnugetopt)
18 AC_SEARCH_LIBS(gethostbyname, nsl)
19
20 AC_CHECK_FUNCS_ONCE([getline])
21
22 PANDORA_HAVE_LIBEVENT
23 PANDORA_REQUIRE_PTHREAD
24 PANDORA_CXX_DEMANGLE
25
26 dnl Specialty checks
27 DETECT_BYTEORDER
28 ENABLE_UTILLIB
29 SETSOCKOPT_SANITY
30 ENABLE_HSIEH_HASH
31 REQUIRE_POD2MAN
32 PROTOCOL_BINARY_TEST
33 WITH_MEMCACHED
34 ENABLE_DEPRECATED
35 PANDORA_HAVE_LIBINNODB
36 PANDORA_PRINT_CALLSTACK
37
38 AC_CHECK_HEADERS([atomic.h])
39 AS_IF([test "x$ac_cv_header_atomic_h" = "xyes"],
40 AC_CHECK_FUNCS(atomic_add_64)
41 AC_CHECK_FUNCS(atomic_add_32)
42 AS_IF([test "x$ac_cv_func_atomic_add_64" = "xyes" -a "x$ac_cv_func_atomic_add_32" = "xyes"],
43 AC_DEFINE([USE_ATOMIC_H],
44 [1],
45 [Define to true if you want to use functions from atomic.h])))
46
47 AC_CONFIG_FILES([
48 Makefile
49 clients/Makefile
50 tests/Makefile
51 docs/Makefile
52 example/Makefile
53 libmemcached/Makefile
54 libmemcached/memcached_configure.h
55 support/Makefile
56 support/libmemcached.pc
57 support/libmemcached.spec
58 support/libmemcached-fc.spec
59 ])
60 AC_OUTPUT
61
62 echo "---"
63 echo "Configuration summary for $PACKAGE_NAME version $VERSION"
64 echo ""
65 echo " * Installation prefix: $prefix"
66 echo " * System type: $host_vendor-$host_os"
67 echo " * Host CPU: $host_cpu"
68 echo " * C Compiler: $CC_VERSION"
69 echo " * Assertions enabled: $ac_cv_assert"
70 echo " * Debug enabled: $with_debug"
71 echo " * Warnings as failure: $ac_cv_warnings_as_errors"
72 echo ""
73 echo "---"
74