# $Header: /home/cvsroot/NetZ3950/Makefile.PL,v 1.6 2003/05/09 10:33:23 mike Exp $ my $yazinc = `yaz-config --cflags`; my $yazlibs = `yaz-config --libs`; if (!$yazinc || !$yazlibs) { die "ERROR: Unable to call script 'yaz-config': is YAZ installed?"; } use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile( 'NAME' => 'Net::Z3950', 'VERSION_FROM' => 'Z3950.pm', # finds $VERSION 'LIBS' => [ $yazlibs ], # e.g., '-lm' 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING' # Some systems like to be told: 'DEFINE' => '-D_GNU_SOURCE' # Apparently RedHat 8.0 (but NOT 7.3) is one of these. 'INC' => $yazinc, 'PREREQ_PM' => { Event => 0.77 }, 'MYEXTLIB' => 'yazwrap/libyazwrap$(LIB_EXT)', 'AUTHOR' => 'Mike Taylor ', 'ABSTRACT' => 'Build clients for the Z39.50 info. retrieval protocol', ); # ### I put this bit here basically because the "perlxstut" (XS # Tutorial) manual told me to, but frankly I don't understand # the MakeMaker. It seems that this is superfluous, because the # generated Makefile in any case recurses to yazwrap at the drop # of a hat -- including, for example, when doing a "make test", # which is _not_ what I want. Never mind, it's not the end of # the world. # sub MY::postamble { '$(MYEXTLIB): yazwrap/Makefile cd yazwrap && $(MAKE) $(PASTHRU)'; } sub MY::post_constants { 'PASTHRU_INC=$(INC)' }