Boolean switches should use AC_ARG_ENABLE(). AC_ARG_WITH is to allow you to
specify "configure with <this> package". The code below should fall out
simply as:

AC_ARG_ENABLE(sendfile, [ --enable-sendfile  Enable or disable sendfile support]
  [ if test "$enable_sendfile" = "yes"; then
       sendfile="1"
    else
       sendfile="0"
    fi
  ])

No switch leaves sendfile unset (e.g. default to the platform availability).
--enable-sendfile sets it to 1, and --disable-sendfile sets it to 0.

Users expect AC_ARG_ENABLE type switches for these things.

(--with-debug and --with-maintainer-mode need to switch, too, for that
 matter)

Cheers,
-g

On Tue, Mar 06, 2001 at 12:10:42PM -0800, [EMAIL PROTECTED] wrote:
> On Tue, 6 Mar 2001, Roy T. Fielding wrote:
> 
> > On Tue, Mar 06, 2001 at 04:54:49AM -0000, [EMAIL PROTECTED] wrote:
> > >   +++ configure.in        2001/03/06 04:54:49     1.256
> > >   @@ -350,6 +350,13 @@
> > >    dnl threaded poll() and we don't want to use sendfile on early FreeBSD
> > >    dnl systems if we are also using threads.
> > >
> > >   +AC_ARG_WITH(sendfile, [  --with-sendfile  Force sendfile to be on or 
> > > off],
> > >   +  [ if test "$withval" = "yes"; then
> > >   +        sendfile="1"
> > >   +    else
> > >   +        sendfile="0"
> > >   +    fi ] )
> > >   +
> >
> > This seems to say that --with-sendfile means --without-sendfile.  I think
> > that --with options should always default to "yes" if no =value is given.
> > Otherwise, the option should be --disable-sendfile.
> 
> The way that autoconf works, by using AC_ARG_WITH, we get multiple
> options:
> 
>       --with-sendfile=yes
>       --with-sendfile
>       --with-sendfile=no
>       --without-sendfile
> 
> The first two are the same, as are the last two.
> 
> The logic in that file makes --with-sendfile force sendfile to be on, and
> --without-sendfile to force it to be off.
> 
> Ryan
> 
> _______________________________________________________________________________
> Ryan Bloom                            [EMAIL PROTECTED]
> 406 29th St.
> San Francisco, CA 94131
> -------------------------------------------------------------------------------

-- 
Greg Stein, http://www.lyra.org/

Reply via email to