pandora-build v0.80 - fix build for old lds.
authorMonty Taylor <mordred@inaugust.com>
Wed, 2 Dec 2009 23:07:36 +0000 (15:07 -0800)
committerMonty Taylor <mordred@inaugust.com>
Wed, 2 Dec 2009 23:07:36 +0000 (15:07 -0800)
m4/pandora_canonical.m4
m4/pandora_stl_hash.m4

index 83edbd84648336e2c9eb83a84ff8b888e3567851..ef5e1983df69d9f05cf9874ad840f4072801a623 100644 (file)
@@ -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
 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
 
 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"],[
   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
   ])
 
   dnl autoconf doesn't automatically provide a fail-if-no-C++ macro
index adf25611c546653bd1990670e36898d669ae2f65..9cd92783d53b8f781e06fe932bcfdb13b04ff19c 100644 (file)
@@ -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_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<int, int> 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<int, int> 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<string>],
      [ac_cv_redefine_hash_string],
    AC_CACHE_CHECK(
      [whether to redefine hash<string>],
      [ac_cv_redefine_hash_string],