diff options
author | brian d foy <bdfoy@cpan.org> | 2009-09-24 15:48:33 -0500 |
---|---|---|
committer | brian d foy <bdfoy@cpan.org> | 2009-09-24 15:48:33 -0500 |
commit | 59edad4d4b63b64f330c27c861c45c3c1a58de74 (patch) | |
tree | 5a74afab05e480310d989099111a263df7818ffe | |
parent | 0656b9fc8aae5da3be28d633841446a5069846e7 (diff) | |
parent | 9d6c7f2eccef26a6d6eb46a8192949a88c6aaf8f (diff) | |
download | perl-59edad4d4b63b64f330c27c861c45c3c1a58de74.tar.gz |
Merge branch 'blead' of ssh://perl5.git.perl.org/gitroot/perl into blead
-rw-r--r-- | makedef.pl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/makedef.pl b/makedef.pl index 1b3c2b5fe5..65c2e28ee4 100644 --- a/makedef.pl +++ b/makedef.pl @@ -34,6 +34,7 @@ BEGIN { unshift @INC, "lib" } +use Config; use strict; use vars qw($PLATFORM $CCTYPE $FILETYPE $CONFIG_ARGS $ARCHNAME $PATCHLEVEL); @@ -75,7 +76,13 @@ if ($PLATFORM eq 'win32' or $PLATFORM eq 'wince' or $PLATFORM eq "aix") { # the user might have chosen to disable because the canned configs are # minimal configs that don't include any of those options. my $opts = ($PLATFORM eq 'wince' ? '-MCross' : ''); # for wince need Cross.pm to get Config.pm - my $config = `$^X $opts -Ilib -V`; + + $ENV{PERL5LIB} = join $Config{path_sep}, @INC; + my $cmd = "$^X $opts -V"; + my $config = `$cmd`; + if (! $config) { + die "Couldn't run [$cmd]: $!"; + }; my($options) = $config =~ /^ Compile-time options: (.*?)\n^ \S/ms; $options =~ s/\s+/ /g; print STDERR "Options: ($options)\n"; |