| Revision 217,
749 bytes
checked in by martin, 6 years ago
(diff) |
|
Set svn:eol-style as appropriate for all files
|
-
Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 | dnl @synopsis AC_CXX_NAMESPACES |
|---|
| 2 | dnl |
|---|
| 3 | dnl If the compiler can prevent names clashes using namespaces, define |
|---|
| 4 | dnl HAVE_NAMESPACES. |
|---|
| 5 | dnl |
|---|
| 6 | dnl @category Cxx |
|---|
| 7 | dnl @author Todd Veldhuizen |
|---|
| 8 | dnl @author Luc Maisonobe <luc@spaceroots.org> |
|---|
| 9 | dnl @version 2004-02-04 |
|---|
| 10 | dnl @license AllPermissive |
|---|
| 11 | |
|---|
| 12 | AC_DEFUN([AC_CXX_NAMESPACES], |
|---|
| 13 | [AC_CACHE_CHECK(whether the compiler implements namespaces, |
|---|
| 14 | ac_cv_cxx_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_namespaces=yes, ac_cv_cxx_namespaces=no) |
|---|
| 20 | AC_LANG_RESTORE |
|---|
| 21 | ]) |
|---|
| 22 | if test "$ac_cv_cxx_namespaces" = yes; then |
|---|
| 23 | AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces]) |
|---|
| 24 | fi |
|---|
| 25 | ]) |
|---|
Note: See
TracBrowser
for help on using the repository browser.