File: AC_CXX_NAMESPACES.m4

package info (click to toggle)
log4cpp 1.1.1-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,956 kB
  • ctags: 1,587
  • sloc: sh: 9,583; cpp: 6,093; ansic: 1,049; makefile: 273
file content (21 lines) | stat: -rw-r--r-- 701 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
dnl @synopsis AC_CXX_NAMESPACES
dnl
dnl If the compiler can prevent names clashes using namespaces, define
dnl HAVE_NAMESPACES.
dnl
dnl @version $Id: AC_CXX_NAMESPACES.m4,v 1.2 2002/07/22 22:00:20 bastiaan Exp $
dnl @author Luc Maisonobe
dnl
AC_DEFUN([AC_CXX_NAMESPACES],
[AC_CACHE_CHECK(whether the compiler implements namespaces,
ac_cv_cxx_namespaces,
[AC_LANG_PUSH(C++)
 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_POP(C++)
])
if test "$ac_cv_cxx_namespaces" = yes; then
  AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces])
fi
])