4 AC_DEFUN([AC_CXX_NAMESPACES],
5 [AC_CACHE_CHECK(whether the compiler implements namespaces,
9 AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}],
10 [using namespace Outer::Inner; return i;],
11 ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no)
14 if test "$ac_cv_cxx_namespaces" = yes; then
15 AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces])
19 AC_DEFUN([AC_CXX_HAVE_STL],
20 [AC_CACHE_CHECK(whether the compiler supports Standard Template Library,
22 [AC_REQUIRE([AC_CXX_NAMESPACES])
25 AC_TRY_COMPILE([#include <list>
27 #ifdef HAVE_NAMESPACES
29 #endif],[list<int> x; x.push_back(5);
30 list<int>::iterator iter = x.begin(); if (iter != x.end()) ++iter; return
32 ac_cv_cxx_have_stl=yes, ac_cv_cxx_have_stl=no)
35 if test "$ac_cv_cxx_have_stl" = yes; then
36 AC_DEFINE(HAVE_STL,,[define if the compiler supports Standard Template Library