1ngx_addon_name=ngx_http_set_misc_module 2 3if test -n "$ngx_module_link"; then 4 if test -n "$NDK_SRCS"; then 5 echo "found ngx_devel_kit for ngx_set_misc; looks good." 6 else 7 echo "error: ngx_devel_kit is required to build ngx_set_misc; please put it before ngx_set_misc." 1>&2 8 exit 1 9 fi 10else 11 if echo $HTTP_MODULES | grep " ndk_http_module" > /dev/null; then 12 echo "found ngx_devel_kit for ngx_set_misc; looks good." 13 else 14 echo "error: ngx_devel_kit is required to build ngx_set_misc; please put it before ngx_set_misc." 1>&2 15 exit 1 16 fi 17fi 18 19SET_MISC_SRCS=" \ 20 $ngx_addon_dir/src/ngx_http_set_base32.c \ 21 $ngx_addon_dir/src/ngx_http_set_default_value.c \ 22 $ngx_addon_dir/src/ngx_http_set_hashed_upstream.c \ 23 $ngx_addon_dir/src/ngx_http_set_quote_sql.c \ 24 $ngx_addon_dir/src/ngx_http_set_quote_json.c \ 25 $ngx_addon_dir/src/ngx_http_set_unescape_uri.c \ 26 $ngx_addon_dir/src/ngx_http_set_misc_module.c \ 27 $ngx_addon_dir/src/ngx_http_set_escape_uri.c \ 28 $ngx_addon_dir/src/ngx_http_set_hash.c \ 29 $ngx_addon_dir/src/ngx_http_set_local_today.c \ 30 $ngx_addon_dir/src/ngx_http_set_hex.c \ 31 $ngx_addon_dir/src/ngx_http_set_base64.c \ 32 $ngx_addon_dir/src/ngx_http_set_random.c \ 33 $ngx_addon_dir/src/ngx_http_set_secure_random.c \ 34 $ngx_addon_dir/src/ngx_http_set_rotate.c 35 " 36 37SET_MISC_DEPS=" \ 38 $ngx_addon_dir/src/ddebug.h \ 39 $ngx_addon_dir/src/ngx_http_set_default_value.h \ 40 $ngx_addon_dir/src/ngx_http_set_hashed_upstream.h \ 41 $ngx_addon_dir/src/ngx_http_set_quote_sql.h \ 42 $ngx_addon_dir/src/ngx_http_set_quote_json.h \ 43 $ngx_addon_dir/src/ngx_http_set_unescape_uri.h \ 44 $ngx_addon_dir/src/ngx_http_set_escape_uri.h \ 45 $ngx_addon_dir/src/ngx_http_set_hash.h \ 46 $ngx_addon_dir/src/ngx_http_set_local_today.h \ 47 $ngx_addon_dir/src/ngx_http_set_hex.h \ 48 $ngx_addon_dir/src/ngx_http_set_base64.h \ 49 $ngx_addon_dir/src/ngx_http_set_random.h \ 50 $ngx_addon_dir/src/ngx_http_set_rotate.h \ 51 $ngx_addon_dir/src/ngx_http_set_secure_random.h \ 52 $ngx_addon_dir/src/ngx_http_set_misc_module.h \ 53 " 54 55if [ $USE_OPENSSL = YES -o $MAIL_SSL = YES ]; then 56 SET_MISC_DEPS="$SET_MISC_DEPS $ngx_addon_dir/src/ngx_http_set_hmac.h" 57 SET_MISC_SRCS="$SET_MISC_SRCS $ngx_addon_dir/src/ngx_http_set_hmac.c" 58fi 59 60CFLAGS="$CFLAGS -DNDK_SET_VAR -DNDK_UPSTREAM_LIST" 61USE_SHA1=YES 62USE_MD5=YES 63 64if test -n "$ngx_module_link"; then 65 ngx_module_type=HTTP 66 ngx_module_name=$ngx_addon_name 67 ngx_module_incs= 68 ngx_module_deps="$SET_MISC_DEPS" 69 ngx_module_srcs="$SET_MISC_SRCS" 70 ngx_module_libs= 71 72 . auto/module 73else 74 HTTP_MODULES="$HTTP_MODULES $ngx_addon_name" 75 NGX_ADDON_SRCS="$NGX_ADDON_SRCS $SET_MISC_SRCS" 76 NGX_ADDON_DEPS="$NGX_ADDON_DEPS $SET_MISC_DEPS" 77fi 78