
For static builds we still need to manually reorder $HTTP_MODULES, and we cannot source "auto/module" like the new-style configuration mode needs, because the "auto/module" snippet modifies $HTTP_MODULES itself, but ignores the new $ngx_module_order variable when doing a static build. Fortunately, the old-style way of configuring the module is still working in all Nginx versions for statically built modules, so we can keep using that for static builds. This fixes issue #46.
20 lines
801 B
Bash
20 lines
801 B
Bash
# vim:ft=sh:
|
|
ngx_addon_name=ngx_http_fancyindex_module
|
|
|
|
if [ "$ngx_module_link" = DYNAMIC ] ; then
|
|
ngx_module_type=HTTP
|
|
ngx_module_name=ngx_http_fancyindex_module
|
|
ngx_module_srcs="$ngx_addon_dir/ngx_http_fancyindex_module.c"
|
|
ngx_module_deps="$ngx_addon_dir/template.h"
|
|
ngx_module_order="$ngx_module_name ngx_http_autoindex_module"
|
|
. auto/module
|
|
else
|
|
# XXX: Insert fancyindex module *after* index module!
|
|
#
|
|
HTTP_MODULES=`echo "${HTTP_MODULES}" | sed -e \
|
|
's/ngx_http_index_module/ngx_http_fancyindex_module ngx_http_index_module/'`
|
|
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_fancyindex_module.c"
|
|
if [ $HTTP_ADDITION != YES ] ; then
|
|
echo " - The 'addition' filter is needed for fancyindex_{header,footer}, but it was disabled"
|
|
fi
|
|
fi
|