1 use ExtUtils::MakeMaker;
3 ## $Id: Makefile.PL,v 1.19 2007-08-13 16:41:19 mike Exp $
5 my $yazconf = "yaz-config";
6 my $yazver = `$yazconf --version`;
7 my $yazinc = `$yazconf --cflags servers`;
8 my $yazlibs = `$yazconf --libs server`;
9 if (!$yazver || (!$yazinc && !$yazlibs)) {
11 ERROR: Unable to call script: yaz-config
12 If you are using a YAZ installation from the Debian package "yaz", you
13 will also need to install "libyaz-dev" in order to build the
18 ### Although this release of SimpleServer will work with version 3.0.2
19 # of YAZ, you will not be able to take advantage of the new CCL
20 # support in the YAZ GFS unless you have version 3.0.9 or better.
23 my ($major, $minor, $trivial) = split(/\./, $yazver);
24 my ($needMaj, $needMin, $needTriv) = (3, 0, 2);
25 #print "major=$major, minor=$minor, trivial=$trivial\n";
26 die "You have YAZ version $major.$minor.$trivial; " .
27 "you need $needMaj.$needMin.$needTriv or better."
28 if ($major < $needMaj ||
29 $major == $needMaj && $minor < $needMin ||
30 $major == $needMaj && $minor == $needMin && $trivial < $needTriv);
33 # $yazinc = '-Ic:\yaz\include'
34 # $yazlibs = 'c:\yaz\lib\yaz.lib'
37 'NAME' => 'Net::Z3950::SimpleServer',
38 'VERSION_FROM' => 'SimpleServer.pm', # finds $VERSION
39 'LIBS' => [$yazlibs], # e.g., '-lm'
40 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING'
41 'INC' => $yazinc, # e.g., '-I/usr/include/other'
42 # OPTIMIZE => "-Wdeclaration-after-statement -g -O0",