summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorgregames <gregames@13f79535-47bb-0310-9956-ffa450edef68>2002-03-23 20:52:51 +0000
committergregames <gregames@13f79535-47bb-0310-9956-ffa450edef68>2002-03-23 20:52:51 +0000
commit770856f8428336b2bbaaca0b7354ca1a85e78bbe (patch)
treede02d2e4aa24899d608f0d8256d56062fc25bdf4 /configure.in
parentbcf3dc786c1dcb1cb00030bf0e291ecfe236fa18 (diff)
downloadlibapr-770856f8428336b2bbaaca0b7354ca1a85e78bbe.tar.gz
OS/390: only remove -g if CFLAGS wasn't set on entry to configure.
It turns out that AC_PROG_CC only sets -g (and -O2 for gcc) in CFLAGS by default. Any CFLAGS explicitly set by the user are preserved. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63189 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in8
1 files changed, 5 insertions, 3 deletions
diff --git a/configure.in b/configure.in
index d061b465b..ce5fb9698 100644
--- a/configure.in
+++ b/configure.in
@@ -170,14 +170,16 @@ nl='
'
echo $ac_n "${nl}Check for compiler flags...${nl}"
-dnl AC_PROG_CC unconditionally sets -g in CFLAGS.
-dnl On OS/390 (at least), this causes the compiler to insert extra debugger
+dnl AC_PROG_CC sets -g in CFLAGS (and -O2 for gcc) by default.
+dnl On OS/390 this causes the compiler to insert extra debugger
dnl hook instructions. That's fine for debug/maintainer builds, not fine
dnl otherwise.
case $host in
*os390)
- APR_REMOVEFROM(CFLAGS,-g)
+ if test "$ac_test_CFLAGS" != set; then
+ APR_REMOVEFROM(CFLAGS,-g)
+ fi
;;
esac