Reid Spencer | b15e69a | 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]) |
| 7 | AC_LANG_SAVE |
| 8 | AC_LANG_CPLUSPLUS |
| 9 | AC_TRY_COMPILE([#include <iterator> |
| 10 | #ifdef HAVE_NAMESPACES |
| 11 | using namespace std; |
| 12 | #endif],[forward_iterator<int,int> t; return 0;], |
| 13 | ac_cv_cxx_have_fwd_iterator=yes, ac_cv_cxx_have_fwd_iterator=no) |
| 14 | AC_LANG_RESTORE |
| 15 | ]) |
| 16 | HAVE_FWD_ITERATOR=0 |
| 17 | if test "$ac_cv_cxx_have_fwd_iterator" = yes |
| 18 | then |
| 19 | HAVE_FWD_ITERATOR=1 |
| 20 | fi |
| 21 | AC_SUBST(HAVE_FWD_ITERATOR)]) |
| 22 | |
| 23 | |