2016-02-04 09:30:21 -06:00
|
|
|
|
|
|
|
# Copyright (C) Ruslan Ermilov
|
|
|
|
# Copyright (C) Nginx, Inc.
|
|
|
|
|
|
|
|
|
|
|
|
case $ngx_module_type in
|
|
|
|
HTTP_*) ngx_var=HTTP ;;
|
|
|
|
*) ngx_var=$ngx_module_type ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
2016-02-04 11:25:29 -06:00
|
|
|
if [ "$ngx_module_link" = DYNAMIC ]; then
|
|
|
|
|
|
|
|
for ngx_module in $ngx_module_name; do
|
|
|
|
# extract the first name
|
|
|
|
break
|
|
|
|
done
|
|
|
|
|
|
|
|
DYNAMIC_MODULES="$DYNAMIC_MODULES $ngx_module"
|
|
|
|
|
|
|
|
eval ${ngx_module}_MODULES=\"$ngx_module_name\"
|
|
|
|
|
|
|
|
if [ -z "$ngx_module_order" -a \
|
|
|
|
\( "$ngx_module_type" = "HTTP_FILTER" \
|
|
|
|
-o "$ngx_module_type" = "HTTP_AUX_FILTER" \) ]
|
|
|
|
then
|
|
|
|
eval ${ngx_module}_ORDER=\"$ngx_module_name \
|
|
|
|
ngx_http_copy_filter_module\"
|
|
|
|
else
|
|
|
|
eval ${ngx_module}_ORDER=\"$ngx_module_order\"
|
|
|
|
fi
|
|
|
|
|
2020-11-10 08:13:20 -06:00
|
|
|
srcs=
|
|
|
|
shrd=
|
|
|
|
for src in $ngx_module_srcs
|
|
|
|
do
|
|
|
|
found=no
|
|
|
|
for old in $DYNAMIC_MODULES_SRCS
|
|
|
|
do
|
|
|
|
if [ $src = $old ]; then
|
|
|
|
found=yes
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ $found = no ]; then
|
|
|
|
srcs="$srcs $src"
|
|
|
|
else
|
|
|
|
shrd="$shrd $src"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
eval ${ngx_module}_SRCS=\"$srcs\"
|
|
|
|
eval ${ngx_module}_SHRD=\"$shrd\"
|
|
|
|
|
|
|
|
DYNAMIC_MODULES_SRCS="$DYNAMIC_MODULES_SRCS $srcs"
|
|
|
|
|
2016-02-04 11:25:29 -06:00
|
|
|
if test -n "$ngx_module_incs"; then
|
|
|
|
CORE_INCS="$CORE_INCS $ngx_module_incs"
|
|
|
|
fi
|
|
|
|
|
2016-11-21 07:49:19 -06:00
|
|
|
if test -n "$ngx_module_deps"; then
|
|
|
|
NGX_ADDON_DEPS="$NGX_ADDON_DEPS $ngx_module_deps"
|
|
|
|
fi
|
|
|
|
|
2016-02-04 11:25:29 -06:00
|
|
|
libs=
|
|
|
|
for lib in $ngx_module_libs
|
|
|
|
do
|
|
|
|
case $lib in
|
|
|
|
|
2016-02-26 05:27:04 -06:00
|
|
|
LIBXSLT | LIBGD | GEOIP | PERL)
|
2016-02-04 11:25:29 -06:00
|
|
|
libs="$libs \$NGX_LIB_$lib"
|
|
|
|
|
|
|
|
if eval [ "\$USE_${lib}" = NO ] ; then
|
|
|
|
eval USE_${lib}=DYNAMIC
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
2016-06-30 10:57:39 -05:00
|
|
|
PCRE | OPENSSL | ZLIB)
|
2016-02-04 11:25:29 -06:00
|
|
|
eval USE_${lib}=YES
|
|
|
|
;;
|
|
|
|
|
2016-06-30 10:57:39 -05:00
|
|
|
MD5 | SHA1)
|
|
|
|
# obsolete
|
|
|
|
;;
|
|
|
|
|
2016-02-04 11:25:29 -06:00
|
|
|
*)
|
|
|
|
libs="$libs $lib"
|
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
eval ${ngx_module}_LIBS=\'$libs\'
|
|
|
|
|
|
|
|
elif [ "$ngx_module_link" = YES ]; then
|
2016-02-04 09:30:21 -06:00
|
|
|
|
|
|
|
eval ${ngx_module_type}_MODULES=\"\$${ngx_module_type}_MODULES \
|
|
|
|
$ngx_module_name\"
|
|
|
|
|
|
|
|
eval ${ngx_var}_SRCS=\"\$${ngx_var}_SRCS $ngx_module_srcs\"
|
|
|
|
|
|
|
|
if test -n "$ngx_module_incs"; then
|
|
|
|
eval ${ngx_var}_INCS=\"\$${ngx_var}_INCS $ngx_module_incs\"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -n "$ngx_module_deps"; then
|
|
|
|
eval ${ngx_var}_DEPS=\"\$${ngx_var}_DEPS $ngx_module_deps\"
|
|
|
|
fi
|
|
|
|
|
|
|
|
for lib in $ngx_module_libs
|
|
|
|
do
|
|
|
|
case $lib in
|
|
|
|
|
2016-06-30 10:57:39 -05:00
|
|
|
PCRE | OPENSSL | ZLIB | LIBXSLT | LIBGD | PERL | GEOIP)
|
2016-02-04 09:30:21 -06:00
|
|
|
eval USE_${lib}=YES
|
|
|
|
;;
|
|
|
|
|
2016-06-30 10:57:39 -05:00
|
|
|
MD5 | SHA1)
|
|
|
|
# obsolete
|
|
|
|
;;
|
|
|
|
|
2016-02-04 09:30:21 -06:00
|
|
|
*)
|
|
|
|
CORE_LIBS="$CORE_LIBS $lib"
|
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
elif [ "$ngx_module_link" = ADDON ]; then
|
|
|
|
|
|
|
|
eval ${ngx_module_type}_MODULES=\"\$${ngx_module_type}_MODULES \
|
|
|
|
$ngx_module_name\"
|
|
|
|
|
2020-11-10 08:13:20 -06:00
|
|
|
srcs=
|
|
|
|
for src in $ngx_module_srcs
|
|
|
|
do
|
|
|
|
found=no
|
|
|
|
for old in $NGX_ADDON_SRCS
|
|
|
|
do
|
|
|
|
if [ $src = $old ]; then
|
|
|
|
found=yes
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ $found = no ]; then
|
|
|
|
srcs="$srcs $src"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $srcs"
|
2016-02-04 09:30:21 -06:00
|
|
|
|
|
|
|
if test -n "$ngx_module_incs"; then
|
|
|
|
eval ${ngx_var}_INCS=\"\$${ngx_var}_INCS $ngx_module_incs\"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -n "$ngx_module_deps"; then
|
|
|
|
NGX_ADDON_DEPS="$NGX_ADDON_DEPS $ngx_module_deps"
|
|
|
|
fi
|
|
|
|
|
|
|
|
for lib in $ngx_module_libs
|
|
|
|
do
|
|
|
|
case $lib in
|
|
|
|
|
2016-06-30 10:57:39 -05:00
|
|
|
PCRE | OPENSSL | ZLIB | LIBXSLT | LIBGD | PERL | GEOIP)
|
2016-02-04 09:30:21 -06:00
|
|
|
eval USE_${lib}=YES
|
|
|
|
;;
|
|
|
|
|
2016-06-30 10:57:39 -05:00
|
|
|
MD5 | SHA1)
|
|
|
|
# obsolete
|
|
|
|
;;
|
|
|
|
|
2016-02-04 09:30:21 -06:00
|
|
|
*)
|
|
|
|
CORE_LIBS="$CORE_LIBS $lib"
|
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
fi
|