FRiCKLE/ngx_cache_purge

Ability to build as dynamic module

kamil-michalak opened this issue · 1 comments

Ability to build as dynamic module

Maybe this shuold work?

if [ "$HTTP_PROXY" = "YES" ]; then
    have=NGX_HTTP_PROXY . auto/have
fi

if [ "$HTTP_FASTCGI" = "YES" ]; then
    have=NGX_HTTP_FASTCGI . auto/have
fi

if [ "$HTTP_SCGI" = "YES" ]; then
    have=NGX_HTTP_SCGI . auto/have
fi

if [ "$HTTP_UWSGI" = "YES" ]; then
    have=NGX_HTTP_UWSGI . auto/have
fi

if test -n "$ngx_module_link"; then
    ngx_module_type=HTTP
    ngx_module_name=ngx_http_cache_purge_module
    ngx_module_srcs="$ngx_addon_dir/ngx_cache_purge_module.c"

    have=NGX_CACHE_PURGE_MODULE . auto/have

    . auto/module
else
    HTTP_MODULES="$HTTP_MODULES ngx_http_cache_purge_module"
    NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_cache_purge_module.c"

    have=NGX_CACHE_PURGE_MODULE . auto/have
fi