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