diff options
author | Bill Wendling <wendling@ncsa.uiuc.edu> | 2000-12-05 06:39:11 (GMT) |
---|---|---|
committer | Bill Wendling <wendling@ncsa.uiuc.edu> | 2000-12-05 06:39:11 (GMT) |
commit | b2992ce84170f0cba23c327f2aa56285c598ca90 (patch) | |
tree | 2d6a2cba3806d9688c14a2290860639416645cfe /c++ | |
parent | 2876134885a79ed5e692ee7c2ed15ecc203b3c29 (diff) | |
download | hdf5-b2992ce84170f0cba23c327f2aa56285c598ca90.zip hdf5-b2992ce84170f0cba23c327f2aa56285c598ca90.tar.gz hdf5-b2992ce84170f0cba23c327f2aa56285c598ca90.tar.bz2 |
[svn-r3076] Purpose:
New Flag
Description:
Added a test to see if the C++ compiler can handle the bool
datatype. If not, then it defines the BOOL_NOTDEFINED macro.
Diffstat (limited to 'c++')
-rwxr-xr-x | c++/configure | 37 | ||||
-rw-r--r-- | c++/configure.in | 10 |
2 files changed, 45 insertions, 2 deletions
diff --git a/c++/configure b/c++/configure index ebd6b91..461cf3a 100755 --- a/c++/configure +++ b/c++/configure @@ -1932,6 +1932,39 @@ rm -fr conftest* fi +echo $ac_n "checking if $CXX supports bool types""... $ac_c" 1>&6 +echo "configure:1937: checking if $CXX supports bool types" >&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 <<EOF +#line 1942 "configure" +#include "confdefs.h" +#ifdef __cplusplus +extern "C" void exit(int); +#endif + +int main(void) { bool flag; 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 +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 + + cat > confcache <<\EOF # This file is a shell script that caches the results of configure @@ -1982,7 +2015,7 @@ rm -f confcache echo $ac_n "checking make""... $ac_c" 1>&6 -echo "configure:1986: checking make" >&5 +echo "configure:2019: checking make" >&5 if test "`${MAKE-make} --version -f /dev/null 2>/dev/null |\ sed -n 1p|cut -c1-8`" = "GNU Make"; then @@ -1999,7 +2032,7 @@ fi if test -z "$DEPEND"; then echo $ac_n "checking how to include a makefile""... $ac_c" 1>&6 -echo "configure:2003: checking how to include a makefile" >&5 +echo "configure:2036: checking how to include a makefile" >&5 cat >makeinc <<EOF foo: diff --git a/c++/configure.in b/c++/configure.in index 9770738..62aa13d 100644 --- a/c++/configure.in +++ b/c++/configure.in @@ -289,6 +289,16 @@ echo yes CXXFLAGS="${CXXFLAGS} -DOLD_HEADER_FILENAME" ]) +AC_MSG_CHECKING(if $CXX supports bool types) +AC_TRY_RUN([ +int main(void) { bool flag; return 0; } +], [ +echo yes +], [ +echo no +CXXFLAGS="${CXXFLAGS} -DBOOL_NOTDEFINED" +]) + dnl ---------------------------------------------------------------------- dnl Checks for header files. dnl |