Hello, it's me again trying to be useful :)
The following patch fixes 3 issues:
1. Fix a warning triggered by `ln` on Cygwin, when running
perl Makefile.PL for a second time without previously running make clean.
2. Show MP_APU_CONFIG as an argument to Makefile.PL in the Usage menu.
3. When compiling a static mod_perl and MP_AP_CONFIGURE="--with-apr=/some/path" 
argument is given, Apache will use the apr-config at the given path, but 
mod_perl will use the default at "srclib/apr/.libs".
This should be fixed now.


Index: lib/ModPerl/BuildOptions.pm
===================================================================
--- lib/ModPerl/BuildOptions.pm (revision 169299)
+++ lib/ModPerl/BuildOptions.pm (working copy)
@@ -233,6 +233,7 @@
 AP_PREFIX      0    Apache installation or source tree prefix
 AP_CONFIGURE   0    Apache ./configure arguments
 APR_CONFIG     0    Path to apr-config
+APU_CONFIG     0    Path to apu-config
 XS_GLUE_DIR    1    Directories containing extension glue
 INCLUDE_DIR    1    Add directories to search for header files
 GENERATE_XS    0    Generate XS code based on httpd version
Index: lib/Apache2/Build.pm
===================================================================
--- lib/Apache2/Build.pm        (revision 169299)
+++ lib/Apache2/Build.pm        (working copy)
@@ -1110,6 +1110,18 @@
                 push @tries, grep -d $_,
                     map catdir($base, "srclib", $_), qw(apr apr-util);
             }
+
+            # Check for MP_AP_CONFIGURE="--with-apr[-util]=DIR|FILE"
+            my $what_long = ($what eq 'apu') ? 'apr-util' : 'apr';
+            if($self->{MP_AP_CONFIGURE} =~ /--with-${what_long}=(\S+)/) {
+                my $dir = $1;
+                unless (-d $dir) {
+                    $dir =~ s/$config$//;
+                }
+
+                push @tries,
+                    grep -d $_, $dir, catdir($dir, 'bin');
+            }
         }
         else {
             push @tries, grep length,
@@ -1577,7 +1589,7 @@
     # when running make clean the real DynaLoader.a may get deleted.
     my $src = catfile $modperl_path, "$self->{MP_LIBNAME}.a";
     my $dst = catfile $modperl_path, "lib$self->{MP_LIBNAME}.a";
-    qx{ln -s $src $dst};
+    qx{ln -s $src $dst} unless -e $dst;
     qx{cp $dyna_filepath $modperl_path/libDynaLoader.a};
 
     $modperl_static_libs_cygwin = join ' ',


-----------------------------------------------------------------
http://host.GBG.bg - лидер в Уеб Хостинг решения и регистрация на Домейн имена

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

Reply via email to