1 # $Id: Makefile.PL,v 1.8 2006-05-11 16:43:40 mike Exp $
4 use ExtUtils::MakeMaker;
7 my $yazver = `yaz-config --version`;
8 my $yazinc = `yaz-config --cflags threads`;
9 my $yazlibs = `yaz-config --libs threads`;
10 if (!$yazver || !$yazinc || !$yazlibs) {
12 ERROR: Unable to call script: yaz-config
13 If you are using a YAZ installation from the Debian package "yaz", you
14 will also need to install "libyaz-dev" in order to build this module.
19 check_version($yazver, "2.0.11");
22 # $yazinc = '-Ic:\yaz\include'
23 # $yazlibs = 'c:\yaz\lib\yaz.lib'
25 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
26 # the contents of the Makefile that is written.
28 NAME => 'Net::Z3950::ZOOM',
29 VERSION_FROM => 'lib/Net/Z3950/ZOOM.pm', # finds $VERSION
30 PREREQ_PM => { "MARC::Record" => 1.38 },
31 ($] >= 5.005 ? ## Add these new keywords supported since 5.005
32 (ABSTRACT_FROM => 'lib/Net/Z3950/ZOOM.pm', # retrieve abstract from module
33 AUTHOR => 'Mike Taylor <mike@>') : ()),
34 LIBS => [ $yazlibs ], # e.g., '-lm'
35 DEFINE => '', # e.g., '-DHAVE_SOMETHING'
36 # Insert -I. if you add *.h files later:
37 INC => $yazinc, # e.g., '-I/usr/include/other'
38 # Un-comment this if you add C files to link with later:
39 # OBJECT => '$(O_FILES)', # link all the C files too
40 # Use this to test for illegal code that GCC stupidly permits by default:
41 # OPTIMIZE => "-Wdeclaration-after-statement"
48 my($gmajor, $gminor, $gtrivial) = ($got =~ /(\d+)\.(\d+)\.(\d+)/);
49 print "gmajor=$gmajor\n";
50 print "gminor=$gminor\n";
51 print "gtrivial=$gtrivial\n";
52 my($wmajor, $wminor, $wtrivial) = ($want =~ /(\d+)\.(\d+)\.(\d+)/);
53 print "wmajor=$wmajor\n";
54 print "wminor=$wminor\n";
55 print "wtrivial=$wtrivial\n";
57 if (($gmajor < $wmajor) ||
58 ($gmajor == $wmajor && $gminor < $wminor) ||
59 ($gmajor == $wmajor && $gminor == $wminor && $gtrivial < $wtrivial)) {
62 ZOOM-Perl requires at least version $want of YAZ,
63 but is currently you only have version $got.