Fix passing through CFLAGS/CPPFLAGS/CXXFLAGS when using --enable-debug

Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
This commit is contained in:
Mikko Koppanen 2010-12-18 12:13:10 +01:00 committed by Martin Sustrik
parent d15e881ea0
commit cbbb1e925d
2 changed files with 11 additions and 6 deletions

View File

@ -302,14 +302,14 @@ AC_DEFUN([AC_ZMQ_CHECK_ENABLE_DEBUG], [{
CXXFLAGS="-g0 "
fi
if test "x$LOCAL_CFLAGS" != "xnone"; then
CFLAGS="${CFLAGS} ${LOCAL_CFLAGS}"
if test "x$ZMQ_ORIG_CFLAGS" != "xnone"; then
CFLAGS="${CFLAGS} ${ZMQ_ORIG_CFLAGS}"
fi
if test "x$LOCAL_CPPFLAGS" != "xnone"; then
CPPFLAGS="${CPPFLAGS} ${LOCAL_CPPFLAGS}"
if test "x$ZMQ_ORIG_CPPFLAGS" != "xnone"; then
CPPFLAGS="${CPPFLAGS} ${ZMQ_ORIG_CPPFLAGS}"
fi
if test "x$LOCAL_CXXFLAGS" != "xnone"; then
CXXFLAGS="${CXXFLAGS} ${LOCAL_CXXFLAGS}"
if test "x$ZMQ_ORIG_CXXFLAGS" != "xnone"; then
CXXFLAGS="${CXXFLAGS} ${ZMQ_ORIG_CXXFLAGS}"
fi
AC_MSG_RESULT(yes)
else

View File

@ -31,6 +31,11 @@ AC_SUBST(PACKAGE_VERSION)
LTVER="1:0:0"
AC_SUBST(LTVER)
# Take a copy of original flags
ZMQ_ORIG_CFLAGS="${CFLAGS:-none}"
ZMQ_ORIG_CPPFLAGS="${CPPFLAGS:-none}"
ZMQ_ORIG_CXXFLAGS="${CXXFLAGS:-none}"
# Checks for programs.
AC_PROG_CC
AC_PROG_CC_C99