Make use of new vdo().
[awesomized/libmemcached] / configure.ac
1 #!/usr/bin/env bash
2 # libmemcached
3 # Copyright (C) 2008 Brian Aker, Monty Taylor
4 # All rights reserved.
5 #
6 # Use and distribution licensed under the BSD license. See
7 # the COPYING file in this directory for full text.
8
9 AC_PREREQ(2.59)
10 AC_INIT([libmemcached],[0.38],[http://tangent.org/552/libmemcached.html])
11 AC_CONFIG_SRCDIR([libmemcached/memcached.c])
12 AC_CONFIG_AUX_DIR(config)
13 AM_CONFIG_HEADER([config.h])
14 AC_CONFIG_MACRO_DIR([m4])
15
16 PANDORA_CANONICAL_TARGET
17
18 #shared library versioning
19 MEMCACHED_LIBRARY_VERSION=3:0:0
20 # | | |
21 # +------+ | +---+
22 # | | |
23 # current:revision:age
24 # | | |
25 # | | +- increment if interfaces have been added
26 # | | set to zero if interfaces have been removed or changed
27 # | +- increment if source code has changed
28 # | set to zero if current is incremented
29 # +- increment if interfaces have been added, removed or changed
30 AC_SUBST(MEMCACHED_LIBRARY_VERSION)
31
32
33 HASHKIT_LIBRARY_VERSION=0:0:0
34 AC_SUBST(HASHKIT_LIBRARY_VERSION)
35
36 AC_SEARCH_LIBS(getopt_long, gnugetopt)
37 AC_SEARCH_LIBS(gethostbyname, nsl)
38
39 AC_CHECK_FUNCS([getline])
40
41 PANDORA_HAVE_LIBEVENT
42 PANDORA_REQUIRE_PTHREAD
43 PANDORA_CXX_DEMANGLE
44
45 dnl Specialty checks
46 DETECT_BYTEORDER
47 ENABLE_UTILLIB
48 SETSOCKOPT_SANITY
49 ENABLE_HSIEH_HASH
50 REQUIRE_POD2MAN
51 REQUIRE_PODCHECKER
52 PROTOCOL_BINARY_TEST
53 WITH_MEMCACHED
54 ENABLE_DEPRECATED
55 PANDORA_HAVE_LIBINNODB
56 PANDORA_PRINT_CALLSTACK
57 PANDORA_HAVE_SASL
58
59 dnl The sasl functions should only be visible if we build with sasl support
60 AS_IF([test "x$ac_cv_sasl" = "xyes"],
61 [LIBMEMCACHED_WITH_SASL_SUPPORT="#define LIBMEMCACHED_WITH_SASL_SUPPORT 1"])
62 AC_SUBST(LIBMEMCACHED_WITH_SASL_SUPPORT)
63
64 AC_CHECK_HEADERS([atomic.h])
65 AS_IF([test "x$ac_cv_header_atomic_h" = "xyes"],[
66 AC_CHECK_FUNCS(atomic_add_64)
67 AC_CHECK_FUNCS(atomic_add_32)
68 AS_IF([test "x$ac_cv_func_atomic_add_64" = "xyes" -a "x$ac_cv_func_atomic_add_32" = "xyes"],[
69 AC_DEFINE([USE_ATOMIC_H],
70 [1],
71 [Define to true if you want to use functions from atomic.h])])])
72
73 AC_CONFIG_FILES([
74 Makefile
75 docs/Makefile
76 libhashkit/configure.h
77 libmemcached/configure.h
78 support/libmemcached.pc
79 support/libmemcached.spec
80 support/libmemcached-fc.spec
81 ])
82 AC_OUTPUT
83
84 echo "---"
85 echo "Configuration summary for $PACKAGE_NAME version $VERSION"
86 echo ""
87 echo " * Installation prefix: $prefix"
88 echo " * System type: $host_vendor-$host_os"
89 echo " * Host CPU: $host_cpu"
90 echo " * C Compiler: $CC_VERSION"
91 echo " * Assertions enabled: $ac_cv_assert"
92 echo " * Debug enabled: $with_debug"
93 echo " * Warnings as failure: $ac_cv_warnings_as_errors"
94 echo ""
95 echo "---"
96