blob: 46665f2867ebd395c3b11fdbab447b7188a51ee5 [file] [log] [blame]
Reid Spencerb15e69a2004-09-07 06:56:14 +00001# 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
3AC_DEFUN([AC_CXX_HAVE_STD_ITERATOR],
4[AC_CACHE_CHECK(whether the compiler has the standard iterator,
5ac_cv_cxx_have_std_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
11using namespace std;
12#endif],[iterator<int,int,int> t; return 0;],
13 ac_cv_cxx_have_std_iterator=yes, ac_cv_cxx_have_std_iterator=no)
14 AC_LANG_RESTORE
15])
16HAVE_STD_ITERATOR=0
17if test "$ac_cv_cxx_have_std_iterator" = yes
18then
19 HAVE_STD_ITERATOR=1
20fi
21AC_SUBST(HAVE_STD_ITERATOR)])
22
23