Reid Spencer | b15e69a | 2004-09-07 06:56:14 +0000 | [diff] [blame] | 1 | # Check for standard 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_STD_ITERATOR], |
| 4 | [AC_CACHE_CHECK(whether the compiler has the standard iterator, |
| 5 | ac_cv_cxx_have_std_iterator, |
| 6 | [AC_REQUIRE([AC_CXX_NAMESPACES]) |
Reid Spencer | 70eca35 | 2004-09-19 22:31:49 +0000 | [diff] [blame^] | 7 | AC_LANG_PUSH([C++]) |
| 8 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 9 | [[#include <iterator> |
Reid Spencer | b15e69a | 2004-09-07 06:56:14 +0000 | [diff] [blame] | 10 | #ifdef HAVE_NAMESPACES |
| 11 | using namespace std; |
Reid Spencer | 70eca35 | 2004-09-19 22:31:49 +0000 | [diff] [blame^] | 12 | #endif]], |
| 13 | [[iterator<int,int,int> t; return 0;]])], |
| 14 | ac_cv_cxx_have_std_iterator=yes, |
| 15 | ac_cv_cxx_have_std_iterator=no) |
| 16 | AC_LANG_POP([C++]) |
Reid Spencer | b15e69a | 2004-09-07 06:56:14 +0000 | [diff] [blame] | 17 | ]) |
| 18 | HAVE_STD_ITERATOR=0 |
| 19 | if test "$ac_cv_cxx_have_std_iterator" = yes |
| 20 | then |
| 21 | HAVE_STD_ITERATOR=1 |
| 22 | fi |
| 23 | AC_SUBST(HAVE_STD_ITERATOR)]) |
| 24 | |
| 25 | |