[llvm-commits] CVS: llvm/autoconf/aclocal.m4 configure.ac

Brian Gaeke gaeke at cs.uiuc.edu
Sun Nov 9 21:07:31 PST 2003


Changes in directory llvm/autoconf:

aclocal.m4 updated: 1.7 -> 1.8
configure.ac updated: 1.46 -> 1.47

---
Log message:

Patch to fix PR102, contributed by Reid Spencer.


---
Diffs of the changes:  (+86 -37)

Index: llvm/autoconf/aclocal.m4
diff -u llvm/autoconf/aclocal.m4:1.7 llvm/autoconf/aclocal.m4:1.8
--- llvm/autoconf/aclocal.m4:1.7	Mon Oct 13 11:22:00 2003
+++ llvm/autoconf/aclocal.m4	Sun Nov  9 21:06:07 2003
@@ -5892,61 +5892,109 @@
 # Check for hash_map extension.  This is from
 # http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_map.html
 #
-AC_DEFUN([AC_CXX_HAVE_EXT_HASH_MAP],
-[AC_CACHE_CHECK(whether the compiler has ext/hash_map,
-ac_cv_cxx_have_ext_hash_map,
-[AC_REQUIRE([AC_CXX_NAMESPACES])
+AC_DEFUN([AC_CXX_HAVE_STD_EXT_HASH_MAP],
+[AC_CACHE_CHECK([whether the compiler has <ext/hash_map> defining template class std::hash_map],
+ ac_cv_cxx_have_std_ext_hash_map,
+ [AC_REQUIRE([AC_CXX_NAMESPACES])
   AC_LANG_SAVE
   AC_LANG_CPLUSPLUS
   AC_TRY_COMPILE([#include <ext/hash_map>
 #ifdef HAVE_NAMESPACES
 using namespace std;
-#endif],[hash_map<int, int> t; return 0;],
-  ac_cv_cxx_have_ext_hash_map=std, ac_cv_cxx_have_ext_hash_map=no)
+#endif],[hash_map<int, int> t;],
+  [ac_cv_cxx_have_std_ext_hash_map=yes], [ac_cv_cxx_have_std_ext_hash_map=no])
+  AC_LANG_RESTORE])
+ if test "$ac_cv_cxx_have_std_ext_hash_map" = yes; then
+   AC_DEFINE(HAVE_STD_EXT_HASH_MAP,,[Define if the compiler has a header <ext/hash_map> that defines template class std::hash_map.])
+ fi])
+
+AC_DEFUN([AC_CXX_HAVE_GNU_EXT_HASH_MAP],
+[AC_CACHE_CHECK([whether the compiler has <ext/hash_map> defining template class __gnu_cxx::hash_map],
+ ac_cv_cxx_have_gnu_ext_hash_map,
+ [AC_REQUIRE([AC_CXX_NAMESPACES])
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
   AC_TRY_COMPILE([#include <ext/hash_map>
 #ifdef HAVE_NAMESPACES
 using namespace __gnu_cxx;
-#endif],[hash_map<int, int> t; return 0;],
-  ac_cv_cxx_have_ext_hash_map=gnu, ac_cv_cxx_have_ext_hash_map=no)
-  AC_LANG_RESTORE
-])
-if test "$ac_cv_cxx_have_ext_hash_map" = std; then
-   AC_DEFINE(HAVE_STD_EXT_HASH_MAP,,[define if the compiler has ext/hash_map])
-fi
-if test "$ac_cv_cxx_have_ext_hash_map" = gnu; then
-   AC_DEFINE(HAVE_GNU_EXT_HASH_MAP,,[define if the compiler has ext/hash_map])
-fi
-])
-
+#endif],[hash_map<int,int> t; ],
+  [ac_cv_cxx_have_gnu_ext_hash_map=yes],[ac_cv_cxx_have_gnu_ext_hash_map=no])
+  AC_LANG_RESTORE])
+ if test "$ac_cv_cxx_have_gnu_ext_hash_map" = yes; then
+   AC_DEFINE(HAVE_GNU_EXT_HASH_MAP,,[Define if the compiler has a header <ext/hash_map> that defines template class __gnu_cxx::hash_map.])
+ fi])
+
+AC_DEFUN([AC_CXX_HAVE_GLOBAL_HASH_MAP],
+[AC_CACHE_CHECK([whether the compiler has <hash_map> defining template class ::hash_map],
+ ac_cv_cxx_have_global_hash_map,
+ [AC_REQUIRE([AC_CXX_NAMESPACES])
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+  AC_TRY_COMPILE([#include <hash_map>],[hash_map<int,int> t; ],
+  [ac_cv_cxx_have_global_hash_map=yes], [ac_cv_cxx_have_global_hash_map=no])
+  AC_LANG_RESTORE])
+ if test "$ac_cv_cxx_have_global_hash_map" = yes; then
+   AC_DEFINE(HAVE_GLOBAL_HASH_MAP,,[Define if the compiler has a header <hash_map> that defines template class ::hash_map.])
+ fi])
+
+AC_DEFUN([AC_CXX_HAVE_HASH_MAP],
+[AC_CXX_HAVE_STD_EXT_HASH_MAP
+ AC_CXX_HAVE_GNU_EXT_HASH_MAP
+ AC_CXX_HAVE_GLOBAL_HASH_MAP])
 #
 # Check for hash_set extension.  This is modified from
 # http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html
 #
-AC_DEFUN([AC_CXX_HAVE_EXT_HASH_SET],
-[AC_CACHE_CHECK(whether the compiler has ext/hash_set,
-ac_cv_cxx_have_ext_hash_set,
-[AC_REQUIRE([AC_CXX_NAMESPACES])
+AC_DEFUN([AC_CXX_HAVE_STD_EXT_HASH_SET],
+[AC_CACHE_CHECK([whether the compiler has <ext/hash_set> defining template class std::hash_set],
+ ac_cv_cxx_have_std_ext_hash_set,
+ [AC_REQUIRE([AC_CXX_NAMESPACES])
   AC_LANG_SAVE
   AC_LANG_CPLUSPLUS
   AC_TRY_COMPILE([#include <ext/hash_set>
 #ifdef HAVE_NAMESPACES
 using namespace std;
-#endif],[hash_set<int> t; return 0;],
-  ac_cv_cxx_have_ext_hash_set=std, ac_cv_cxx_have_ext_hash_set=no)
+#endif],[hash_set<int> t; ],
+  [ac_cv_cxx_have_std_ext_hash_set=yes], [ac_cv_cxx_have_std_ext_hash_set=no])
+  AC_LANG_RESTORE])
+ if test "$ac_cv_cxx_have_std_ext_hash_set" = yes; then
+   AC_DEFINE(HAVE_STD_EXT_HASH_SET,,[Define if the compiler has a header <ext/hash_set> that defines template class std::hash_set.])
+ fi])
+
+AC_DEFUN([AC_CXX_HAVE_GNU_EXT_HASH_SET],
+[AC_CACHE_CHECK(
+ [whether the compiler has <ext/hash_set> defining template class __gnu_cxx::hash_set],
+ ac_cv_cxx_have_gnu_ext_hash_set,
+ [AC_REQUIRE([AC_CXX_NAMESPACES])
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
   AC_TRY_COMPILE([#include <ext/hash_set>
 #ifdef HAVE_NAMESPACES
 using namespace __gnu_cxx;
-#endif],[hash_set<int> t; return 0;],
-  ac_cv_cxx_have_ext_hash_set=gnu, ac_cv_cxx_have_ext_hash_set=no)
-  AC_LANG_RESTORE
-])
-if test "$ac_cv_cxx_have_ext_hash_set" = std; then
-   AC_DEFINE(HAVE_STD_EXT_HASH_SET,,[define if the compiler has ext/hash_set in std])
-fi
-if test "$ac_cv_cxx_have_ext_hash_set" = gnu; then
-   AC_DEFINE(HAVE_GNU_EXT_HASH_SET,,[define if the compiler has ext/hash_set in __gnu_cc])
-fi
-])
+#endif],[hash_set<int> t; ],
+  [ac_cv_cxx_have_gnu_ext_hash_set=yes], [ac_cv_cxx_have_gnu_ext_hash_set=no])
+  AC_LANG_RESTORE])
+ if test "$ac_cv_cxx_have_gnu_ext_hash_set" = yes; then
+   AC_DEFINE(HAVE_GNU_EXT_HASH_SET,,[Define if the compiler has a header <ext/hash_set> that defines template class __gnu_cxx::hash_set.])
+ fi])
+
+AC_DEFUN([AC_CXX_HAVE_GLOBAL_HASH_SET],
+[AC_CACHE_CHECK([whether the compiler has <hash_set> defining template class ::hash_set],
+ ac_cv_cxx_have_global_hash_set,
+ [AC_REQUIRE([AC_CXX_NAMESPACES])
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+  AC_TRY_COMPILE([#include <hash_set>],[hash_set<int> t; return 0;],
+  [ac_cv_cxx_have_global_hash_set=yes], [ac_cv_cxx_have_global_hash_set=no])
+  AC_LANG_RESTORE])
+ if test "$ac_cv_cxx_have_global_hash_set" = yes; then
+   AC_DEFINE(HAVE_GLOBAL_HASH_SET,,[Define if the compiler has a header <hash_set> that defines template class ::hash_set.])
+ fi])
+
+AC_DEFUN([AC_CXX_HAVE_HASH_SET],
+[AC_CXX_HAVE_STD_EXT_HASH_SET
+ AC_CXX_HAVE_GNU_EXT_HASH_SET
+ AC_CXX_HAVE_GLOBAL_HASH_SET])
 
 #
 # Check for standard iterator extension.  This is modified from
@@ -6195,4 +6243,5 @@
 		AC_DEFINE([HAVE_PRINTF_A],[1],[Define to have the %a format string])
 	fi
 ])
+
 


Index: llvm/autoconf/configure.ac
diff -u llvm/autoconf/configure.ac:1.46 llvm/autoconf/configure.ac:1.47
--- llvm/autoconf/configure.ac:1.46	Tue Oct 28 13:17:11 2003
+++ llvm/autoconf/configure.ac	Sun Nov  9 21:06:07 2003
@@ -460,8 +460,8 @@
 AC_C_PRINTF_A
 
 dnl Check for C++ extensions
-AC_CXX_HAVE_EXT_HASH_MAP
-AC_CXX_HAVE_EXT_HASH_SET
+AC_CXX_HAVE_HASH_MAP
+AC_CXX_HAVE_HASH_SET
 AC_CXX_HAVE_EXT_SLIST
 AC_CXX_HAVE_STD_ITERATOR
 AC_CXX_HAVE_BI_ITERATOR





More information about the llvm-commits mailing list