diff configure @ 265:1cafe0f3f0ec noffle

[svn] * configure, configure.in: Correct --enable-debug handling. Don't add -DDEBUG flag to the build line on non-debug builds.
author bears
date Mon, 05 Aug 2002 23:05:32 +0100
parents ebd9c98bbc7f
children f3b44be9e4ab
line wrap: on
line diff
--- a/configure	Mon Aug 05 23:05:02 2002 +0100
+++ b/configure	Mon Aug 05 23:05:32 2002 +0100
@@ -2699,15 +2699,17 @@
 fi
 
 
-if test "x$enable_debug" = "xyes" && test "x$GCC" = "xyes"; then
- CFLAGS="$CFLAGS \
--Wall -O2 -g -pedantic -ansi -W -Wtraditional -Wshadow -Wpointer-arith \
--Wcast-align -Wwrite-strings \
--Wstrict-prototypes -Wmissing-prototypes \
--Wmissing-declarations -Wnested-externs -Winline \
--D__USE_BSD -D__USE_XOPEN_EXTENDED -D__USE_POSIX -DDEBUG"
-else
-  CFLAGS="$CFLAGS -D__USE_BSD -D__USE_XOPEN_EXTENDED -D__USE_POSIX -DDEBUG"
+if test "x$enable_debug" = "xyes"; then
+  if test "x$GCC" = "xyes"; then
+    CFLAGS="$CFLAGS \
+      -Wall -pedantic -ansi -W -Wtraditional -Wshadow -Wpointer-arith \
+      -Wcast-align -Wwrite-strings \
+      -Wstrict-prototypes -Wmissing-prototypes \
+      -Wmissing-declarations -Wnested-externs -Winline \
+      -D__USE_BSD -D__USE_XOPEN_EXTENDED -D__USE_POSIX -DDEBUG"
+  else
+      CFLAGS="$CFLAGS -DDEBUG"
+  fi
 fi
 
 
@@ -2718,7 +2720,7 @@
   noffle_cv_docdir=$withval
 else
    echo $ac_n "checking other documentation directory""... $ac_c" 1>&6
-echo "configure:2722: checking other documentation directory" >&5
+echo "configure:2724: checking other documentation directory" >&5
 if eval "test \"`echo '$''{'noffle_cv_docdir'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2737,7 +2739,7 @@
 
 
 echo $ac_n "checking spooldir""... $ac_c" 1>&6
-echo "configure:2741: checking spooldir" >&5
+echo "configure:2743: checking spooldir" >&5
 # Check whether --with-spooldir or --without-spooldir was given.
 if test "${with_spooldir+set}" = set; then
   withval="$with_spooldir"
@@ -2760,7 +2762,7 @@
 
 
 echo $ac_n "checking configfile""... $ac_c" 1>&6
-echo "configure:2764: checking configfile" >&5
+echo "configure:2766: checking configfile" >&5
 # Check whether --with-configfile or --without-configfile was given.
 if test "${with_configfile+set}" = set; then
   withval="$with_configfile"