summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2016-02-16 22:42:40 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2016-02-16 22:42:40 (GMT)
commit6731dca11fb634e0eec285c59d61fe0de79f042d (patch)
tree96858438aecd543adf4a3e7f3f86ef96aed62363 /configure.ac
parent944e932662366e98b4b313ffaba0b1d00984a24b (diff)
downloadhdf5-6731dca11fb634e0eec285c59d61fe0de79f042d.zip
hdf5-6731dca11fb634e0eec285c59d61fe0de79f042d.tar.gz
hdf5-6731dca11fb634e0eec285c59d61fe0de79f042d.tar.bz2
[svn-r29127] Moved the --enable-build-mode check in configure.ac to after the
platform-specific build information so the debug and production flags are not clobbered. Tested on: 64-bit Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1 autotools serial (production & debug)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac108
1 files changed, 54 insertions, 54 deletions
diff --git a/configure.ac b/configure.ac
index 08efbc9..17e9ff9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -158,60 +158,6 @@ AC_SUBST([UNAME_INFO])
UNAME_INFO=`uname -a`
## ----------------------------------------------------------------------
-## Determine build mode (debug, production, clean).
-## This has to be done early since the build mode is referred to
-## frequently.
-##
-AC_MSG_CHECKING([build mode])
-AC_ARG_ENABLE([build-mode],
- [AS_HELP_STRING([--enable-build-mode=(debug|production|clean)],
- [Sets the build mode. Debug turns on symbols, API
- tracing, asserts, and debug optimization,
- as well as several other minor configure options
- that aid in debugging.
- Production turns high optimizations on.
- Clean turns nothing on and disables optimization
- (i.e.: a 'clean slate' configuration).
- All these settings can be overridden by using
- specific configure flags.
- [default=debug]
- ])],
- [BUILD_MODE=$enableval])
-
-## Set the default
-## Depends on branch, set via script at branch creation time
-if test "X-$BUILD_MODE" = X- ; then
- BUILD_MODE=debug
-fi
-
-## Allow this variable to be substituted in
-## other files (src/libhdf5.settings.in, etc.)
-AC_SUBST([BUILD_MODE])
-
-case "X-$BUILD_MODE" in
- X-clean)
- AC_MSG_RESULT([clean])
- ;;
- X-debug)
- AC_DEFINE([DEBUG_BUILD], [1], [Define if this is a debug build.])
- H5_CFLAGS="$H5_CFLAGS $DEBUG_CFLAGS"
- H5_CPPFLAGS="$H5_CPPFLAGS $DEBUG_CPPFLAGS"
- H5_CXXFLAGS="$H5_CXXFLAGS $DEBUG_CXXFLAGS"
- H5_FCFLAGS="$H5_FCFLAGS $DEBUG_FCFLAGS"
- AC_MSG_RESULT([debug])
- ;;
- X-production)
- H5_CFLAGS="$H5_CFLAGS $PROD_CFLAGS"
- H5_CPPFLAGS="$H5_CPPFLAGS $PROD_CPPFLAGS"
- H5_CXXFLAGS="$H5_CXXFLAGS $PROD_CXXFLAGS"
- H5_FCFLAGS="$H5_FCFLAGS $PROD_FCFLAGS"
- AC_MSG_RESULT([production])
- ;;
- *)
- AC_MSG_ERROR([Unrecognized build mode: $BUILD_MODE. Use debug, production, or clean.])
-esac
-
-## ----------------------------------------------------------------------
## Some platforms have broken basename, and/or xargs programs. Check
## that it actually does what it's supposed to do. Catch this early
## since configure and scripts relies upon them heavily and there's
@@ -321,6 +267,60 @@ while test -n "$hname"; do
done
## ----------------------------------------------------------------------
+## Determine build mode (debug, production, clean).
+## This has to be done early since the build mode is referred to
+## frequently.
+##
+AC_MSG_CHECKING([build mode])
+AC_ARG_ENABLE([build-mode],
+ [AS_HELP_STRING([--enable-build-mode=(debug|production|clean)],
+ [Sets the build mode. Debug turns on symbols, API
+ tracing, asserts, and debug optimization,
+ as well as several other minor configure options
+ that aid in debugging.
+ Production turns high optimizations on.
+ Clean turns nothing on and disables optimization
+ (i.e.: a 'clean slate' configuration).
+ All these settings can be overridden by using
+ specific configure flags.
+ [default=debug]
+ ])],
+ [BUILD_MODE=$enableval])
+
+## Set the default
+## Depends on branch, set via script at branch creation time
+if test "X-$BUILD_MODE" = X- ; then
+ BUILD_MODE=debug
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+AC_SUBST([BUILD_MODE])
+
+case "X-$BUILD_MODE" in
+ X-clean)
+ AC_MSG_RESULT([clean])
+ ;;
+ X-debug)
+ AC_DEFINE([DEBUG_BUILD], [1], [Define if this is a debug build.])
+ H5_CFLAGS="$H5_CFLAGS $DEBUG_CFLAGS"
+ H5_CPPFLAGS="$H5_CPPFLAGS $DEBUG_CPPFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $DEBUG_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $DEBUG_FCFLAGS"
+ AC_MSG_RESULT([debug])
+ ;;
+ X-production)
+ H5_CFLAGS="$H5_CFLAGS $PROD_CFLAGS"
+ H5_CPPFLAGS="$H5_CPPFLAGS $PROD_CPPFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $PROD_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $PROD_FCFLAGS"
+ AC_MSG_RESULT([production])
+ ;;
+ *)
+ AC_MSG_ERROR([Unrecognized build mode: $BUILD_MODE. Use debug, production, or clean.])
+esac
+
+## ----------------------------------------------------------------------
## Some built-in configure checks can only see CFLAGS (not AM_CFLAGS), so
## we need to add this in so configure works as intended. We will need to
## reset this value at the end of configure, to preserve the user's settings.