X-Git-Url: http://git.indexdata.com/?p=simpleserver-moved-to-github.git;a=blobdiff_plain;f=Makefile.PL;h=d3bc617ebce8768acb13c7dd8ef102cd235ab9f2;hp=0f22ddd76e9b9f74012978f61e0084ea3d7b754d;hb=b88f2f7ab4c8c08d1a4552c05b52264b7b3e5ee4;hpb=b18ec135ab08c3234a8f8d5e69e17e8b632b7fcc diff --git a/Makefile.PL b/Makefile.PL index 0f22ddd..d3bc617 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,13 +1,27 @@ use ExtUtils::MakeMaker; -# See lib/ExtUtils/MakeMaker.pm for details of how to influence -# the contents of the Makefile that is written. -my $libs = `yaz-config --libs threads` || die "ERROR: Unable to call script: yaz-config"; +## $Id: Makefile.PL,v 1.8 2005-03-13 20:01:38 adam Exp $ + +my $yazconf = "yaz-config"; +my $yazinc = `$yazconf --cflags threads`; +my $yazlibs = `$yazconf --libs threads`; +if (!$yazinc && !$yazlibs) { + die qq[ +ERROR: Unable to call script: yaz-config +If you're using a YAZ installation from the Debian package "yaz", you +will also need to install "libyaz-dev" in order to build the +SimpleServer module. +]; +} + +# For Windows use +# $yazinc = '-Ic:\yaz\include' +# $yazlibs = 'c:\yaz\lib\yaz.lib' WriteMakefile( 'NAME' => 'Net::Z3950::SimpleServer', 'VERSION_FROM' => 'SimpleServer.pm', # finds $VERSION - 'LIBS' => [$libs], # e.g., '-lm' + 'LIBS' => [$yazlibs], # e.g., '-lm' 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING' - 'INC' => '', # e.g., '-I/usr/include/other' + 'INC' => $yazinc, # e.g., '-I/usr/include/other' );