Fix memory leak
[idzebra-moved-to-github.git] / perl / Makefile.PL.in
index 70019e3..e5c1207 100644 (file)
@@ -1,11 +1,24 @@
 use ExtUtils::MakeMaker;
 
 WriteMakefile(
-              'NAME'     => 'IDZebra',
-              'OBJECT'   => 'IDZebra_wrap.o zebra_perl.o' ,
-              'INC'      => "-I../index -I../include @YAZINC@",
-              'LIBS'     => "-L../index -lzebra -L../data1 -ldata1 @TCL_LIB@ @YAZLIB@ @ZPERL_LIBS@",
-              'OPTIMIZE' => '-g -O2'
-       
+              'NAME'          => 'IDZebra',
+              'OBJECT'        => 'IDZebra_wrap.o zebra_perl.o' ,
+              'INC'           => "-I@top_srcdir@/index -I../include @YAZINC@",
+              'LIBS'          => "-L@top_srcdir@/index -lzebra @TCL_LIB@ @YAZLIB@ @ZPERL_LIBS@",
+              'OPTIMIZE'      => '-g',
+#              'PREREQ_FATAL'  => 1,
+              'PREREQ_PM'     => {
+                  'Scalar::Util' => '1.0',
+                  'Test::More'   => '0.40',
+              }
+       
               );
 
+sub MY::postamble {
+'IDZebra_wrap.c: IDZebra.i
+       swig -I../include -v -Wall -perl -proxy ./IDZebra.i
+       mv IDZebra.pm lib/'
+       ;
+}
+
+