Reid Spencer | 491f681 | 2004-09-07 06:56:14 +0000 | [diff] [blame] | 1 | # Check for forward iterator extension. This is modified from |
| 2 | # http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html |
| 3 | AC_DEFUN([AC_CXX_HAVE_FWD_ITERATOR], |
| 4 | [AC_CACHE_CHECK(whether the compiler has forward iterators, |
| 5 | ac_cv_cxx_have_fwd_iterator, |
| 6 | [AC_REQUIRE([AC_CXX_NAMESPACES]) |
Reid Spencer | 12de17d | 2004-09-19 22:31:49 +0000 | [diff] [blame] | 7 | AC_LANG_PUSH([C++]) |
| 8 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <iterator> |
Reid Spencer | 491f681 | 2004-09-07 06:56:14 +0000 | [diff] [blame] | 9 | #ifdef HAVE_NAMESPACES |
| 10 | using namespace std; |
Reid Spencer | 12de17d | 2004-09-19 22:31:49 +0000 | [diff] [blame] | 11 | #endif]], [[forward_iterator<int,int> t; return 0;]])],[ac_cv_cxx_have_fwd_iterator=yes],[ac_cv_cxx_have_fwd_iterator=no]) |
| 12 | AC_LANG_POP([C++]) |
Reid Spencer | 491f681 | 2004-09-07 06:56:14 +0000 | [diff] [blame] | 13 | ]) |
Reid Spencer | 491f681 | 2004-09-07 06:56:14 +0000 | [diff] [blame] | 14 | if test "$ac_cv_cxx_have_fwd_iterator" = yes |
| 15 | then |
John Criswell | 4046846 | 2004-09-24 21:19:06 +0000 | [diff] [blame] | 16 | AC_DEFINE(HAVE_FWD_ITERATOR,1,[Have forward iterator]) |
| 17 | else |
| 18 | AC_DEFINE(HAVE_FWD_ITERATOR,0,[Does not have forward iterator]) |
Reid Spencer | 491f681 | 2004-09-07 06:56:14 +0000 | [diff] [blame] | 19 | fi |
John Criswell | 4046846 | 2004-09-24 21:19:06 +0000 | [diff] [blame] | 20 | ]) |
Reid Spencer | 491f681 | 2004-09-07 06:56:14 +0000 | [diff] [blame] | 21 | |
| 22 | |