michael@0: # Checks whether the compiler implements namespaces michael@0: AC_DEFUN([AC_CXX_NAMESPACES], michael@0: [AC_CACHE_CHECK(whether the compiler implements namespaces, michael@0: ac_cv_cxx_namespaces, michael@0: [AC_LANG_SAVE michael@0: AC_LANG_CPLUSPLUS michael@0: AC_TRY_COMPILE([namespace Outer { michael@0: namespace Inner { int i = 0; }}], michael@0: [using namespace Outer::Inner; return i;], michael@0: ac_cv_cxx_namespaces=yes, michael@0: ac_cv_cxx_namespaces=no) michael@0: AC_LANG_RESTORE]) michael@0: if test "$ac_cv_cxx_namespaces" = yes; then michael@0: AC_DEFINE(HAVE_NAMESPACES, 1, [define if the compiler implements namespaces]) michael@0: fi])