Maxim Dounin | 8298a22 | 2016-02-04 18:30:21 +0300 | [diff] [blame] | 1 | |
| 2 | # Copyright (C) Ruslan Ermilov |
| 3 | # Copyright (C) Nginx, Inc. |
| 4 | |
| 5 | |
| 6 | case $ngx_module_type in |
| 7 | HTTP_*) ngx_var=HTTP ;; |
| 8 | *) ngx_var=$ngx_module_type ;; |
| 9 | esac |
| 10 | |
| 11 | |
Maxim Dounin | ce1c3bd | 2016-02-04 20:25:29 +0300 | [diff] [blame] | 12 | if [ "$ngx_module_link" = DYNAMIC ]; then |
| 13 | |
| 14 | for ngx_module in $ngx_module_name; do |
| 15 | # extract the first name |
| 16 | break |
| 17 | done |
| 18 | |
| 19 | DYNAMIC_MODULES="$DYNAMIC_MODULES $ngx_module" |
| 20 | eval ${ngx_module}_SRCS=\"$ngx_module_srcs\" |
| 21 | |
| 22 | eval ${ngx_module}_MODULES=\"$ngx_module_name\" |
| 23 | |
| 24 | if [ -z "$ngx_module_order" -a \ |
| 25 | \( "$ngx_module_type" = "HTTP_FILTER" \ |
| 26 | -o "$ngx_module_type" = "HTTP_AUX_FILTER" \) ] |
| 27 | then |
| 28 | eval ${ngx_module}_ORDER=\"$ngx_module_name \ |
| 29 | ngx_http_copy_filter_module\" |
| 30 | else |
| 31 | eval ${ngx_module}_ORDER=\"$ngx_module_order\" |
| 32 | fi |
| 33 | |
| 34 | if test -n "$ngx_module_incs"; then |
| 35 | CORE_INCS="$CORE_INCS $ngx_module_incs" |
| 36 | fi |
| 37 | |
| 38 | libs= |
| 39 | for lib in $ngx_module_libs |
| 40 | do |
| 41 | case $lib in |
| 42 | |
Ruslan Ermilov | 890fade | 2016-02-26 14:27:04 +0300 | [diff] [blame^] | 43 | LIBXSLT | LIBGD | GEOIP | PERL) |
Maxim Dounin | ce1c3bd | 2016-02-04 20:25:29 +0300 | [diff] [blame] | 44 | libs="$libs \$NGX_LIB_$lib" |
| 45 | |
| 46 | if eval [ "\$USE_${lib}" = NO ] ; then |
| 47 | eval USE_${lib}=DYNAMIC |
| 48 | fi |
| 49 | ;; |
| 50 | |
Ruslan Ermilov | 890fade | 2016-02-26 14:27:04 +0300 | [diff] [blame^] | 51 | PCRE | OPENSSL | MD5 | SHA1 | ZLIB) |
Maxim Dounin | ce1c3bd | 2016-02-04 20:25:29 +0300 | [diff] [blame] | 52 | eval USE_${lib}=YES |
| 53 | ;; |
| 54 | |
| 55 | *) |
| 56 | libs="$libs $lib" |
| 57 | ;; |
| 58 | |
| 59 | esac |
| 60 | done |
| 61 | eval ${ngx_module}_LIBS=\'$libs\' |
| 62 | |
| 63 | elif [ "$ngx_module_link" = YES ]; then |
Maxim Dounin | 8298a22 | 2016-02-04 18:30:21 +0300 | [diff] [blame] | 64 | |
| 65 | eval ${ngx_module_type}_MODULES=\"\$${ngx_module_type}_MODULES \ |
| 66 | $ngx_module_name\" |
| 67 | |
| 68 | eval ${ngx_var}_SRCS=\"\$${ngx_var}_SRCS $ngx_module_srcs\" |
| 69 | |
| 70 | if test -n "$ngx_module_incs"; then |
| 71 | eval ${ngx_var}_INCS=\"\$${ngx_var}_INCS $ngx_module_incs\" |
| 72 | fi |
| 73 | |
| 74 | if test -n "$ngx_module_deps"; then |
| 75 | eval ${ngx_var}_DEPS=\"\$${ngx_var}_DEPS $ngx_module_deps\" |
| 76 | fi |
| 77 | |
| 78 | for lib in $ngx_module_libs |
| 79 | do |
| 80 | case $lib in |
| 81 | |
| 82 | PCRE | OPENSSL | MD5 | SHA1 | ZLIB | LIBXSLT | LIBGD | PERL | GEOIP) |
| 83 | eval USE_${lib}=YES |
| 84 | ;; |
| 85 | |
| 86 | *) |
| 87 | CORE_LIBS="$CORE_LIBS $lib" |
| 88 | ;; |
| 89 | |
| 90 | esac |
| 91 | done |
| 92 | |
| 93 | elif [ "$ngx_module_link" = ADDON ]; then |
| 94 | |
| 95 | eval ${ngx_module_type}_MODULES=\"\$${ngx_module_type}_MODULES \ |
| 96 | $ngx_module_name\" |
| 97 | |
| 98 | NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_module_srcs" |
| 99 | |
| 100 | if test -n "$ngx_module_incs"; then |
| 101 | eval ${ngx_var}_INCS=\"\$${ngx_var}_INCS $ngx_module_incs\" |
| 102 | fi |
| 103 | |
| 104 | if test -n "$ngx_module_deps"; then |
| 105 | NGX_ADDON_DEPS="$NGX_ADDON_DEPS $ngx_module_deps" |
| 106 | fi |
| 107 | |
| 108 | for lib in $ngx_module_libs |
| 109 | do |
| 110 | case $lib in |
| 111 | |
| 112 | PCRE | OPENSSL | MD5 | SHA1 | ZLIB | LIBXSLT | LIBGD | PERL | GEOIP) |
| 113 | eval USE_${lib}=YES |
| 114 | ;; |
| 115 | |
| 116 | *) |
| 117 | CORE_LIBS="$CORE_LIBS $lib" |
| 118 | ;; |
| 119 | |
| 120 | esac |
| 121 | done |
| 122 | fi |