dougm 01/10/20 11:59:28
Modified: . Makefile.PL
lib/Apache Build.pm
lib/ModPerl BuildOptions.pm
pod modperl_dev.pod
Log:
add MP_AP_PREFIX build option; possible to derive apxs values on platforms where
apxs is not supported
Revision Changes Path
1.46 +4 -1 modperl-2.0/Makefile.PL
Index: Makefile.PL
===================================================================
RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- Makefile.PL 2001/10/17 17:38:07 1.45
+++ Makefile.PL 2001/10/20 18:59:28 1.46
@@ -47,7 +47,10 @@
set_modperl_version();
if ($build->{MP_APXS}) {
- print "Using $build->{MP_APXS}\n";
+ print "Using APXS => $build->{MP_APXS}\n";
+ }
+ elsif ($build->{MP_AP_PREFIX} and -e $build->apxs(-q => 'INCLUDEDIR')) {
+ print "Using Apache prefix => $build->{MP_AP_PREFIX}\n";
}
else {
for my $path ($build->find) {
1.54 +13 -1 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.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- Build.pm 2001/10/16 20:59:15 1.53
+++ Build.pm 2001/10/20 18:59:28 1.54
@@ -36,6 +36,13 @@
our $APXS;
+my %apxs_query = (
+ INCLUDEDIR => 'include',
+ LIBEXECDIR => 'modules',
+ CFLAGS => undef,
+ PREFIX => '',
+);
+
sub apxs {
my $self = shift;
@@ -71,7 +78,12 @@
last if -x $apxs;
}
- return '' unless $apxs and -x $apxs;
+ unless ($apxs and -x $apxs) {
+ my $prefix = $self->{MP_AP_PREFIX} || "";
+ return '' unless -d $prefix and $is_query;
+ my $val = $apxs_query{$_[1]};
+ return defined $val ? ($val ? "$prefix/$val" : $prefix) : "";
+ }
my $val = qx($apxs @_ 2>/dev/null);
1.11 +1 -0 modperl-2.0/lib/ModPerl/BuildOptions.pm
Index: BuildOptions.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildOptions.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- BuildOptions.pm 2001/10/20 18:30:39 1.10
+++ BuildOptions.pm 2001/10/20 18:59:28 1.11
@@ -160,6 +160,7 @@
OPTIONS_FILE Read options from given file
STATIC_EXTS Build Apache::*.xs as static extensions
APXS Path to apxs
+AP_PREFIX Apache installation prefix
XS_GLUE_DIR Directories containing extension glue
INCLUDE_DIR Add directories to search for header files
GENERATE_XS Generate XS code based on httpd version
1.44 +9 -0 modperl-2.0/pod/modperl_dev.pod
Index: modperl_dev.pod
===================================================================
RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- modperl_dev.pod 2001/10/20 18:30:40 1.43
+++ modperl_dev.pod 2001/10/20 18:59:28 1.44
@@ -87,6 +87,15 @@
Build mod_perl as a DSO (default)
+=item MP_APXS
+
+Path to apxs
+
+=item MP_AP_PREFIX
+
+Apache installation prefix
+(can be used to derive apxs values on platforms where apxs is not supported)
+
=item MP_USE_STATIC
Build mod_perl static