1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
if ($^O =~ /win32/i) {
PDL::Core::Dev->import();
warn "Win32 systems not yet supported. Will not build PDL::IO::Browser";
write_dummy_make(unsupported('PDL::IO::Browser','win32'));
return;
}
# Makefile.PL for PDL::IO module.
# Use this as a template for the Makefile.PL for
# any external PDL module.
use ExtUtils::MakeMaker;
PDL::Core::Dev->import();
@pack = (["browser.pd",Browser,PDL::IO::Browser]);
%hash = pdlpp_stdargs_int(@::pack);
push @{$hash{LIBS}} , '-lcurses';
$hash{'OBJECT'} .= ' browse$(OBJ_EXT)';
$hash{'clean'}{FILES} .= ' browse$(OBJ_EXT)';
unshift @{$hash{LIBS}} , '-lncurses'; # For some systems
# Find the relevant file to include
@idirs = ('/usr/include', '/usr/local/include');
@curses = ('curses','ncurses');
@curses = reverse @curses if $^O eq 'freebsd';
CURSES:
foreach $c (@curses) {
foreach $d (@idirs) {
if (-e "$d/$c.h") {
my $x = uc $c;
$hash{DEFINE} .= " -D$x";
last CURSES;
}
}
}
WriteMakefile(%hash);
# Add genpp rule
sub MY::postamble { pdlpp_postamble_int(@::pack); }
|