ztest.pl returns display_term for one of the entries
[simpleserver-moved-to-github.git] / Makefile.PL
1 use ExtUtils::MakeMaker;
2
3 # Use: perl Makefile.PL OPTIMIZE="-O0 -g -Wdeclaration-after-statement"
4
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)) {
10    die qq[
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
14 SimpleServer module.
15 ];
16 }
17
18 ## present_number in search handler appeared in 4.2.48
19 chomp($yazver);
20 my ($major, $minor, $trivial) = split(/\./, $yazver);
21 my ($needMaj, $needMin, $needTriv) = (4, 2, 48);
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);
28
29 # For Windows use
30 # $yazinc = '-Ic:\yaz\include'
31 # $yazlibs = 'c:\yaz\lib\yaz3.lib'
32
33 WriteMakefile(
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",
40 );