summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikko Koppanen <mkoppanen@php.net>2010-12-18 12:13:10 +0100
committerMartin Sustrik <sustrik@250bpm.com>2010-12-18 12:13:10 +0100
commitcbbb1e925d699c8b42b2724740d68839c81684c3 (patch)
treeb89228f4bb3d005b73dc1a32e2b8fe59e128949c
parentd15e881ea02232c3e875699b3c25f43ad2fd093c (diff)
Fix passing through CFLAGS/CPPFLAGS/CXXFLAGS when using --enable-debug
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
-rw-r--r--acinclude.m412
-rw-r--r--configure.in5
2 files changed, 11 insertions, 6 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 7da2e0b..1257c9e 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -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
diff --git a/configure.in b/configure.in
index 0dfd98e..9c03518 100644
--- a/configure.in
+++ b/configure.in
@@ -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