blob: 35be1cde7e5e6206b9b318e6dc2bcbbd1336a95a [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001dnl @synopsis AC_CXX_HAVE_STD_NAMESPACE
2dnl
3dnl If the compiler supports the std namespace, define
4dnl HAVE_STD_NAMESPACE.
5dnl
6dnl @category Cxx
7dnl @author Todd Veldhuizen
8dnl @author Luc Maisonobe <luc@spaceroots.org>
9dnl @version 2004-02-04
10dnl @license AllPermissive
11
12AC_DEFUN([AC_CXX_HAVE_STD_NAMESPACE],
13[AC_CACHE_CHECK(whether the compiler supports the std namespace,
14ac_cv_cxx_have_std_namespace,
15[AC_LANG_SAVE
16 AC_LANG_CPLUSPLUS
17 AC_TRY_COMPILE([#include <iostream>
18 std::istream& is = std::cin;
19 ],[return 0;],
20 ac_cv_cxx_have_std_namespace=yes, ac_cv_cxx_have_std_namespace=no)
21 AC_LANG_RESTORE
22])
23if test "$ac_cv_cxx_have_std_namespace" = yes; then
24 AC_DEFINE(HAVE_STD_NAMESPACE,,[define if the compiler supports the std namespace])
25fi
26])