- fi
- done
- done
- done
-
- if test -n "$ac_cv_cxx_hash_map"; 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,
- [the location of <hash_map>])
- AC_DEFINE_UNQUOTED(HASH_SET_H,$ac_cv_cxx_hash_set,
- [the location of <hash_set>])
- AC_DEFINE_UNQUOTED(HASH_NAMESPACE,$ac_cv_cxx_hash_namespace,
- [the namespace of hash_map/hash_set])
- AC_DEFINE_UNQUOTED(HASH_MAP_CLASS,$ac_cv_cxx_hash_map_class,
- [the classname of hash_map])
- AC_DEFINE_UNQUOTED(HASH_SET_CLASS,$ac_cv_cxx_hash_set_class,
- [the classname of hash_set])
- AC_MSG_RESULT([$ac_cv_cxx_hash_map])
- else
- 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_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[
-#include HASH_SET_H
-#include <string>
-using namespace HASH_NAMESPACE;
-using namespace std;
- ]],[[
-string teststr("test");
-HASH_SET_CLASS<string> test_hash;
-HASH_SET_CLASS<string>::iterator iter= test_hash.find(teststr);
-if (iter != test_hash.end())
- return 1;
+ AS_IF([test "x${pandora_cv_stl_unordered}" != "xyes"],[
+ AC_CACHE_CHECK([for tr1 unordered_map],
+ [pandora_cv_tr1_unordered],[
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+/* We put in this define because of a YACC symbol clash in Drizzle.
+ Seriously... I cannot believe the GCC guys defined a piece of the internals
+ of this named IF - and I can't believe that YACC generates a token define
+ called IF. Really?
+*/
+#define IF 21;
+#include <tr1/unordered_map>
+ ]],[[
+std::tr1::unordered_map<int, int> t