diff options
Diffstat (limited to 'tclap-1.2.1/config/ac_cxx_have_sstream.m4')
-rw-r--r-- | tclap-1.2.1/config/ac_cxx_have_sstream.m4 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tclap-1.2.1/config/ac_cxx_have_sstream.m4 b/tclap-1.2.1/config/ac_cxx_have_sstream.m4 new file mode 100644 index 0000000..677f778 --- /dev/null +++ b/tclap-1.2.1/config/ac_cxx_have_sstream.m4 @@ -0,0 +1,25 @@ +dnl @synopsis AC_CXX_HAVE_SSTREAM +dnl +dnl If the C++ library has a working stringstream, define HAVE_SSTREAM. +dnl +dnl @author Ben Stanley +dnl @version $Id: ac_cxx_have_sstream.m4,v 1.2 2006/02/22 02:10:28 zeekec Exp $ +dnl +AC_DEFUN([AC_CXX_HAVE_SSTREAM], +[AC_REQUIRE([AC_CXX_NAMESPACES]) +AC_LANG_SAVE +AC_LANG_CPLUSPLUS +AC_CHECK_HEADERS(sstream) +AC_CACHE_CHECK([whether the STL defines stringstream], +[ac_cv_cxx_have_sstream], +[AC_TRY_COMPILE([#include <sstream> +#ifdef HAVE_NAMESPACES +using namespace std; +#endif],[stringstream message; message << "Hello"; return 0;], + ac_cv_cxx_have_sstream=yes, ac_cv_cxx_have_sstream=no) +]) +if test "$ac_cv_cxx_have_sstream" = yes; then + AC_DEFINE(HAVE_SSTREAM,1,[define if the compiler has stringstream]) +fi +AC_LANG_RESTORE +]) |