-# $Id: Makefile.PL,v 1.17 2001/08/30 22:09:21 robs Exp $
+# $Id: Makefile.PL,v 1.25 2001/09/21 16:14:11 skimo Exp $
use ExtUtils::MakeMaker;
use IO::File;
@h1 = qw(fastcgi.h fcgiapp.h fcgimisc.h fcgios.h);
@h = (@h1, 'fcgi_config.h');
@o = qw(FCGI.o);
-@dist1 = qw(LICENSE.TERMS acconfig.h configure configure.in);
+@dist1 = qw(LICENSE.TERMS configure configure.in install.sh missing
+ config.sub config.guess ltmain.sh);
@dist2 = qw(fcgiapp.c os_unix.c os_win32.c);
@dist3 = (@h1, qw(fcgi_config.h.in fcgi_config_x86.h));
GetOptions ("pure-perl!" => \$pure);
-$pure =
- (prompt("Do you want to use the pure perl implementation", "no") =~ /^y/)
- ? "1" : "0" unless defined $pure;
+$pure = "0" unless defined $pure;
open(CFG,">FCGI.cfg");
print CFG "\$pure = $pure;1;\n";
close CFG;
use File::Copy qw(copy);
# TODO: stop or save if a local file has been modified
- foreach (@dist3, @dist2) { unlink };
+ foreach (@dist1, @dist2, @dist3) { unlink };
+ foreach (@dist1) { copy("$devkit/$_", ".") || die $! };
+ foreach (@dist2) { copy("$devkit/libfcgi/$_", ".") || die $! };
foreach (@dist3) { copy("$devkit/include/$_", ".") || die $! };
- foreach (@dist2) { copy("$devkit/libfcgi/$_", ".") || die $! };
}
else {
# CPAN
} else {
if ("$sys" eq "win32") {
- @libs = (@libs) ? map { "$_ ws2_32.lib" } @libs : ('ws2_32.lib');
+ @libs = (scalar @libs)
+ ? map { "$_ :nosearch -lws2_32" } @libs
+ : (':nosearch -lws2_32');
push @extras, 'DEFINE' => '-DDLLAPI=__declspec(dllexport)';
}
$mm = MM->new({
'NAME' => 'FCGI',
- 'VERSION_FROM' => 'FCGI.PL',
+ 'VERSION_FROM' => 'version.pm',
'dist' => { 'COMPRESS' => 'gzip -9f',
'SUFFIX' => 'gz',
'PREOP' => '$(CP) '.join(' ',
print "Please read configure.readme for information on how to run it yourself\n";
$ENV{'CC'} = $Config{'cc'};
- system("./configure");
+ system("$Config{sh} configure");
}