Ensure that the default autoconf CFLAGS are not used.

A recent change to the configure script that allows the user to specify
CFLAGS and/or LDFLAGS to the script had the unfortunate side effect of
letting autoconf's default CFLAGS (-g -O2) feed in to the rest of the build
system, thereby overriding the DONT_OPTIMIZE setting in menuselect. That
problem is now corrected.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2009-09-08 16:37:28 +00:00
parent fe7ec8c675
commit 5d0790027a
3 changed files with 10097 additions and 9327 deletions

View File

@@ -17,20 +17,26 @@ AC_CANONICAL_HOST
# check existence of the package
AC_CONFIG_SRCDIR([main/asterisk.c])
# specify output header file
AC_CONFIG_HEADER(include/asterisk/autoconfig.h)
AC_COPYRIGHT("Asterisk")
AC_REVISION($Revision$)
AC_USE_SYSTEM_EXTENSIONS # note- does not work on FreeBSD
# preserve any CFLAGS or LDFLAGS that may be set
# NOTE: This must be done before calling any macros that end up
# calling AC_PROG_CC or the like, since they will set a default
# set of CFLAGS ("-g -O2") if the user did not supply any, and
# we don't want those default flags to be carried over into the
# rest of the build system since we have other means of controlling
# debugging symbol generation and optimization.
CONFIG_CFLAGS="${CFLAGS}"
CONFIG_LDFLAGS="${LDFLAGS}"
AC_SUBST(CONFIG_CFLAGS)
AC_SUBST(CONFIG_LDFLAGS)
# specify output header file
AC_CONFIG_HEADER(include/asterisk/autoconfig.h)
AC_USE_SYSTEM_EXTENSIONS # note- does not work on FreeBSD
case "${host_os}" in
freebsd*)
ac_default_prefix=/usr/local