Add ARM files
[dh-make-perl] / dev / arm / libio-socket-ssl-perl / libio-socket-ssl-perl-1.16 / Makefile.PL
1 #
2 # a MakeMaker script for IO::Socket::SSL (aspa@hip.fi).
3 #
4 # $Id: Makefile.PL,v 1.1 2000/07/04 10:09:57 aspa Exp $.
5 #
6
7 use 5.00503; # prior versions have problems with self-ties.
8 use ExtUtils::MakeMaker;
9
10
11 # Test to make sure that Net::SSLeay can be properly seeded!
12 unless (defined $ENV{EGD_PATH}) {
13         foreach (qw(/var/run/egd-pool /dev/egd-pool /etc/egd-pool /etc/entropy)) {
14                 if (-S) { $ENV{EGD_PATH}=$_; last }
15         }
16 }
17
18 $| = 1;
19
20 {
21         # issue warning, if Net::SSLeay cannot find random generator
22         # redefine __WARN__ only locally to allow detection of failures
23         # in PREREQ_PM
24         local $SIG{__WARN__} = sub {
25                 undef $SIG{__WARN__};
26                 my $warning      = shift;
27                 return unless $warning =~ /random/i;
28                 print "Net::SSLeay could not find a random number generator on\n";
29                 print "your system.      This will likely cause most of the tests\n";
30                 print "to fail.  Please see the README file for more information.\n";
31                 print "the message from Net::SSLeay was: $warning\n";
32
33                 # Taken from ExtUtils::MakeMaker 6.16 (Michael Schwern) so that 
34                 # the prompt() function can be emulated for older versions of ExtUtils::MakeMaker.
35                 my $isa_tty = -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT));
36                 
37                 if ($isa_tty) {
38                         print "Do you REALLY want to continue? [Default: no] ";
39                         die "User cancelled install!\n" if (<STDIN> !~ /^y(?:es)?$/);
40                 } else {
41                         die "Install cancelled.\n";
42                 }
43         };
44
45         if (! defined $ENV{SKIP_RNG_TEST}) {
46                 eval { require Net::SSLeay; $Net::SSLeay::trace=1; Net::SSLeay::randomize(); };
47                 die $@ if $@ =~ /cancelled/;
48         } else {
49                 print "Random Number Generator test skipped.\n";
50         }
51 }
52
53 # make sure that we have dualvar from the XS Version of Scalar::Util
54 if ( eval { require Scalar::Util } ) {
55         eval { Scalar::Util::dualvar( 0,'' ) };
56         if ($@) {
57                 warn "You need the XS Version of Scalar::Util for dualvar() support";
58                 exit(0);
59         }
60 }
61
62 # check if we have something which handles IDN
63 if ( ! eval { require Net::IDN::Encode } and ! eval { require Net::LibIDN }) {
64         warn <<'EOM';
65
66 WARNING
67 No library for handling international domain names found.
68 It will work but croak if you try to verify an international name against
69 a certificate.
70 It's recommended to install either Net::IDN::Encode or Net::LibIDN
71
72 EOM
73 }
74
75 # check Version
76 if ( eval { require Net::SSLeay } and $Net::SSLeay::VERSION <1.33 ) {
77         warn <<"EOM";
78
79 WARNING
80 You have version $Net::SSLeay::VERSION of Net::SSLeay.
81 Support for subjectAltNames in certificates is only available in Version >=1.33
82 so verifying a hostname against the certificate will not work.
83 It is recommended to upgrade to a current Net::SSLeay.
84
85 EOM
86 }
87
88 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
89 # the contents of the Makefile that is written.
90 WriteMakefile(
91         'NAME' => 'IO::Socket::SSL',
92         'AUTHOR' => 'Steffen Ullrich & Peter Behroozi & Marko Asplund',
93         'ABSTRACT' => 'Nearly transparent SSL encapsulation for IO::Socket::INET.',
94         'VERSION_FROM' => 'SSL.pm',
95         'DISTNAME' => 'IO-Socket-SSL',
96         'PREREQ_PM' => { 'Net::SSLeay' => 1.21, 'Scalar::Util' => 0 },
97         'dist' => { COMPRESS => 'gzip', SUFFIX => 'gz', },
98         'NO_META' => 1,
99 );