Randy Kobes wrote:

So, the patch below keeps backwards compatibility, and
adds an INSTALL_LIB capability to 'perl Makefile.PL' to
point to where to install mod_perl.lib, if it can't
find the location in the installed Apache tree.

Sounds fair enough to me -- add the extra feature that we wanted, and just play it safe backwards-compatibility-wise.

I've test your patch (below) and it works a treat -- Perl 5.8.0 and 5.8.1, with Apache 1.3.27 / mod_perl 1.28_01-dev. Thanks!

There is one other installation oddity that I've noticed for a while now (it's not new), but never had time to look at properly. I find that running

perl Makefile.PL APACHE_SRC=C:/apache EAPI

(where C:/apache is my Apache installation directory) puts a 4kB file called "perl" into C:/apache/modules. It looks like this is the typemap file from the mp1 build tree's "Apache" sub-directory, which also gets copied into src/modules/perl.

I think it is Makefile.PL's setup_for_static() that copies it there. Why does it do that? We don't need it there do we?

- Steve

================================================================
Index: Makefile.PL
===================================================================
RCS file: /home/cvs/modperl/Makefile.PL,v
retrieving revision 1.216
diff -u -r1.216 Makefile.PL
--- Makefile.PL 19 Aug 2003 05:07:44 -0000      1.216
+++ Makefile.PL 25 Sep 2003 23:57:45 -0000
@@ -330,7 +330,8 @@

my $vcpp = ($Config{cc} =~ /^cl(\.exe)?$/);
my %win32_args;
-my %win32_accept = map {$_ => 1} qw(APACHE_SRC INSTALL_DLL DEBUG EAPI);
+my %win32_accept = map {$_ => 1}
+    qw(APACHE_SRC INSTALL_DLL INSTALL_LIB DEBUG EAPI);

while($_ = shift) {
    ($k,$v) = split /=/, $_, 2;
@@ -375,6 +376,10 @@
    my $w32_ap_mod = $fixed_apsrc . '/modules';
    $win32_args{INSTALL_DLL} = $w32_ap_mod if -d $w32_ap_mod;
  }
+  unless ($win32_args{INSTALL_LIB}) {
+    my $w32_ap_lib = $fixed_apsrc . '/libexec';
+    $win32_args{INSTALL_LIB} = $w32_ap_lib if -d $w32_ap_lib;
+  }
}

my %very_experimental = map {$_,1}
@@ -1341,7 +1346,8 @@
    if($USE_APXS) {
        $add = "apxs_install";
    }
-    elsif ($win32_auto and $win32_args{INSTALL_DLL}) {
+    elsif ($win32_auto and
+           ($win32_args{INSTALL_DLL} or $win32_args{INSTALL_LIB})) {
      $add = 'amp_install';
    }
    elsif($USE_APACI) {
@@ -1372,12 +1378,11 @@
        $win32_args{INSTALL_DLL} .
          ($win32_args{APACHE_VERS} < 1315 ?
           '/ApacheModulePerl.dll' : '/mod_perl.so');
-        if (-d "$win32_args{APACHE_SRC}/libexec") {
-          my $libexec = win32_fix_path($win32_args{APACHE_SRC}) . '/libexec';
-          $string .= sprintf qq{\n\t\$(CP) "%s" "%s"},
-            "$win32_path{MODPERL_LIB}/mod_perl.lib",
-              $libexec . '/mod_perl.lib';
-        }
+      }
+      if ($win32_args{INSTALL_LIB}) {
+        $string .= sprintf qq{\n\t\$(CP) "%s" "%s"},
+          "$win32_path{MODPERL_LIB}/mod_perl.lib",
+            $win32_args{INSTALL_LIB} . '/mod_perl.lib';
      }
      return $string;
    }
@@ -2155,7 +2160,7 @@

  if ($win32_args{INSTALL_DLL} ) {
    $win32_args{INSTALL_DLL} =
-       win32_fix_path($win32_args{INSTALL_DLL});
+      win32_fix_path($win32_args{INSTALL_DLL});
    unless ( -d $win32_args{INSTALL_DLL}) {
      my @dirs = grep {-d}
        ('\Program Files\Apache Group\Apache\modules',
@@ -2170,6 +2175,28 @@

****  The Apache/modules directory was not found.    *******
****      Please install mod_perl.so manually.       *******
+
+END
+      }
+    }
+  }
+  if ($win32_args{INSTALL_LIB} ) {
+    $win32_args{INSTALL_LIB} =
+      win32_fix_path($win32_args{INSTALL_LIB});
+    unless ( -d $win32_args{INSTALL_LIB}) {
+      my @dirs = grep {-d}
+       ('\Program Files\Apache Group\Apache\libexec',
+        '\Apache\libexec', '\Program Files\Apache\libexec');
+      $win32_args{INSTALL_LIB} = find_dir([EMAIL PROTECTED], 'Apache/libexec');
+      if ($win32_args{INSTALL_LIB} and -d $win32_args{INSTALL_LIB}) {
+       $win32_args{INSTALL_LIB} =
+         win32_fix_path($win32_args{INSTALL_LIB});
+      }
+      else {
+       print <<'END';
+
+****  The Apache/libexec directory was not found.    *******
+****      Please install mod_perl.lib manually.       *******

END
      }
Index: INSTALL.win32
===================================================================
RCS file: /home/cvs/modperl/INSTALL.win32,v
retrieving revision 1.10
diff -u -r1.10 INSTALL.win32
--- INSTALL.win32       6 Jul 2003 13:42:56 -0000       1.10
+++ INSTALL.win32       25 Sep 2003 23:57:45 -0000
@@ -131,6 +131,12 @@
(eg, \Apache\modules). If not given, a value of APACHE_SRC\modules
will be used, if this directory exists.

+=item INSTALL_LIB
+
+This gives the location of where to install mod_perl.lib
+(eg, \Apache\libexec). If not given, a value of APACHE_SRC\libexec
+will be used, if this directory exists.
+
=item DEBUG

If true (DEBUG=1), a Debug version will be built (this assumes
===================================================================





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to