3 use ExtUtils::MakeMaker;
7 my $verbose = $ENV{IM_VERBOSE};
11 GetOptions("incpath=s", \@incpaths,
12 "libpath=s" => \@libpaths,
13 "verbose|v" => \$verbose);
17 my $MM_ver = eval $ExtUtils::MakeMaker::VERSION;
21 NAME => 'Imager::Font::T1',
22 VERSION_FROM => 'T1.pm',
23 OBJECT => 'T1.o imt1.o',
24 clean => { FILES => 'testout' },
28 if ($BUILDING_IMAGER) {
30 unshift @INC, "../lib";
34 print "T1Lib: building independently\n";
35 require Imager::ExtUtils;
36 push @inc, Imager::ExtUtils->includes;
37 $opts{TYPEMAPS} = [ Imager::ExtUtils->typemap ];
39 # Imager required configure through use
40 my @Imager_req = ( Imager => "0.80_01" );
41 if ($MM_ver >= 6.46) {
51 "Test::More" => "0.47",
55 homepage => "http://imager.perl.org/",
58 url => "git://git.imager.perl.org/imager-type1.git",
59 web => "http://git.imager.perl.org/imager-type1.git/",
71 require Imager::Probe;
77 sub { -e File::Spec->catfile($_[0], "t1lib.h") },
79 testcode => _t1_test_code(),
80 testcodeheaders => [ "stdio.h", "string.h", "t1lib.h" ],
81 incpath => \@incpaths,
82 libpath => \@libpaths,
85 my $probe_res = Imager::Probe->probe(\%probe);
87 push @inc, $probe_res->{INC};
88 $opts{LIBS} = $probe_res->{LIBS};
89 $opts{DEFINE} = $probe_res->{DEFINE};
93 $opts{AUTHOR} = 'Tony Cook <tony@imager.perl.org>';
94 $opts{ABSTRACT} = 'T1Lib font driver for Imager';
100 if ($BUILDING_IMAGER) {
101 ExtUtils::MakeMaker::WriteEmptyMakefile(%opts);
105 die "OS unsupported: T1Lib headers/libraries not found\n";
112 if (T1_InitLib(IGNORE_CONFIGFILE|IGNORE_FONTDATABASE) == NULL) {
113 fprintf(stderr, "T1Lib: Cannot initialize\n");