Cleanup warnings/found issue in store by key functions.
[awesomized/libmemcached] / configure.ac
1 AC_INIT(clients/memcat.c)
2 AC_CONFIG_AUX_DIR(config)
3 AM_CONFIG_HEADER(libmemcached/libmemcached_config.h)
4 AC_CANONICAL_SYSTEM
5
6 MEMCACHED_LIBRARY_NAME=libmemcached
7
8 #release versioning
9 MEMCACHED_MAJOR_VERSION=0
10 MEMCACHED_MINOR_VERSION=23
11 MEMCACHED_MICRO_VERSION=0
12
13 #API version
14 MEMCACHED_API_VERSION=1.0
15 AC_SUBST(MEMCACHED_API_VERSION)
16
17 #shared library versioning
18 MEMCACHED_LIBRARY_VERSION=2:0:0
19 # | | |
20 # +------+ | +---+
21 # | | |
22 # current:revision:age
23 # | | |
24 # | | +- increment if interfaces have been added
25 # | | set to zero if interfaces have been removed or changed
26 # | +- increment if source code has changed
27 # | set to zero if current is incremented
28 # +- increment if interfaces have been added, removed or changed
29
30 AC_SUBST(MEMCACHED_LIBRARY_VERSION)
31
32 PACKAGE=$MEMCACHED_LIBRARY_NAME
33 AC_SUBST(MEMCACHED_LIBRARY_NAME)
34
35 MEMCACHED_VERSION=$MEMCACHED_MAJOR_VERSION.$MEMCACHED_MINOR_VERSION.$MEMCACHED_MICRO_VERSION
36 MEMCACHED_RELEASE=$MEMCACHED_MAJOR_VERSION.$MEMCACHED_MINOR_VERSION
37 AC_SUBST(MEMCACHED_RELEASE)
38 AC_SUBST(MEMCACHED_VERSION)
39
40 VERSION=$MEMCACHED_RELEASE
41
42 AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
43
44 AC_PROG_CC
45 AC_PROG_CXX
46 AC_PROG_LIBTOOL
47 AM_SANITY_CHECK
48 LIBTOOL="$LIBTOOL --preserve-dup-deps"
49 AC_SUBST(LIBTOOL)dnl
50 AC_LANG_CPLUSPLUS
51
52 sinclude(config/debug.m4)
53 sinclude(config/dtrace.m4)
54 sinclude(config/byteorder.m4)
55 sinclude(config/64bit.m4)
56 sinclude(config/protocol_binary.m4)
57
58 # We only support GCC and Sun's forte at the moment
59 CFLAGS="-DMEMCACHED_INTERNAL $CFLAGS"
60 if test "$GCC" = "yes"
61 then
62 CFLAGS="-W -std=iso9899:1999 -Wall -Wextra -Wstrict-aliasing -pedantic -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -O3 $CFLAGS"
63
64 if test "$ENABLE_DEBUG" = "yes"
65 then
66 CFLAGS="$CFLAGS -ggdb -DHAVE_DEBUG"
67 fi
68 else
69 CFLAGS="-Xa -xstrconst -mt -D_FORTEC_ $CFLAGS"
70 if test "$ENABLE_DEBUG" = "yes"
71 then
72 CFLAGS="$CFLAGS -DHAVE_DEBUG"
73 fi
74 DTRACEFLAGS="$DTRACEFLAGS"
75 fi
76
77 LDFLAGS="-lm"
78 AC_C_CONST
79 AC_HEADER_TIME
80 AC_TYPE_SIZE_T
81 AC_SEARCH_LIBS(getopt_long, gnugetopt)
82 AC_SEARCH_LIBS(socket, socket)
83 AC_SEARCH_LIBS(gethostbyname, nsl)
84 AC_OUTPUT(Makefile clients/Makefile tests/Makefile docs/Makefile libmemcached/Makefile support/Makefile support/libmemcached.pc support/libmemcached.spec)