Better distance function
[text-levenshtein-edlib.git] / Makefile.PL
1 use 5.014000;
2 use Devel::CheckLib;
3 use ExtUtils::MakeMaker;
4
5 check_lib_or_exit
6 lib => 'edlib';
7
8 WriteMakefile(
9 NAME => 'Text::Levenshtein::Edlib',
10 VERSION_FROM => 'lib/Text/Levenshtein/Edlib.pm',
11 ABSTRACT_FROM => 'lib/Text/Levenshtein/Edlib.pm',
12 AUTHOR => 'Marius Gavrilescu <marius@ieval.ro>',
13 MIN_PERL_VERSION => '5.14.0',
14 LICENSE => 'perl',
15 SIGN => 1,
16 CONFIGURE_REQUIRES => {
17 qw/Devel::CheckLib 0
18 ExtUtils::MakeMaker 0/,
19 },
20 PREREQ_PM => {},
21 LIBS => ['-ledlib'],
22 META_ADD => {
23 dynamic_config => 1,
24 resources => {
25 repository => 'https://git.ieval.ro/?p=text-levenshtein-edlib.git',
26 },
27 }
28 );
29 if (eval {require ExtUtils::Constant; 1}) {
30 # If you edit these definitions to change the constants used by this module,
31 # you will need to use the generated const-c.inc and const-xs.inc
32 # files to replace their "fallback" counterparts before distributing your
33 # changes.
34 my @names = (qw(EDLIB_EDOP_DELETE EDLIB_EDOP_INSERT EDLIB_EDOP_MATCH
35 EDLIB_EDOP_MISMATCH EDLIB_STATUS_ERROR EDLIB_STATUS_OK),
36 {name=>"EDLIB_CIGAR_EXTENDED", macro=>"1"},
37 {name=>"EDLIB_CIGAR_STANDARD", macro=>"1"},
38 {name=>"EDLIB_MODE_HW", macro=>"1"},
39 {name=>"EDLIB_MODE_NW", macro=>"1"},
40 {name=>"EDLIB_MODE_SHW", macro=>"1"},
41 {name=>"EDLIB_TASK_DISTANCE", macro=>"1"},
42 {name=>"EDLIB_TASK_LOC", macro=>"1"},
43 {name=>"EDLIB_TASK_PATH", macro=>"1"});
44 ExtUtils::Constant::WriteConstants(
45 NAME => 'Text::Levenshtein::Edlib',
46 NAMES => \@names,
47 DEFAULT_TYPE => 'IV',
48 C_FILE => 'const-c.inc',
49 XS_FILE => 'const-xs.inc',
50 );
51
52 }
53 else {
54 use File::Copy;
55 use File::Spec;
56 foreach my $file ('const-c.inc', 'const-xs.inc') {
57 my $fallback = File::Spec->catfile('fallback', $file);
58 copy ($fallback, $file) or die "Can't copy $fallback to $file: $!";
59 }
60 }
This page took 0.021908 seconds and 4 git commands to generate.