Mercurial > octave-nkf
diff aclocal.m4 @ 3769:7c8e3c42ed04
[project @ 2001-01-31 22:15:51 by jwe]
author | jwe |
---|---|
date | Wed, 31 Jan 2001 22:15:55 +0000 |
parents | c922e2d23c8c |
children | 1a809dae77db |
line wrap: on
line diff
--- a/aclocal.m4 Mon Jan 29 18:05:34 2001 +0000 +++ b/aclocal.m4 Wed Jan 31 22:15:55 2001 +0000 @@ -931,3 +931,40 @@ AC_DEFINE(CXX_PREPENDS_UNDERSCORE) fi ]) +dnl +dnl See if the C++ library is ISO compliant. +dnl FIXME: This is obviously very simplistic, and trivially fooled. +dnl +dnl OCTAVE_CXX_ISO_COMPLIANT_LIBRARY +AC_DEFUN(OCTAVE_CXX_ISO_COMPLIANT_LIBRARY, [ + AC_REQUIRE([AC_PROG_CXX]) + AC_MSG_CHECKING([if C++ library is ISO compliant]) + AC_CACHE_VAL(octave_cv_cxx_iso_compliant_library, [ + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + rm -f conftest.h + for inc in algorithm bitset cassert cctype cerrno cfloat ciso646 \ + climits clocale cmath complex csetjmp csignal cstdarg cstddef \ + cstdio cstdlib cstring ctime cwchar cwctype deque exception \ + fstream functional iomanip ios iosfwd iostream istream iterator \ + limits list locale map memory new numeric ostream queue set \ + sstream stack stdexcept streambuf string strstream typeinfo \ + utility valarray vector; do + echo "#include <$inc>" >> conftest.h + done + AC_TRY_LINK([#include "conftest.h"], [ + std::bitset<50> flags; + flags.set(); + int digits = std::numeric_limits<unsigned long>::digits; + digits = 0; + ], + octave_cv_cxx_iso_compliant_library=yes, + octave_cv_cxx_iso_compliant_library=no + ) + AC_LANG_RESTORE + ]) + AC_MSG_RESULT($octave_cv_cxx_iso_compliant_library) + if test $octave_cv_cxx_iso_compliant_library = yes; then + AC_DEFINE(CXX_ISO_COMPLIANT_LIBRARY) + fi +])