-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile.PL
executable file
·80 lines (53 loc) · 2 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/usr/bin/perl
# Copyright 2011 Alexandr Gomoliako
# TODO
# - by default build with all core modules that don't have external
# dependencies;
# - honour PREFIX from PERL_MM_OPT;
# - use $ENV{AUTOMATED_TESTING} to detect cpantesters/travis;
use strict;
use Config;
my @args;
push @args, '--prefix=' . $Config{siteprefix} . "/nginx-perl"
if $Config{siteprefix} ;
push @args, '--sbin-path=' . ( $Config{installsitebin} ||
$Config{installsitescript} ||
$Config{sitebin} ||
$Config{sitescript} )
if $Config{installsitebin} ||
$Config{installsitescript} ||
$Config{sitebin} ||
$Config{sitescript} ;
# ignoring MakeMaker's options
shift @ARGV
while @ARGV && $ARGV[0] !~ /^--/;
unless (@ARGV) {
# disabling pcre / building statically for automatic testing
my @PCRE_INCLUDE =
grep { -e "$_/pcre.h" }
qw( /usr/include
/usr/local/include
/usr/pkg/include
/use/include/pcre
/opt/local/include );
push @args, '--with-pcre=pcre'
if -e 'pcre' && !@PCRE_INCLUDE;
push @args, '--without-http_rewrite_module',
'--without-pcre'
if !-e 'pcre' && !@PCRE_INCLUDE;
# disabling zlib / building statically for automatic testing
my @ZLIB_INCLUDE =
grep { -e "$_/zlib.h" }
qw( /usr/include
/usr/local/include
/usr/pkg/include
/use/include/pcre
/opt/local/include );
push @args, '--with-zlib=zlib'
if -e 'zlib' && !@ZLIB_INCLUDE;
push @args, '--without-http_gzip_module'
if !-e 'zlib' && !@ZLIB_INCLUDE;
}
# our perl interpreter
push @args, '--with-perl=' . $^X;
exec './configure', @args, @ARGV;