FRiCKLE / ngx_cache_purge

nginx module which adds ability to purge content from FastCGI, proxy, SCGI and uWSGI caches.
http://labs.frickle.com/nginx_ngx_cache_purge/
Other
1.06k stars 310 forks source link

Ability to build as dynamic module #60

Open kamil-michalak opened 6 years ago

kamil-michalak commented 6 years ago

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