autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_ARG_ENABLE ambiguity


From: Joshua Kwan
Subject: Re: AC_ARG_ENABLE ambiguity
Date: Wed, 11 Jun 2003 01:53:56 -0700
User-agent: Mutt/1.5.4i

On Wed, Jun 11, 2003 at 09:47:59AM +0200, Tim Van Holder wrote:
> A more canonical approach to using AC_ARG_* is to use a shell var to
> hold the switch:
> 
> AC_ARG_ENABLE(foo
>   AC_HELP_STRING([--disable-foo], [Disable the use of foo]),
>   [use_foo=$enableval], [use_foo=yes])
> if test $use_foo = yes; then
>   AC_DEFINE(USE_FOO, 1, [Define if your system has a foo.])
> else
>   AC_DEFINE(USE_FAKE_FOO, 1, [Define if you want faked foo functionality])
> fi

I guess that works well. Okay.

> Note that it seems odd to define two different macros - why not use
> AC_DEFINE only if foo is enabled, or use a two-valued macro (0 or 1)?
> 
> (As an aside, 'usage' is 'the way something is used' - so you're not
> disabling foo's usage, but its use.)

I completely BS'd the sample code, only attempting to illustrate my
point. :)

Regards
Josh

-- 
New PGP public key: 0x27AFC3EE

Attachment: pgpIRN9sx_qPL.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]