1 AC_INIT(clients/memcat.c)
2 AC_CONFIG_AUX_DIR(config)
3 AM_CONFIG_HEADER(libmemcached/libmemcached_config.h)
5 # Setting CFLAGS here prevents AC_CANONICAL_TARGET from injecting them
7 SAVE_CXXFLAGS=${CXXFLAGS}
14 CXXFLAGS=${SAVE_CXXFLAGS}
16 MEMCACHED_LIBRARY_NAME=libmemcached
19 MEMCACHED_MAJOR_VERSION=0
20 MEMCACHED_MINOR_VERSION=29
21 MEMCACHED_MICRO_VERSION=0
24 MEMCACHED_API_VERSION=1.0
25 AC_SUBST(MEMCACHED_API_VERSION)
27 #shared library versioning
28 MEMCACHED_LIBRARY_VERSION=2:0:0
32 # current:revision:age
34 # | | +- increment if interfaces have been added
35 # | | set to zero if interfaces have been removed or changed
36 # | +- increment if source code has changed
37 # | set to zero if current is incremented
38 # +- increment if interfaces have been added, removed or changed
40 AC_SUBST(MEMCACHED_LIBRARY_VERSION)
42 PACKAGE=$MEMCACHED_LIBRARY_NAME
43 AC_SUBST(MEMCACHED_LIBRARY_NAME)
45 MEMCACHED_VERSION=$MEMCACHED_MAJOR_VERSION.$MEMCACHED_MINOR_VERSION.$MEMCACHED_MICRO_VERSION
46 MEMCACHED_RELEASE=$MEMCACHED_MAJOR_VERSION.$MEMCACHED_MINOR_VERSION
47 AC_SUBST(MEMCACHED_RELEASE)
48 AC_SUBST(MEMCACHED_VERSION)
50 VERSION=$MEMCACHED_RELEASE
52 AM_INIT_AUTOMAKE($PACKAGE, $VERSION, nostdinc no-define -Wall -Werror)
53 AC_USE_SYSTEM_EXTENSIONS
60 LIBTOOL="$LIBTOOL --preserve-dup-deps"
66 AC_SEARCH_LIBS(getopt_long, gnugetopt)
67 AC_SEARCH_LIBS(socket, socket)
68 AC_SEARCH_LIBS(gethostbyname, nsl)
69 AC_SEARCH_LIBS(floorf, m)
72 sinclude(config/pod2man.m4)
73 sinclude(config/debug.m4)
74 sinclude(config/dtrace.m4)
75 sinclude(config/byteorder.m4)
76 sinclude(config/64bit.m4)
77 sinclude(config/protocol_binary.m4)
78 sinclude(config/memcached.m4)
79 sinclude(config/setsockopt.m4)
80 sinclude(config/hsieh.m4)
81 sinclude(config/util.m4)
83 dnl This is likely subverted by vpath builds. How do we find the original
84 dnl source dir in the configure step of a vpath build?
92 # We only support GCC and Sun's forte at the moment
93 if test "$GCC" = "yes"
95 if test "$building_from_hg" = "yes"
97 CFLAGS="-Werror $CFLAGS"
98 CXXFLAGS="-Werror $CXXFLAGS"
101 CFLAGS="-W -std=iso9899:1999 -Wall -Wextra -Wno-strict-aliasing -pedantic -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -O3 -ggdb $CFLAGS"
102 CXXFLAGS="-W -Wall -Wextra -Wno-strict-aliasing -pedantic -Wundef -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wold-style-cast -Weffc++ -Wconversion -Wmissing-declarations -Wredundant-decls -O3 -ggdb $CXXFLAGS"
104 if test "$ENABLE_DEBUG" = "yes"
106 CFLAGS="$CFLAGS -ggdb -DHAVE_DEBUG"
109 CFLAGS="-Xa -xstrconst -mt -D_FORTEC_ -errfmt=error -errwarn -errshort=tags $CFLAGS"
110 CXXFLAGS="+w +w2 -xwe -mt -D_FORTEC_ $CXXFLAGS"
111 if test "$ENABLE_DEBUG" = "yes"
113 CFLAGS="$CFLAGS -DHAVE_DEBUG"
114 CXXFLAGS="$CXXFLAGS -DHAVE_DEBUG"
119 AM_CPPFLAGS="${CPPFLAGS}"
120 AM_CFLAGS="${CFLAGS}"
121 AM_CXXFLAGS="${CXXFLAGS}"
123 AC_SUBST([AM_CPPFLAGS])
124 AC_SUBST([AM_CFLAGS])
125 AC_SUBST([AM_CXXFLAGS])
127 dnl We've collected the flags in AM_*FLAGS now, so blank these.
132 AC_OUTPUT(Makefile clients/Makefile tests/Makefile docs/Makefile libmemcached/Makefile libmemcachedutil/Makefile support/Makefile support/libmemcached.pc support/libmemcached.spec support/libmemcached-fc.spec)