ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/ac-tools/AC_CXX_NAMESPACES.m4
Revision: 1465
Committed: Fri Jul 9 23:08:25 2010 UTC (15 years ago) by chuckv
File size: 998 byte(s)
Log Message:
Creating busticated version of OpenMD

File Contents

# User Rev Content
1 gezelter 811 dnl
2     dnl AC_CXX_NAMESPACES
3     dnl
4     dnl Description
5     dnl
6     dnl If the compiler can prevent names clashes using namespaces,
7     dnl define HAVE_NAMESPACES.
8     dnl
9     dnl Version: 1.2 (last modified: 2000-07-19)
10     dnl Author: Luc Maisonobe
11     dnl
12     dnl from http://www.gnu.org/software/ac-archive/htmldoc/index.html
13     dnl
14     dnl License:
15     dnl GNU General Public License
16     dnl [http://www.gnu.org/software/ac-archive/htmldoc/COPYING.html]
17     dnl with this special exception
18     dnl [http://www.gnu.org/software/ac-archive/htmldoc/COPYING-Exception.html].
19     dnl
20    
21     AC_DEFUN([AC_CXX_NAMESPACES],
22     [AC_CACHE_CHECK(whether the compiler implements namespaces,
23     ac_cv_cxx_namespaces,
24     [AC_LANG_SAVE
25     AC_LANG_CPLUSPLUS
26     AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}],
27     [using namespace Outer::Inner; return i;],
28     ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no)
29     AC_LANG_RESTORE
30     ])
31     if test "$ac_cv_cxx_namespaces" = yes; then
32     AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces])
33     fi
34     ])