[svn-r6471] Purpose:

Update
Description:
    Removed useless #includes and added a test for the std environment.
Platforms tested:
    Linux
This commit is contained in:
Bill Wendling 2003-03-09 02:11:55 -05:00
parent 140ad8b106
commit a326fafb16
2 changed files with 131 additions and 68 deletions

98
c++/configure vendored
View File

@ -1387,7 +1387,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_aux_dir=
@ -1545,20 +1544,20 @@ for f in $host_cpu-$host_vendor-$host_os \
$host_os_novers \
$host_vendor \
$host_cpu ; do
echo "$as_me:$LINENO: checking for config $f" >&5
echo "$as_me:$LINENO: checking for config $f" >&5
echo $ECHO_N "checking for config $f... $ECHO_C" >&6
if test -f $srcdir/config/$f; then
host_config=$srcdir/config/$f
echo "$as_me:$LINENO: result: found" >&5
if test -f $srcdir/config/$f; then
host_config=$srcdir/config/$f
echo "$as_me:$LINENO: result: found" >&5
echo "${ECHO_T}found" >&6
break
fi
echo "$as_me:$LINENO: result: no" >&5
break
fi
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
done
if test "X$host_config" != "Xnone"; then
CXX_BASENAME="`echo $CXX |cut -f1 -d' ' |xargs basename 2>/dev/null`"
. $host_config
CXX_BASENAME="`echo $CXX |cut -f1 -d' ' |xargs basename 2>/dev/null`"
. $host_config
fi
ac_ext=cc
@ -4400,7 +4399,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
case $host in
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 4403 "configure"' > conftest.$ac_ext
echo '#line 4402 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -4941,7 +4940,7 @@ chmod -w .
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
compiler_c_o=no
if { (eval echo configure:4944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
if { (eval echo configure:4943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
if test -s out/conftest.err; then
@ -6752,7 +6751,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 6755 "configure"
#line 6754 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -6850,7 +6849,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 6853 "configure"
#line 6852 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -7620,7 +7619,7 @@ done
fi
if test -z "$AR"; then
for ac_prog in ar xar
for ac_prog in ar xar
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
@ -7830,6 +7829,7 @@ echo $ECHO_N "checking for large file support mode on Linux... $ECHO_C" >&6
if test "X$LINUX_LFS" = "Xyes"; then
echo "$as_me:$LINENO: result: enabled" >&5
echo "${ECHO_T}enabled" >&6
CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $CPPFLAGS"
else
echo "$as_me:$LINENO: result: disabled" >&5
@ -7904,14 +7904,6 @@ else
#line $LINENO "configure"
#include "confdefs.h"
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
using namespace std;
namespace H5 {
int fnord;
}
@ -7935,7 +7927,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
echo yes
echo yes
else
echo "$as_me: program exited with status $ac_status" >&5
@ -7943,8 +7935,56 @@ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
( exit $ac_status )
echo no
CXXFLAGS="${CXXFLAGS} -DH5_NO_NAMESPACE"
echo no
CXXFLAGS="${CXXFLAGS} -DH5_NO_NAMESPACE"
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: checking if $CXX supports std" >&5
echo $ECHO_N "checking if $CXX supports std... $ECHO_C" >&6
if test "$cross_compiling" = yes; then
{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
#include <string>
using namespace std;
int main(void) {
string myString("testing namespace std");
return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
echo yes
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
( exit $ac_status )
echo no
CXXFLAGS="${CXXFLAGS} -DH5_NO_STD"
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
@ -7979,7 +8019,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
echo yes
echo yes
else
echo "$as_me: program exited with status $ac_status" >&5
@ -7987,8 +8027,8 @@ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
( exit $ac_status )
echo no
CXXFLAGS="${CXXFLAGS} -DBOOL_NOTDEFINED"
echo no
CXXFLAGS="${CXXFLAGS} -DBOOL_NOTDEFINED"
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext

View File

@ -1,9 +1,18 @@
dnl ----------------------------------------------------------------------
dnl Process this file with autoconf to produce configure.
dnl
dnl Copyright (C) 2000, 2001, 2002
dnl National Center for Supercomputing Applications.
dnl All rights reserved.
dnl Copyright by the Board of Trustees of the University of Illinois.
dnl All rights reserved.
dnl
dnl This file is part of HDF5. The full HDF5 copyright notice, including
dnl terms governing use, modification, and redistribution, is contained in
dnl the files COPYING and Copyright.html. COPYING can be found at the root
dnl of the source code distribution tree; Copyright.html can be found at the
dnl root level of an installed copy of the electronic HDF5 document set and
dnl is linked from the top-level documents page. It can also be found at
dnl http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have
dnl access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu.
dnl
dnl ----------------------------------------------------------------------
dnl ----------------------------------------------------------------------
@ -20,7 +29,6 @@ dnl release!!!
dnl
AC_INIT([HDF5 C++], [1.5.49], [hdfhelp@ncsa.uiuc.edu])
AC_CONFIG_SRCDIR([src/H5Library.cpp])
AC_CONFIG_AUX_DIR([../bin])
AC_CANONICAL_HOST
@ -120,17 +128,17 @@ for f in $host_cpu-$host_vendor-$host_os \
$host_os_novers \
$host_vendor \
$host_cpu ; do
AC_MSG_CHECKING(for config $f)
if test -f $srcdir/config/$f; then
host_config=$srcdir/config/$f
AC_MSG_RESULT(found)
break
fi
AC_MSG_RESULT(no)
AC_MSG_CHECKING(for config $f)
if test -f $srcdir/config/$f; then
host_config=$srcdir/config/$f
AC_MSG_RESULT(found)
break
fi
AC_MSG_RESULT(no)
done
if test "X$host_config" != "Xnone"; then
CXX_BASENAME="`echo $CXX |cut -f1 -d' ' |xargs basename 2>/dev/null`"
. $host_config
CXX_BASENAME="`echo $CXX |cut -f1 -d' ' |xargs basename 2>/dev/null`"
. $host_config
fi
dnl ----------------------------------------------------------------------
@ -152,8 +160,12 @@ if test "X$GCC" = "Xyes"; then
AC_CHECK_PROGS(PERL, perl,, $PATH)
fi
dnl ----------------------------------------------------------------------
dnl Check which archiving tool to use. This needs to be done before
dnl the AM_PROG_LIBTOOL macro.
dnl
if test -z "$AR"; then
AC_CHECK_PROGS(AR,ar xar,:,$PATH)
AC_CHECK_PROGS(AR,ar xar,:,$PATH)
fi
AC_SUBST(AR)
@ -170,7 +182,7 @@ if test -z "$SEARCH"; then
VPATH=$srcdir/config $srcdir/src $srcdir/bin
.c.o:
cp $< H5.o
foo: H5.o
/bin/rm -f H5.o
@echo works
@ -189,12 +201,12 @@ EOF
VPATH=$srcdir/config:$srcdir/src:$srcdir/bin
.c.o:
cp $< H5.o
foo: H5.o
/bin/rm -f H5.o
@echo works
EOF
if (${MAKE-make} -f maketest foo) >/dev/null 2>&1; then
SEARCH_RULE='VPATH='
SEARCH_SEP=':'
@ -235,15 +247,16 @@ dnl ----------------------------------------------------------------------
dnl Production flags? Save the value in $CONFIG_MODE so we have it for
dnl the record.
dnl
AC_MSG_CHECKING(for production mode)
AC_ARG_ENABLE(production,
[ --enable-production Determines how to run the compiler.])
AC_MSG_CHECKING([for production mode])
AC_ARG_ENABLE([production],
[AC_HELP_STRING([--enable-production],
[Determines how to run the compiler.])])
case "X-$enable_production" in
X-yes)
AC_MSG_RESULT("production")
dnl Remove the "-g" flag from CXXFLAGS if it's in there.
dnl Remove the "-g" flag from CFLAGS if it's in there.
dnl
CXXFLAGS_temp=""
if test -n "$CXXFLAGS"; then
@ -307,7 +320,7 @@ case "$host_cpu-$host_vendor-$host_os" in
[AC_HELP_STRING([--enable-linux-lfs],
[Enable support for large (64-bit)
files on Linux. [default=check]])])
LINUX_LFS="no"
case "X-$enable_linux_lfs" in
X-yes)
@ -324,13 +337,14 @@ case "$host_cpu-$host_vendor-$host_os" in
fi
;;
esac
AC_MSG_CHECKING([for large file support mode on Linux])
if test "X$LINUX_LFS" = "Xyes"; then
AC_MSG_RESULT([enabled])
AC_MSG_RESULT(enabled)
CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $CPPFLAGS"
else
AC_MSG_RESULT([disabled])
AC_MSG_RESULT(disabled)
fi
dnl Add POSIX support on Linux systems, so <features.h> defines
@ -365,14 +379,6 @@ int main(void) { return 0; }
AC_MSG_CHECKING(if $CXX can handle namespaces)
AC_TRY_RUN([
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
using namespace std;
namespace H5 {
int fnord;
}
@ -383,10 +389,27 @@ int main(void) {
return 0;
}
], [
echo yes
echo yes
], [
echo no
CXXFLAGS="${CXXFLAGS} -DH5_NO_NAMESPACE"
echo no
CXXFLAGS="${CXXFLAGS} -DH5_NO_NAMESPACE"
])
AC_MSG_CHECKING(if $CXX supports std)
AC_TRY_RUN([
#include <string>
using namespace std;
int main(void) {
string myString("testing namespace std");
return 0;
}
], [
echo yes
], [
echo no
CXXFLAGS="${CXXFLAGS} -DH5_NO_STD"
])
AC_MSG_CHECKING(if $CXX supports bool types)
@ -396,10 +419,10 @@ int main(void) {
return 0;
}
], [
echo yes
echo yes
], [
echo no
CXXFLAGS="${CXXFLAGS} -DBOOL_NOTDEFINED"
echo no
CXXFLAGS="${CXXFLAGS} -DBOOL_NOTDEFINED"
])
AC_MSG_CHECKING(if $CXX can handle static cast)