Mailing List Archive

cvs commit: modperl Makefile.PL
dougm 98/06/11 15:12:53

Modified: . Makefile.PL
Log:
if APACHE_PREFIX=... is present, use it for:
- when USE_APXS=1, set $WITH_APXS=$APACHE_PREFIX/sbin/apxs
- add --prefix=$APACHE_PREFIX when running configure
- add apaci_install target for mod_perl's 'make install'
which will (cd $APACHE_ROOT && make install)

Revision Changes Path
1.46 +27 -5 modperl/Makefile.PL

Index: Makefile.PL
===================================================================
RCS file: /export/home/cvs/modperl/Makefile.PL,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- Makefile.PL 1998/06/09 17:57:30 1.45
+++ Makefile.PL 1998/06/11 22:12:51 1.46
@@ -129,6 +129,7 @@
$PERL_TRACE = 0;
$ALL_HOOKS = 0;
$APACHE_SRC = "";
+$APACHE_PREFIX = "";
$APACHE_HEADER_INSTALL = 1;
$PERL_SECTIONS = 0;
$PERL_SSI = 0;
@@ -150,7 +151,7 @@
};

my @mp_args =
- qw(EVERYTHING DO_HTTPD NO_HTTPD CONFIG ADD_MODULE
+ qw(EVERYTHING DO_HTTPD NO_HTTPD CONFIG ADD_MODULE APACHE_PREFIX
USE_APACI USE_DSO USE_APXS WITH_APXS APACI_ARGS PREP_HTTPD
ALL_HOOKS ADD_VERSION STATIC DYNAMIC PORT);

@@ -222,7 +223,12 @@
$USE_APACI = 1 if $USE_DSO;

if($USE_APXS) {
- $WITH_APXS = $USE_APXS if -e $USE_APXS;
+ if(-e $USE_APXS and !(-d _)) {
+ $WITH_APXS = $USE_APXS;
+ }
+ elsif($USE_APXS and $APACHE_PREFIX) {
+ $WITH_APXS = "$APACHE_PREFIX/sbin/apxs";
+ }
print "Will configure via APXS";
print " (apxs=$WITH_APXS)" if $WITH_APXS;
print "\n";
@@ -729,6 +735,9 @@
if($APACI_ARGS) {
$cmd .= " " . join " ", split(',', $APACI_ARGS);
}
+ if($APACHE_PREFIX and $APACI_ARGS !~ /--prefix=/) {
+ $cmd .= " --prefix=$APACHE_PREFIX";
+ }
print "(cd $APACHE_ROOT && $cmd)\n";
system "(cd $APACHE_ROOT && $cmd)";
}
@@ -951,15 +960,25 @@
sub MY::install {
my $self = shift;
my $string = $self->MM::install;
- return $string unless $USE_APXS;
- $string =~ s/(pure_install\s+)(.*)/$1 apxs_install $2/;
+ my $add = "";
+ if($USE_APXS) {
+ $add = "apxs_install";
+ }
+ elsif($USE_APACI) {
+ if($APACI_ARGS =~ /--prefix=/ or $APACHE_PREFIX) {
+ $add = "apaci_install";
+ }
+ }
+ if($add and !$NO_HTTPD and !$PREP_HTTPD) {
+ $string =~ s/(pure_install\s+)(.*)/$1 $add $2/;
+ }
return $string;
}

sub MY::top_targets {
my $self = shift;
my $string = $self->MM::top_targets;
- return $string unless $USE_APXS or $APACHE_SRC;
+ return $string unless $USE_APXS or $USE_APACI or $APACHE_SRC;

if($USE_APACI and !$PREP_HTTPD) {
$string =~ s/(pure_all\s+::\s+)(.*)/$1 apaci_httpd $2/;
@@ -990,6 +1009,9 @@

apaci_httpd:
(cd $(APACHE_ROOT) && $(MAKE))
+
+apaci_install:
+ (cd $(APACHE_ROOT) && $(MAKE) install)

tar_Apache:
(cd $(INSTALLSITELIB); \