2 # a MakeMaker script for IO::Socket::SSL (aspa@hip.fi).
4 # $Id: Makefile.PL,v 1.1 2000/07/04 10:09:57 aspa Exp $.
7 use 5.00503; # prior versions have problems with self-ties.
8 use ExtUtils::MakeMaker;
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 }
21 # issue warning, if Net::SSLeay cannot find random generator
22 # redefine __WARN__ only locally to allow detection of failures
24 local $SIG{__WARN__} = sub {
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";
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));
38 print "Do you REALLY want to continue? [Default: no] ";
39 die "User cancelled install!\n" if (<STDIN> !~ /^y(?:es)?$/);
41 die "Install cancelled.\n";
45 if (! defined $ENV{SKIP_RNG_TEST}) {
46 eval { require Net::SSLeay; $Net::SSLeay::trace=1; Net::SSLeay::randomize(); };
47 die $@ if $@ =~ /cancelled/;
49 print "Random Number Generator test skipped.\n";
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,'' ) };
57 warn "You need the XS Version of Scalar::Util for dualvar() support";
62 # check if we have something which handles IDN
63 if ( ! eval { require Net::IDN::Encode } and ! eval { require Net::LibIDN }) {
67 No library for handling international domain names found.
68 It will work but croak if you try to verify an international name against
70 It's recommended to install either Net::IDN::Encode or Net::LibIDN
76 if ( eval { require Net::SSLeay } and $Net::SSLeay::VERSION <1.33 ) {
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.
88 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
89 # the contents of the Makefile that is written.
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', },