]> sipb.mit.edu Git - ikiwiki.git/blobdiff - pm_filter
Merge branch 'master' of git://git.ikiwiki.info
[ikiwiki.git] / pm_filter
index 98cb5bd9ef930f5bb55d4efd4b27ea015fa987ae..5ee5a1b9890d8b2b60ae67686aa1f841a7531d01 100755 (executable)
--- a/pm_filter
+++ b/pm_filter
@@ -13,7 +13,12 @@ elsif (/VERSION_AUTOREPLACE/) {
        $_=qq{our \$version="$ver";};
 }
 elsif (/^use lib/) {
-       if (grep { $_ eq $libdir } @INC) {
+       # The idea here is to figure out if the libdir the Makefile.PL
+       # was configure to use is in perl's normal search path.
+       # If not, hard code it into ikiwiki.
+       if ((grep { $_ eq $libdir } @INC) &&
+            (! exists $ENV{PERL5LIB} || ! length $ENV{PERL5LIB} ||
+            $ENV{PERL5LIB} ne $libdir)) {
                $_="";
        }
        else {