1 dnl @synopsis AC_CXX_HAVE_STL
3 dnl If the compiler supports the Standard Template Library, define HAVE_STL.
5 dnl @version $Id: ac_cxx_have_stl.m4,v 1.1 2005/01/07 02:52:49 norwin Exp $
6 dnl @author Todd Veldhuizen and Luc Maisonobe <luc@spaceroots.org>
8 AC_DEFUN([AC_CXX_HAVE_STL],
9 [AC_CACHE_CHECK(whether the compiler supports Standard Template Library,
11 [AC_REQUIRE([AC_CXX_NAMESPACES])
14 AC_TRY_COMPILE([#include <list>
16 #ifdef HAVE_NAMESPACES
18 #endif],[list<int> x; x.push_back(5);
19 list<int>::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0;],
20 ac_cv_cxx_have_stl=yes, ac_cv_cxx_have_stl=no)
23 if test "$ac_cv_cxx_have_stl" = yes; then
24 AC_DEFINE(HAVE_STL,,[define if the compiler supports Standard Template Library])