diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2009-08-28 20:01:21 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2009-08-28 20:01:21 +0000 |
commit | 802b79e3ca114e5958e12e57c5eb7f0569f45c77 (patch) | |
tree | 94a3fc2d8afe760a93e732a57af1b8f082bc47c5 /configure.ac | |
parent | f199054c88ea146da16164fd4d2d6b96f4417cee (diff) |
Ensure that CFLAGS and/or LDFLAGS provided to configure script are preserved.
Cross-compilation environments want to provide 'defaults' for compiler and
linker options, and frequently do this by specifying CFLAGS and LDFLAGS in the
environment or as command-line arguments to the configure script. This patch
modifies the configure script and Makefile to preserve these settings and
ensure they are used in the build process.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@214696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 37bb2010a..c7ae196cf 100644 --- a/configure.ac +++ b/configure.ac @@ -25,6 +25,12 @@ AC_REVISION($Revision$) AC_USE_SYSTEM_EXTENSIONS # note- does not work on FreeBSD +# preserve any CFLAGS or LDFLAGS that may be set +CONFIG_CFLAGS="${CFLAGS}" +CONFIG_LDFLAGS="${LDFLAGS}" +AC_SUBST(CONFIG_CFLAGS) +AC_SUBST(CONFIG_LDFLAGS) + case "${host_os}" in freebsd*) ac_default_prefix=/usr/local |