Permalink
Browse files

now we check the openssl crypto library in config explicitly.

  • Loading branch information...
1 parent c349899 commit cfb305d32e4f2a1c69e202df0bf6d5c5a62cc60f @agentzh agentzh committed Jan 30, 2011
Showing with 47 additions and 7 deletions.
  1. +12 −7 README
  2. +35 −0 config
View
19 README
@@ -140,17 +140,22 @@ Caveats
Installation
First ensure you have openssl installed in your system.
- 1. Grab the nginx source code from nginx.net (<http://nginx.net/ >), for
- example, the version 0.8.53 (see nginx compatibility),
+ 1. Ensure you have the OpenSSL crypto library installed on
+ your system. For Ubuntu/Debian users, just install
+ the `libssl-dev` package. For Fedora/RHEL/CentOS users,
+ just install the `openssl-devel` package.
- 2. Grab the NDK module from GitHub:
+ 2. Grab the nginx source code from nginx.net (<http://nginx.net/ >), for
+ example, the version 0.8.54 (see nginx compatibility),
+
+ 3. Grab the NDK module from GitHub:
http://github.com/simpl/ngx_devel_kit
- 3. and then build the source with this module:
+ 4. and then build the source with this module:
- $ wget 'http://sysoev.ru/nginx/nginx-0.8.53.tar.gz'
- $ tar -xzvf nginx-0.8.53.tar.gz
- $ cd nginx-0.8.53/
+ $ wget 'http://sysoev.ru/nginx/nginx-0.8.54.tar.gz'
+ $ tar -xzvf nginx-0.8.54.tar.gz
+ $ cd nginx-0.8.54/
# Here we assume you would install you nginx under /opt/nginx/.
$ ./configure --prefix=/opt/nginx \
View
35 config
@@ -1,3 +1,38 @@
+ngx_feature="OpenSSL md5 crypto library"
+ngx_feature_libs="-lcrypto"
+ngx_feature_name=
+ngx_feature_run=no
+ngx_feature_incs="#include <openssl/md5.h>"
+ngx_feature_path=
+ngx_feature_test="MD5(NULL, 0, NULL);"
+
+. auto/feature
+
+if [ $ngx_found = no ]; then
+ # Solaris and others
+ ngx_feature="OpenSSL md5 crypto library under /lib"
+ ngx_feature_libs="-L/lib -lcrypto"
+
+ . auto/feature
+
+ if [ $ngx_found = no ]; then
+ cat << END
+ $0: error: the ngx_set_misc addon requires OpenSSL library but we cannot find it.
+END
+ exit 1
+ fi
+fi
+
+if [ $ngx_found = yes ]; then
+ CORE_INCS="$CORE_INCS $ngx_feature_path"
+ CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
+else
+ cat << END
+ $0: error: the ngx_set_misc addon requires the OpenSSL crypto library.
+END
+ exit 1
+fi
+
ngx_addon_name=ngx_http_set_misc_module
HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES ngx_http_set_misc_module"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/src/ngx_http_set_base32.c $ngx_addon_dir/src/ngx_http_set_default_value.c $ngx_addon_dir/src/ngx_http_set_hashed_upstream.c $ngx_addon_dir/src/ngx_http_set_quote_sql.c $ngx_addon_dir/src/ngx_http_set_quote_json.c $ngx_addon_dir/src/ngx_http_set_unescape_uri.c $ngx_addon_dir/src/ngx_http_set_misc_module.c $ngx_addon_dir/src/ngx_http_set_escape_uri.c $ngx_addon_dir/src/ngx_http_set_hash.c $ngx_addon_dir/src/ngx_http_set_local_today.c"

0 comments on commit cfb305d

Please sign in to comment.