1 use ExtUtils::MakeMaker;
3 ## $Id: Makefile.PL,v 1.9 2006-03-24 12:06:15 mike Exp $
5 my $yazconf = "yaz-config";
6 my $yazver = `$yazconf --version`;
7 my $yazinc = `$yazconf --cflags threads`;
8 my $yazlibs = `$yazconf --libs threads`;
9 if (!$yazver || (!$yazinc && !$yazlibs)) {
11 ERROR: Unable to call script: yaz-config
12 If you're using a YAZ installation from the Debian package "yaz", you
13 will also need to install "libyaz-dev" in order to build the
18 # Judging by the YAZ NEWS file, 2.1.10 was the first release to
19 # include SRW/U support in the GFS
21 my ($major, $minor, $trivial) = split(/\./, $yazver);
22 #print "major=$major, minor=$minor, trivial=$trivial\n";
23 die "You have YAZ version $major.$minor.$trivial; you need 2.1.10 or better"
25 $major == 2 && $minor < 1 ||
26 $major == 2 && $minor == 1 && $trivial < 10);
29 # $yazinc = '-Ic:\yaz\include'
30 # $yazlibs = 'c:\yaz\lib\yaz.lib'
33 'NAME' => 'Net::Z3950::SimpleServer',
34 'VERSION_FROM' => 'SimpleServer.pm', # finds $VERSION
35 'LIBS' => [$yazlibs], # e.g., '-lm'
36 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING'
37 'INC' => $yazinc, # e.g., '-I/usr/include/other'