stas 2003/08/06 16:45:06
Modified: lib/Apache Build.pm Log: work harder to find out the location of apr-config. if found store its base directory as it might be different from the APXS dir. Revision Changes Path 1.129 +21 -4 modperl-2.0/lib/Apache/Build.pm Index: Build.pm =================================================================== RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v retrieving revision 1.128 retrieving revision 1.129 diff -u -r1.128 -r1.129 --- Build.pm 25 Jul 2003 01:49:10 -0000 1.128 +++ Build.pm 6 Aug 2003 23:45:06 -0000 1.129 @@ -686,6 +686,14 @@ $self->{ap_includedir} = $d; } +# where apr-config and apu-config reside +sub apr_bindir { + my ($self) = @_; + + $self->apr_config_path unless $self->{apr_bindir}; + $self->{apr_bindir}; +} + sub apr_config_path { my ($self) = @_; @@ -696,13 +704,22 @@ $self->{apr_config_path} = $self->{MP_APR_CONFIG}; } - if (!$self->{apr_config_path} and - exists $self->{MP_AP_PREFIX} and -d $self->{MP_AP_PREFIX}) { - my $try = catfile $self->{MP_AP_PREFIX}, "bin", "apr-config"; - $self->{apr_config_path} = $try if -x $try; + if (!$self->{apr_config_path}) { + if (exists $self->{MP_AP_PREFIX} and -d $self->{MP_AP_PREFIX}) { + my $try = catfile $self->{MP_AP_PREFIX}, "bin", "apr-config"; + $self->{apr_config_path} = $try if -x $try; + } + elsif (my $bindir = $self->apxs(-q => 'BINDIR')) { + my $try = catfile $bindir, "apr-config"; + $self->{apr_config_path} = $try if -x $try; + } } $self->{apr_config_path} ||= Apache::TestConfig::which('apr-config'); + + $self->{apr_bindir} = $self->{apr_config_path} + ? dirname $self->{apr_config_path} + : ''; $self->{apr_config_path}; }