[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] --disable-debug and --disable-maintainer-mode are broken

From: Yoshiki Hayashi <yoshiki_at_xemacs.org>
Date: 2001-10-19 14:55:29 CEST

Those two usage of AC_ARG_ENABLE are wrong. AC_ARG_ENABLE
runs ACTION-IF-GIVEN if --enable-FEATURE or
--disable-FEATURE are given. You should test enableval
to see whether enable or disable is given.

 - Macro: AC_ARG_ENABLE (FEATURE, HELP-STRING, [ACTION-IF-GIVEN],
          [ACTION-IF-NOT-GIVEN])
     If the user gave `configure' the option `--enable-FEATURE' or
     `--disable-FEATURE', run shell commands ACTION-IF-GIVEN. If
     neither option was given, run shell commands ACTION-IF-NOT-GIVEN.
     The name FEATURE indicates an optional user-level facility. It
     should consist only of alphanumeric characters and dashes.

     The option's argument is available to the shell commands
     ACTION-IF-GIVEN in the shell variable `enableval', which is
     actually just the value of the shell variable `enable_FEATURE',
     with any `-' characters changed into `_'. You may use that
     variable instead, if you wish. The HELP-STRING argument is like
     that of `AC_ARG_WITH' (*note External Software::).

* confiugre.in (--enable-debug, --enable-maintainer-mode):
  Test enableval to check argument correctly.

Index: ./configure.in
===================================================================
--- ./.svn/text-base/configure.in Fri Oct 12 14:45:57 2001
+++ ./configure.in Fri Oct 19 21:48:04 2001
@@ -215,17 +215,23 @@
 
 AC_ARG_ENABLE(debug,
 [ --enable-debug Turn on debugging and compile time warnings],
-[enable_debugging=yes])
+[
+ if test "$enableval" = "yes"; then
+ enable_debugging=yes
+ fi
+])
 
 AC_ARG_ENABLE(maintainer-mode,
 [ --enable-maintainer-mode Turn on debugging and very strict compile-time
                           warnings],
 [
- enable_debugging=yes
- if test "$GCC" = "yes"; then
- dnl SVN_DEBUG enables specific features for developer builds
- dnl AP_DEBUG enables specific (Apache) features for developer builds
- CFLAGS="$CFLAGS -Wpointer-arith -Wwrite-strings -Wshadow -DSVN_DEBUG -DAP_DEBUG";
+ if test "$enableval" = "yes"; then
+ enable_debugging=yes
+ if test "$GCC" = "yes"; then
+ dnl SVN_DEBUG enables specific features for developer builds
+ dnl AP_DEBUG enables specific (Apache) features for developer builds
+ CFLAGS="$CFLAGS -Wpointer-arith -Wwrite-strings -Wshadow -DSVN_DEBUG -DAP_DEBUG";
+ fi
     fi
 ])
 

-- 
Yoshiki Hayashi
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:45 2006

This is an archived mail posted to the Subversion Dev mailing list.