summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorMike McGreevy <mamcgree@hdfgroup.org>2009-10-19 03:05:25 (GMT)
committerMike McGreevy <mamcgree@hdfgroup.org>2009-10-19 03:05:25 (GMT)
commitb7e61c869be9ccfa0e65c7abec702ee422a84c7a (patch)
tree8f0cc9da08a02e2922a9edf56d5bf83f403cdf60 /configure.in
parent5ef5f8c3a6e2119b3be6b83d9fea9b53f3a3dbf3 (diff)
downloadhdf5-b7e61c869be9ccfa0e65c7abec702ee422a84c7a.zip
hdf5-b7e61c869be9ccfa0e65c7abec702ee422a84c7a.tar.gz
hdf5-b7e61c869be9ccfa0e65c7abec702ee422a84c7a.tar.bz2
[svn-r17675] Purpose:
Configure Cleanup Description: Make all AM_CFLAGS visible in CFLAGS during configure so all checks have full visibility of any set flags. Tested: h5committest
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in29
1 files changed, 23 insertions, 6 deletions
diff --git a/configure.in b/configure.in
index f8bc091..d5066ea 100644
--- a/configure.in
+++ b/configure.in
@@ -317,6 +317,16 @@ while test -n "$hname"; do
done
dnl ----------------------------------------------------------------------
+dnl Some built-in configure checks can only see CFLAGS (not AM_CFLAGS), so
+dnl we need to add this in so configure works as intended. We will need to
+dnl reset this value at the end of configure, to preserve the user's settings.
+CFLAGS="${AM_CFLAGS} ${CFLAGS}"
+FCFLAGS="${AM_FCFLAGS} ${FCFLAGS}"
+CXXFLAGS="${AM_CXXFLAGS} ${CXXFLAGS}"
+CPPFLAGS="${AM_CPPFLAGS} ${CPPFLAGS}"
+LDFLAGS="${AM_LDFLAGS} ${LDFLAGS}"
+
+dnl ----------------------------------------------------------------------
dnl Enable dependency tracking unless the configure options or a
dnl site-specific file told us not to. This prevents configure from
dnl silently disabling dependencies for some compilers.
@@ -365,7 +375,8 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
dnl --------------------------------------------------------------------
dnl General Fortran flags
dnl
- AM_FCFLAGS="${AM_FCFLAGS} ${AM_FFLAGS}"
+ AM_FCFLAGS="${AM_FCFLAGS} ${FFLAGS}"
+ FCFLAGS="${FCFLAGS} ${FFLAGS}"
dnl --------------------------------------------------------------------
dnl Fortran source extention
@@ -494,6 +505,7 @@ int main(void) { return 0; }
echo no
], [
echo yes
+ CXXFLAGS="${CXXFLAGS} -DOLD_HEADER_FILENAME"
AM_CXXFLAGS="${AM_CXXFLAGS} -DOLD_HEADER_FILENAME"
])
@@ -512,6 +524,7 @@ int main(void) {
echo yes
], [
echo no
+ CXXFLAGS="${CXXFLAGS} -DH5_NO_NAMESPACE"
AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_NAMESPACE"
])
@@ -529,6 +542,7 @@ int main(void) {
echo yes
], [
echo no
+ CXXFLAGS="${CXXFLAGS} -DH5_NO_STD"
AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_STD"
])
@@ -542,6 +556,7 @@ int main(void) {
echo yes
], [
echo no
+ CXXFLAGS="${CXXFLAGS} -DBOOL_NOTDEFINED"
AM_CXXFLAGS="${AM_CXXFLAGS} -DBOOL_NOTDEFINED"
])
@@ -579,6 +594,7 @@ int main(void) {
echo yes
], [
echo no
+ CXXFLAGS="${CXXFLAGS} -DNO_STATIC_CAST"
AM_CXXFLAGS="${AM_CXXFLAGS} -DNO_STATIC_CAST"
])
else
@@ -885,6 +901,7 @@ if test "X${HDF_FORTRAN}" = "Xyes"; then
H5_FORTRAN_SHARED="no"
else
dnl echo 'adding fortran compiler flag needed for building shared libraries'
+ FCFLAGS="${FCFLAGS} -fPIC"
AM_FCFLAGS="${AM_FCFLAGS} -fPIC"
fi
fi
@@ -3965,13 +3982,13 @@ AC_RUN_IFELSE([
])
-dnl ------------------------------------
-dnl Restore user's CPPFLAGS and LDFLAGS.
-CPPFLAGS="$saved_user_CPPFLAGS"
-LDFLAGS="$saved_user_LDFLAGS"
-FCFLAGS="$saved_user_FCFLAGS"
+dnl ----------------------------------------------------------------------
+dnl Restore user's CFLAGS.
CFLAGS="$saved_user_CFLAGS"
+FCFLAGS="$saved_user_FCFLAGS"
CXXFLAGS="$saved_user_CXXFLAGS"
+CPPFLAGS="$saved_user_CPPFLAGS"
+LDFLAGS="$saved_user_LDFLAGS"
dnl ----------------------------------------------------------------------