summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
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.