| 1 |
# Stolen from the GNU autoconf macro archive: |
| 2 |
# http://www.gnu.org/software/ac-archive/C++_Support/ac_cxx_have_sstream.html |
| 3 |
|
| 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 |
]) |