~ubuntu-branches/ubuntu/hardy/autoconf-archive/hardy

« back to all changes in this revision

Viewing changes to m4source/ac_cxx_have_sstream.m4

  • Committer: Bazaar Package Importer
  • Author(s): Martin A. Godisch
  • Date: 2004-06-26 09:43:57 UTC
  • Revision ID: james.westby@ubuntu.com-20040626094357-3be3jwcz1vcdhpe8
Tags: upstream-20040616
ImportĀ upstreamĀ versionĀ 20040616

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl Available from the GNU Autoconf Macro Archive at:
 
2
dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_sstream.html
 
3
dnl
 
4
AC_DEFUN([AC_CXX_HAVE_SSTREAM],
 
5
[AC_CACHE_CHECK(whether the compiler has stringstream,
 
6
ac_cv_cxx_have_sstream,
 
7
[AC_REQUIRE([AC_CXX_NAMESPACES])
 
8
 AC_LANG_SAVE
 
9
 AC_LANG_CPLUSPLUS
 
10
 AC_TRY_COMPILE([#include <sstream>
 
11
#ifdef HAVE_NAMESPACES
 
12
using namespace std;
 
13
#endif],[stringstream message; message << "Hello"; return 0;],
 
14
 ac_cv_cxx_have_sstream=yes, ac_cv_cxx_have_sstream=no)
 
15
 AC_LANG_RESTORE
 
16
])
 
17
if test "$ac_cv_cxx_have_sstream" = yes; then
 
18
  AC_DEFINE(HAVE_SSTREAM,,[define if the compiler has stringstream])
 
19
fi
 
20
])