1 dnl @synopsis AC_CXX_HAVE_SSTREAM
3 dnl If the C++ library has a working stringstream, define HAVE_SSTREAM.
5 dnl @author Ben Stanley
6 dnl @version $Id: ac_cxx_have_sstream.m4,v 1.1 2005/01/07 02:52:49 norwin Exp $
8 AC_DEFUN([AC_CXX_HAVE_SSTREAM],
9 [AC_CACHE_CHECK(whether the compiler has stringstream,
10 ac_cv_cxx_have_sstream,
11 [AC_REQUIRE([AC_CXX_NAMESPACES])
14 AC_TRY_COMPILE([#include <sstream>
15 #ifdef HAVE_NAMESPACES
17 #endif],[stringstream message; message << "Hello"; return 0;],
18 ac_cv_cxx_have_sstream=yes, ac_cv_cxx_have_sstream=no)
21 if test "$ac_cv_cxx_have_sstream" = yes; then
22 AC_DEFINE(HAVE_SSTREAM,,[define if the compiler has stringstream])