From 054fa7d35ebb621167afe72c2ed02856bac25a06 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Mon, 11 Dec 2000 09:30:33 -0500 Subject: [svn-r3107] Purpose: Adding Flag Description: Testing to see if the C++ compiler can handle the ``static_cast'' keyword. --- c++/configure | 74 ++++++++++++++++++++++++++++++++++++++++++++------------ c++/configure.in | 45 ++++++++++++++++++++++++---------- 2 files changed, 90 insertions(+), 29 deletions(-) diff --git a/c++/configure b/c++/configure index 60eff93..efea4b6 100755 --- a/c++/configure +++ b/c++/configure @@ -1873,24 +1873,24 @@ int fnord; } int main(void) { - using namespace H5; - fnord = 37; - return 0; + using namespace H5; + fnord = 37; + return 0; } EOF if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then -echo yes + echo yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* -echo no -CXXFLAGS="${CXXFLAGS} -DH5_NO_NAMESPACE" + echo no + CXXFLAGS="${CXXFLAGS} -DH5_NO_NAMESPACE" fi rm -fr conftest* @@ -1917,15 +1917,15 @@ EOF if { (eval echo configure:1918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then -echo no + echo no else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* -echo yes -CXXFLAGS="${CXXFLAGS} -DOLD_HEADER_FILENAME" + echo yes + CXXFLAGS="${CXXFLAGS} -DOLD_HEADER_FILENAME" fi rm -fr conftest* @@ -1944,21 +1944,63 @@ else extern "C" void exit(int); #endif -int main(void) { bool flag; return 0; } +int main(void) { + bool flag; + return 0; +} + +EOF +if { (eval echo configure:1954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + echo yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + + echo no + CXXFLAGS="${CXXFLAGS} -DBOOL_NOTDEFINED" + +fi +rm -fr conftest* +fi + + +echo $ac_n "checking if $CXX can handle static cast""... $ac_c" 1>&6 +echo "configure:1973: checking if $CXX can handle static cast" >&5 +if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < (test_float); + return 0; +} EOF -if { (eval echo configure:1951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then -echo yes + echo yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* -echo no -CXXFLAGS="${CXXFLAGS} -DBOOL_NOTDEFINED" + echo no + CXXFLAGS="${CXXFLAGS} -DNO_STATIC_CAST" fi rm -fr conftest* @@ -2015,7 +2057,7 @@ rm -f confcache echo $ac_n "checking make""... $ac_c" 1>&6 -echo "configure:2019: checking make" >&5 +echo "configure:2061: checking make" >&5 if test "`${MAKE-make} --version -f /dev/null 2>/dev/null |\ sed -n 1p|cut -c1-8`" = "GNU Make"; then @@ -2032,7 +2074,7 @@ fi if test -z "$DEPEND"; then echo $ac_n "checking how to include a makefile""... $ac_c" 1>&6 -echo "configure:2036: checking how to include a makefile" >&5 +echo "configure:2078: checking how to include a makefile" >&5 cat >makeinc < (test_float); + return 0; +} ], [ -echo yes + echo yes ], [ -echo no -CXXFLAGS="${CXXFLAGS} -DBOOL_NOTDEFINED" + echo no + CXXFLAGS="${CXXFLAGS} -DNO_STATIC_CAST" ]) dnl ---------------------------------------------------------------------- -- cgit v0.12