summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorAndrew Dunstan2011-11-26 20:22:32 +0000
committerAndrew Dunstan2011-11-26 20:22:32 +0000
commitba00ab0b111a0cbbac612e8ea8b0d5f96534102e (patch)
tree6fe685d377755e73917fc39ee05eb1050b2e5da9 /src/tools
parent5966bcecf6167f2921e614e66499fa4d2c195c64 (diff)
Use the preferred version of xsubpp, not necessarily the one that came with the
distro version of perl. David Wheeler and Alex Hunsaker. Backpatch to 9.1 where it applies cleanly. A simple workaround is available for earlier branches, and further effort doesn't seem warranted.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/msvc/Mkvcbuild.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index e2ae0a15781..e9e8f2fe7b1 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
@@ -13,6 +13,8 @@ use Project;
use Solution;
use Cwd;
use File::Copy;
+use Config;
+use List::Util qw(first);
use Exporter;
our (@ISA, @EXPORT_OK);
@@ -106,11 +108,12 @@ sub mkvcbuild
(my $xsc = $xs) =~ s/\.xs/.c/;
if (Solution::IsNewer("$plperlsrc$xsc","$plperlsrc$xs"))
{
+ my $xsubppdir = first { -e "$_\\ExtUtils\\xsubpp.BAT" } @INC;
print "Building $plperlsrc$xsc...\n";
system( $solution->{options}->{perl}
. '/bin/perl '
. $solution->{options}->{perl}
- . '/lib/ExtUtils/xsubpp -typemap '
+ . "$xsubppdir/ExtUtils/xsubpp -typemap "
. $solution->{options}->{perl}
. '/lib/ExtUtils/typemap '
. "$plperlsrc$xs "