That code block should not be executed if the option is not specified. In theory it should work as advertised. What is the check that's failing to you?
Kinkie (on mobile, can't commit but can comment ;) ) I'm putting the finishing touches to autoconf-refactor on a local branch, in a few days I'll be able to post a merge candidate On 7/30/10, Alex Rousskov <rouss...@measurement-factory.com> wrote: > 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. >>> >> >> > > -- /kinkie