diff options
author | Brad King <brad.king@kitware.com> | 2002-06-19 19:05:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2002-06-19 19:05:14 (GMT) |
commit | ff76604e8063fe995dc26c9fb82f143b79d880a2 (patch) | |
tree | 6b6391391050e269ca3da14c8d7d0837b2cb27b8 | |
parent | 03a8c9795ca21c1a6075f6ad443f143ad6ea9683 (diff) | |
download | CMake-ff76604e8063fe995dc26c9fb82f143b79d880a2.zip CMake-ff76604e8063fe995dc26c9fb82f143b79d880a2.tar.gz CMake-ff76604e8063fe995dc26c9fb82f143b79d880a2.tar.bz2 |
ENH: Added test for sstream header. Defines CMAKE_NO_ANSI_STRING_STREAM if the header doesn't exist.
-rw-r--r-- | Templates/cxxconfigure.in | 18 | ||||
-rw-r--r-- | configure.in | 17 |
2 files changed, 33 insertions, 2 deletions
diff --git a/Templates/cxxconfigure.in b/Templates/cxxconfigure.in index b451468..63f48e0 100644 --- a/Templates/cxxconfigure.in +++ b/Templates/cxxconfigure.in @@ -96,7 +96,7 @@ fi AC_SUBST(CMAKE_TEMPLATE_FLAGS) -# check no g++ compilers to see if they have the standard +# check non-g++ compilers to see if they have the standard # ansi stream files (without the .h) if test $ac_cv_prog_gxx = no; then AC_MSG_CHECKING( ansi standard C++ stream headers ) @@ -113,6 +113,22 @@ if test $ac_cv_prog_gxx = no; then fi AC_SUBST(CMAKE_NO_ANSI_STREAM_HEADERS) +# check non-g++ compilers to see if they have std::stringstream +if test $ac_cv_prog_gxx = no; then + AC_MSG_CHECKING( for ansi standard C++ stringstream ) + rm -rf conftest.* + cat > conftest.cc <<! +#include <sstream> +! + if test -z "`${CXX} ${CMAKE_ANSI_CXXFLAGS} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then + echo "$ac_t""yes" 1>&6 + else + CMAKE_NO_ANSI_STRING_STREAM="1" + echo "$ac_t""no" 1>&6 + fi +fi +AC_SUBST(CMAKE_NO_ANSI_STRING_STREAM) + # check to see if stl is in the std namespace if test $ac_cv_prog_gxx = no; then AC_MSG_CHECKING( ansi standard namespace support ) diff --git a/configure.in b/configure.in index 8478af2..21c772a 100644 --- a/configure.in +++ b/configure.in @@ -93,7 +93,7 @@ fi AC_SUBST(CMAKE_ANSI_CFLAGS) AC_SUBST(CMAKE_ANSI_CXXFLAGS) -# check no g++ compilers to see if they have the standard +# check non-g++ compilers to see if they have the standard # ansi stream files (without the .h) if test $ac_cv_prog_gxx = no; then AC_MSG_CHECKING( ansi standard C++ stream headers ) @@ -109,6 +109,21 @@ if test $ac_cv_prog_gxx = no; then fi fi +# check non-g++ compilers to see if they have std::stringstream +if test $ac_cv_prog_gxx = no; then + AC_MSG_CHECKING( for ansi standard C++ stringstream ) + rm -rf conftest.* + cat > conftest.cc <<! +#include <sstream> +! + if test -z "`${CXX} $CMAKE_ANSI_CXXFLAGS $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then + echo "$ac_t""yes" 1>&6 + else + AC_DEFINE(CMAKE_NO_ANSI_STRING_STREAM) + echo "$ac_t""no" 1>&6 + fi +fi + # check to see if stl is in the std namespace if test $ac_cv_prog_gxx = no; then AC_MSG_CHECKING( ansi standard namespace support ) |