1 use ExtUtils::MakeMaker;
3 ## $Id: Makefile.PL,v 1.12 2006-08-08 16:25:37 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
19 my ($major, $minor, $trivial) = split(/\./, $yazver);
20 # YAZ 2.1.14 is the first to propagate SRW/U addinfo correctly
21 my ($needMaj, $needMin, $needTriv) = (2, 1, 24);
22 #print "major=$major, minor=$minor, trivial=$trivial\n";
23 die "You have YAZ version $major.$minor.$trivial; " .
24 "you need $needMaj.$needMin.$needTriv or better."
25 if ($major < $needMaj ||
26 $major == $needMaj && $minor < $needMin ||
27 $major == $needMaj && $minor == $needMin && $trivial < $needTriv);
30 # $yazinc = '-Ic:\yaz\include'
31 # $yazlibs = 'c:\yaz\lib\yaz.lib'
34 'NAME' => 'Net::Z3950::SimpleServer',
35 'VERSION_FROM' => 'SimpleServer.pm', # finds $VERSION
36 'LIBS' => [$yazlibs], # e.g., '-lm'
37 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING'
38 'INC' => $yazinc, # e.g., '-I/usr/include/other'
39 # OPTIMIZE => "-Wdeclaration-after-statement -g -O0",