configure.ac | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index c3364aa..2a734fe 100644 --- a/configure.ac +++ b/configure.ac @@ -82,6 +82,9 @@ AC_PROG_F77 dnl ---------------------------------------------------------------- dnl Disable default flag for compilation dnl ---------------------------------------------------------------- +CPPFLAGS_gentoo="${CPPFLAGS}" +CFLAGS_gentoo="${CFLAGS}" +CXXFLAGS_gentoo="${CXXFLAGS}" CPPFLAGS="" CFLAGS="" CXXFLAGS="" @@ -407,7 +410,7 @@ AC_ARG_ENABLE([mode],[AS_HELP_STRING([--enable-mode], [choose special compilation mode (debug, release)])],[], [enable_mode=default] ) -clean_default_flags +clean_default_flags=no AS_CASE([$enable_mode], [default], [dnl AM_CPPFLAGS="$AM_CPPFLAGS" @@ -428,6 +431,12 @@ AS_CASE([$enable_mode], AM_CFLAGS="$AM_CFLAGS -O3 -DNDEBUG" AM_CXXFLAGS="$AM_CXXFLAGS -O3 -DNDEBUG" clean_default_flags=yes + ], [gentoo], [dnl + AC_MSG_NOTICE([Using gentoo compile mode]) + AM_CPPFLAGS="$AM_CPPFLAGS ${CPPFLAGS_gentoo}" + AM_CFLAGS="$AM_CFLAGS -DNDEBUG ${CFLAGS_gentoo}" + AM_CXXFLAGS="$AM_CXXFLAGS -DNDEBUG ${CXXFLAGS_gentoo}" + clean_default_flags=yes ], [dnl AC_MSG_ERROR([Unknown compilation mode '$enable_mode'. Aborting.]) ])