-
Notifications
You must be signed in to change notification settings - Fork 80
/
config.in
73 lines (63 loc) · 2.71 KB
/
config.in
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
ngx_feature="ngx_small_light dependencies"
ngx_feature_libs="{$ngx_feature_libs}"
ngx_feature_name=
ngx_feature_run=no
ngx_feature_inc_path="$ngx_feature_inc_path {$ngx_feature_inc_path}"
ngx_feature_incs="#include <wand/MagickWand.h>
#include <Imlib2.h>
#include <gd.h>
"
ngx_feature_path=
ngx_feature_test="MagickWandGenesis();
Imlib_Image img_imlib2 = imlib_create_image(300, 300);
gdImagePtr img_gd = gdImageCreate(300, 300);
gdImagePtr img_gd_webp; int size = 0;
img_gd_webp = gdImageCreate(300, 300);
unsigned char *out = gdImageWebpPtr(img_gd_webp, &size);
"
. auto/feature
if [ $ngx_found = no ]; then
cat <<EOF
The compilation test below failed:
$ngx_feature_incs
$ngx_feature_test
EOF
exit 1
fi
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
SMALL_LIGHT_SRCS=" \
$ngx_addon_dir/src/ngx_http_small_light_module.c \
$ngx_addon_dir/src/ngx_http_small_light_parser.c \
$ngx_addon_dir/src/ngx_http_small_light_param.c \
$ngx_addon_dir/src/ngx_http_small_light_size.c \
$ngx_addon_dir/src/ngx_http_small_light_type.c \
$ngx_addon_dir/src/ngx_http_small_light_imagemagick.c \
$ngx_addon_dir/src/ngx_http_small_light_imlib2.c \
$ngx_addon_dir/src/ngx_http_small_light_jpeg.c \
$ngx_addon_dir/src/ngx_http_small_light_gd.c \
"
SMALL_LIGHT_DEPS=" \
$ngx_addon_dir/src/ngx_http_small_light_module.h \
$ngx_addon_dir/src/ngx_http_small_light_parser.h \
$ngx_addon_dir/src/ngx_http_small_light_param.h \
$ngx_addon_dir/src/ngx_http_small_light_size.h \
$ngx_addon_dir/src/ngx_http_small_light_type.h \
$ngx_addon_dir/src/ngx_http_small_light_imagemagick.h \
$ngx_addon_dir/src/ngx_http_small_light_imlib2.h \
$ngx_addon_dir/src/ngx_http_small_light_jpeg.h \
$ngx_addon_dir/src/ngx_http_small_light_gd.h \
"
CFLAGS="${CFLAGS} {$CFLAGS} {$GD_WEBP_FLAGS}"
ngx_addon_name=ngx_http_small_light_module
if test -n "$ngx_module_link"; then
ngx_module_type=HTTP_AUX_FILTER
ngx_module_name=$ngx_addon_name
ngx_module_deps="$SMALL_LIGHT_DEPS"
ngx_module_srcs="$SMALL_LIGHT_SRCS"
ngx_module_libs="$ngx_module_libs $ngx_feature_libs"
. auto/module
else
HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES $ngx_addon_name"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $SMALL_LIGHT_SRCS"
NGX_ADDON_DEPS="$NGX_ADDON_DEPS $SMALL_LIGHT_DEPS"
fi