1 2# Copyright (C) Igor Sysoev 3# Copyright (C) Nginx, Inc. 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 (void) img" 14 . auto/feature 15 16 17if [ $ngx_found = no ]; then 18 19 # FreeBSD port 20 21 ngx_feature="GD library in /usr/local/" 22 ngx_feature_path="/usr/local/include" 23 24 if [ $NGX_RPATH = YES ]; then 25 ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lgd" 26 else 27 ngx_feature_libs="-L/usr/local/lib -lgd" 28 fi 29 30 . auto/feature 31fi 32 33 34if [ $ngx_found = no ]; then 35 36 # NetBSD port 37 38 ngx_feature="GD library in /usr/pkg/" 39 ngx_feature_path="/usr/pkg/include" 40 41 if [ $NGX_RPATH = YES ]; then 42 ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lgd" 43 else 44 ngx_feature_libs="-L/usr/pkg/lib -lgd" 45 fi 46 47 . auto/feature 48fi 49 50 51if [ $ngx_found = no ]; then 52 53 # MacPorts 54 55 ngx_feature="GD library in /opt/local/" 56 ngx_feature_path="/opt/local/include" 57 58 if [ $NGX_RPATH = YES ]; then 59 ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lgd" 60 else 61 ngx_feature_libs="-L/opt/local/lib -lgd" 62 fi 63 64 . auto/feature 65fi 66 67 68if [ $ngx_found = yes ]; then 69 70 CORE_INCS="$CORE_INCS $ngx_feature_path" 71 72 if [ $USE_LIBGD = YES ]; then 73 CORE_LIBS="$CORE_LIBS $ngx_feature_libs" 74 fi 75 76 NGX_LIB_LIBGD=$ngx_feature_libs 77 78 ngx_feature="GD WebP support" 79 ngx_feature_name="NGX_HAVE_GD_WEBP" 80 ngx_feature_test="gdImagePtr img = gdImageCreateFromWebpPtr(1, NULL); 81 (void) img" 82 . auto/feature 83 84else 85 86cat << END 87 88$0: error: the HTTP image filter module requires the GD library. 89You can either do not enable the module or install the libraries. 90 91END 92 93 exit 1 94 95fi 96