updated config to check openssl and -W,-E support on the fly.

This commit is contained in:
agentzh (章亦春) 2011-01-14 20:16:13 +08:00
Родитель f2541c2d57
Коммит 0fbf2c8483
2 изменённых файлов: 55 добавлений и 1 удалений

55
config
Просмотреть файл

@ -1,3 +1,43 @@
ngx_feature="openssl md5"
ngx_feature_libs="-lssl"
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 against libcrypto"
ngx_feature="openssl MD5 by libcrypto"
ngx_feature_libs="-lcrypto"
. auto/feature
if [ $ngx_found = no ]; then
cat << END
$0: error: the ngx_lua addon requires OpenSSL library but we cannot find it.
END
exit 1
else
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
fi
else
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
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_lua addon requires the OpenSSL library.
END
exit 1
fi
ngx_feature="lua library"
ngx_feature_libs="-llua -lm"
ngx_feature_name=
@ -126,5 +166,18 @@ HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES ngx_http_lua_module"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/src/ngx_http_lua_module.c $ngx_addon_dir/src/ngx_http_lua_headers.c $ngx_addon_dir/src/ngx_http_lua_directive.c $ngx_addon_dir/src/ngx_http_lua_hook.c $ngx_addon_dir/src/ngx_http_lua_util.c $ngx_addon_dir/src/ngx_http_lua_cache.c $ngx_addon_dir/src/ngx_http_lua_conf.c $ngx_addon_dir/src/ngx_http_lua_contentby.c $ngx_addon_dir/src/ngx_http_lua_rewriteby.c $ngx_addon_dir/src/ngx_http_lua_accessby.c $ngx_addon_dir/src/ngx_http_lua_setby.c $ngx_addon_dir/src/ngx_http_lua_filter.c $ngx_addon_dir/src/ngx_http_lua_clfactory.c"
NGX_ADDON_DEPS="$NGX_ADDON_DEPS $ngx_addon_dir/src/ddebug.h $ngx_addon_dir/src/ngx_http_lua_common.h $ngx_addon_dir/src/ngx_http_lua_directive.h $ngx_addon_dir/src/ngx_http_lua_headers.h $ngx_addon_dir/src/ngx_http_lua_hook.h $ngx_addon_dir/src/ngx_http_lua_util.h $ngx_addon_dir/src/ngx_http_lua_cache.h $ngx_addon_dir/src/ngx_http_lua_conf.h $ngx_addon_dir/src/ngx_http_lua_contentby.h $ngx_addon_dir/src/ngx_http_lua_rewriteby.h $ngx_addon_dir/src/ngx_http_lua_accessby.h $ngx_addon_dir/src/ngx_http_lua_setby.h $ngx_addon_dir/src/ngx_http_lua_filter.h $ngx_addon_dir/src/ngx_http_lua_clfactory.h"
CFLAGS="$CFLAGS -DNDK_SET_VAR -DNGX_OPENSSL_MD5 -DNGX_HAVE_OPENSSL_MD5_H -DNGX_HAVE_OPENSSL_SHA1_H -DNDK_SET_VAR -DNDK_HASH -DNDK_SHA1 -DNDK_MD5"
CORE_LIBS="-Wl,-E $CORE_LIBS"
ngx_feature="export symbols by default"
ngx_feature_libs=""
ngx_feature_name=
ngx_feature_run=no
ngx_feature_incs="#include <stdio.h>"
ngx_feature_path=
ngx_feature_test='printf("hello");'
. auto/feature
if [ $ngx_found = yes ]; then
CORE_LIB="-Wl,-E $CORE_LIBS"
fi

Просмотреть файл

@ -114,6 +114,7 @@ GET /api?user=agentz
=== TEST 6: working with ngx_auth_request (simplest form, w/o ngx_memc)
--- ONLY
--- http_config
upstream backend {
drizzle_server 127.0.0.1:$TEST_NGINX_MYSQL_PORT protocol=mysql