summaryrefslogtreecommitdiff
blob: 3611479a812bc4a1faf87d8f4f337c0e0b09ed63 (plain)
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
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -13,6 +13,7 @@
 
 my ($help, $jpeg_inc, $jpeg_lib, $png_inc, $png_lib, $gif_inc, $gif_lib, $gif_lib_name);
 my ($jpeg_static, $png_static, $gif_static);
+my ($disable_jpeg, $disable_png, $disable_gif);
 
 my $DEFINES = '-O2';
 $DEFINES .= ' -Wall' unless $^O =~ /sun|solaris/i;
@@ -29,6 +30,9 @@
 
 my $result = GetOptions(
     "help|h"               => \$help,
+    "disable-jpeg"          => \$disable_jpeg,
+    "disable-png"           => \$disable_png,
+    "disable-gif"           => \$disable_gif,
     "with-jpeg-includes=s" => \$jpeg_inc,
     "with-jpeg-libs=s"     => \$jpeg_lib,
     "with-jpeg-static"     => \$jpeg_static,
@@ -75,6 +79,7 @@
 
 # Look for libjpeg
 for my $incdir ( $jpeg_inc, @check ) {
+    last if $disable_jpeg;
     if ( $incdir && -e catfile($incdir, 'jpeglib.h') ) {
         $JPEG = 1;
         $jpeg_inc = $incdir;
@@ -111,6 +116,7 @@
 
 # Look for libpng
 for my $incdir ( $png_inc, @check ) {
+    last if $disable_png;
     if ( $incdir && -e catfile($incdir, 'png.h') ) {
         $PNG = 1;
         $png_inc = $incdir;
@@ -144,6 +150,7 @@
 
 # Look for libgif
 for my $incdir ( $gif_inc, @check ) {
+    last if $disable_gif;
     if ( $incdir && -e catfile($incdir, 'gif_lib.h') ) {
         $GIF = 1;
         $gif_inc = $incdir;