Debian Codegraph @

macros/ac_cxx_have_std.m4

raw
1 # Stolen from the GNU autoconf macro archive:
2 # http://www.gnu.org/software/ac-archive/C++_Support/ac_cxx_have_std.html
3
4 AC_DEFUN([AC_CXX_HAVE_STD],
5 [AC_CACHE_CHECK(whether the compiler supports ISO C++ standard library,
6 ac_cv_cxx_have_std,
7 [AC_REQUIRE([AC_CXX_NAMESPACES])
8 AC_LANG_SAVE
9 AC_LANG_CPLUSPLUS
10 AC_TRY_COMPILE([#include <iostream>
11 #include <map>
12 #include <iomanip>
13 #include <cmath>
14 #ifdef HAVE_NAMESPACES
15 using namespace std;
16 #endif],[return 0;],
17 ac_cv_cxx_have_std=yes, ac_cv_cxx_have_std=no)
18 AC_LANG_RESTORE
19 ])
20 if test "$ac_cv_cxx_have_std" = yes; then
21 AC_DEFINE(HAVE_STD,,[define if the compiler supports ISO C++ standard library])
22 fi
23 ])
24
25