summaryrefslogtreecommitdiffstats
path: root/c++
diff options
context:
space:
mode:
Diffstat (limited to 'c++')
-rwxr-xr-xc++/configure74
-rw-r--r--c++/configure.in45
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 <<EOF
+#line 1978 "configure"
+#include "confdefs.h"
+#ifdef __cplusplus
+extern "C" void exit(int);
+#endif
+
+int main(void) {
+ float test_float;
+ int test_int;
+ test_float = 37.0;
+ test_int = static_cast <int> (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 <<EOF
foo:
diff --git a/c++/configure.in b/c++/configure.in
index b3592b8..42dde87 100644
--- a/c++/configure.in
+++ b/c++/configure.in
@@ -266,15 +266,15 @@ int fnord;
}
int main(void) {
- using namespace H5;
- fnord = 37;
- return 0;
+ using namespace H5;
+ fnord = 37;
+ 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 needs old style header files in includes)
@@ -283,20 +283,39 @@ AC_TRY_RUN([
int main(void) { return 0; }
], [
-echo no
+ echo no
], [
-echo yes
-CXXFLAGS="${CXXFLAGS} -DOLD_HEADER_FILENAME"
+ 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; }
+int main(void) {
+ bool flag;
+ return 0;
+}
+], [
+ echo yes
+], [
+ echo no
+ CXXFLAGS="${CXXFLAGS} -DBOOL_NOTDEFINED"
+])
+
+AC_MSG_CHECKING(if $CXX can handle static cast)
+AC_TRY_RUN([
+int main(void) {
+ float test_float;
+ int test_int;
+ test_float = 37.0;
+ test_int = static_cast <int> (test_float);
+ return 0;
+}
], [
-echo yes
+ echo yes
], [
-echo no
-CXXFLAGS="${CXXFLAGS} -DBOOL_NOTDEFINED"
+ echo no
+ CXXFLAGS="${CXXFLAGS} -DNO_STATIC_CAST"
])
dnl ----------------------------------------------------------------------