| 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="" |
| @@ -428,6 +431,13 @@ AS_CASE([$enable_mode], |
| AM_CXXFLAGS="$AM_CXXFLAGS -O3 -DNDEBUG" |
| clean_default_flags=yes |
| AM_CONDITIONAL([KAAPI_USE_DEBUG], [test "$enable_mode" = truc ]) |
| + ], [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 |
| + AM_CONDITIONAL([KAAPI_USE_DEBUG], [test "$enable_mode" = gentoo ]) |
| ], [dnl |
| AC_MSG_ERROR([Unknown compilation mode '$enable_mode'. Aborting.]) |
| ]) |