Salome HOME
sources v1.2
[modules/kernel.git] / salome_adm / unix / config_files / ac_cxx_have_sstream.m4
1 dnl @synopsis AC_CXX_HAVE_SSTREAM
2 dnl
3 dnl If the C++ library has a working stringstream, define HAVE_SSTREAM.
4 dnl
5 dnl @author Ben Stanley
6 dnl @version $Id$
7 dnl
8 dnl modified by Marc Tajchman (CEA) - 10/10/2002
9 dnl
10 AC_DEFUN([AC_CXX_HAVE_SSTREAM],
11 [AC_CACHE_CHECK(whether the compiler has stringstream,
12 HAVE_SSTREAM,
13 [AC_REQUIRE([AC_CXX_NAMESPACES])
14  AC_LANG_SAVE
15  AC_LANG_CPLUSPLUS
16  AC_TRY_COMPILE([#include <sstream>
17 #ifdef HAVE_NAMESPACES
18 using namespace std;
19 #endif],[stringstream message; message << "Hello"; return 0;],
20  HAVE_SSTREAM=yes, HAVE_SSTREAM=no)
21  AC_LANG_RESTORE
22 ])
23 AC_SUBST(HAVE_SSTREAM)
24 ])