aboutsummaryrefslogtreecommitdiffstats
path: root/autoconf/m4/cxx_namespaces.m4
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-09-19 22:31:49 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-09-19 22:31:49 +0000
commit12de17db02dca026fea1e2aee57ebdca97784292 (patch)
treeedfdc281c36966a7fa9f81a3533acee319d0bd7f /autoconf/m4/cxx_namespaces.m4
parent8eacb0c3a7489b86a7f5523ff4992452bc0b7941 (diff)
downloadexternal_llvm-12de17db02dca026fea1e2aee57ebdca97784292.zip
external_llvm-12de17db02dca026fea1e2aee57ebdca97784292.tar.gz
external_llvm-12de17db02dca026fea1e2aee57ebdca97784292.tar.bz2
Bring the script out of the dark ages and into modern autoconfness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16415 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf/m4/cxx_namespaces.m4')
-rw-r--r--autoconf/m4/cxx_namespaces.m413
1 files changed, 7 insertions, 6 deletions
diff --git a/autoconf/m4/cxx_namespaces.m4 b/autoconf/m4/cxx_namespaces.m4
index 756e378..d8d650e 100644
--- a/autoconf/m4/cxx_namespaces.m4
+++ b/autoconf/m4/cxx_namespaces.m4
@@ -4,12 +4,13 @@
AC_DEFUN([AC_CXX_NAMESPACES],
[AC_CACHE_CHECK(whether the compiler implements namespaces,
ac_cv_cxx_namespaces,
-[AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}],
- [using namespace Outer::Inner; return i;],
- ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no)
- AC_LANG_RESTORE
+[AC_LANG_PUSH([C++])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[namespace Outer { namespace Inner { int i = 0; }}]],
+ [[using namespace Outer::Inner; return i;]])],
+ ac_cv_cxx_namespaces=yes,
+ ac_cv_cxx_namespaces=no)
+ AC_LANG_POP([C++])
])
if test "$ac_cv_cxx_namespaces" = yes; then
AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces])