3 # $Id: Makefile.PL,v 1.1 2004/04/02 18:04:01 mdw Exp $
5 # Makefile for Catacomb/Perl
7 # (c) 2000 Straylight/Edgeware
10 #----- Licensing notice -----------------------------------------------------
12 # This file is part of the Perl interface to Catacomb.
14 # Catacomb/Perl is free software; you can redistribute it and/or modify
15 # it under the terms of the GNU General Public License as published by
16 # the Free Software Foundation; either version 2 of the License, or
17 # (at your option) any later version.
19 # Catacomb/Perl is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU General Public License for more details.
24 # You should have received a copy of the GNU General Public License
25 # along with Catacomb/Perl; if not, write to the Free Software Foundation,
26 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28 #----- Revision history -----------------------------------------------------
30 # $Log: Makefile.PL,v $
31 # Revision 1.1 2004/04/02 18:04:01 mdw
35 use ExtUtils::MakeMaker;
38 WriteMakefile(NAME => "Catacomb",
39 DISTNAME => "catacomb-perl",
40 AUTHOR => "Mark Wooding (mdw\@nsict.org)",
42 XS => { "catacomb.xs" => "catacomb.c" },
43 OBJECT => join(" ", grep { s/$/$Config{_o}/ }
44 @{[qw(algs mpstuff catacomb algstuff
46 CONFIGURE => \&configure,
47 PL_FILES => { 'algs.PL' => 'algs.c' },
48 depend => { '$(MAKEFILE)' => '$(VERSION_FROM)',
50 join(" ", grep { s/$/.xs/ }
51 @{[qw(catacomb algorithms mp misc pgen)]})
53 VERSION_FROM => "Catacomb.pm");
58 my $out = `$lib-config --$what`;
59 $? and die("nonzero exit status from $lib-config --$what");
61 $config{$what} .= " " if defined($config{$what});
62 $config{$what} .= $out;
69 system("$lib-config --check $version")
70 and die("$lib version $version not found");
71 libconfig_item($lib, "cflags");
72 libconfig_item($lib, "libs");
77 libconfig("mLib", "2.0.0pre4");
78 libconfig("catacomb", "2.0.0pre8");
79 return { CCFLAGS => $config{cflags},
80 LIBS => [ $config{libs} ] };
83 #----- That's all, folks ----------------------------------------------------