Permalink
Browse files

Merge pull request #62 from theangryangel/feat/dynamic_module

Allows mod_zip to be compiled as a dynamic module.
  • Loading branch information...
2 parents a7f9f8b + 5ae85b3 commit adf75e97b5fff1de72504f1af4c72a0c7800584e @evanmiller committed on GitHub Aug 14, 2017
Showing with 15 additions and 5 deletions.
  1. +15 −5 config
View
20 config
@@ -1,9 +1,19 @@
ngx_addon_name=ngx_http_zip_module
-HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES ngx_http_zip_module"
-NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_zip_module.c"
-NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_zip_parsers.c"
-NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_zip_file.c"
-NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_zip_headers.c"
+
+if [ $ngx_module_link = DYNAMIC ] ; then
+ ngx_module_name=ngx_http_zip_module
+ ngx_module_srcs="$ngx_addon_dir/ngx_http_zip_module.c $ngx_addon_dir/ngx_http_zip_parsers.c $ngx_addon_dir/ngx_http_zip_file.c $ngx_addon_dir/ngx_http_zip_headers.c"
+
+ . auto/module
+elif [ $ngx_module_link = ADDON ] ; then
+ HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES ngx_http_zip_module"
+ NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_zip_module.c"
+ NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_zip_parsers.c"
+ NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_zip_file.c"
+ NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_zip_headers.c"
+
+ . auto/module
+fi
ngx_feature="iconv_open()"
ngx_feature_name="NGX_ZIP_HAVE_ICONV"

0 comments on commit adf75e9

Please sign in to comment.