source: icXML/icXML-devel/m4/cxx_have_namespaces.m4 @ 2723

Last change on this file since 2723 was 2723, checked in by cameron, 6 years ago

Add Xerces build system scripts

File size: 779 bytes
Line 
1dnl @synopsis AC_CXX_HAVE_NAMESPACES
2dnl
3dnl If the compiler can prevent names clashes using namespaces, define
4dnl HAVE_NAMESPACES.
5dnl
6dnl @category Cxx
7dnl @author Todd Veldhuizen
8dnl @author Luc Maisonobe <luc@spaceroots.org>
9dnl @version 2004-02-04
10dnl @license AllPermissive
11
12AC_DEFUN([AC_CXX_HAVE_NAMESPACES],
13[AC_CACHE_CHECK(whether the compiler implements namespaces,
14ac_cv_cxx_have_namespaces,
15[AC_LANG_SAVE
16 AC_LANG_CPLUSPLUS
17 AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}],
18                [using namespace Outer::Inner; return i;],
19 ac_cv_cxx_have_namespaces=yes, ac_cv_cxx_have_namespaces=no)
20 AC_LANG_RESTORE
21])
22if test "$ac_cv_cxx_have_namespaces" = yes; then
23  AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces])
24fi
25])
Note: See TracBrowser for help on using the repository browser.