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.81" );
42 if ($MM_ver >= 6.46) {
52 "Test::More" => "0.47",
56 homepage => "http://imager.perl.org/",
59 url => "git://git.imager.perl.org/imager-type1.git",
60 web => "http://git.imager.perl.org/imager-type1.git/",
72 require Imager::Probe;
78 sub { -e File::Spec->catfile($_[0], "t1lib.h") },
80 testcode => _t1_test_code(),
81 testcodeheaders => [ "stdio.h", "string.h", "t1lib.h" ],
82 incpath => \@incpaths,
83 libpath => \@libpaths,
86 my $probe_res = Imager::Probe->probe(\%probe);
90 push @inc, $probe_res->{INC};
91 $opts{LIBS} = $probe_res->{LIBS};
92 $opts{DEFINE} = $probe_res->{DEFINE};
96 $opts{AUTHOR} = 'Tony Cook <tonyc@cpan.org>';
97 $opts{ABSTRACT} = 'T1Lib font driver for Imager';
100 WriteMakefile(%opts);
103 $IMAGER_LIBS{T1} = 0;
105 if ($BUILDING_IMAGER) {
106 ExtUtils::MakeMaker::WriteEmptyMakefile(%opts);
110 die "OS unsupported: T1Lib headers/libraries not found\n";
117 if (T1_InitLib(IGNORE_CONFIGFILE|IGNORE_FONTDATABASE) == NULL) {
118 fprintf(stderr, "T1Lib: Cannot initialize\n");