Remove obsolete comment.
[simpleserver-moved-to-github.git] / Makefile.PL
1 use ExtUtils::MakeMaker;
2
3 ## $Id: Makefile.PL,v 1.18 2007-08-13 16:15:42 mike Exp $
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 chomp($yazver);
19 my ($major, $minor, $trivial) = split(/\./, $yazver);
20 my ($needMaj, $needMin, $needTriv) = (3, 0, 2);
21 #print "major=$major, minor=$minor, trivial=$trivial\n";
22 die "You have YAZ version $major.$minor.$trivial; " .
23     "you need $needMaj.$needMin.$needTriv or better."
24     if ($major < $needMaj || 
25         $major == $needMaj && $minor < $needMin ||
26         $major == $needMaj && $minor == $needMin && $trivial < $needTriv);
27
28 # For Windows use
29 # $yazinc = '-Ic:\yaz\include'
30 # $yazlibs = 'c:\yaz\lib\yaz.lib'
31
32 WriteMakefile(
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' 
38 #    OPTIMIZE   => "-Wdeclaration-after-statement -g -O0",
39 );