blob: cfdbfdb1ba8894ec3c9442dcd663a82c82b298e1 [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001dnl @synopsis AC_CXX_HAVE_STD_LIBS
2dnl
3dnl If the compiler supports ISO C++ standard library (i.e., can
4dnl include the files iostream, map, iomanip and cmath}), define
5dnl HAVE_STD_LIBS.
6dnl
7dnl @category Cxx
8dnl @author Todd Veldhuizen
9dnl @author Luc Maisonobe <luc@spaceroots.org>
10dnl @version 2004-02-04
11dnl @license AllPermissive
12
13AC_DEFUN([AC_CXX_HAVE_STD_LIBS],
14[AC_CACHE_CHECK(whether the compiler supports ISO C++ standard library,
15ac_cv_cxx_have_std_libs,
cristy964cb7f2010-04-25 23:18:00 +000016[AC_REQUIRE([AX_CXX_NAMESPACES])
cristy3ed852e2009-09-05 21:47:34 +000017 AC_LANG_SAVE
18 AC_LANG_CPLUSPLUS
19 AC_TRY_COMPILE([#include <iostream>
20#include <map>
21#include <iomanip>
22#include <cmath>
23#ifdef HAVE_NAMESPACES
24using namespace std;
25#endif],[return 0;],
26 ac_cv_cxx_have_std_libs=yes, ac_cv_cxx_have_std_libs=no)
27 AC_LANG_RESTORE
28])
29if test "$ac_cv_cxx_have_std_libs" = yes; then
30 AC_DEFINE(HAVE_STD_LIBS,,[define if the compiler supports ISO C++ standard library])
31fi
32])