From 1b4bde6cb8743004cfc31fb9328b7c09ff982746 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Thu, 17 Dec 2009 16:00:02 -0800 Subject: [PATCH] Updated to latest pandora-build. Removed the .ver scripts to be consistent with other libs. --- libmemcached/include.am | 5 +-- libmemcached/libmemcached.ver | 1 - .../protocol/libmemcachedprotocol.ver | 1 - libmemcached/util/libmemcachedutil.ver | 1 - m4/pandora_canonical.m4 | 17 ++-------- m4/pandora_check_cxx_standard.m4 | 11 +++++-- m4/pandora_cinttypes.m4 | 5 ++- m4/pandora_cstdint.m4 | 3 ++ m4/pandora_cxx_demangle.m4 | 3 ++ m4/pandora_drizzle_build.m4 | 31 ++++++++++++++++--- m4/pandora_have_libreadline.m4 | 2 +- m4/pandora_libtool.m4 | 10 ++++++ m4/pandora_shared_ptr.m4 | 3 ++ m4/pandora_stl_hash.m4 | 3 ++ m4/pandora_warnings.m4 | 17 +++++++--- 15 files changed, 77 insertions(+), 36 deletions(-) delete mode 100644 libmemcached/libmemcached.ver delete mode 100644 libmemcached/protocol/libmemcachedprotocol.ver delete mode 100644 libmemcached/util/libmemcachedutil.ver diff --git a/libmemcached/include.am b/libmemcached/include.am index ed7ae80d..12e6be35 100644 --- a/libmemcached/include.am +++ b/libmemcached/include.am @@ -3,12 +3,9 @@ # All paths should be given relative to the root EXTRA_DIST+= \ - libmemcached/libmemcached.ver \ libmemcached/libmemcached_probes.d \ libmemcached/memcached/README.txt \ - libmemcached/memcached_configure.h.in \ - libmemcached/protocol/libmemcachedprotocol.ver \ - libmemcached/util/libmemcachedutil.ver + libmemcached/memcached_configure.h.in noinst_HEADERS+= \ diff --git a/libmemcached/libmemcached.ver b/libmemcached/libmemcached.ver deleted file mode 100644 index 38b5cab8..00000000 --- a/libmemcached/libmemcached.ver +++ /dev/null @@ -1 +0,0 @@ -libmemcached_3 { global: *; }; diff --git a/libmemcached/protocol/libmemcachedprotocol.ver b/libmemcached/protocol/libmemcachedprotocol.ver deleted file mode 100644 index 09090189..00000000 --- a/libmemcached/protocol/libmemcachedprotocol.ver +++ /dev/null @@ -1 +0,0 @@ -libmemcachedprotocol_0 { global: *; }; diff --git a/libmemcached/util/libmemcachedutil.ver b/libmemcached/util/libmemcachedutil.ver deleted file mode 100644 index 1a6d5013..00000000 --- a/libmemcached/util/libmemcachedutil.ver +++ /dev/null @@ -1 +0,0 @@ -libmemcachedutil_0 { global: *; }; diff --git a/m4/pandora_canonical.m4 b/m4/pandora_canonical.m4 index ef5e1983..0542e3d3 100644 --- a/m4/pandora_canonical.m4 +++ b/m4/pandora_canonical.m4 @@ -4,7 +4,7 @@ dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Which version of the canonical setup we're using -AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.80]) +AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.86]) AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[ dnl Force dependency tracking on for Sun Studio builds @@ -97,13 +97,6 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[ PANDORA_LIBTOOL - AS_IF([test "$lt_cv_prog_gnu_ld" = "yes"],[ - ${LD} --help | grep default-symver >/dev/null 2>&1 - AS_IF([test $? -eq 0],[ - AM_LDFLAGS="${AM_LDFLAGS} -Wl,--default-symver" - ]) - ]) - dnl autoconf doesn't automatically provide a fail-if-no-C++ macro dnl so we check c++98 features and fail if we don't have them, mainly dnl for that reason @@ -176,12 +169,7 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[ dnl alloca - but we need to know it anyway for check_stack_overrun. PANDORA_STACK_DIRECTION - save_LIBS="${LIBS}" - LIBS="" - AC_CHECK_LIB(m, floor, [], AC_CHECK_LIB(m, __infinity)) - LIBM="${LIBS}" - LIBS="${save_LIBS}" - AC_SUBST([LIBM]) + AC_CHECK_LIBM AC_CHECK_FUNC(setsockopt, [], [AC_CHECK_LIB(socket, setsockopt)]) AC_CHECK_FUNC(bind, [], [AC_CHECK_LIB(bind, bind)]) @@ -244,6 +232,5 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[ AC_SUBST([AM_CFLAGS]) AC_SUBST([AM_CXXFLAGS]) AC_SUBST([AM_CPPFLAGS]) - AC_SUBST([AM_LDFLAGS]) ]) diff --git a/m4/pandora_check_cxx_standard.m4 b/m4/pandora_check_cxx_standard.m4 index d4189ea0..6a88a31f 100644 --- a/m4/pandora_check_cxx_standard.m4 +++ b/m4/pandora_check_cxx_standard.m4 @@ -8,9 +8,16 @@ AC_DEFUN([PANDORA_CHECK_CXX_STANDARD],[ AS_IF([test "$GCC" = "yes"], [AS_IF([test "$ac_cv_cxx_compile_cxx0x_native" = "yes"],[], [AS_IF([test "$ac_cv_cxx_compile_cxx0x_gxx" = "yes"], - [CXXFLAGS="-std=gnu++0x ${CXXFLAGS}"], - [CXXFLAGS="-std=gnu++98"]) + [CXX_STANDARD="-std=gnu++0x"], + [CXX_STANDARD="-std=gnu++98"]) ]) ]) + AM_CXXFLAGS="${CXX_STANDARD} ${AM_CXXFLAGS}" + + save_CXXFLAGS="${CXXFLAGS}" + CXXFLAGS="${CXXFLAGS} ${CXX_STANDARD}" AC_CXX_HEADER_STDCXX_98 + CXXFLAGS="${save_CXXFLAGS}" + + AC_SUBST([CXX_STANDARD]) ]) diff --git a/m4/pandora_cinttypes.m4 b/m4/pandora_cinttypes.m4 index 562fd0d6..83a72515 100644 --- a/m4/pandora_cinttypes.m4 +++ b/m4/pandora_cinttypes.m4 @@ -8,6 +8,8 @@ AC_DEFUN([PANDORA_CXX_CINTTYPES], [AC_REQUIRE([PANDORA_CXX_CSTDINT]) AC_MSG_CHECKING(the location of cinttypes) AC_LANG_PUSH(C++) + save_CXXFLAGS="${CXXFLAGS}" + CXXFLAGS="${CXX_STANDARD} ${CXXFLAGS}" ac_cv_cxx_cinttypes="" for location in tr1/cinttypes boost/cinttypes cinttypes; do if test -z "$ac_cv_cxx_cinttypes"; then @@ -18,14 +20,15 @@ AC_DEFUN([PANDORA_CXX_CINTTYPES], fi done AC_LANG_POP() + CXXFLAGS="${save_CXXFLAGS}" if test -n "$ac_cv_cxx_cinttypes"; then AC_MSG_RESULT([$ac_cv_cxx_cinttypes]) else - AC_DEFINE([__STDC_LIMIT_MACROS],[1],[Use STDC Limit Macros in C++]) ac_cv_cxx_cinttypes="" AC_MSG_RESULT() AC_MSG_WARN([Could not find a cinttypes header.]) fi + AC_DEFINE([__STDC_LIMIT_MACROS],[1],[Use STDC Limit Macros in C++]) AC_DEFINE_UNQUOTED(CINTTYPES_H,$ac_cv_cxx_cinttypes, [the location of ]) ]) diff --git a/m4/pandora_cstdint.m4 b/m4/pandora_cstdint.m4 index 619dd326..fb6fbacf 100644 --- a/m4/pandora_cstdint.m4 +++ b/m4/pandora_cstdint.m4 @@ -7,6 +7,8 @@ AC_DEFUN([PANDORA_CXX_CSTDINT], [AC_MSG_CHECKING(the location of cstdint) AC_LANG_PUSH(C++) + save_CXXFLAGS="${CXXFLAGS}" + CXXFLAGS="${CXX_STANDARD} ${CXXFLAGS}" ac_cv_cxx_cstdint="" for location in tr1/cstdint boost/cstdint cstdint; do if test -z "$ac_cv_cxx_cstdint"; then @@ -16,6 +18,7 @@ AC_DEFUN([PANDORA_CXX_CSTDINT], fi done AC_LANG_POP() + CXXFLAGS="${save_CXXFLAGS}" if test -n "$ac_cv_cxx_cstdint"; then AC_MSG_RESULT([$ac_cv_cxx_cstdint]) else diff --git a/m4/pandora_cxx_demangle.m4 b/m4/pandora_cxx_demangle.m4 index 13a0db15..d2d9ddd5 100644 --- a/m4/pandora_cxx_demangle.m4 +++ b/m4/pandora_cxx_demangle.m4 @@ -9,12 +9,15 @@ dnl are set. AC_DEFUN([PANDORA_CXX_DEMANGLE],[ AC_LANG_PUSH([C++]) + save_CXXFLAGS="${CXXFLAGS}" + CXXFLAGS="${CXX_STANDARD} ${CXXFLAGS}" AC_CHECK_HEADERS(cxxabi.h) AC_CACHE_CHECK([checking for abi::__cxa_demangle], pandora_cv_cxa_demangle, [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ char *foo= 0; int bar= 0; foo= abi::__cxa_demangle(foo, foo, 0, &bar); ]])],[pandora_cv_cxa_demangle=yes],[pandora_cv_cxa_demangle=no])]) + CXXFLAGS="${save_CXXFLAGS}" AC_LANG_POP() AS_IF([test "x$pandora_cv_cxa_demangle" = xyes],[ diff --git a/m4/pandora_drizzle_build.m4 b/m4/pandora_drizzle_build.m4 index bcec7f71..35f27161 100644 --- a/m4/pandora_drizzle_build.m4 +++ b/m4/pandora_drizzle_build.m4 @@ -10,10 +10,7 @@ dnl are set. AC_DEFUN([PANDORA_DRIZZLE_BUILD],[ dnl We need to turn on our CXXFLAGS to make sure it shows up correctly - save_CXXFLAGS="${CXXFLAGS}" - CXXFLAGS="${CXXFLAGS} ${AM_CXXFLAGS}" PANDORA_CXX_STL_HASH - CXXFLAGS="${save_CXXFLAGS}" PANDORA_CXX_CSTDINT PANDORA_CXX_CINTTYPES @@ -39,7 +36,7 @@ AC_DEFUN([PANDORA_DRIZZLE_BUILD],[ AC_HEADER_SYS_WAIT AC_HEADER_STDBOOL - AC_CHECK_HEADERS(sys/fpu.h fpu_control.h ieeefp.h) + AC_CHECK_HEADERS(sys/types.h sys/fpu.h fpu_control.h ieeefp.h) AC_CHECK_HEADERS(select.h sys/select.h) AC_CHECK_HEADERS(utime.h sys/utime.h ) AC_CHECK_HEADERS(synch.h sys/mman.h sys/socket.h) @@ -70,8 +67,32 @@ AC_DEFUN([PANDORA_DRIZZLE_BUILD],[ # include #endif ]]) - AC_CHECK_TYPES([ulong]) + AC_CHECK_TYPES([uint, ulong]) PANDORA_CXX_DEMANGLE + AH_TOP([ +#ifndef __CONFIG_H__ +#define __CONFIG_H__ + +#if defined(i386) && !defined(__i386__) +#define __i386__ +#endif + + ]) + AH_BOTTOM([ +#if defined(__cplusplus) +# include CSTDINT_H +# include CINTTYPES_H +#else +# include +# include +#endif + +#if !defined(HAVE_ULONG) && !defined(__USE_MISC) +typedef unsigned long int ulong; +#endif + +#endif /* __CONFIG_H__ */ + ]) ]) diff --git a/m4/pandora_have_libreadline.m4 b/m4/pandora_have_libreadline.m4 index 1f04cd4f..bc739d5d 100644 --- a/m4/pandora_have_libreadline.m4 +++ b/m4/pandora_have_libreadline.m4 @@ -105,9 +105,9 @@ rl_compentry_func_t *func2= (rl_compentry_func_t*)0; [Does system provide rl_compentry_func_t]) ]) - AC_LANG_PUSH(C++) save_CXXFLAGS="${CXXFLAGS}" CXXFLAGS="${AM_CXXFLAGS} ${CXXFLAGS}" + AC_LANG_PUSH(C++) AC_CACHE_CHECK([rl_compentry_func_t works], [pandora_cv_rl_compentry_works],[ AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ diff --git a/m4/pandora_libtool.m4 b/m4/pandora_libtool.m4 index b9e461c7..543cbb6b 100644 --- a/m4/pandora_libtool.m4 +++ b/m4/pandora_libtool.m4 @@ -4,7 +4,17 @@ dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([PANDORA_LIBTOOL],[ + AC_REQUIRE([AC_DISABLE_STATIC]) AC_REQUIRE([AC_PROG_LIBTOOL]) + m4_ifndef([LT_PREREQ],[ + pandora_have_old_libtool=yes + ],[ + pandora_have_old_libtool=no + ]) + AS_IF([test "$SUNCC" = "yes" -a "${pandora_have_old_libtool}" = "yes"],[ + AC_MSG_ERROR([Building ${PACKAGE} with Sun Studio requires at least libtool 2.2]) + ]) + dnl By requiring AC_PROG_LIBTOOL, we should force the macro system to read dnl libtool.m4, where in 2.2 AC_PROG_LIBTOOL is an alias for LT_INIT dnl Then, if we're on 2.2, we should have LT_LANG, so we'll call it. diff --git a/m4/pandora_shared_ptr.m4 b/m4/pandora_shared_ptr.m4 index 70185ade..5d6e8dde 100644 --- a/m4/pandora_shared_ptr.m4 +++ b/m4/pandora_shared_ptr.m4 @@ -20,6 +20,8 @@ dnl AC_DEFUN([PANDORA_SHARED_PTR],[ AC_REQUIRE([PANDORA_CHECK_CXX_STANDARD]) AC_LANG_PUSH(C++) + save_CXXFLAGS="${CXXFLAGS}" + CXXFLAGS="${CXX_STANDARD} ${CXXFLAGS}" AC_CHECK_HEADERS(memory tr1/memory boost/shared_ptr.hpp) AC_CACHE_CHECK([the location of shared_ptr header file], [ac_cv_shared_ptr_h],[ @@ -52,5 +54,6 @@ shared_ptr test_ptr(new string("test string")); AC_DEFINE_UNQUOTED([SHARED_PTR_NAMESPACE], ${ac_cv_shared_ptr_namespace}, [The namespace in which SHARED_PTR can be found]) + CXXFLAGS="${save_CXXFLAGS}" AC_LANG_POP() ]) diff --git a/m4/pandora_stl_hash.m4 b/m4/pandora_stl_hash.m4 index 9cd92783..26281aee 100644 --- a/m4/pandora_stl_hash.m4 +++ b/m4/pandora_stl_hash.m4 @@ -12,6 +12,8 @@ AC_DEFUN([PANDORA_CXX_STL_HASH], [AC_MSG_CHECKING(the location of hash_map) + save_CXXFLAGS="${CXXFLAGS}" + CXXFLAGS="${AM_CXXFLAGS} ${CXXFLAGS}" AC_LANG_PUSH(C++) ac_cv_cxx_hash_map="" for location in "" "ext/" "tr1/" ; do @@ -103,5 +105,6 @@ if (iter != test_hash.end()) AS_IF([test $ac_cv_redefine_hash_string = yes],[ AC_DEFINE(REDEFINE_HASH_STRING, 1, [if hash needs to be defined]) ]) + CXXFLAGS="${save_CXXFLAGS}" AC_LANG_POP() ]) diff --git a/m4/pandora_warnings.m4 b/m4/pandora_warnings.m4 index 6054320a..b26b860e 100644 --- a/m4/pandora_warnings.m4 +++ b/m4/pandora_warnings.m4 @@ -50,6 +50,7 @@ AC_DEFUN([PANDORA_WARNINGS],[ AS_IF([test "$ac_profiling" = "yes"],[ CC_PROFILING="-pg" + GCOV_LIBS="-pg -lgcov" save_LIBS="${LIBS}" LIBS="" AC_CHECK_LIB(c_p, read) @@ -61,7 +62,12 @@ AC_DEFUN([PANDORA_WARNINGS],[ ]) AS_IF([test "$ac_coverage" = "yes"], - [CC_COVERAGE="-fprofile-arcs -ftest-coverage"]) + [ + CC_COVERAGE="--coverage" + GCOV_LIBS="-lgcov" + ]) + + AS_IF([test "$ac_cv_warnings_as_errors" = "yes"], [W_FAIL="-Werror"]) @@ -129,9 +135,9 @@ uint16_t x= htons(80); AS_IF([test "$INTELCC" = "yes"],[ m4_if(PW_LESS_WARNINGS,[no],[ - BASE_WARNINGS="-w1 -Wall -Werror -Wcheck -Wformat -Wp64 -Woverloaded-virtual -Wcast-qual" + BASE_WARNINGS="-w1 -Werror -Wcheck -Wformat -Wp64 -Woverloaded-virtual -Wcast-qual" ],[ - BASE_WARNINGS="-w1 -Wall -Wcheck -Wformat -Wp64 -Woverloaded-virtual -Wcast-qual -diag-disable 981" + BASE_WARNINGS="-w1 -Wcheck -Wformat -Wp64 -Woverloaded-virtual -Wcast-qual -diag-disable 981" ]) CC_WARNINGS="${BASE_WARNINGS}" CXX_WARNINGS="${BASE_WARNINGS}" @@ -217,8 +223,8 @@ template <> void C::foo(); AC_INCLUDES_DEFAULT])], [ac_cv_safe_to_use_Wredundant_decls_=yes], [ac_cv_safe_to_use_Wredundant_decls_=no]) - CXXFLAGS="${save_CXXFLAGS}" - AC_LANG_POP()]) + CXXFLAGS="${save_CXXFLAGS}" + AC_LANG_POP()]) AS_IF([test "$ac_cv_safe_to_use_Wredundant_decls_" = "yes"], [CXX_WARNINGS="${CXX_WARNINGS} -Wredundant-decls"], [CXX_WARNINGS="${CXX_WARNINGS} -Wno-redundant-decls"]) @@ -339,5 +345,6 @@ inline const EnumDescriptor* GetEnumDescriptor() { AC_SUBST(PROTOSKIP_WARNINGS) AC_SUBST(INNOBASE_SKIP_WARNINGS) AC_SUBST(NO_WERROR) + AC_SUBST([GCOV_LIBS]) ]) -- 2.30.2