1 |
gezelter |
2517 |
dnl @synopsis AC_CXX_HAVE_STL |
2 |
|
|
dnl |
3 |
|
|
dnl If the compiler supports the Standard Template Library, define |
4 |
|
|
dnl HAVE_STL. |
5 |
|
|
dnl |
6 |
|
|
dnl @category Cxx |
7 |
|
|
dnl @author Todd Veldhuizen |
8 |
|
|
dnl @author Luc Maisonobe <luc@spaceroots.org> |
9 |
|
|
dnl @version 2004-02-04 |
10 |
|
|
dnl @license AllPermissive |
11 |
|
|
|
12 |
|
|
AC_DEFUN([AC_CXX_HAVE_STL], |
13 |
|
|
[AC_CACHE_CHECK(whether the compiler supports Standard Template Library, |
14 |
|
|
ac_cv_cxx_have_stl, |
15 |
|
|
[AC_REQUIRE([AC_CXX_NAMESPACES]) |
16 |
|
|
AC_LANG_SAVE |
17 |
|
|
AC_LANG_CPLUSPLUS |
18 |
|
|
AC_TRY_COMPILE([#include <list> |
19 |
|
|
#include <deque> |
20 |
|
|
#ifdef HAVE_NAMESPACES |
21 |
|
|
using namespace std; |
22 |
|
|
#endif],[list<int> x; x.push_back(5); |
23 |
|
|
list<int>::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0;], |
24 |
|
|
ac_cv_cxx_have_stl=yes, ac_cv_cxx_have_stl=no) |
25 |
|
|
AC_LANG_RESTORE |
26 |
|
|
]) |
27 |
|
|
if test "$ac_cv_cxx_have_stl" = yes; then |
28 |
|
|
AC_DEFINE(HAVE_STL,,[define if the compiler supports Standard Template Library]) |
29 |
|
|
fi |
30 |
|
|
]) |