summaryrefslogtreecommitdiff
path: root/cpan/dist/Socket6/Makefile.PL
diff options
context:
space:
mode:
authorfukachan <fukachan>2018-01-13 08:04:28 +0000
committerfukachan <fukachan>2018-01-13 08:04:28 +0000
commit390e3236a188925be11b39d3b081920eef68e374 (patch)
tree0e3866735bae8b62389be87cab89d4ba4e6d2751 /cpan/dist/Socket6/Makefile.PL
parent19c1447a792ddd625cb519967da942002c174346 (diff)
downloadfml8-Socket6-0-28.tar.gz
fml8-Socket6-0-28.tar.bz2
fml8-Socket6-0-28.zip
import Socket6-0.28Socket6-0-28
Diffstat (limited to 'cpan/dist/Socket6/Makefile.PL')
-rw-r--r--cpan/dist/Socket6/Makefile.PL28
1 files changed, 22 insertions, 6 deletions
diff --git a/cpan/dist/Socket6/Makefile.PL b/cpan/dist/Socket6/Makefile.PL
index 9547afc3..73558dba 100644
--- a/cpan/dist/Socket6/Makefile.PL
+++ b/cpan/dist/Socket6/Makefile.PL
@@ -1,4 +1,4 @@
-# Copyright (C) 2000-2008 Hajimu UMEMOTO <ume@mahoroba.org>.
+# Copyright (C) 2000-2016 Hajimu UMEMOTO <ume@mahoroba.org>.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -25,15 +25,30 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
-# $Id: Makefile.PL,v 1.8 2008/11/01 19:01:10 ume Exp $
+# $Id: Makefile.PL 659 2016-03-17 06:20:36Z ume $
+use Config;
use ExtUtils::MakeMaker;
if ($^O eq 'MSWin32') {
configure_mswin32();
} else {
+ local $ENV{TMPDIR} = $ENV{TMPDIR};
my $path_perl = ($^X =~ m!^/!o) ? $^X : `which $^X`;
- my $cmd = './configure';
+ my $cmd = "CC='$Config{cc}' CFLAGS='$Config{ccflags}'";
+ if ($^O eq 'android') {
+ # Work around a bug in Android's sh:
+ # http://stackoverflow.com/questions/15283220/android-shell-eof
+ $ENV{TMPDIR} ||= File::Spec->tmpdir();
+
+ # /bin/sh doesn't exist on Android, point it to the right
+ # location for sh
+ $cmd .= " CONFIG_SHELL='$Config{sh}'";
+
+ # Call './configure' as 'sh ./configure'
+ $cmd .= " $Config{sh}";
+ }
+ $cmd .= " ./configure";
$cmd .= " --with-perl=$path_perl" if ($path_perl);
system($cmd);
}
@@ -43,7 +58,6 @@ require './config.pl';
WriteMakefile(
NAME => 'Socket6',
VERSION_FROM => 'Socket6.pm',
- MAN3PODS => {}, # Pods will be built by installman.
XSPROTOARG => '-noprototypes', # XXX remove later?
PM => {'Socket6.pm' => '$(INST_LIBDIR)/Socket6.pm'},
CONFIGURE => sub { { CC => "${cc}" } },
@@ -53,8 +67,6 @@ WriteMakefile(
sub configure_mswin32
{
- require Config;
-
open(IN, '<config.pl.in') || die "Failed to open file 'config.pl.in' [$!]";
open(OUT, '>config.pl') || die "Failed to open file 'config.pl' [$!]";
@@ -74,6 +86,10 @@ sub configure_mswin32
open(IN, '<config.h.in') || die "Failed to open file 'config.h.in' [$!]";
open(OUT, '>config.h') || die "Failed to open file 'config.h' [$!]";
+ print(OUT "#ifndef NTDDI_LONGHORN\n");
+ print(OUT "# define NTDDI_LONGHORN 0x06000000\n");
+ print(OUT "#endif\n");
+
while (<IN>) {
if (/HAVE_PL_SV_UNDEF/) {
print(OUT "#define HAVE_PL_SV_UNDEF 1\n");