This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
From: Ilya Zakharevich <ilya@math.ohio-state.edu>
authorJarkko Hietaniemi <jhi@iki.fi>
Mon, 13 Sep 1999 10:22:31 +0000 (10:22 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 13 Sep 1999 10:22:31 +0000 (10:22 +0000)
To: perl5-porters@perl.org (Mailing list Perl5)
Subject: [PATCH 5.005_61] MakeMaker supports uninstalled Perls
Date: Sat, 11 Sep 1999 05:31:03 -0400 (EDT)
Message-Id: <199909110931.FAA11036@monk.mps.ohio-state.edu>

From: andreas.koenig@anima.de (Andreas J. Koenig)
To: Ilya Zakharevich <ilya@math.ohio-state.edu>
Cc: perl5-porters@perl.org (Mailing list Perl5)
Subject: Re: [PATCH 5.005_61] MakeMaker supports uninstalled Perls
Date: 11 Sep 1999 15:36:26 +0200
Message-ID: <sfc906dr2n9.fsf@hohenstaufen.in-berlin.de>

p4raw-id: //depot/cfgperl@4135

lib/ExtUtils/MM_Unix.pm
lib/ExtUtils/MakeMaker.pm

index 0909cc1..5e12773 100644 (file)
@@ -1674,10 +1674,34 @@ from the perl source tree.
        }
     } else {
        # we should also consider $ENV{PERL5LIB} here
+        my $old = $self->{PERL_LIB} || $self->{PERL_ARCHLIB} || $self->{PERL_INC};
        $self->{PERL_LIB}     ||= $Config::Config{privlibexp};
        $self->{PERL_ARCHLIB} ||= $Config::Config{archlibexp};
        $self->{PERL_INC}     = $self->catdir("$self->{PERL_ARCHLIB}","CORE"); # wild guess for now
        my $perl_h;
+
+       if (not -f ($perl_h = $self->catfile($self->{PERL_INC},"perl.h"))
+           and not $old){
+           # Maybe somebody tries to build an extension with an
+           # uninstalled Perl outside of Perl build tree
+           my $found;
+           for my $dir (@INC) {
+             $found = $dir, last if -e $self->catdir($dir, "Config.pm");
+           }
+           if ($found) {
+             my $inc = dirname $found;
+             if (-e $self->catdir($inc, "perl.h")) {
+               $self->{PERL_LIB}          = $found;
+               $self->{PERL_ARCHLIB}      = $found;
+               $self->{PERL_INC}          = $inc;
+               $self->{UNINSTALLED_PERL}  = 1;
+               print STDOUT <<EOP;
+... Detected uninstalled Perl.  Trying to continue.
+EOP
+             }
+           }
+       }
+       
        unless (-f ($perl_h = $self->catfile($self->{PERL_INC},"perl.h"))){
            die qq{
 Error: Unable to locate installed Perl libraries or Perl source code.
@@ -2556,6 +2580,10 @@ sub manifypods {
        $pod2man_exe = $self->catfile($Config{scriptdirexp},'pod2man');
     }
     unless ($pod2man_exe = $self->perl_script($pod2man_exe)) {
+      # Maybe a build by uninstalled Perl?
+      $pod2man_exe = $self->catfile($self->{PERL_INC}, "pod", "pod2man");
+    }
+    unless ($pod2man_exe = $self->perl_script($pod2man_exe)) {
        # No pod2man but some MAN3PODS to be installed
        print <<END;
 
index 6318d0e..0f00e39 100644 (file)
@@ -482,7 +482,7 @@ sub ExtUtils::MakeMaker::new {
            else {
                $pthinks =~ s!/Config\.pm$!!; $pthinks =~ s!.*/!!;
            }
-           print STDOUT <<END;
+           print STDOUT <<END unless $self->{UNINSTALLED_PERL};
 Your perl and your Config.pm seem to have different ideas about the architecture
 they are running on.
 Perl thinks: [$pthinks]