2
0
mirror of https://github.com/HDFGroup/hdf5.git synced 2025-04-24 17:51:25 +08:00

[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.
This commit is contained in:
Bill Wendling 2000-12-05 01:39:11 -05:00
parent 2876134885
commit b2992ce841
2 changed files with 45 additions and 2 deletions

37
c++/configure vendored

@ -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:

@ -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