Debian Codegraph @

macros/ac_cxx_namespaces.m4

raw
1 # Stolen from the GNU autoconf macro archive:
2 # http://www.gnu.org/software/ac-archive/C++_Support/ac_cxx_namespaces.html
3
4 AC_DEFUN([AC_CXX_NAMESPACES],
5 [AC_CACHE_CHECK(whether the compiler implements namespaces,
6 ac_cv_cxx_namespaces,
7 [AC_LANG_SAVE
8 AC_LANG_CPLUSPLUS
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)
12 AC_LANG_RESTORE
13 ])
14 if test "$ac_cv_cxx_namespaces" = yes; then
15 AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces])
16 fi
17 ])