--- IO-AIO/Makefile.PL 2013/04/14 09:43:18 1.29 +++ IO-AIO/Makefile.PL 2018/08/14 14:03:15 1.37 @@ -1,4 +1,4 @@ -use 5.008002; +use Canary::Stability IO::AIO => 1, 5.008002; use ExtUtils::MakeMaker; @@ -11,23 +11,23 @@ *** *** Your platform is not standards compliant. To get this module working, you need to -*** download and install win32 pthread (http://sourceware.org/pthreads-win32/) -*** in /gtk/{lib,include} -*** also, the windows SDK is expected to be installed in /sdk -*** and visual C is expected to be installed in /vc98 -*** -*** Akternatively, set the INC and LIBS environment variables -*** accordingly before running Makefile.PL, or you can -*** pass INC and LIBS arguments to Makefile.PL itself. +*** download and install win32 pthread (http://sourceware.org/pthreads-win32/). *** EOF - $INC = "$ENV{INC} -I/sdk/include -I/vc98/include -I/gtk/include"; - $LIBS = ["$ENV{LIBS} -L/gtk/lib -lpthreadVC2"]; + if(0){ + if ($Config{cc} =~ /(?:^|\\|\/)gcc(?:|.*\.exe)$/) { + $INC = "$ENV{INC} -I/gtk/include"; + $LIBS = ["$ENV{LIBS} -L/gtk/lib -lpthreadGC2"]; + } else { + $INC = "$ENV{INC} -I/sdk/include -I/vc98/include -I/gtk/include"; + $LIBS = ["$ENV{LIBS} -L/gtk/lib -lpthreadVC2"]; + } + } - open my $fh, ">libeio/config.h" - or die "libeio/config.h: $!"; + open my $fh, ">config.h" + or die "config.h: $!"; print $fh < "./configure --prefix \Q$Config{prefixexp}\E" and exit $? >> 8; @@ -95,7 +96,7 @@ SUFFIX => '.gz', }, depend => { - "AIO.c" => "schmorp.h libeio/eio.h libeio/xthread.h libeio/etp.c libeio/eio.c libeio/config.h", + "AIO.c" => "schmorp.h libeio/eio.h libeio/xthread.h libeio/etp.c libeio/eio.c config.h", }, NAME => "IO::AIO", VERSION_FROM => "AIO.pm", @@ -103,12 +104,13 @@ LIBS => $LIBS, EXE_FILES => ["bin/treescan"], PM => { - 'AIO.pm' => '$(INST_LIBDIR)/AIO.pm', + 'AIO.pm' => '$(INST_LIB)/IO/AIO.pm', }, + CONFIGURE_REQUIRES => { ExtUtils::MakeMaker => 6.52, Canary::Stability => 2001 }, PREREQ_PM => { "common::sense" => 0, }, - clean => { FILES => "libeio/config.h libeio/config.log libeio/config.status" }, + clean => { FILES => "config.h libeio/config.h libeio/config.log libeio/config.status" }, }); $mm->flush;