Remove mass calloc() on memcached_st creation.
[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.37],[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=4: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
58 AC_CHECK_HEADERS([atomic.h])
59 AS_IF([test "x$ac_cv_header_atomic_h" = "xyes"],[
60 AC_CHECK_FUNCS(atomic_add_64)
61 AC_CHECK_FUNCS(atomic_add_32)
62 AS_IF([test "x$ac_cv_func_atomic_add_64" = "xyes" -a "x$ac_cv_func_atomic_add_32" = "xyes"],[
63 AC_DEFINE([USE_ATOMIC_H],
64 [1],
65 [Define to true if you want to use functions from atomic.h])])])
66
67 AC_CONFIG_FILES([
68 Makefile
69 docs/Makefile
70 libmemcached/configure.h
71 support/libmemcached.pc
72 support/libmemcached.spec
73 support/libmemcached-fc.spec
74 ])
75 AC_OUTPUT
76
77 echo "---"
78 echo "Configuration summary for $PACKAGE_NAME version $VERSION"
79 echo ""
80 echo " * Installation prefix: $prefix"
81 echo " * System type: $host_vendor-$host_os"
82 echo " * Host CPU: $host_cpu"
83 echo " * C Compiler: $CC_VERSION"
84 echo " * Assertions enabled: $ac_cv_assert"
85 echo " * Debug enabled: $with_debug"
86 echo " * Warnings as failure: $ac_cv_warnings_as_errors"
87 echo ""
88 echo "---"
89