line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Alien::FFI; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
45550
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
116
|
|
4
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
81
|
|
5
|
3
|
|
|
3
|
|
55
|
use 5.010; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
703
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# ABSTRACT: Get libffi compiler and linker flags |
8
|
|
|
|
|
|
|
our $VERSION = '0.06'; # VERSION |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new |
12
|
|
|
|
|
|
|
{ |
13
|
0
|
|
|
0
|
0
|
0
|
my($class) = @_; |
14
|
0
|
|
|
|
|
0
|
bless {}, $class; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my $pkg_config = 'pkg-config'; |
18
|
3
|
|
|
3
|
|
626
|
if(eval q{ use PkgConfig (); 1 }) |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
19
|
|
|
|
|
|
|
{ |
20
|
|
|
|
|
|
|
$pkg_config = "$^X $INC{'PkgConfig.pm'}"; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub install_type |
24
|
|
|
|
|
|
|
{ |
25
|
2
|
|
|
2
|
0
|
541
|
'system'; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub cflags |
29
|
|
|
|
|
|
|
{ |
30
|
2
|
|
|
2
|
0
|
68656
|
state $cflags; |
31
|
|
|
|
|
|
|
|
32
|
2
|
50
|
|
|
|
11
|
unless(defined $cflags) |
33
|
|
|
|
|
|
|
{ |
34
|
2
|
|
|
|
|
3706
|
$cflags = `$pkg_config --cflags libffi`; |
35
|
2
|
50
|
|
|
|
79
|
$cflags = '' unless $? == 0; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
2
|
|
|
|
|
71
|
$cflags; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub libs |
42
|
|
|
|
|
|
|
{ |
43
|
2
|
|
|
2
|
0
|
61062
|
state $libs; |
44
|
|
|
|
|
|
|
|
45
|
2
|
50
|
|
|
|
15
|
unless(defined $libs) |
46
|
|
|
|
|
|
|
{ |
47
|
2
|
|
|
|
|
2532
|
$libs = `$pkg_config --libs libffi`; |
48
|
2
|
50
|
|
|
|
50
|
$libs = '-lffi' unless $? == 0; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
2
|
|
|
|
|
52
|
$libs; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
__END__ |