blob: ff99054db689a35fbf5ea2e3f56da08f65316cbe [file] [log] [blame] [raw]
Igor Sysoev1a537752009-05-01 18:53:04 +00001
2# Copyright (C) Igor Sysoev
NGINX team01f0bd52012-01-30 14:53:52 +00003# Copyright (C) Nginx, Inc.
Igor Sysoev1a537752009-05-01 18:53:04 +00004
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
16if [ $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
30fi
31
32
33if [ $ngx_found = no ]; then
34
35 # NetBSD port
36
37 ngx_feature="GD library in /usr/pkg/"
nginxbf317882013-02-05 14:21:59 +000038 ngx_feature_path="/usr/pkg/include"
Igor Sysoev1a537752009-05-01 18:53:04 +000039
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
47fi
48
49
50if [ $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
64fi
65
66
67if [ $ngx_found = yes ]; then
68
Igor Sysoev0a2a0822009-05-06 09:29:03 +000069 CORE_INCS="$CORE_INCS $ngx_feature_path"
Igor Sysoev1a537752009-05-01 18:53:04 +000070 CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
71
72else
73
74cat << END
75
76$0: error: the HTTP image filter module requires the GD library.
77You can either do not enable the module or install the libraries.
78
79END
80
81 exit 1
82
83fi