[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: making part of package optional at ./configure time
From: |
Keith MARSHALL |
Subject: |
Re: making part of package optional at ./configure time |
Date: |
Tue, 19 Sep 2006 09:14:16 +0100 |
>> Use something like
>> AC_ARG_ENABLE([webcam],
>> [AS_HELP_STRING([--disable-webcam], [disable use of webcam])],
>> [AC_DEFINE([USE_WEBCAM], [1], [enable/disable webcam
broadcaster])])
>>
> Many thanks for your help.
>
> This is almost there, but working in reverse to my expectations,
> ./configure --disable-webcam
> enables inclusion and
That would be because the above logic doesn't check the value of
$enableval; it simply *unconditionally* AC_DEFINEs USE_WEBCAM, as
soon as the user specifies *either* an `--enable-webcam' *or* a
`--disable-webcam' option, (which is equivalent to specifying
`--enable-webcam=no', and therefore sets $enableval to `no'),
while...
> ./configure
> DISABLES it
has no default action specified, if *neither* option is given, so
the AC_DEFINE effect is never invoked.
Regards,
Keith.