Blame m4/ax_cxx_have_sstream.m4

Packit Service e31359
# ===========================================================================
Packit Service e31359
#    http://www.gnu.org/software/autoconf-archive/ax_cxx_have_sstream.html
Packit Service e31359
# ===========================================================================
Packit Service e31359
#
Packit Service e31359
# SYNOPSIS
Packit Service e31359
#
Packit Service e31359
#   AX_CXX_HAVE_SSTREAM
Packit Service e31359
#
Packit Service e31359
# DESCRIPTION
Packit Service e31359
#
Packit Service e31359
#   If the C++ library has a working stringstream, define HAVE_SSTREAM.
Packit Service e31359
#
Packit Service e31359
# LICENSE
Packit Service e31359
#
Packit Service e31359
#   Copyright (c) 2008 Ben Stanley <Ben.Stanley@exemail.com.au>
Packit Service e31359
#
Packit Service e31359
#   Copying and distribution of this file, with or without modification, are
Packit Service e31359
#   permitted in any medium without royalty provided the copyright notice
Packit Service e31359
#   and this notice are preserved. This file is offered as-is, without any
Packit Service e31359
#   warranty.
Packit Service e31359
Packit Service e31359
#serial 6
Packit Service e31359
Packit Service e31359
AU_ALIAS([AC_CXX_HAVE_SSTREAM], [AX_CXX_HAVE_SSTREAM])
Packit Service e31359
AC_DEFUN([AX_CXX_HAVE_SSTREAM],
Packit Service e31359
[AC_CACHE_CHECK(whether the compiler has stringstream,
Packit Service e31359
ax_cv_cxx_have_sstream,
Packit Service e31359
[AC_REQUIRE([AX_CXX_NAMESPACES])
Packit Service e31359
 AC_LANG_SAVE
Packit Service e31359
 AC_LANG_CPLUSPLUS
Packit Service e31359
 AC_TRY_COMPILE([#include <sstream>
Packit Service e31359
#ifdef HAVE_NAMESPACES
Packit Service e31359
using namespace std;
Packit Service e31359
#endif],[stringstream message; message << "Hello"; return 0;],
Packit Service e31359
 ax_cv_cxx_have_sstream=yes, ax_cv_cxx_have_sstream=no)
Packit Service e31359
 AC_LANG_RESTORE
Packit Service e31359
])
Packit Service e31359
if test "$ax_cv_cxx_have_sstream" = yes; then
Packit Service e31359
  AC_DEFINE(HAVE_SSTREAM,1,[define if the compiler has stringstream])
Packit Service e31359
fi
Packit Service e31359
])