-AC_CHECK_HEADERS(iostream vector map string list typeinfo iterator strstream stdexcept algorithm, ,
- AC_MSG_ERROR(need to have ANSI compliant headers))
+AC_CHECK_HEADERS(iostream vector map string list typeinfo iterator stdexcept algorithm, ,
+ AC_MSG_ERROR([need to have ANSI compliant headers]))
+dnl We need the sstream header. But since g++-2.95.n, n<3 does not provide
+dnl it, we must fall back to strstream, which, however, suffers from fixed
+dnl buffer sizes. So the fallback may produce a crippled library. NB: this
+dnl fallback will disappear in future versions.
+AC_CHECK_HEADERS(sstream strstream)
+if test "x${ac_cv_header_sstream}" = "xno"; then
+ if test "x${ac_cv_header_strstream}" = "xno"; then
+ AC_MSG_ERROR([I could not find the <sstream> or <strstream> header.])
+ else
+ GINAC_WARNING([I could not find <sstream>. <strstream> may cause trouble.])
+ fi
+fi