Log Message: |
Use more effective means of finding apxs if MP_APXS is not specified on command line
The current logic in ModPerl::BuildOptions->init() just looks through the PATH for an apxs, but there is better logic (checking for an MP_APXS environment variable, amongst other things) in Apache2::Build->find_apxs_util(), so use that instead. That requires saving the value found in $build->{MP_APXS} rather than a file-scope lexical. Also change Makefile.PL to display the MP_APXS or MP_AP_PREFIX that it is using so that it is clear what option has been picked up.
With this change, the MP_APXS command-line argument will take precedence over anything else (as is the case now); the MP_APXS environment variable will be used instead if that is present; next, we check for MP_AP_PREFIX/bin/apxs; and finally we keep the last ditch attempt to find apxs in the PATH (corrected so that it works on Windows too - use the correct PATH separator, and look for apxs.bat).
This should hopefully fix CPAN RT#84732.
I've also renamed the misleading $self variable used in various parse*() functions in BuildOptions.pm since they are not called as methods so the first argument is actually the $build (i.e. the Apache2::Build) object passed in, not the ModPerl::BuildOptions class from init() (which was itself a class method call, not an object method call).
|