Mercurial > hg > nginx
annotate auto/lib/libgd/conf @ 7138:05bd1baabf87 stable-1.12
Core: disabled SO_REUSEPORT when testing config (ticket #1300).
When closing a socket with SO_REUSEPORT, Linux drops all connections waiting
in this socket's listen queue. Previously, it was believed to only result
in connection resets when reconfiguring nginx to use smaller number of worker
processes. It also results in connection resets during configuration
testing though.
Workaround is to avoid using SO_REUSEPORT when testing configuration. It
should prevent listening sockets from being created if a conflicting socket
already exists, while still preserving detection of other possible errors.
It should also cover UDP sockets.
The only downside of this approach seems to be that a configuration testing
won't be able to properly report the case when nginx was compiled with
SO_REUSEPORT, but the kernel is not able to set it. Such errors will be
reported on a real start instead.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 11 Jul 2017 19:59:56 +0300 |
parents | e4b00a021cea |
children | f7e79596baf2 |
rev | line source |
---|---|
2788 | 1 |
2 # Copyright (C) Igor Sysoev | |
4412 | 3 # Copyright (C) Nginx, Inc. |
2788 | 4 |
5 | |
6 ngx_feature="GD library" | |
7 ngx_feature_name= | |
8 ngx_feature_run=no | |
9 ngx_feature_incs="#include <gd.h>" | |
10 ngx_feature_path= | |
11 ngx_feature_libs="-lgd" | |
12 ngx_feature_test="gdImagePtr img = gdImageCreateFromGifPtr(1, NULL);" | |
13 . auto/feature | |
14 | |
15 | |
16 if [ $ngx_found = no ]; then | |
17 | |
18 # FreeBSD port | |
19 | |
20 ngx_feature="GD library in /usr/local/" | |
21 ngx_feature_path="/usr/local/include" | |
22 | |
23 if [ $NGX_RPATH = YES ]; then | |
24 ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lgd" | |
25 else | |
26 ngx_feature_libs="-L/usr/local/lib -lgd" | |
27 fi | |
28 | |
29 . auto/feature | |
30 fi | |
31 | |
32 | |
33 if [ $ngx_found = no ]; then | |
34 | |
35 # NetBSD port | |
36 | |
37 ngx_feature="GD library in /usr/pkg/" | |
5013
82a3f951feb3
Configure: fixed style of include directories.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
38 ngx_feature_path="/usr/pkg/include" |
2788 | 39 |
40 if [ $NGX_RPATH = YES ]; then | |
41 ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lgd" | |
42 else | |
43 ngx_feature_libs="-L/usr/pkg/lib -lgd" | |
44 fi | |
45 | |
46 . auto/feature | |
47 fi | |
48 | |
49 | |
50 if [ $ngx_found = no ]; then | |
51 | |
52 # MacPorts | |
53 | |
54 ngx_feature="GD library in /opt/local/" | |
55 ngx_feature_path="/opt/local/include" | |
56 | |
57 if [ $NGX_RPATH = YES ]; then | |
58 ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lgd" | |
59 else | |
60 ngx_feature_libs="-L/opt/local/lib -lgd" | |
61 fi | |
62 | |
63 . auto/feature | |
64 fi | |
65 | |
66 | |
67 if [ $ngx_found = yes ]; then | |
68 | |
2796 | 69 CORE_INCS="$CORE_INCS $ngx_feature_path" |
6383 | 70 |
71 if [ $USE_LIBGD = YES ]; then | |
72 CORE_LIBS="$CORE_LIBS $ngx_feature_libs" | |
73 fi | |
74 | |
75 NGX_LIB_LIBGD=$ngx_feature_libs | |
2788 | 76 |
6779
e4b00a021cea
Image filter: support for WebP.
Valentin Bartenev <vbart@nginx.com>
parents:
6383
diff
changeset
|
77 ngx_feature="GD WebP support" |
e4b00a021cea
Image filter: support for WebP.
Valentin Bartenev <vbart@nginx.com>
parents:
6383
diff
changeset
|
78 ngx_feature_name="NGX_HAVE_GD_WEBP" |
e4b00a021cea
Image filter: support for WebP.
Valentin Bartenev <vbart@nginx.com>
parents:
6383
diff
changeset
|
79 ngx_feature_test="gdImagePtr img = gdImageCreateFromWebpPtr(1, NULL);" |
e4b00a021cea
Image filter: support for WebP.
Valentin Bartenev <vbart@nginx.com>
parents:
6383
diff
changeset
|
80 . auto/feature |
e4b00a021cea
Image filter: support for WebP.
Valentin Bartenev <vbart@nginx.com>
parents:
6383
diff
changeset
|
81 |
2788 | 82 else |
83 | |
84 cat << END | |
85 | |
86 $0: error: the HTTP image filter module requires the GD library. | |
87 You can either do not enable the module or install the libraries. | |
88 | |
89 END | |
90 | |
91 exit 1 | |
92 | |
93 fi |