X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=configure.ac;h=a336819e3fd58c2cae32a4440aa36182fcbaa1d5;hb=e115444989a124cc1a433ea20c13e877317bb0ad;hp=06033bfb44ca44b0b0737221bd1fa2bf8c000f8f;hpb=6915d96dce45f277eebb7fbe3373ab4a23b15a21;p=m6w6%2Flibmemcached diff --git a/configure.ac b/configure.ac index 06033bfb..a336819e 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,7 @@ AC_PREREQ(2.59) AC_INIT([libmemcached],[0.30],[http://tangent.org/552/libmemcached.html]) AC_CONFIG_SRCDIR([libmemcached/memcached.c]) AC_CONFIG_AUX_DIR(config) -AM_CONFIG_HEADER(libmemcached/libmemcached_config.h) +AM_CONFIG_HEADER([config.h]) AC_CONFIG_MACRO_DIR([m4]) #shared library versioning @@ -53,7 +53,6 @@ else building_from_bzr=no fi -AC_PROG_CC_C99 AC_PROG_CXX ACX_USE_SYSTEM_EXTENSIONS @@ -61,11 +60,14 @@ ACX_USE_SYSTEM_EXTENSIONS AC_PROG_CPP AM_PROG_CC_C_O +FORCE_MAC_GCC42 +dnl Once we can use a modern autoconf, we can use this +dnl AC_PROG_CC_C99 + AC_C_BIGENDIAN AC_C_CONST AC_HEADER_TIME AC_TYPE_SIZE_T -AC_TYPE_SSIZE_T AC_FUNC_MALLOC AC_FUNC_REALLOC @@ -96,10 +98,17 @@ fi AC_SUBST(LD_VERSION_SCRIPT) AC_SUBST(LD_UTIL_VERSION_SCRIPT) +gl_VISIBILITY + # Build optimized or debug version ? # First check for gcc and g++ if test "$GCC" = "yes" then + + dnl Once we can use a modern autoconf, we can replace the std=gnu99 here + dnl with using AC_CC_STD_C99 above + CC="${CC} -std=gnu99" + CFLAGS="-ggdb3 ${CFLAGS}" CXXFLAGS="-ggdb3 ${CXXFLAGS}" @@ -111,6 +120,10 @@ then fi if test "x$SUNCC" = "xyes" then + dnl Once we can use a modern autoconf, we can replace the -xc99=all here + dnl with using AC_CC_STD_C99 above + CC="${CC} -xc99=all" + CFLAGS="-g -mt ${CFLAGS}" CXXFLAGS="-xlang=c99 -g -mt -compat=5 -library=stlport4 -template=no%extdef ${CXXFLAGS}" @@ -161,6 +174,7 @@ ENABLE_HSIEH_HASH REQUIRE_POD2MAN PROTOCOL_BINARY_TEST WITH_MEMCACHED +ENABLE_DEPRECATED dnl TODO: Remove this define once we are using 2.61 across the board. # AX_HEADER_ASSERT @@ -266,8 +280,6 @@ uint16_t x= htons(80); ]) ]) - W_STRICT_ALIASING="-Wno-strict-aliasing" - AS_IF([test "$ac_profiling" = "yes"], [CC_PROFILING="-pg"]) @@ -275,9 +287,10 @@ uint16_t x= htons(80); [CC_COVERAGE="-fprofile-arcs -ftest-coverage"]) AS_IF([test "$building_from_bzr" = "yes"], - [W_FAIL="-Werror"]) + [W_FAIL=""]) + #[W_FAIL="-Werror"]) - BASE_WARNINGS="-pedantic -W -Wall -Wextra ${W_FAIL} -Wundef -Wshadow -Wmissing-declarations ${W_STRICT_ALIASING} ${F_DIAGNOSTICS_SHOW_OPTION} ${W_CONVERSION}" + BASE_WARNINGS="-pedantic -Wall -Wextra ${W_FAIL} -Wundef -Wshadow -Wmissing-declarations -Wstrict-aliasing -Wformat=2 ${F_DIAGNOSTICS_SHOW_OPTION} ${W_CONVERSION} ${CFLAG_VISIBILITY}" CC_WARNINGS="${BASE_WARNINGS} -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wswitch-default -Wswitch-enum -Wcast-align" CXX_WARNINGS="${BASE_WARNINGS} -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wold-style-cast -Weffc++ -Wno-long-long" @@ -316,6 +329,7 @@ template <> void C::foo(); [CXX_WARNINGS="${CXX_WARNINGS} -Wredundant-decls"], [CXX_WARNINGS="${CXX_WARNINGS} -Wno-redundant-decls"]) + NO_STRICT_ALIASING="-fno-strict-aliasing -Wno-strict-aliasing" NO_REDUNDANT_DECLS="-Wno-redundant-decls" fi if test "$SUNCC" = "yes" @@ -351,6 +365,7 @@ fi AC_SUBST(NO_CONVERSION) AC_SUBST(NO_REDUNDANT_DECLS) +AC_SUBST(NO_STRICT_ALIASING) AM_CPPFLAGS="-I\$(top_srcdir) -I\$(top_builddir) ${CPPFLAGS}" AM_CFLAGS="${CC_WARNINGS} ${CC_PROFILING} ${CC_COVERAGE} ${CFLAGS}" @@ -371,6 +386,7 @@ AC_CONFIG_FILES([ tests/Makefile docs/Makefile libmemcached/Makefile + libmemcached/memcached_configure.h libmemcachedutil/Makefile support/Makefile support/libmemcached.pc