From a302b79a37cd2c9f80f2470f09f7d430f084641f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 8 Sep 2005 11:01:39 +0000 Subject: r10077: - move gcc option checks to check_cc.m4 - only use -g if supported - don't allow AC_PROG_C and friends to autoset the CFLAGS (we don't want -g -02 by default..., maybe a configure option for -OX could be useful...) metze (This used to be commit f3e0bf022f6a1d5de0d21eb7be3ec97f526fe631) --- source4/build/m4/check_path.m4 | 40 ++++++++++++---------------------------- 1 file changed, 12 insertions(+), 28 deletions(-) (limited to 'source4/build/m4/check_path.m4') diff --git a/source4/build/m4/check_path.m4 b/source4/build/m4/check_path.m4 index 3c626ee0d0..3e46c16cbf 100644 --- a/source4/build/m4/check_path.m4 +++ b/source4/build/m4/check_path.m4 @@ -145,45 +145,29 @@ AC_ARG_WITH(selftest-prefix, ;; esac]) +debug=no +AC_ARG_ENABLE(debug, +[ --enable-debug Turn on compiler debugging information (default=no)], + [if test x$enable_debug = xyes; then + debug=yes + fi]) + developer=no AC_SUBST(developer) -AC_ARG_ENABLE(developer, [ --enable-developer Turn on developer warnings and debugging (default=no)], +AC_ARG_ENABLE(developer, +[ --enable-developer Turn on developer warnings and debugging (default=no)], [if test x$enable_developer = xyes; then debug=yes developer=yes - DEVELOPER_CFLAGS="-DDEBUG_PASSWORD -DDEVELOPER" - if test x"$GCC" = x"yes" ; then - AX_CFLAGS_GCC_OPTION(-Wall, DEVELOPER_CFLAGS) - AX_CFLAGS_GCC_OPTION(-Wshadow, DEVELOPER_CFLAGS) - AX_CFLAGS_GCC_OPTION(-Werror-implicit-function-declaration, DEVELOPER_CFLAGS) - AX_CFLAGS_GCC_OPTION(-Wstrict-prototypes, DEVELOPER_CFLAGS) - AX_CFLAGS_GCC_OPTION(-Wpointer-arith, DEVELOPER_CFLAGS) - AX_CFLAGS_GCC_OPTION(-Wcast-qual, DEVELOPER_CFLAGS) - AX_CFLAGS_GCC_OPTION(-Wcast-align, DEVELOPER_CFLAGS) - AX_CFLAGS_GCC_OPTION(-Wwrite-strings, DEVELOPER_CFLAGS) - AX_CFLAGS_GCC_OPTION(-Wmissing-format-attribute, DEVELOPER_CFLAGS) - AX_CFLAGS_GCC_OPTION(-Wformat=2, DEVELOPER_CFLAGS) - AX_CFLAGS_GCC_OPTION(-Wno-format-y2k, DEVELOPER_CFLAGS) - AX_CFLAGS_GCC_OPTION(-Wno-declaration-after-statement, DEVELOPER_CFLAGS) - fi - fi]) - -debug=no -AC_ARG_ENABLE(debug, -[ --enable-debug Turn on compiler debugging information (default=no)], - [if test x$enable_debug = xyes -a x$enable_developer != xyes; then - debug=yes - CFLAGS="${CFLAGS} -g" fi]) - experimental=no -AC_ARG_ENABLE(experimental, [ --enable-experimental Turn on experimental features (default=no)], - [if eval "test x$enable_experimental = xyes"; then +AC_ARG_ENABLE(experimental, +[ --enable-experimental Turn on experimental features (default=no)], + [if test x$enable_experimental = xyes; then experimental=yes fi]) - dnl disable these external libs AC_ARG_WITH(disable-ext-lib, [ --with-disable-ext-lib=LIB Comma-seperated list of external libraries], -- cgit