Re: --enable-disk-io default is not auto?

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Fri, 30 Jul 2010 15:03:44 -0600

On 07/23/2010 08:01 PM, Amos Jeffries wrote:
> Alex Rousskov wrote:
>> Hello,
>>
>> I believe the change below is required for --enable-disk-io to
>> actually default to auto, which is what we promise in AS_HELP_STRING. On
>> the other hand, the comment insists that we should "do nothing" and that
>> the "auto is ok". Did I miss something?
>
> --enable-disk-io --> "yes"
> <missing> --> "auto"
> --disable-disk-io --> "no"
> --enable-disk-io=A,B,C --> "yes, for A B C only"

Agreed.

> --enable-disk-io=auto --> "yes, for a module called 'auto'"

Do not want to argue about this one for now.

Can you confirm that the fix below is the right one? AS_HELP_STRING says
that "all available modules will be built" by default, but that does not
happen without the fix, AFAICT, because $enableval matches the "*" case
and squid_opt_enable_diskio gets set to "yes", and a later

   if test $squid_opt_enable_diskio = "auto";

check fails.

Thank you,

Alex.

>>> AC_MSG_CHECKING([for DiskIO modules to be enabled])
>>> squid_disk_module_candidates=""
>>> squid_opt_enable_diskio="auto" #values: no, yes, "auto"(=yes+detect
>>> modules)
>>> AC_ARG_ENABLE(disk-io,
>>> AS_HELP_STRING([--enable-disk-io="list of modules"],
>>> [Build support for the list of disk I/O modules.
>>> Set without a value or omitted, all available modules will be built.
>>> See src/DiskIO for a list of available modules, or
>>> Programmers Guide section on DiskIO
>>> for details on how to build your custom disk module]), [ case
>>> $enableval in
>>> - yes)
>>> - ${TRUE}
>>> - #do nothing, "auto" is ok
>>> + yes|auto)
>>> + squid_opt_enable_diskio=$enableval
>>> ;;
>>> no)
>>> squid_opt_enable_diskio="no"
>>> ;;
>>> *)
>>> squid_opt_enable_diskio="yes"
>>> squid_disk_module_candidates=" `echo $enableval| sed -e 's/,/ /g;s/
>>> */ /g'` "
>>> SQUID_CLEANUP_MODULES_LIST([squid_disk_module_candidates])
>>> ;;
>>> esac
>>> ])
>>>
>>> # if requested to autodetect, find out what we have
>>> if test $squid_opt_enable_diskio = "auto"; then
>>> squid_opt_enable_diskio="yes"
>>> SQUID_LOOK_FOR_MODULES([$srcdir/src/DiskIO],[squid_disk_module_candidates])
>>>
>>> fi
>>
>> Thank you,
>>
>> Alex.
>>
>
>
Received on Fri Jul 30 2010 - 21:03:50 MDT

This archive was generated by hypermail 2.2.0 : Sat Jul 31 2010 - 12:00:25 MDT