summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorWink Saville <wink@google.com>2010-05-29 13:00:38 -0700
committerWink Saville <wink@google.com>2010-05-29 13:00:38 -0700
commitd0332953cda33fb4f8e24ebff9c49159b69c43d6 (patch)
tree81612e8b12f590310aeb0ebf1da37b304eb7baa6 /m4
parentede38fe9b9f93888e6e41afc7abb09525f44da95 (diff)
downloadexternal_protobuf-d0332953cda33fb4f8e24ebff9c49159b69c43d6.zip
external_protobuf-d0332953cda33fb4f8e24ebff9c49159b69c43d6.tar.gz
external_protobuf-d0332953cda33fb4f8e24ebff9c49159b69c43d6.tar.bz2
Add protobuf 2.3.0 sources
This is the contents of protobuf-2.3.0.tar.bz2 from http://code.google.com/p/protobuf/downloads/list. Change-Id: Idfde09ce7ef5ac027b07ee83f2674fbbed5c30b2
Diffstat (limited to 'm4')
-rw-r--r--m4/acx_check_suncc.m413
-rw-r--r--m4/stl_hash.m445
2 files changed, 39 insertions, 19 deletions
diff --git a/m4/acx_check_suncc.m4 b/m4/acx_check_suncc.m4
index 3464a84..4e8f961 100644
--- a/m4/acx_check_suncc.m4
+++ b/m4/acx_check_suncc.m4
@@ -26,7 +26,7 @@ AC_DEFUN([ACX_CHECK_SUNCC],[
AS_IF([test "$SUNCC" = "yes" -a "x${ac_cv_env_CXXFLAGS_set}" = "x"],[
dnl Sun Studio has a crashing bug with -xO4 in some cases. Keep this
dnl at -xO3 until a proper test to detect those crashes can be done.
- CXXFLAGS="-g0 -xO3 -xlibmil -xdepend -xbuiltin -mt -compat=5 -library=stlport4 -template=no%extdef ${CXXFLAGS}"
+ CXXFLAGS="-g0 -xO3 -xlibmil -xdepend -xbuiltin -mt -compat=5 -library=stlport4 -library=Crun -template=no%extdef ${CXXFLAGS}"
])
case $host_os in
@@ -42,10 +42,6 @@ AC_DEFUN([ACX_CHECK_SUNCC],[
AS_IF([test "x$ac_enable_64bit" = "xyes"],[
- AS_IF([test "x${ac_cv_env_LDFLAGS_set}" = "x"],[
- LDFLAGS="-L/usr/local/lib/${isainfo_k} ${LDFLAGS}"
- ])
-
AS_IF([test "x$libdir" = "x\${exec_prefix}/lib"],[
dnl The user hasn't overridden the default libdir, so we'll
dnl the dir suffix to match solaris 32/64-bit policy
@@ -54,12 +50,19 @@ AC_DEFUN([ACX_CHECK_SUNCC],[
dnl This should just be set in CPPFLAGS and in LDFLAGS, but libtool
dnl does the wrong thing if you don't put it into CXXFLAGS. sigh.
+ dnl (It also needs it in CFLAGS, or it does a different wrong thing!)
AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"],[
CXXFLAGS="${CXXFLAGS} -m64"
ac_cv_env_CXXFLAGS_set=set
ac_cv_env_CXXFLAGS_value='-m64'
])
+ AS_IF([test "x${ac_cv_env_CFLAGS_set}" = "x"],[
+ CFLAGS="${CFLAGS} -m64"
+ ac_cv_env_CFLAGS_set=set
+ ac_cv_env_CFLAGS_value='-m64'
+ ])
+
AS_IF([test "$target_cpu" = "sparc" -a "x$SUNCC" = "xyes" ],[
CXXFLAGS="-xmemalign=8s ${CXXFLAGS}"
])
diff --git a/m4/stl_hash.m4 b/m4/stl_hash.m4
index 912b954..08813c9 100644
--- a/m4/stl_hash.m4
+++ b/m4/stl_hash.m4
@@ -14,28 +14,45 @@ AC_DEFUN([AC_CXX_STL_HASH],
[AC_MSG_CHECKING(the location of hash_map)
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
- ac_cv_cxx_hash_map=""
- for location in ext/hash_map hash_map; do
- for namespace in __gnu_cxx "" std stdext; do
- if test -z "$ac_cv_cxx_hash_map"; then
- AC_TRY_COMPILE([#include <$location>],
- [${namespace}::hash_map<int, int> t],
- [ac_cv_cxx_hash_map="<$location>";
- ac_cv_cxx_hash_namespace="$namespace";])
- fi
+ ac_cv_cxx_hash_map_header=""
+ ac_cv_cxx_hash_map_class=""
+ for location in [tr1/unordered_map ext/hash_map hash_map]; do
+ for namespace in [std::tr1 __gnu_cxx "" std stdext]; do
+ for name in [unordered_map hash_map]; do
+
+ if test -z "$ac_cv_cxx_hash_map_header"; then
+
+ # On OSX 1.5 / GCC 4.0.1 (the standard compiler on that platform),
+ # calling find() on a const unordered_map does not compile. So, we
+ # include a call to find() in our test to detect this broken
+ # implementation and avoid using it. Note that ext/hash_map works
+ # fine on this platform, so we'll end up using that.
+ AC_TRY_COMPILE([#include <$location>],
+ [const ${namespace}::$name<int, int> t;
+ t.find(1);],
+ [ac_cv_cxx_hash_map_header="<$location>";
+ ac_cv_cxx_hash_namespace="$namespace";
+ ac_cv_cxx_hash_map_class="$name";])
+ fi
+ done
done
done
- ac_cv_cxx_hash_set=`echo "$ac_cv_cxx_hash_map" | sed s/map/set/`;
- if test -n "$ac_cv_cxx_hash_map"; then
+ ac_cv_cxx_hash_set_header=`echo "$ac_cv_cxx_hash_map_header" | sed s/map/set/`;
+ ac_cv_cxx_hash_set_class=`echo "$ac_cv_cxx_hash_map_class" | sed s/map/set/`;
+ if test -n "$ac_cv_cxx_hash_map_header"; then
AC_DEFINE(HAVE_HASH_MAP, 1, [define if the compiler has hash_map])
AC_DEFINE(HAVE_HASH_SET, 1, [define if the compiler has hash_set])
- AC_DEFINE_UNQUOTED(HASH_MAP_H,$ac_cv_cxx_hash_map,
+ AC_DEFINE_UNQUOTED(HASH_MAP_H,$ac_cv_cxx_hash_map_header,
[the location of <hash_map>])
- AC_DEFINE_UNQUOTED(HASH_SET_H,$ac_cv_cxx_hash_set,
+ AC_DEFINE_UNQUOTED(HASH_SET_H,$ac_cv_cxx_hash_set_header,
[the location of <hash_set>])
+ AC_DEFINE_UNQUOTED(HASH_MAP_CLASS,$ac_cv_cxx_hash_map_class,
+ [the name of <hash_set>])
+ AC_DEFINE_UNQUOTED(HASH_SET_CLASS,$ac_cv_cxx_hash_set_class,
+ [the name of <hash_set>])
AC_DEFINE_UNQUOTED(HASH_NAMESPACE,$ac_cv_cxx_hash_namespace,
[the namespace of hash_map/hash_set])
- AC_MSG_RESULT([$ac_cv_cxx_hash_map])
+ AC_MSG_RESULT([$ac_cv_cxx_hash_map_header])
else
AC_MSG_RESULT()
AC_MSG_WARN([could not find an STL hash_map])