On Tue, Jun 21, 2016 at 2:33 PM, Ruediger Pluem <rpl...@apache.org> wrote:
> > On 06/21/2016 05:39 PM, William A Rowe Jr wrote: > > Just retested on 2.4.x branch, better but still problematic... > > > > "../../httpd-2.4/configure" \ > > "--prefix=/opt/apache24-apr15-ossl102" \ > > "--with-apr=/opt/apr15-ossl102" \ > > "--with-apr-util=/opt/apr15-ossl102" \ > > "--enable-watchdog=no" \ > > "--enable-proxy=yes" > > > > checking whether to enable mod_proxy_hcheck... checking dependencies > > configure: WARNING: "mod_watchdog is disabled but required for > mod_proxy_hcheck" > > configure: error: mod_proxy_hcheck has been requested but can not be > built due to prerequisite failures > > checking whether to enable mod_proxy_hcheck... > > <abort> > > > Would that suit better (against current 2.4.x): > > Index: config.m4 > =================================================================== > --- config.m4 (revision 1749588) > +++ config.m4 (working copy) > @@ -13,9 +13,17 @@ > if test "$proxy_mods_enable" = "no"; then > enable_proxy_hcheck=no > fi > -dnl If enable_proxy_hcheck is unset handle it like other proxy modules > +dnl If enable_proxy_hcheck is unset handle it like other proxy modules if > +dnl it is able to disable itself. If not do not enable it. > if test -z "$enable_proxy_hcheck" ; then > - enable_proxy_hcheck="$proxy_mods_enable" > + case "$proxy_mods_enable" in > + yes|static|shared) > + enable_proxy_hcheck=no > + ;; > + *) > + enable_proxy_hcheck="$proxy_mods_enable" > + ;; > + esac > fi > > proxy_objs="mod_proxy.lo proxy_util.lo" > I came up with the following logic to resolve default enablement (forget leaving this loose in the file, it fits just fine in the APACHE_MODULE syntax, as illustrated by mod_ssl, mod_ldap, etc etc...) --- modules/proxy/config.m4 (revision 1749557) +++ modules/proxy/config.m4 (working copy) @@ -10,14 +10,6 @@ proxy_mods_enable=most fi -if test "$proxy_mods_enable" = "no"; then - enable_proxy_hcheck=no -fi -dnl If enable_proxy_hcheck is unset handle it like other proxy modules -if test -z "$enable_proxy_hcheck" ; then - enable_proxy_hcheck="$proxy_mods_enable" -fi - proxy_objs="mod_proxy.lo proxy_util.lo" APACHE_MODULE(proxy, Apache proxy module, $proxy_objs, , $proxy_mods_enable) @@ -67,7 +59,14 @@ APACHE_MODULE(proxy_balancer, Apache proxy BALANCER module. Requires and is enabled by --enable-proxy., $proxy_balancer_objs, , $proxy_mods_enable,, proxy) APACHE_MODULE(proxy_express, mass reverse-proxy module. Requires --enable-proxy., , , $proxy_mods_enable,, proxy) -APACHE_MODULE(proxy_hcheck, reverse-proxy health-check module. Requires --enable-proxy and --enable-watchdog., , , $enable_proxy_hcheck,, watchdog) +APACHE_MODULE(proxy_hcheck, [reverse-proxy health-check module. Requires --enable-proxy and --enable-watchdog.], , ,[ + $proxy_mods_enable + dnl Verify that both proxy_mods_enable above and watchdog below are enabled + dnl when --enable-proxy-hcheck isn't explicitly elected + if test "$enable_watchdog" = "no"; then + enable_proxy_hcheck=no; + fi +], , proxy watchdog) APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current]) This does exactly what we want, enables proxy_hcheck when proxy is enabled, will drop it immediately where watchdog is disabled, and cause no extraneous noise or failures when not --enable-proxy-hcheck (when the user does explicitly elect it and we can't build, we are supposed to fail hard.) What doesn't work is a list a module dependencies as I illustrated above. This is important due to the consumer (static) requiring a provider (shared) component, that the final dependency argument tests for. I'm working on a variation for that arg which would support iterating a list of modules, ensuring each follows the enabled <> enabled static <> static rule, but bash variable expansion is giving me a bit of a headache. Hope to have an update after dinner that would support this syntax instead of duplicating a bunch of .m4 code out of the acinclude.m4 APACHE_MODULE function.