You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.4 KiB

  1. --- a/lib/Inline/C.pm
  2. +++ b/lib/Inline/C.pm
  3. @@ -457,22 +457,28 @@ sub get_maps {
  4. print STDERR "get_maps Stage\n" if $o->{CONFIG}{BUILD_NOISY};
  5. my $typemap = '';
  6. my $file;
  7. - $file = File::Spec->catfile(
  8. - $Config::Config{installprivlib},
  9. - "ExtUtils",
  10. - "typemap",
  11. - );
  12. - $typemap = $file if -f $file;
  13. - $file = File::Spec->catfile(
  14. - $Config::Config{privlibexp}
  15. - ,"ExtUtils","typemap"
  16. - );
  17. - $typemap = $file
  18. - if (not $typemap and -f $file);
  19. - warn "Can't find the default system typemap file"
  20. - if (not $typemap and $^W);
  21. +
  22. + unless ($ENV{'_INLINE_C_SYSTEM_TYPEMAP_'}) {
  23. + $file = File::Spec->catfile(
  24. + $Config::Config{installprivlib},
  25. + "ExtUtils",
  26. + "typemap",
  27. + );
  28. + $typemap = $file if -f $file;
  29. + $file = File::Spec->catfile(
  30. + $Config::Config{privlibexp}
  31. + ,"ExtUtils","typemap"
  32. + );
  33. + $typemap = $file
  34. + if (not $typemap and -f $file);
  35. + warn "Can't find the default system typemap file"
  36. + if (not $typemap and $^W);
  37. - unshift(@{$o->{ILSM}{MAKEFILE}{TYPEMAPS}}, $typemap) if $typemap;
  38. + unshift(@{$o->{ILSM}{MAKEFILE}{TYPEMAPS}}, $typemap) if $typemap;
  39. + }
  40. + else {
  41. + unshift(@{$o->{ILSM}{MAKEFILE}{TYPEMAPS}}, $ENV{'_INLINE_C_SYSTEM_TYPEMAP_'});
  42. + }
  43. if (not $o->UNTAINT) {
  44. require FindBin;