[Snort-devel] --disable-debug enables debug

Fyodor fygrave at ...1...
Tue Jun 25 03:13:04 EDT 2002


> 
> In configure.in, the parameters for debug are:
> ================================
> AC_ARG_ENABLE(debug,
> [  --enable-debug       enable debugging options (bugreports and developers only)],
>                 [ if test -n "$GCC"; then
>                     CFLAGS="$CFLAGS -DDEBUG -ggdb"
>                   else
>                     CLFLAGS="$CFLAGS -DDEBUG"
>                   fi
>                 ],)
> ================================
> 
> This generates the following lines in configure:
> ================================
> # Check whether --enable-debug or --disable-debug was given.
> if test "${enable_debug+set}" = set; then
>   enableval="$enable_debug"
>    if test -n "$GCC"; then
>                     CFLAGS="$CFLAGS -DDEBUG -ggdb"
>                   else
>                     CLFLAGS="$CFLAGS -DDEBUG"
>                   fi
> 
> fi
> ================================
> The problem comes from the fact that ${enable_debug+set} is
> equal to "set" whenever any form of enable-debug or disable-debug
> is used as an argument.  Adding a line to configure.in to check the
> actual value of $enable-debug solves the problem:
> 

this looks more like configure bug, cuz semantics of AC_ARG_ENABLE() is

AC_ARG_ENABLE(option, help messages, what to do if enable, what to do if disable);

and the 'disable' part is obviously empty there.

-- 
http://www.notlsd.net
PGP fingerprint = 56DD 1511 DDDA 56D7 99C7  B288 5CE5 A713 0969 A4D1




More information about the Snort-devel mailing list