From b6a7bb728204c2a091dab5b6b04985b6d5e4fa8d Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Wed, 2 Dec 2009 15:07:36 -0800 Subject: [PATCH] pandora-build v0.80 - fix build for old lds. --- m4/pandora_canonical.m4 | 7 +++++-- m4/pandora_stl_hash.m4 | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/m4/pandora_canonical.m4 b/m4/pandora_canonical.m4 index 83edbd84..ef5e1983 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.79]) +AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.80]) AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[ dnl Force dependency tracking on for Sun Studio builds @@ -98,7 +98,10 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[ PANDORA_LIBTOOL AS_IF([test "$lt_cv_prog_gnu_ld" = "yes"],[ - AM_LDFLAGS="${AM_LDFLAGS} -Wl,--default-symver" + ${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 diff --git a/m4/pandora_stl_hash.m4 b/m4/pandora_stl_hash.m4 index adf25611..9cd92783 100644 --- a/m4/pandora_stl_hash.m4 +++ b/m4/pandora_stl_hash.m4 @@ -50,6 +50,38 @@ AC_DEFUN([PANDORA_CXX_STL_HASH], AC_MSG_RESULT() AC_MSG_WARN([could not find an STL hash_map]) fi + AC_CACHE_CHECK( + [whether hash_map has rehash method], + [ac_cv_hash_map_has_rehash], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ +#include HASH_MAP_H +using namespace HASH_NAMESPACE; + ]],[[ +HASH_MAP_CLASS test_hash; +test_hash.rehash(100); + ]])], + [ac_cv_hash_map_has_rehash=yes], + [ac_cv_hash_map_has_rehash=no])]) + AS_IF([test $ac_cv_hash_map_has_rehash = yes],[ + AC_DEFINE(HASH_MAP_HAS_REHASH, 1, [if hash_map<> hash rehash method]) + ]) + AC_CACHE_CHECK( + [whether hash_map has resize method], + [ac_cv_hash_map_has_resize], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ +#include HASH_MAP_H +using namespace HASH_NAMESPACE; + ]],[[ +HASH_MAP_CLASS test_hash; +test_hash.resize(100); + ]])], + [ac_cv_hash_map_has_resize=yes], + [ac_cv_hash_map_has_resize=no])]) + AS_IF([test $ac_cv_hash_map_has_resize = yes],[ + AC_DEFINE(HASH_MAP_HAS_RESIZE, 1, [if hash_map<> hash resize method]) + ]) AC_CACHE_CHECK( [whether to redefine hash], [ac_cv_redefine_hash_string], -- 2.30.2