ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-3.0/ac-tools/AC_CXX_HAVE_STL.m4
Revision: 2517
Committed: Fri Dec 16 19:01:47 2005 UTC (18 years, 6 months ago) by gezelter
File size: 861 byte(s)
Log Message:
added the STL check

File Contents

# User Rev Content
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     ])