--- IO-AIO/Makefile.PL 2005/07/31 19:04:45 1.4 +++ IO-AIO/Makefile.PL 2009/07/14 00:13:36 1.20 @@ -1,10 +1,78 @@ +use v5.8.8; + use ExtUtils::MakeMaker; use Config; -require "autoconf.pm"; +if ($^O =~ /win32/i or $^O =~ /mswin/) { + + # configuration on windows is hardcoded - as always + + warn "your platform is not standards-compliant, you have to port this module first\n"; + warn "using some hardcoded config that will not work on your system\n"; + + $INC = "-I/Perl/lib/CORE -I/sdk/include -I/vc98/include -I/gtk/include -I/gtk/include/pango-1.0 -I/gtk/include/glib-2.0 -I/gtk/lib/glib-2.0/include/ -I/gtk/include/freetype2"; + $LIBS = ["-L/gtk/lib -lpthreadVC2"]; + +} else { + + $INC = ""; + $LIBS = ['-lpthread', '-lpthreads', '-lpthreadVC2', '']; + + if ($^O =~ /freebsd/i) { + print < "./configure --prefix \Q$Config{prefixexp}\E" + and exit $? >> 8; + } +} + +if ($^O =~ /linux/ && $Config{usemymalloc} eq "y") { + print <new({ dist => { @@ -12,10 +80,21 @@ COMPRESS => 'gzip -9v', SUFFIX => '.gz', }, + depend => { + "AIO.c" => "libeio/eio.h libeio/xthread.h libeio/eio.c libeio/config.h", + }, NAME => "IO::AIO", VERSION_FROM => "AIO.pm", - LIBS => ['-lpthread -lrt', '-lpthread', '-lpthreads', ''], - clean => { FILES => "autoconf/config.h autoconf/config.log autoconf/config.status" }, + INC => $INC, + LIBS => $LIBS, + EXE_FILES => ["bin/treescan"], + PM => { + 'AIO.pm' => '$(INST_LIBDIR)/AIO.pm', + }, + PREREQ_PM => { + "common::sense" => 0, + }, + clean => { FILES => "libeio/config.h libeio/config.log libeio/config.status" }, }); $mm->flush;