From 564aada1e8c8d01b9957bb56ef7cb33812cbc6fb Mon Sep 17 00:00:00 2001 From: oes Date: Wed, 27 Nov 2002 12:55:26 +0000 Subject: [PATCH] Fixed broken handling of pre-set CFLAGS --- configure.in | 54 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/configure.in b/configure.in index 368d1ba3..fadd55bf 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. dnl -dnl $Id: configure.in,v 1.68.2.6 2002/09/25 15:35:15 oes Exp $ +dnl $Id: configure.in,v 1.68.2.7 2002/10/25 02:44:22 hal9 Exp $ dnl dnl Written by and Copyright (C) 2001, 2002 the SourceForge dnl Privoxy team. http://www.privoxy.org/ @@ -28,6 +28,10 @@ dnl or write to the Free Software Foundation, Inc., 59 dnl Temple Place - Suite 330, Boston, MA 02111-1307, USA. dnl dnl $Log: configure.in,v $ +dnl Revision 1.68.2.7 2002/10/25 02:44:22 hal9 +dnl Port of make install, etc from main trunk. Needs testing! Add Slackware +dnl support, and other related changes. Update related docs. +dnl dnl Revision 1.68.2.6 2002/09/25 15:35:15 oes dnl Marking as non-release dnl @@ -390,7 +394,7 @@ dnl ================================================================= dnl AutoConf Initialization dnl ================================================================= -AC_REVISION($Revision: 1.68.2.6 $) +AC_REVISION($Revision: 1.68.2.7 $) AC_INIT(jcc.c) if test ! -f config.h.in; then @@ -462,6 +466,12 @@ AC_DEFINE_UNQUOTED(CODE_STATUS,"${CODE_STATUS}") dnl ================================================================= dnl Checks for programs needed to build. dnl ================================================================= + +dnl Keep AC_PROG_CC from setting its own defaults: +if test "X$CFLAGS" = "X"; then + CFLAGS = " " +fi + AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL @@ -483,29 +493,27 @@ AC_ARG_WITH(debug, [ --with-debug Enable debug mode], [ if test "x$withval" != "xno" ; then - if test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - if test "$GDB"; then - CFLAGS="-ggdb" - else - CFLAGS="-g" - fi - CFLAGS="$CFLAGS -Wshadow -Wconversion" - else - CFLAGS="-g" - fi - fi + if test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + if test "$GDB"; then + CFLAGS="$CFLAGS -ggdb" + else + CFLAGS="$CFLAGS -g" + fi + CFLAGS="$CFLAGS -Wshadow -Wconversion" + else + CFLAGS="$CFLAGS -g" + fi + fi fi ], - [ - if test "X$CFLAGS" = "X"; then # if CFLAGS are unset - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi - fi - ] + [ + if test "X$CFLAGS" = "X "; then # if CFLAGS were unset (see above) + if test "$GCC" = yes; then + CFLAGS="-O2" + fi + fi + ] ) dnl ================================================================= -- 2.49.0