3 use ExtUtils::MakeMaker;
7 my $verbose = $ENV{IM_VERBOSE};
11 GetOptions("incpath=s", \@incpaths,
12 "libpath=s" => \@libpaths,
13 "verbose|v" => \$verbose);
18 my $MM_ver = eval $ExtUtils::MakeMaker::VERSION;
22 NAME => 'Imager::Font::T1',
23 VERSION_FROM => 'T1.pm',
24 OBJECT => 'T1.o imt1.o',
25 clean => { FILES => 'testout' },
29 if ($BUILDING_IMAGER) {
31 unshift @INC, "../lib";
35 print "T1Lib: building independently\n";
36 require Imager::ExtUtils;
37 push @inc, Imager::ExtUtils->includes;
38 $opts{TYPEMAPS} = [ Imager::ExtUtils->typemap ];
40 # Imager required configure through use
41 my @Imager_req = ( Imager => "0.95" );
42 if ($MM_ver >= 6.46) {
52 "Test::More" => "0.47",
56 homepage => "http://imager.perl.org/",
57 repository => "git://git.imager.perl.org/imager.git",
58 bugtracker => "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Imager",
69 require Imager::Probe;
75 sub { -e File::Spec->catfile($_[0], "t1lib.h") },
77 testcode => _t1_test_code(),
78 testcodeheaders => [ "stdio.h", "string.h", "t1lib.h" ],
79 incpath => \@incpaths,
80 libpath => \@libpaths,
84 my $probe_res = Imager::Probe->probe(\%probe);
88 push @inc, $probe_res->{INC};
89 $opts{LIBS} = $probe_res->{LIBS};
90 $opts{DEFINE} = $probe_res->{DEFINE};
94 $opts{AUTHOR} = 'Tony Cook <tonyc@cpan.org>';
95 $opts{ABSTRACT} = 'T1Lib font driver for Imager';
101 $IMAGER_LIBS{T1} = 0;
103 if ($BUILDING_IMAGER) {
104 ExtUtils::MakeMaker::WriteEmptyMakefile(%opts);
108 die "OS unsupported: T1Lib headers/libraries not found\n";
115 if (T1_InitLib(IGNORE_CONFIGFILE|IGNORE_FONTDATABASE) == NULL) {
116 fprintf(stderr, "T1Lib: Cannot initialize\n");