]> git.imager.perl.org - imager.git/blobdiff - Makefile.PL
- the image resulting from a crop is now the same type as the
[imager.git] / Makefile.PL
index 8b61d14740191fcc22506772630029adb5f51153..d955c2fe8631eaa7413f74240f2171b87d5a63b1 100644 (file)
@@ -1,4 +1,4 @@
-
+#!perl -w
 use ExtUtils::MakeMaker;
 use Cwd;
 use Config;
@@ -21,6 +21,7 @@ $aext=$Config{'_a'};
 # 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
@@ -49,8 +50,9 @@ for $frm(values %formats) {
   $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";
@@ -58,12 +60,12 @@ $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',
@@ -142,7 +144,7 @@ sub gifcheck {
   }
 
  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
@@ -236,13 +238,13 @@ sub pathcheck {
     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";
 }
 
@@ -262,8 +264,12 @@ sub pathcheck {
 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};