-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile.PL
39 lines (35 loc) · 1.21 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
39
use 5.010001;
use ExtUtils::MakeMaker;
use ExtUtils::PkgConfig;
my (%liblua, %liblualib, $cflags, $libs, $lua_version);
eval {%liblua = ExtUtils::PkgConfig->find('lua5.1')}
or eval {%liblua = ExtUtils::PkgConfig->find('lua5.2')};
if (%liblua) {
$cflags = $liblua{cflags};
$libs = $liblua{libs};
}
else {
$libs = '-llua5.1 -lm -ldl';
}
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
NAME => 'Outline::Lua',
VERSION_FROM => 'lib/Outline/Lua.pm', # finds $VERSION
PREREQ_PM => {
List::Util => 0,
Scalar::Util => 0,
overload => 0,
},
BUILD_REQUIRES => {
Test::Class => 0,
Test::More => 0,
},
ABSTRACT_FROM => 'lib/Outline/Lua.pm', # retrieve abstract from module
AUTHOR => 'Al <[email protected]>',
LIBS => [$libs], # e.g., '-lm'
DEFINE => '', # e.g., '-DHAVE_SOMETHING'
INC => $cflags, # e.g., '-I. -I/usr/include/other'
# Un-comment this if you add C files to link with later:
# OBJECT => '$(O_FILES)', # link all the C files too
);