-
+#!perl -w
use ExtUtils::MakeMaker;
use Cwd;
use Config;
# IM_CFLAGS Extra flags to pass to the compiler
# IM_LFLAGS Extra flags to pass to the linker
# IM_DFLAGS Extra flags to pass to the preprocessor
+# IM_SUPPRESS_PROMPT Suppress the prompt asking about gif support
getenv(); # get environment variables
$F_OBJECT .= ' ' .$frm->{objfiles};
}
-$F_INC = join(" ",map { (exists $definc{$_})?'':'-I'.$_ } @incs);
-$F_LIBS = join(" ",map { '-L'.$_ } @libs).' '.$F_LIBS;
+$F_INC = join ' ', map "-I$_", map / / ? qq{"$_"} : $_,
+ grep !exists $definc{$_}, @incs;
+$F_LIBS = join(' ',map "-L$_", map / / ? qq{"$_"} : $_, @libs) . $F_LIBS;
$OSLIBS = '';
$OSDEF = "-DOS_$^O";
if ($^O eq 'hpux') { $OSLIBS .= ' -ldld'; }
if (defined $Config{'d_dlsymun'}) { $OSDEF .= ' -DDLSYMUN'; }
-@objs = qw(Imager.o draw.o image.o io.o iolayer.o log.o
- gaussian.o conv.o pnm.o raw.o feat.o font.o
+@objs = qw(Imager.o draw.o polygon.o image.o io.o iolayer.o
+ log.o gaussian.o conv.o pnm.o raw.o feat.o font.o
filters.o dynaload.o stackmach.o datatypes.o
regmach.o trans2.o quant.o error.o convert.o
map.o tags.o palimg.o maskimg.o img16.o rotate.o
- bmp.o color.o);
+ bmp.o tga.o rgb.o color.o fills.o imgdouble.o);
%opts=(
'NAME' => 'Imager',
}
RETR:
- if ($formats{'gif'} or $formats{'ungif'}) {
+ if (($formats{'gif'} or $formats{'ungif'}) && !$ENV{IM_SUPPRESS_PROMPT}) {
print <<EOFF;
You have libgif or libungif installed. They are both known to have
print " Include paths:\n";
for (@incs) { print $_,"\n"; }
}
- @incs=grep { -d $_ && -r _ && -x _ or ( print(" $_ doesnt exist or is unaccessible - removed."),0) } @incs;
+ @incs=grep { -d $_ && -r _ && -x _ or ( print(" $_ doesnt exist or is unaccessible - removed.\n"),0) } @incs;
if ($VERBOSE) {
print "\nLibrary paths:\n";
for (@incs) { print $_,"\n"; }
}
- @libs=grep { -d $_ && -r _ && -x _ or ( print(" $_ doesnt exist or is unaccessible - removed."),0) } @libs;
+ @libs=grep { -d $_ && -r _ && -x _ or ( print(" $_ doesnt exist or is unaccessible - removed.\n"),0) } @libs;
print "\ndone.\n";
}
sub init {
@definc{'/usr/include'}=();
- @incs=(qw(/usr/include /usr/local/include /usr/include/freetype /usr/local/include/freetype /usr/include/freetype2 /usr/local/include/freetype2), split /:/, $INCPATH );
- @libs=(split(/ /, $Config{'libpth'}), split(/:/, $LIBPATH) );
+ @incs=(split(/\Q$Config{path_sep}/, $INCPATH),
+ qw(/sw/include /usr/include/freetype2 /usr/local/include/freetype2
+ /usr/include /usr/local/include /usr/include/freetype
+ /usr/local/include/freetype));
+ @libs=(split(/\Q$Config{path_sep}/,$LIBPATH),
+ qw(/sw/lib), split(/ /, $Config{'libpth'}));
if ($^O =~ /win32/i && $Config{cc} =~ /\bcl\b/i) {
push(@incs, split /;/, $ENV{INCLUDE}) if exists $ENV{INCLUDE};
push(@libs, split /;/, $ENV{LIB}) if exists $ENV{LIB};