From 78e7d4a69814c1483b17f9d169af54fbe7ed1dc3 Mon Sep 17 00:00:00 2001 From: Brian Gaeke Date: Mon, 23 Feb 2004 18:56:03 +0000 Subject: [PATCH] Move HASH_* checks to using AC_SUBST instead of AC_DEFINE. Tighten up some whitespace and comments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11761 91177308-0d34-0410-b5e6-96231b3b80d8 --- autoconf/acinclude.m4 | 72 ++++++++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 32 deletions(-) diff --git a/autoconf/acinclude.m4 b/autoconf/acinclude.m4 index 4a5612e3476..1ac0dd6e04d 100644 --- a/autoconf/acinclude.m4 +++ b/autoconf/acinclude.m4 @@ -5888,10 +5888,8 @@ if test "$ac_cv_cxx_namespaces" = yes; then fi ]) -# # 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_STD_EXT_HASH_MAP], [AC_CACHE_CHECK([whether the compiler has defining template class std::hash_map], ac_cv_cxx_have_std_ext_hash_map, @@ -5904,9 +5902,12 @@ using namespace std; #endif],[hash_map 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 that defines template class std::hash_map.]) - fi]) + HAVE_STD_EXT_HASH_MAP=0 + if test "$ac_cv_cxx_have_std_ext_hash_map" = yes + then + HAVE_STD_EXT_HASH_MAP=1 + fi + AC_SUBST(HAVE_STD_EXT_HASH_MAP)]) AC_DEFUN([AC_CXX_HAVE_GNU_EXT_HASH_MAP], [AC_CACHE_CHECK([whether the compiler has defining template class __gnu_cxx::hash_map], @@ -5920,9 +5921,12 @@ using namespace __gnu_cxx; #endif],[hash_map 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 that defines template class __gnu_cxx::hash_map.]) - fi]) + HAVE_GNU_EXT_HASH_MAP=0 + if test "$ac_cv_cxx_have_gnu_ext_hash_map" = yes + then + HAVE_GNU_EXT_HASH_MAP=1 + fi + AC_SUBST(HAVE_GNU_EXT_HASH_MAP)]) AC_DEFUN([AC_CXX_HAVE_GLOBAL_HASH_MAP], [AC_CACHE_CHECK([whether the compiler has defining template class ::hash_map], @@ -5933,18 +5937,20 @@ AC_DEFUN([AC_CXX_HAVE_GLOBAL_HASH_MAP], AC_TRY_COMPILE([#include ],[hash_map 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 that defines template class ::hash_map.]) - fi]) + HAVE_GLOBAL_HASH_MAP=0 + if test "$ac_cv_cxx_have_global_hash_map" = yes + then + HAVE_GLOBAL_HASH_MAP=1 + fi + AC_SUBST(HAVE_GLOBAL_HASH_MAP)]) 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_STD_EXT_HASH_SET], [AC_CACHE_CHECK([whether the compiler has defining template class std::hash_set], ac_cv_cxx_have_std_ext_hash_set, @@ -5957,9 +5963,12 @@ using namespace std; #endif],[hash_set 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 that defines template class std::hash_set.]) - fi]) + HAVE_STD_EXT_HASH_SET=0 + if test "$ac_cv_cxx_have_std_ext_hash_set" = yes + then + HAVE_STD_EXT_HASH_SET=1 + fi + AC_SUBST(HAVE_STD_EXT_HASH_SET)]) AC_DEFUN([AC_CXX_HAVE_GNU_EXT_HASH_SET], [AC_CACHE_CHECK( @@ -5974,9 +5983,12 @@ using namespace __gnu_cxx; #endif],[hash_set 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 that defines template class __gnu_cxx::hash_set.]) - fi]) + HAVE_GNU_EXT_HASH_SET=0 + if test "$ac_cv_cxx_have_gnu_ext_hash_set" = yes + then + HAVE_GNU_EXT_HASH_SET=1 + fi + AC_SUBST(HAVE_GNU_EXT_HASH_SET)]) AC_DEFUN([AC_CXX_HAVE_GLOBAL_HASH_SET], [AC_CACHE_CHECK([whether the compiler has defining template class ::hash_set], @@ -5987,19 +5999,20 @@ AC_DEFUN([AC_CXX_HAVE_GLOBAL_HASH_SET], AC_TRY_COMPILE([#include ],[hash_set 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 that defines template class ::hash_set.]) - fi]) + HAVE_GLOBAL_HASH_SET=0 + if test "$ac_cv_cxx_have_global_hash_set" = yes + then + HAVE_GLOBAL_HASH_SET=1 + fi + AC_SUBST(HAVE_GLOBAL_HASH_SET)]) 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 # http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html -# AC_DEFUN([AC_CXX_HAVE_STD_ITERATOR], [AC_CACHE_CHECK(whether the compiler has the standard iterator, ac_cv_cxx_have_std_iterator, @@ -6018,8 +6031,7 @@ if test "$ac_cv_cxx_have_std_iterator" = yes then HAVE_STD_ITERATOR=1 fi -AC_SUBST(HAVE_STD_ITERATOR) -]) +AC_SUBST(HAVE_STD_ITERATOR)]) # # Check for bidirectional iterator extension. This is modified from @@ -6043,13 +6055,10 @@ if test "$ac_cv_cxx_have_bi_iterator" = yes then HAVE_BI_ITERATOR=1 fi -AC_SUBST(HAVE_BI_ITERATOR) -]) +AC_SUBST(HAVE_BI_ITERATOR)]) -# # Check for forward iterator 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_FWD_ITERATOR], [AC_CACHE_CHECK(whether the compiler has forward iterators, ac_cv_cxx_have_fwd_iterator, @@ -6068,8 +6077,7 @@ if test "$ac_cv_cxx_have_fwd_iterator" = yes then HAVE_FWD_ITERATOR=1 fi -AC_SUBST(HAVE_FWD_ITERATOR) -]) +AC_SUBST(HAVE_FWD_ITERATOR)]) # # Check for slist extension. This is from