File: cxx_have_std_libs.m4

package info (click to toggle)
imagemagick 8%3A6.6.0.4-3%2Bsqueeze7
  • links: PTS, VCS
  • area: main
  • in suites: squeeze-lts
  • size: 66,260 kB
  • ctags: 44,368
  • sloc: ansic: 273,651; cpp: 18,279; sh: 10,816; xml: 7,125; perl: 4,893; makefile: 2,346; tcl: 459; pascal: 125
file content (32 lines) | stat: -rw-r--r-- 909 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
dnl @synopsis AC_CXX_HAVE_STD_LIBS
dnl
dnl If the compiler supports ISO C++ standard library (i.e., can
dnl include the files iostream, map, iomanip and cmath}), define
dnl HAVE_STD_LIBS.
dnl
dnl @category Cxx
dnl @author Todd Veldhuizen
dnl @author Luc Maisonobe <luc@spaceroots.org>
dnl @version 2004-02-04
dnl @license AllPermissive

AC_DEFUN([AC_CXX_HAVE_STD_LIBS],
[AC_CACHE_CHECK(whether the compiler supports ISO C++ standard library,
ac_cv_cxx_have_std_libs,
[AC_REQUIRE([AC_CXX_HAVE_NAMESPACES])
 AC_LANG_SAVE
 AC_LANG_CPLUSPLUS
 AC_TRY_COMPILE([#include <iostream>
#include <map>
#include <iomanip>
#include <cmath>
#ifdef HAVE_NAMESPACES
using namespace std;
#endif],[return 0;],
 ac_cv_cxx_have_std_libs=yes, ac_cv_cxx_have_std_libs=no)
 AC_LANG_RESTORE
])
if test "$ac_cv_cxx_have_std_libs" = yes; then
  AC_DEFINE(HAVE_STD_LIBS,,[define if the compiler supports ISO C++ standard library])
fi
])