diff options
author | Martin Pool <mbp@samba.org> | 2003-03-20 05:54:03 +0000 |
---|---|---|
committer | Martin Pool <mbp@samba.org> | 2003-03-20 05:54:03 +0000 |
commit | c9167c943d24946066bbd62dbf33086a9a7bc3bd (patch) | |
tree | 5573dc394f0c40ba520daa4e48140a9bfe87d966 | |
parent | c8eed69be0850e7c68318562c91f73855a09dd92 (diff) | |
download | samba-c9167c943d24946066bbd62dbf33086a9a7bc3bd.tar.gz samba-c9167c943d24946066bbd62dbf33086a9a7bc3bd.tar.bz2 samba-c9167c943d24946066bbd62dbf33086a9a7bc3bd.zip |
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)
-rw-r--r-- | source3/configure.in | 10 |
1 files changed, 7 insertions, 3 deletions
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 |