summaryrefslogtreecommitdiffhomepage
path: root/auto/options
blob: 572d8a9b6e5bf5eecd6748a412bf701030f23aaf (plain) (blame)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182

# Copyright (C) Igor Sysoev
# Copyright (C) Valentin V. Bartenev
# Copyright (C) NGINX, Inc.


NXT_CONFIGURE_OPTIONS=
NXT_CFLAGS=
NXT_CC_OPT=
NXT_LD_OPT=

NXT_PREFIX=

NXT_DEBUG=NO

NXT_INET6=YES
NXT_UNIX_DOMAIN=YES

NXT_PCRE_CFLAGS=
NXT_PCRE_LIB=

NXT_REGEX=YES
NXT_TRY_PCRE2=YES

NXT_TLS=NO
NXT_OPENSSL=NO
NXT_GNUTLS=NO
NXT_CYASSL=NO
NXT_POLARSSL=NO

NXT_TEST_BUILD_EPOLL=NO
NXT_TEST_BUILD_EVENTPORT=NO
NXT_TEST_BUILD_DEVPOLL=NO
NXT_TEST_BUILD_POLLSET=NO

NXT_TEST_BUILD_FREEBSD_SENDFILE=NO
NXT_TEST_BUILD_LINUX_SENDFILE=NO
NXT_TEST_BUILD_MACOSX_SENDFILE=NO
NXT_TEST_BUILD_SOLARIS_SENDFILEV=NO
NXT_TEST_BUILD_AIX_SEND_FILE=NO
NXT_TEST_BUILD_HPUX_SENDFILE=NO

NXT_TESTS=NO

for nxt_option
do
    case "$nxt_option" in
        -*=*) value=`$echo "$nxt_option" | sed -e 's/[-_a-zA-Z0-9]*=//'`     ;;
           *) value="" ;;
    esac

    case "$nxt_option" in
        --cc=*)                          CC="$value"                         ;;
        --cc-opt=*)                      NXT_CC_OPT="$value"                 ;;
        --ld-opt=*)                      NXT_LD_OPT="$value"                 ;;

        --prefix=*)                      NXT_PREFIX="$value"                 ;;
        --bindir=*)                      NXT_BINDIR="$value"                 ;;
        --sbindir=*)                     NXT_SBINDIR="$value"                ;;
        --libdir=*)                      NXT_LIBDIR="$value"                 ;;
        --incdir=*)                      NXT_INCDIR="$value"                 ;;
        --mandir=*)                      NXT_MANDIR="$value"                 ;;
        --modules=*)                     NXT_MODULES="$value"                ;;
        --state=*)                       NXT_STATE="$value"                  ;;
        --tmp=*)                         NXT_TMP="$value"                    ;;

        --pid=*)                         NXT_PID="$value"                    ;;
        --log=*)                         NXT_LOG="$value"                    ;;

        --control=*)                     NXT_CONTROL="$value"                ;;

        --user=*)                        NXT_USER="$value"                   ;;
        --group=*)                       NXT_GROUP="$value"                  ;;

        --debug)                         NXT_DEBUG=YES                       ;;

        --no-ipv6)                       NXT_INET6=NO                        ;;
        --no-unix-sockets)               NXT_UNIX_DOMAIN=NO                  ;;

        --no-regex)                      NXT_REGEX=NO                        ;;
        --no-pcre2)                      NXT_TRY_PCRE2=NO                    ;;

        --openssl)                       NXT_OPENSSL=YES                     ;;
        --gnutls)                        NXT_GNUTLS=YES                      ;;
        --cyassl)                        NXT_CYASSL=YES                      ;;
        --polarssl)                      NXT_POLARSSL=YES                    ;;

        --test-build-epoll)              NXT_TEST_BUILD_EPOLL=YES            ;;
        --test-build-eventport)          NXT_TEST_BUILD_EVENTPORT=YES        ;;
        --test-build-devpoll)            NXT_TEST_BUILD_DEVPOLL=YES          ;;
        --test-build-pollset)            NXT_TEST_BUILD_POLLSET=YES          ;;

        --test-build-freebsd-sendfile)   NXT_TEST_BUILD_FREEBSD_SENDFILE=YES ;;
        --test-build-linux-sendfile)     NXT_TEST_BUILD_LINUX_SENDFILE=YES   ;;
        --test-build-solaris-sendfilev)  NXT_TEST_BUILD_SOLARIS_SENDFILEV=YES ;;
        --test-build-macosx-sendfile)    NXT_TEST_BUILD_MACOSX_SENDFILE=YES  ;;
        --test-build-aix-send_file)      NXT_TEST_BUILD_AIX_SEND_FILE=YES    ;;
        --test-build-hpux-sendfile)      NXT_TEST_BUILD_HPUX_SENDFILE=YES    ;;

        --tests)                         NXT_TESTS=YES                       ;;

        --help)
            . auto/help
            exit 0
        ;;

        *)
            $echo
            $echo $0: error: invalid option \"$nxt_option\".
            $echo Run \"$0 --help\" to see available options.
            $echo
            exit 1
        ;;
    esac

    nxt_opt=`$echo $nxt_option | sed -e "s/\(--[^=]*=\)\(.* .*\)/\1'\2'/"`

    NXT_CONFIGURE_OPTIONS="$NXT_CONFIGURE_OPTIONS $nxt_opt"

done


case "$NXT_PREFIX" in
    ""|*/)  ;;
     *)  NXT_PREFIX="$NXT_PREFIX/"  ;;
esac

case "$NXT_BINDIR" in
    /*)  ;;
     *)  NXT_BINDIR="$NXT_PREFIX$NXT_BINDIR"  ;;
esac

case "$NXT_SBINDIR" in
    /*)  ;;
     *)  NXT_SBINDIR="$NXT_PREFIX$NXT_SBINDIR"  ;;
esac

case "$NXT_LIBDIR" in
    /*)  ;;
     *)  NXT_LIBDIR="$NXT_PREFIX$NXT_LIBDIR"  ;;
esac

case "$NXT_INCDIR" in
    /*)  ;;
     *)  NXT_INCDIR="$NXT_PREFIX$NXT_INCDIR"  ;;
esac

case "$NXT_MANDIR" in
    /*)  ;;
     *)  NXT_MANDIR="$NXT_PREFIX$NXT_MANDIR"  ;;
esac

case "$NXT_MODULES" in
    /*)  ;;
     *)  NXT_MODULES="$NXT_PREFIX$NXT_MODULES"  ;;
esac

case "$NXT_STATE" in
    /*)  ;;
     *)  NXT_STATE="$NXT_PREFIX$NXT_STATE"  ;;
esac

case "$NXT_TMP" in
    /*)  ;;
     *)  NXT_TMP="$NXT_PREFIX$NXT_TMP"  ;;
esac

case "$NXT_PID" in
    /*)  ;;
     *)  NXT_PID="$NXT_PREFIX$NXT_PID"  ;;
esac

case "$NXT_LOG" in
    /*)  ;;
     *)  NXT_LOG="$NXT_PREFIX$NXT_LOG"  ;;
esac

case "$NXT_CONTROL" in
    unix:/*)  ;;
    unix:*)   NXT_CONTROL="unix:$NXT_PREFIX${NXT_CONTROL##unix:}" ;;
    *)        ;;
esac