-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile.PL
38 lines (34 loc) · 1.09 KB
/
Makefile.PL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
use strict;
use lib '.';
use inc::Module::Install;
name 'Conf-Libconfig';
license 'bsd';
author 'Cnangel <[email protected]>';
repository 'http://github.com/cnangel/Conf-Libconfig';
all_from 'lib/Conf/Libconfig.pm';
requires 'XSLoader' => 0.05;
configure_requires 'ExtUtils::PkgConfig';
test_requires 'Test::Deep' => 0.10;
test_requires 'Test::More' => 0.60;
test_requires 'Test::Warn' => 0.10;
test_requires 'Test::Exception' => 0.25;
test_requires 'ExtUtils::PkgConfig' => 0;
#build_subdirs 'libconfig';
eval("use ExtUtils::PkgConfig;");
my @inc_paths;
my @lib_paths;
eval {
@inc_paths = map {s/-I//; $_} split(' ', ExtUtils::PkgConfig->cflags_only_I('libconfig'));
@lib_paths = map {s/-L//; $_} split(' ', ExtUtils::PkgConfig->libs_only_L('libconfig'));
};
cc_inc_paths @inc_paths;
cc_lib_paths @lib_paths;
cc_lib_links 'config';
checklibs lib => [qw(config)],
libpath => \@lib_paths,
header => [qw(libconfig.h)],
incpath => \@inc_paths;
can_cc or die 'This module requires C compiler.';
no_index directory => qw(t inc);
auto_install();
WriteAll();