1use ExtUtils::MakeMaker;
2
3require 5.005;
4
5use Getopt::Long;
6
7my $renum;
8
9GetOptions('renumber' => \$renum);
10
11do 'util/renum.pl' if $renum;
12
13my %PREREQ_PM =
14    (
15    'List::Util'	=> 0,
16    'Scalar::Util'	=> 0,
17    'Math::Complex'	=> 0,
18    'Test::More'	=> 0
19    );
20
21if ($] >= 5.008) {
22    $PREREQ_PM{'Storable'} = '2.05';
23    $PREREQ_PM{'Safe'	 } = 0,
24}
25
26WriteMakefile(
27	      NAME            => 'Graph',
28	      VERSION_FROM    => 'lib/Graph.pm',
29	      PREREQ_PM	      => \%PREREQ_PM,
30              AUTHOR => 'Jarkko Hietaniemi <jhi@iki.fi>',
31              ($ExtUtils::MakeMaker::VERSION >= 6.3002 ?
32	       ('LICENSE'=> 'perl', ) : ()),
33	      );
34
35# Some Debian distributions have a broken List::Util (see rt.cpan.org #9568)
36eval 'require Scalar::Util; import Scalar::Util qw(weaken)';
37if ($@) {
38    die <<__EOF__;
39$@
40You do not have Scalar::Util::weaken, cannot continue, aborting.
41__EOF__
42}
43