use ExtUtils::MakeMaker qw(prompt WriteMakefile); require 5.6.0; unless (@ARGV) { warn "\nNOTICE: This module requires libgd 2.0.12 or higher.\n"; warn " it will NOT work with earlier versions.\n"; warn " See www.cpan.org for versions of GD that are compatible\n"; warn " with earlier versions of libgd.\n"; warn "\n"; warn " If you are using Math::Trig 1.01 or lower, it has a bug that\n"; warn " causes a \"prerequisite not found\" warning to be issued. You may\n"; warn " safely ignore this warning.\n"; warn "\n"; warn "Type perl Makefile.PL -h for command-line option summary\n"; } # =====> PATHS: CHECK AND ADJUST <===== my @INC = qw(-I/usr/local/include -I/usr/local/include/gd); my @LIBPATH = qw(-L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/local/lib); my @LIBS = qw(-lgd -lpng -lz); ############################################################################################# # Build options passed in to script to support reproducible builds via Makefiles ############################################################################################# use Getopt::Long; my $result = GetOptions("options=s" => \$options, "lib_gd_path=s" => \$lib_gd_path, "lib_ft_path=s" => \$lib_ft_path, "lib_png_path=s" => \$lib_png_path, "lib_jpeg_path=s" => \$lib_jpeg_path, "lib_xpm_path=s" => \$lib_xpm_path, "lib_zlib_path=s" => \$lib_zlib_path, ); unless ($result) { print STDERR < 'GD', 'VERSION_FROM' => 'GD.pm', 'PREREQ_PM' => { 'Math::Trig' => 0, }, 'dist' => {'COMPRESS'=>'gzip -9f', 'SUFFIX' => 'gz', 'ZIP'=>'/usr/bin/zip','ZIPFLAGS'=>'-rl'}, 'LIBS' => [join(' ',$ENV{'GD_LIBS'},@LIBPATH,@LIBS)], 'INC' => join(' ',$ENV{'GD_INC'},@INC), 'AUTHOR' => 'Lincoln Stein (lstein@cshl.org)', 'ABSTRACT' => 'Interface to Gd Graphics Library', $CAPI ? ('CAPI' => 'TRUE') : (), 'DEFINE' => $DEFINES, ); sub MY::postamble { my $postamble = <<'END'; html: GD.pm pod2html --outfile=GD.html GD.pm END $postamble; }