summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorMike McGreevy <mamcgree@hdfgroup.org>2009-10-19 03:19:15 (GMT)
committerMike McGreevy <mamcgree@hdfgroup.org>2009-10-19 03:19:15 (GMT)
commit1ea112f552a60c354e7dfea42e0fecb74a823886 (patch)
tree3abdc9bf0ffd096f827918aaeb33f050897a846e /configure.in
parentf912cacabcab60e1ef27d3ca99d58f4606b65aa4 (diff)
downloadhdf5-1ea112f552a60c354e7dfea42e0fecb74a823886.zip
hdf5-1ea112f552a60c354e7dfea42e0fecb74a823886.tar.gz
hdf5-1ea112f552a60c354e7dfea42e0fecb74a823886.tar.bz2
[svn-r17676] 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 40bf03f..ceba36e 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
@@ -3972,13 +3989,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 ----------------------------------------------------------------------