summaryrefslogtreecommitdiffstats
path: root/c++/configure.in
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2000-12-11 14:30:33 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2000-12-11 14:30:33 (GMT)
commit054fa7d35ebb621167afe72c2ed02856bac25a06 (patch)
tree38042be1ee7e04890b8b2591109846739d9fea5a /c++/configure.in
parent95fe1ec48e7fd95325e38eb12c4a72461aa6e0b7 (diff)
downloadhdf5-054fa7d35ebb621167afe72c2ed02856bac25a06.zip
hdf5-054fa7d35ebb621167afe72c2ed02856bac25a06.tar.gz
hdf5-054fa7d35ebb621167afe72c2ed02856bac25a06.tar.bz2
[svn-r3107] Purpose:
Adding Flag Description: Testing to see if the C++ compiler can handle the ``static_cast'' keyword.
Diffstat (limited to 'c++/configure.in')
-rw-r--r--c++/configure.in45
1 files changed, 32 insertions, 13 deletions
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 ----------------------------------------------------------------------