~ubuntu-branches/ubuntu/trusty/log4shib/trusty

« back to all changes in this revision

Viewing changes to m4/AC_CXX_NAMESPACES.m4

  • Committer: Package Import Robot
  • Author(s): Russ Allbery
  • Date: 2012-06-05 21:20:25 UTC
  • Revision ID: package-import@ubuntu.com-20120605212025-uyigtav7dqwvnf41
Tags: upstream-1.0.4
ImportĀ upstreamĀ versionĀ 1.0.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 @version $Id: AC_CXX_NAMESPACES.m4,v 1.2 2002/07/22 22:00:20 bastiaan Exp $
 
7
dnl @author Luc Maisonobe
 
8
dnl
 
9
AC_DEFUN([AC_CXX_NAMESPACES],
 
10
[AC_CACHE_CHECK(whether the compiler implements namespaces,
 
11
ac_cv_cxx_namespaces,
 
12
[AC_LANG_PUSH(C++)
 
13
 AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}],
 
14
                [using namespace Outer::Inner; return i;],
 
15
 ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no)
 
16
 AC_LANG_POP(C++)
 
17
])
 
18
if test "$ac_cv_cxx_namespaces" = yes; then
 
19
  AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces])
 
20
fi
 
21
])