-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.PL
50 lines (43 loc) · 1.16 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
40
41
42
43
44
45
46
47
48
49
50
use 5.006001;
use ExtUtils::MakeMaker;
use ExtUtils::Liblist;
#
# Do not try to build on systems /known/ not to work
#
if (grep { $^O eq $_ } qw(irix solaris MSWin32 msys)) {
print("OS unsupported\n");
exit(0);
}
#
# Check for call "getgrouplist".
#
# No false negatives known yet. Please contact author if your system provides
# a getgrouplist but is still rejected here.
#
use lib 'inc/';
use Devel::CheckLib;
check_lib_or_exit(
function => '
struct group *gr; gid_t groups[2]; int n = 1;
getgrouplist("foo", 123, groups, &n);
return 0;
',
lib => 'c',
header => 'grp.h',
);
WriteMakefile(
NAME => 'User::getgrouplist',
AUTHOR => 'Bastian Friedrich <[email protected]>',
VERSION_FROM => 'lib/User/getgrouplist.pm',
ABSTRACT_FROM => 'lib/User/getgrouplist.pm',
PREREQ_PM => {
'Exporter' => 0,
'Test::More' => 0,
'Test::Builder' => 0,
},
NEEDS_LINKING => 1,
INC => '-I.',
EXE_FILES => [],
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => 'User-getgrouplist-*.tar.*' },
);