summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 5d507d9..c9d8e3f 100644
--- a/configure.in
+++ b/configure.in
@@ -114,9 +114,12 @@ FCFLAGS="${FCFLAGS}"
CPPFLAGS="${CPPFLAGS}"
LDFLAGS="${LDFLAGS}"
-dnl Configure will need to alter LDFLAGS and CPPFLAGS in order for
+dnl Configure may need to alter any of the *FLAGS variables in order for
dnl various checks to work correctly. Save the user's value here so it
dnl can be restored once all configure checks are complete.
+saved_user_CFLAGS="$CFLAGS"
+saved_user_CXXFLAGS="$CXXFLAGS"
+saved_user_FCFLAGS="$FCFLAGS"
saved_user_LDFLAGS="$LDFLAGS"
saved_user_CPPFLAGS="$CPPFLAGS"
@@ -3991,6 +3994,9 @@ dnl ------------------------------------
dnl Restore user's CPPFLAGS and LDFLAGS.
CPPFLAGS="$saved_user_CPPFLAGS"
LDFLAGS="$saved_user_LDFLAGS"
+FCFLAGS="$saved_user_FCFLAGS"
+CFLAGS="$saved_user_CFLAGS"
+CXXFLAGS="$saved_user_CXXFLAGS"
dnl ----------------------------------------------------------------------