Blame m4/ax_cxx_namespaces.m4

Packit Service e31359
# ===========================================================================
Packit Service e31359
#     http://www.gnu.org/software/autoconf-archive/ax_cxx_namespaces.html
Packit Service e31359
# ===========================================================================
Packit Service e31359
#
Packit Service e31359
# SYNOPSIS
Packit Service e31359
#
Packit Service e31359
#   AX_CXX_NAMESPACES
Packit Service e31359
#
Packit Service e31359
# DESCRIPTION
Packit Service e31359
#
Packit Service e31359
#   If the compiler can prevent names clashes using namespaces, define
Packit Service e31359
#   HAVE_NAMESPACES.
Packit Service e31359
#
Packit Service e31359
# LICENSE
Packit Service e31359
#
Packit Service e31359
#   Copyright (c) 2008 Todd Veldhuizen
Packit Service e31359
#   Copyright (c) 2008 Luc Maisonobe <luc@spaceroots.org>
Packit Service e31359
#
Packit Service e31359
#   Copying and distribution of this file, with or without modification, are
Packit Service e31359
#   permitted in any medium without royalty provided the copyright notice
Packit Service e31359
#   and this notice are preserved. This file is offered as-is, without any
Packit Service e31359
#   warranty.
Packit Service e31359
Packit Service e31359
#serial 6
Packit Service e31359
Packit Service e31359
AU_ALIAS([AC_CXX_NAMESPACES], [AX_CXX_NAMESPACES])
Packit Service e31359
AC_DEFUN([AX_CXX_NAMESPACES],
Packit Service e31359
[AC_CACHE_CHECK(whether the compiler implements namespaces,
Packit Service e31359
ax_cv_cxx_namespaces,
Packit Service e31359
[AC_LANG_SAVE
Packit Service e31359
 AC_LANG_CPLUSPLUS
Packit Service e31359
 AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}],
Packit Service e31359
                [using namespace Outer::Inner; return i;],
Packit Service e31359
 ax_cv_cxx_namespaces=yes, ax_cv_cxx_namespaces=no)
Packit Service e31359
 AC_LANG_RESTORE
Packit Service e31359
])
Packit Service e31359
if test "$ax_cv_cxx_namespaces" = yes; then
Packit Service e31359
  AC_DEFINE(HAVE_NAMESPACES,1,[define if the compiler implements namespaces])
Packit Service e31359
fi
Packit Service e31359
])