use ExtUtils::MakeMaker; use 5.006; use Config; $DEFINE = ""; $DEFINE .= " -DHAVE_MMAP" if $Config{d_mmap} eq "define" && $Config{d_munmap} eq "define"; if ($^O =~ /windows/) { # nop, autodetected } elsif (-e "/usr/include/ucontext.h") { $DEFINE .= " -DHAVE_UCONTEXT_H"; # lame } else { $DEFINE .= " -DHAVE_SETJMP_H -DHAVE_SIGALTSTACK"; # well } print < "Coro::State", VERSION_FROM => "State.pm", DEFINE => $DEFINE, DIR => [], );