1 dnl @synopsis AC_CXX_NAMESPACES
3 dnl If the compiler can prevent names clashes using namespaces, define
7 dnl @author Todd Veldhuizen
8 dnl @author Luc Maisonobe <luc@spaceroots.org>
9 dnl @version 2004-02-04
10 dnl @license AllPermissive
12 AC_DEFUN([AC_CXX_NAMESPACES],
13 [AC_CACHE_CHECK(whether the compiler implements namespaces,
17 AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}],
18 [using namespace Outer::Inner; return i;],
19 ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no)
22 if test "$ac_cv_cxx_namespaces" = yes; then
23 AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces])