1 | use ExtUtils::MakeMaker; |
1 | use ExtUtils::MakeMaker; |
2 | |
2 | |
3 | use Canary::Stability Geo::LatLon2Place => 1, 5.010; |
3 | use Canary::Stability Geo::LatLon2Place => 1, 5.010; |
|
|
4 | |
|
|
5 | my $embed_cdb = $^O eq "MSWin32"; |
|
|
6 | |
|
|
7 | if (exists $ENV{GEO_LATLON2PLACE_EMBED_CDB}) { |
|
|
8 | $embed_cdb = $ENV{GEO_LATLON2PLACE_EMBED_CDB}; |
|
|
9 | } else { |
|
|
10 | print <<EOF; |
|
|
11 | |
|
|
12 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
|
|
13 | |
|
|
14 | Use embedded CDB? |
|
|
15 | |
|
|
16 | On most platforms, this module will rely on the system tinycdb library |
|
|
17 | (on GNU/Debian you can "apt install libcdb-dev" for example). However, |
|
|
18 | this module can also use an embedded version of this library. |
|
|
19 | |
|
|
20 | EOF |
|
|
21 | |
|
|
22 | $embed_cdb = prompt ("Use embedded tinycdb library (y/n)?", $embed_cdb ? "y" : "n") =~ /y/i; |
|
|
23 | } |
4 | |
24 | |
5 | WriteMakefile( |
25 | WriteMakefile( |
6 | dist => { |
26 | dist => { |
7 | PREOP => 'pod2text LatLon2Place.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
27 | PREOP => 'pod2text LatLon2Place.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
8 | COMPRESS => 'gzip -9v', |
28 | COMPRESS => 'gzip -9v', |
9 | SUFFIX => '.gz', |
29 | SUFFIX => '.gz', |
10 | }, |
30 | }, |
11 | NAME => "Geo::LatLon2Place", |
31 | NAME => "Geo::LatLon2Place", |
12 | LIBS => ["-lcdb"], |
32 | ($embed_cdb ? (DEFINE => "-DEMBED_CDB") : (LIBS => ["-lcdb"])), |
13 | VERSION_FROM => "LatLon2Place.pm", |
33 | VERSION_FROM => "LatLon2Place.pm", |
14 | CONFIGURE_REQUIRES => { |
34 | CONFIGURE_REQUIRES => { |
15 | "ExtUtils::MakeMaker" => 6.6, |
35 | "ExtUtils::MakeMaker" => 6.6, |
16 | "Canary::Stability" => 0, |
36 | "Canary::Stability" => 0, |
17 | }, |
37 | }, |