From 23614c1f233bf6c8f35366cee6be53ae80af0e28 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Mon, 13 Sep 1999 10:22:31 +0000 Subject: [PATCH] From: Ilya Zakharevich 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 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: p4raw-id: //depot/cfgperl@4135 --- lib/ExtUtils/MM_Unix.pm | 28 ++++++++++++++++++++++++++++ lib/ExtUtils/MakeMaker.pm | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index 0909cc1..5e12773 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -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 <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 <{UNINSTALLED_PERL}; Your perl and your Config.pm seem to have different ideas about the architecture they are running on. Perl thinks: [$pthinks] -- 2.7.4