1 # $Id: Makefile.PL,v 1.15 2006-10-04 17:13:44 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.1.35");
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 -g -O0",
42 EXE_FILES => [ 'samples/zoom/zselect' ],
49 my($gmajor, $gminor, $gtrivial) = ($got =~ /(\d+)\.(\d+)\.(\d+)/);
50 my($wmajor, $wminor, $wtrivial) = ($want =~ /(\d+)\.(\d+)\.(\d+)/);
51 if (($gmajor < $wmajor) ||
52 ($gmajor == $wmajor && $gminor < $wminor) ||
53 ($gmajor == $wmajor && $gminor == $wminor && $gtrivial < $wtrivial)) {
56 ZOOM-Perl requires at least version $want of YAZ,
57 but is currently you only have version $got.