From c9167c943d24946066bbd62dbf33086a9a7bc3bd Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Thu, 20 Mar 2003 05:54:03 +0000 Subject: If CFLAGS is set when running configure, then just use that. Otherwise add -O. (We used to always set -O, which is sometimes annoying when debugging and anyhow clashes with normal autoconf behaviour.) (This used to be commit aee2ad9c3444d59dd6f53dda5379a6c391e00002) --- source3/configure.in | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/configure.in b/source3/configure.in index fa8e99c3a4..e6189aa06f 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -159,9 +159,6 @@ AC_SUBST(EXTRA_BIN_PROGS) AC_SUBST(EXTRA_SBIN_PROGS) AC_SUBST(EXTRA_ALL_TARGETS) -# compile with optimization and without debugging by default -CFLAGS="-O ${CFLAGS}" - AC_ARG_ENABLE(debug, [ --enable-debug Turn on compiler debugging information (default=no)], [if eval "test x$enable_debug = xyes"; then @@ -194,6 +191,13 @@ AC_PROG_INSTALL AC_PROG_AWK AC_PATH_PROG(PERL, perl) +# compile with optimization and without debugging by default, but +# allow people to set their own preference. +if test "x$CFLAGS" = x +then + CFLAGS="-O ${CFLAGS}" +fi + dnl Check if we use GNU ld LD=ld AC_PROG_LD_GNU -- cgit