diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-09-08 16:39:54 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-09-08 16:39:54 +0000 |
commit | 9bc042350cde09970e3913110ceedaefaee44245 (patch) | |
tree | d33f7677f2029a0ea929b1f4258370d807aa89d4 /configure.ac | |
parent | 34d971b7b4c6dc25b41e526832d01584a6cb8d45 (diff) |
Merged revisions 217074 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r217074 | kpfleming | 2009-09-08 11:37:28 -0500 (Tue, 08 Sep 2009) | 9 lines
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: http://svn.digium.com/svn/asterisk/branches/1.6.2@217077 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index acfba034e..62597f984 100644 --- a/configure.ac +++ b/configure.ac @@ -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 |