Compare commits

..

12 Commits

Author SHA1 Message Date
77e510abdc updated the tests for the new release. 2011-07-30 10:13:47 +08:00
88272c5503 fixed a typo in the patch. 2011-07-30 09:59:43 +08:00
4004360b4c fixed a regression when enabling luajit in 1.0.4.1rc5. thanks @Lance. released ngx_openresty 1.0.4.1rc6. 2011-07-28 12:11:01 +08:00
177e1bfcdf we do not specify TARGET_STRIP= when CCDEBUG is set to -g because it will make gmake crash. sigh. 2011-07-26 12:19:15 +08:00
0bf8bbe040 upgraded ngx_iconv to 0.10rc3, ngx_form_input to 0.07rc5, ngx_array_var to 0.03rc1, and ngx_set_misc to 0.22rc1; now --with-debug option also affects luajit2.0; disabled target stripping in luajit2.0; released ngx_openresty 1.0.4.1rc5. 2011-07-26 11:56:29 +08:00
8ba0a37a42 ngx_openresty 1.0.4.1rc4. 2011-07-25 15:56:17 +08:00
557f52794c applied the official hotfix1 patch for LuaJIT 2.0.0 beta8; also released ngx_openresty 1.0.4.1rc4. 2011-07-25 15:51:44 +08:00
b7e7398fc9 now the --with-cc=CC option of ./configure also controls the C compiler used by Lua and LuaJIT. thanks @姜大炮 for reporting the issue; also released ngx_openresty 1.0.4.1rc3. 2011-07-23 12:37:44 +08:00
68aac430ae upgraded ngx_lua to v0.2.1rc2 and ngx_redis2 to v0.07; also released ngx_openresty 1.0.4.1rc2. 2011-07-23 11:55:35 +08:00
d2c3802134 upgraded ngx_rds_json to v0.12rc1, ngx_drizzle to v0.1.1rc2, ngx_lua to v0.2.1rc1, ngx_postgres to v0.9rc1, ngx_redis2 to v0.07rc6, and also released ngx_openresty 1.0.4.1rc1. 2011-07-14 16:21:24 +08:00
918e884175 Merge branch 'master' of github.com:agentzh/ngx_openresty 2011-07-14 11:43:19 +08:00
cbce5daa05 no longer enable gcc -O2 by default. -O2 hates backtraces. 2011-07-13 22:15:36 +08:00
6 changed files with 310 additions and 143 deletions

View File

@ -5,8 +5,8 @@
# Parent 610e909bb9e29766188aa86fae3abe0bd3432940 # Parent 610e909bb9e29766188aa86fae3abe0bd3432940
Core: fix body if it's preread and there are extra data. Core: fix body if it's preread and there are extra data.
--- nginx-0.8.54/src/http/ngx_http_request_body.c 2011-07-05 12:11:21.619264633 +0800 --- nginx-1.0.4/src/http/ngx_http_request_body.c 2011-07-05 12:11:21.619264633 +0800
+++ nginx-0.8.54-patched/src/http/ngx_http_request_body.c 2011-07-05 12:14:30.694321554 +0800 +++ nginx-1.0.4-patched/src/http/ngx_http_request_body.c 2011-07-05 12:14:30.694321554 +0800
@@ -141,6 +141,7 @@ @@ -141,6 +141,7 @@
/* the whole request body was pre-read */ /* the whole request body was pre-read */

View File

@ -187,26 +187,25 @@ export LUA_INC='$OPENRESTY_BUILD_DIR/lua-root/usr/local/openresty/lua/include'
cd .. cd ..
cd nginx-1.0.4 cd nginx-1.0.4
./configure --prefix=/usr/local/openresty/nginx \ ./configure --prefix=/usr/local/openresty/nginx \
--with-cc-opt='-O2' \
--add-module=../echo-nginx-module-0.37rc1 \ --add-module=../echo-nginx-module-0.37rc1 \
--add-module=../xss-nginx-module-0.03rc3 \ --add-module=../xss-nginx-module-0.03rc3 \
--add-module=../ngx_devel_kit-0.2.17 \ --add-module=../ngx_devel_kit-0.2.17 \
--add-module=../set-misc-nginx-module-0.21 \ --add-module=../set-misc-nginx-module-0.22rc1 \
--add-module=../form-input-nginx-module-0.07rc4 \ --add-module=../form-input-nginx-module-0.07rc5 \
--add-module=../encrypted-session-nginx-module-0.01 \ --add-module=../encrypted-session-nginx-module-0.01 \
--add-module=../ngx_lua-0.2.0 \ --add-module=../ngx_lua-0.2.1rc2 \
--add-module=../headers-more-nginx-module-0.15 \ --add-module=../headers-more-nginx-module-0.15 \
--add-module=../srcache-nginx-module-0.12 \ --add-module=../srcache-nginx-module-0.12 \
--add-module=../array-var-nginx-module-0.02 \ --add-module=../array-var-nginx-module-0.03rc1 \
--add-module=../memc-nginx-module-0.12 \ --add-module=../memc-nginx-module-0.12 \
--add-module=../redis2-nginx-module-0.07rc5 \ --add-module=../redis2-nginx-module-0.07 \
--add-module=../upstream-keepalive-nginx-module-0.3 \ --add-module=../upstream-keepalive-nginx-module-0.3 \
--add-module=../auth-request-nginx-module-0.2 \ --add-module=../auth-request-nginx-module-0.2 \
--add-module=../rds-json-nginx-module-0.11 \ --add-module=../rds-json-nginx-module-0.12rc1 \
--with-http_ssl_module --with-http_ssl_module
cd ../.. cd ../..
--- makefile --- makefile
.PHONY: all install .PHONY: all install clean
all: all:
cd build/lua-5.1.4 && $(MAKE) linux cd build/lua-5.1.4 && $(MAKE) linux
@ -221,7 +220,7 @@ clean:
=== TEST 3: --with-debug === TEST 3: --with-debug (standard lua)
--- cmd: ./configure --with-debug --dry-run --- cmd: ./configure --with-debug --dry-run
--- out --- out
platform: linux (linux) platform: linux (linux)
@ -240,22 +239,22 @@ cd nginx-1.0.4
--add-module=../echo-nginx-module-0.37rc1 \ --add-module=../echo-nginx-module-0.37rc1 \
--add-module=../xss-nginx-module-0.03rc3 \ --add-module=../xss-nginx-module-0.03rc3 \
--add-module=../ngx_devel_kit-0.2.17 \ --add-module=../ngx_devel_kit-0.2.17 \
--add-module=../set-misc-nginx-module-0.21 \ --add-module=../set-misc-nginx-module-0.22rc1 \
--add-module=../form-input-nginx-module-0.07rc4 \ --add-module=../form-input-nginx-module-0.07rc5 \
--add-module=../encrypted-session-nginx-module-0.01 \ --add-module=../encrypted-session-nginx-module-0.01 \
--add-module=../ngx_lua-0.2.0 \ --add-module=../ngx_lua-0.2.1rc2 \
--add-module=../headers-more-nginx-module-0.15 \ --add-module=../headers-more-nginx-module-0.15 \
--add-module=../srcache-nginx-module-0.12 \ --add-module=../srcache-nginx-module-0.12 \
--add-module=../array-var-nginx-module-0.02 \ --add-module=../array-var-nginx-module-0.03rc1 \
--add-module=../memc-nginx-module-0.12 \ --add-module=../memc-nginx-module-0.12 \
--add-module=../redis2-nginx-module-0.07rc5 \ --add-module=../redis2-nginx-module-0.07 \
--add-module=../upstream-keepalive-nginx-module-0.3 \ --add-module=../upstream-keepalive-nginx-module-0.3 \
--add-module=../auth-request-nginx-module-0.2 \ --add-module=../auth-request-nginx-module-0.2 \
--add-module=../rds-json-nginx-module-0.11 \ --add-module=../rds-json-nginx-module-0.12rc1 \
--with-http_ssl_module --with-http_ssl_module
cd ../.. cd ../..
--- makefile --- makefile
.PHONY: all install .PHONY: all install clean
all: all:
cd build/lua-5.1.4 && $(MAKE) linux cd build/lua-5.1.4 && $(MAKE) linux
@ -287,41 +286,40 @@ platform: linux (linux)
cp -rp bundle/ build/ cp -rp bundle/ build/
cd build cd build
cd LuaJIT-2.0.0-beta8 cd LuaJIT-2.0.0-beta8
make PREFIX=/usr/local/openresty/luajit make TARGET_STRIP=@: PREFIX=/usr/local/openresty/luajit
make install PREFIX=/usr/local/openresty/luajit DESTDIR=$OPENRESTY_BUILD_DIR/luajit-root make install TARGET_STRIP=@: PREFIX=/usr/local/openresty/luajit DESTDIR=$OPENRESTY_BUILD_DIR/luajit-root
export LUAJIT_LIB='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/lib' export LUAJIT_LIB='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/lib'
export LUAJIT_INC='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.0' export LUAJIT_INC='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.0'
cd .. cd ..
cd nginx-1.0.4 cd nginx-1.0.4
./configure --prefix=/usr/local/openresty/nginx \ ./configure --prefix=/usr/local/openresty/nginx \
--with-cc-opt='-O2' \
--add-module=../echo-nginx-module-0.37rc1 \ --add-module=../echo-nginx-module-0.37rc1 \
--add-module=../xss-nginx-module-0.03rc3 \ --add-module=../xss-nginx-module-0.03rc3 \
--add-module=../ngx_devel_kit-0.2.17 \ --add-module=../ngx_devel_kit-0.2.17 \
--add-module=../set-misc-nginx-module-0.21 \ --add-module=../set-misc-nginx-module-0.22rc1 \
--add-module=../form-input-nginx-module-0.07rc4 \ --add-module=../form-input-nginx-module-0.07rc5 \
--add-module=../encrypted-session-nginx-module-0.01 \ --add-module=../encrypted-session-nginx-module-0.01 \
--add-module=../ngx_lua-0.2.0 \ --add-module=../ngx_lua-0.2.1rc2 \
--add-module=../headers-more-nginx-module-0.15 \ --add-module=../headers-more-nginx-module-0.15 \
--add-module=../srcache-nginx-module-0.12 \ --add-module=../srcache-nginx-module-0.12 \
--add-module=../array-var-nginx-module-0.02 \ --add-module=../array-var-nginx-module-0.03rc1 \
--add-module=../memc-nginx-module-0.12 \ --add-module=../memc-nginx-module-0.12 \
--add-module=../redis2-nginx-module-0.07rc5 \ --add-module=../redis2-nginx-module-0.07 \
--add-module=../upstream-keepalive-nginx-module-0.3 \ --add-module=../upstream-keepalive-nginx-module-0.3 \
--add-module=../auth-request-nginx-module-0.2 \ --add-module=../auth-request-nginx-module-0.2 \
--add-module=../rds-json-nginx-module-0.11 \ --add-module=../rds-json-nginx-module-0.12rc1 \
--with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib' \ --with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib' \
--with-http_ssl_module --with-http_ssl_module
cd ../.. cd ../..
--- makefile --- makefile
.PHONY: all install .PHONY: all install clean
all: all:
cd build/LuaJIT-2.0.0-beta8 && $(MAKE) PREFIX=/usr/local/openresty/luajit cd build/LuaJIT-2.0.0-beta8 && $(MAKE) TARGET_STRIP=@: PREFIX=/usr/local/openresty/luajit
cd build/nginx-1.0.4 && $(MAKE) cd build/nginx-1.0.4 && $(MAKE)
install: install:
cd build/LuaJIT-2.0.0-beta8 && $(MAKE) install PREFIX=/usr/local/openresty/luajit DESTDIR=$(DESTDIR) cd build/LuaJIT-2.0.0-beta8 && $(MAKE) install TARGET_STRIP=@: PREFIX=/usr/local/openresty/luajit DESTDIR=$(DESTDIR)
cd build/nginx-1.0.4 && $(MAKE) install DESTDIR=$(DESTDIR) cd build/nginx-1.0.4 && $(MAKE) install DESTDIR=$(DESTDIR)
clean: clean:
@ -336,41 +334,41 @@ platform: linux (linux)
cp -rp bundle/ build/ cp -rp bundle/ build/
cd build cd build
cd LuaJIT-2.0.0-beta8 cd LuaJIT-2.0.0-beta8
make PREFIX=/usr/local/openresty/luajit make TARGET_STRIP=@: PREFIX=/usr/local/openresty/luajit
make install PREFIX=/usr/local/openresty/luajit DESTDIR=$OPENRESTY_BUILD_DIR/luajit-root make install TARGET_STRIP=@: PREFIX=/usr/local/openresty/luajit DESTDIR=$OPENRESTY_BUILD_DIR/luajit-root
export LUAJIT_LIB='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/lib' export LUAJIT_LIB='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/lib'
export LUAJIT_INC='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.0' export LUAJIT_INC='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.0'
cd .. cd ..
cd nginx-1.0.4 cd nginx-1.0.4
./configure --prefix=/usr/local/openresty/nginx \ ./configure --prefix=/usr/local/openresty/nginx \
--with-cc-opt='-O2 -O3' \ --with-cc-opt='-O3' \
--add-module=../echo-nginx-module-0.37rc1 \ --add-module=../echo-nginx-module-0.37rc1 \
--add-module=../xss-nginx-module-0.03rc3 \ --add-module=../xss-nginx-module-0.03rc3 \
--add-module=../ngx_devel_kit-0.2.17 \ --add-module=../ngx_devel_kit-0.2.17 \
--add-module=../set-misc-nginx-module-0.21 \ --add-module=../set-misc-nginx-module-0.22rc1 \
--add-module=../form-input-nginx-module-0.07rc4 \ --add-module=../form-input-nginx-module-0.07rc5 \
--add-module=../encrypted-session-nginx-module-0.01 \ --add-module=../encrypted-session-nginx-module-0.01 \
--add-module=../ngx_lua-0.2.0 \ --add-module=../ngx_lua-0.2.1rc2 \
--add-module=../headers-more-nginx-module-0.15 \ --add-module=../headers-more-nginx-module-0.15 \
--add-module=../srcache-nginx-module-0.12 \ --add-module=../srcache-nginx-module-0.12 \
--add-module=../array-var-nginx-module-0.02 \ --add-module=../array-var-nginx-module-0.03rc1 \
--add-module=../memc-nginx-module-0.12 \ --add-module=../memc-nginx-module-0.12 \
--add-module=../redis2-nginx-module-0.07rc5 \ --add-module=../redis2-nginx-module-0.07 \
--add-module=../upstream-keepalive-nginx-module-0.3 \ --add-module=../upstream-keepalive-nginx-module-0.3 \
--add-module=../auth-request-nginx-module-0.2 \ --add-module=../auth-request-nginx-module-0.2 \
--add-module=../rds-json-nginx-module-0.11 \ --add-module=../rds-json-nginx-module-0.12rc1 \
--with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib' \ --with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib' \
--with-http_ssl_module --with-http_ssl_module
cd ../.. cd ../..
--- makefile --- makefile
.PHONY: all install .PHONY: all install clean
all: all:
cd build/LuaJIT-2.0.0-beta8 && $(MAKE) PREFIX=/usr/local/openresty/luajit cd build/LuaJIT-2.0.0-beta8 && $(MAKE) TARGET_STRIP=@: PREFIX=/usr/local/openresty/luajit
cd build/nginx-1.0.4 && $(MAKE) cd build/nginx-1.0.4 && $(MAKE)
install: install:
cd build/LuaJIT-2.0.0-beta8 && $(MAKE) install PREFIX=/usr/local/openresty/luajit DESTDIR=$(DESTDIR) cd build/LuaJIT-2.0.0-beta8 && $(MAKE) install TARGET_STRIP=@: PREFIX=/usr/local/openresty/luajit DESTDIR=$(DESTDIR)
cd build/nginx-1.0.4 && $(MAKE) install DESTDIR=$(DESTDIR) cd build/nginx-1.0.4 && $(MAKE) install DESTDIR=$(DESTDIR)
clean: clean:
@ -385,41 +383,40 @@ platform: linux (linux)
cp -rp bundle/ build/ cp -rp bundle/ build/
cd build cd build
cd LuaJIT-2.0.0-beta8 cd LuaJIT-2.0.0-beta8
make PREFIX=/usr/local/openresty/luajit make TARGET_STRIP=@: PREFIX=/usr/local/openresty/luajit
make install PREFIX=/usr/local/openresty/luajit DESTDIR=$OPENRESTY_BUILD_DIR/luajit-root make install TARGET_STRIP=@: PREFIX=/usr/local/openresty/luajit DESTDIR=$OPENRESTY_BUILD_DIR/luajit-root
export LUAJIT_LIB='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/lib' export LUAJIT_LIB='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/lib'
export LUAJIT_INC='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.0' export LUAJIT_INC='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.0'
cd .. cd ..
cd nginx-1.0.4 cd nginx-1.0.4
./configure --prefix=/usr/local/openresty/nginx \ ./configure --prefix=/usr/local/openresty/nginx \
--with-cc-opt='-O2' \
--add-module=../echo-nginx-module-0.37rc1 \ --add-module=../echo-nginx-module-0.37rc1 \
--add-module=../xss-nginx-module-0.03rc3 \ --add-module=../xss-nginx-module-0.03rc3 \
--add-module=../ngx_devel_kit-0.2.17 \ --add-module=../ngx_devel_kit-0.2.17 \
--add-module=../set-misc-nginx-module-0.21 \ --add-module=../set-misc-nginx-module-0.22rc1 \
--add-module=../form-input-nginx-module-0.07rc4 \ --add-module=../form-input-nginx-module-0.07rc5 \
--add-module=../encrypted-session-nginx-module-0.01 \ --add-module=../encrypted-session-nginx-module-0.01 \
--add-module=../ngx_lua-0.2.0 \ --add-module=../ngx_lua-0.2.1rc2 \
--add-module=../headers-more-nginx-module-0.15 \ --add-module=../headers-more-nginx-module-0.15 \
--add-module=../srcache-nginx-module-0.12 \ --add-module=../srcache-nginx-module-0.12 \
--add-module=../array-var-nginx-module-0.02 \ --add-module=../array-var-nginx-module-0.03rc1 \
--add-module=../memc-nginx-module-0.12 \ --add-module=../memc-nginx-module-0.12 \
--add-module=../redis2-nginx-module-0.07rc5 \ --add-module=../redis2-nginx-module-0.07 \
--add-module=../upstream-keepalive-nginx-module-0.3 \ --add-module=../upstream-keepalive-nginx-module-0.3 \
--add-module=../auth-request-nginx-module-0.2 \ --add-module=../auth-request-nginx-module-0.2 \
--add-module=../rds-json-nginx-module-0.11 \ --add-module=../rds-json-nginx-module-0.12rc1 \
--with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib -llua' \ --with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib -llua' \
--with-http_ssl_module --with-http_ssl_module
cd ../.. cd ../..
--- makefile --- makefile
.PHONY: all install .PHONY: all install clean
all: all:
cd build/LuaJIT-2.0.0-beta8 && $(MAKE) PREFIX=/usr/local/openresty/luajit cd build/LuaJIT-2.0.0-beta8 && $(MAKE) TARGET_STRIP=@: PREFIX=/usr/local/openresty/luajit
cd build/nginx-1.0.4 && $(MAKE) cd build/nginx-1.0.4 && $(MAKE)
install: install:
cd build/LuaJIT-2.0.0-beta8 && $(MAKE) install PREFIX=/usr/local/openresty/luajit DESTDIR=$(DESTDIR) cd build/LuaJIT-2.0.0-beta8 && $(MAKE) install TARGET_STRIP=@: PREFIX=/usr/local/openresty/luajit DESTDIR=$(DESTDIR)
cd build/nginx-1.0.4 && $(MAKE) install DESTDIR=$(DESTDIR) cd build/nginx-1.0.4 && $(MAKE) install DESTDIR=$(DESTDIR)
clean: clean:
@ -434,40 +431,39 @@ platform: linux (linux)
cp -rp bundle/ build/ cp -rp bundle/ build/
cd build cd build
cd LuaJIT-2.0.0-beta8 cd LuaJIT-2.0.0-beta8
make PREFIX=/usr/local/openresty/luajit make TARGET_STRIP=@: PREFIX=/usr/local/openresty/luajit
make install PREFIX=/usr/local/openresty/luajit DESTDIR=$OPENRESTY_BUILD_DIR/luajit-root make install TARGET_STRIP=@: PREFIX=/usr/local/openresty/luajit DESTDIR=$OPENRESTY_BUILD_DIR/luajit-root
export LUAJIT_LIB='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/lib' export LUAJIT_LIB='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/lib'
export LUAJIT_INC='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.0' export LUAJIT_INC='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.0'
cd .. cd ..
cd nginx-1.0.4 cd nginx-1.0.4
./configure --prefix=/usr/local/openresty/nginx \ ./configure --prefix=/usr/local/openresty/nginx \
--with-cc-opt='-O2' \
--add-module=../echo-nginx-module-0.37rc1 \ --add-module=../echo-nginx-module-0.37rc1 \
--add-module=../xss-nginx-module-0.03rc3 \ --add-module=../xss-nginx-module-0.03rc3 \
--add-module=../ngx_devel_kit-0.2.17 \ --add-module=../ngx_devel_kit-0.2.17 \
--add-module=../set-misc-nginx-module-0.21 \ --add-module=../set-misc-nginx-module-0.22rc1 \
--add-module=../form-input-nginx-module-0.07rc4 \ --add-module=../form-input-nginx-module-0.07rc5 \
--add-module=../encrypted-session-nginx-module-0.01 \ --add-module=../encrypted-session-nginx-module-0.01 \
--add-module=../headers-more-nginx-module-0.15 \ --add-module=../headers-more-nginx-module-0.15 \
--add-module=../srcache-nginx-module-0.12 \ --add-module=../srcache-nginx-module-0.12 \
--add-module=../array-var-nginx-module-0.02 \ --add-module=../array-var-nginx-module-0.03rc1 \
--add-module=../memc-nginx-module-0.12 \ --add-module=../memc-nginx-module-0.12 \
--add-module=../redis2-nginx-module-0.07rc5 \ --add-module=../redis2-nginx-module-0.07 \
--add-module=../upstream-keepalive-nginx-module-0.3 \ --add-module=../upstream-keepalive-nginx-module-0.3 \
--add-module=../auth-request-nginx-module-0.2 \ --add-module=../auth-request-nginx-module-0.2 \
--add-module=../rds-json-nginx-module-0.11 \ --add-module=../rds-json-nginx-module-0.12rc1 \
--with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib' \ --with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib' \
--with-http_ssl_module --with-http_ssl_module
cd ../.. cd ../..
--- makefile --- makefile
.PHONY: all install .PHONY: all install clean
all: all:
cd build/LuaJIT-2.0.0-beta8 && $(MAKE) PREFIX=/usr/local/openresty/luajit cd build/LuaJIT-2.0.0-beta8 && $(MAKE) TARGET_STRIP=@: PREFIX=/usr/local/openresty/luajit
cd build/nginx-1.0.4 && $(MAKE) cd build/nginx-1.0.4 && $(MAKE)
install: install:
cd build/LuaJIT-2.0.0-beta8 && $(MAKE) install PREFIX=/usr/local/openresty/luajit DESTDIR=$(DESTDIR) cd build/LuaJIT-2.0.0-beta8 && $(MAKE) install TARGET_STRIP=@: PREFIX=/usr/local/openresty/luajit DESTDIR=$(DESTDIR)
cd build/nginx-1.0.4 && $(MAKE) install DESTDIR=$(DESTDIR) cd build/nginx-1.0.4 && $(MAKE) install DESTDIR=$(DESTDIR)
clean: clean:
@ -483,25 +479,24 @@ cp -rp bundle/ build/
cd build cd build
cd nginx-1.0.4 cd nginx-1.0.4
./configure --prefix=/usr/local/openresty/nginx \ ./configure --prefix=/usr/local/openresty/nginx \
--with-cc-opt='-O2' \
--add-module=../echo-nginx-module-0.37rc1 \ --add-module=../echo-nginx-module-0.37rc1 \
--add-module=../xss-nginx-module-0.03rc3 \ --add-module=../xss-nginx-module-0.03rc3 \
--add-module=../ngx_devel_kit-0.2.17 \ --add-module=../ngx_devel_kit-0.2.17 \
--add-module=../set-misc-nginx-module-0.21 \ --add-module=../set-misc-nginx-module-0.22rc1 \
--add-module=../form-input-nginx-module-0.07rc4 \ --add-module=../form-input-nginx-module-0.07rc5 \
--add-module=../encrypted-session-nginx-module-0.01 \ --add-module=../encrypted-session-nginx-module-0.01 \
--add-module=../headers-more-nginx-module-0.15 \ --add-module=../headers-more-nginx-module-0.15 \
--add-module=../srcache-nginx-module-0.12 \ --add-module=../srcache-nginx-module-0.12 \
--add-module=../array-var-nginx-module-0.02 \ --add-module=../array-var-nginx-module-0.03rc1 \
--add-module=../memc-nginx-module-0.12 \ --add-module=../memc-nginx-module-0.12 \
--add-module=../redis2-nginx-module-0.07rc5 \ --add-module=../redis2-nginx-module-0.07 \
--add-module=../upstream-keepalive-nginx-module-0.3 \ --add-module=../upstream-keepalive-nginx-module-0.3 \
--add-module=../auth-request-nginx-module-0.2 \ --add-module=../auth-request-nginx-module-0.2 \
--add-module=../rds-json-nginx-module-0.11 \ --add-module=../rds-json-nginx-module-0.12rc1 \
--with-http_ssl_module --with-http_ssl_module
cd ../.. cd ../..
--- makefile --- makefile
.PHONY: all install .PHONY: all install clean
all: all:
cd build/nginx-1.0.4 && $(MAKE) cd build/nginx-1.0.4 && $(MAKE)
@ -528,26 +523,25 @@ export LUA_INC='$OPENRESTY_BUILD_DIR/lua-root/opt/blah/lua/include'
cd .. cd ..
cd nginx-1.0.4 cd nginx-1.0.4
./configure --prefix=/opt/blah/nginx \ ./configure --prefix=/opt/blah/nginx \
--with-cc-opt='-O2' \
--add-module=../echo-nginx-module-0.37rc1 \ --add-module=../echo-nginx-module-0.37rc1 \
--add-module=../xss-nginx-module-0.03rc3 \ --add-module=../xss-nginx-module-0.03rc3 \
--add-module=../ngx_devel_kit-0.2.17 \ --add-module=../ngx_devel_kit-0.2.17 \
--add-module=../set-misc-nginx-module-0.21 \ --add-module=../set-misc-nginx-module-0.22rc1 \
--add-module=../form-input-nginx-module-0.07rc4 \ --add-module=../form-input-nginx-module-0.07rc5 \
--add-module=../encrypted-session-nginx-module-0.01 \ --add-module=../encrypted-session-nginx-module-0.01 \
--add-module=../ngx_lua-0.2.0 \ --add-module=../ngx_lua-0.2.1rc2 \
--add-module=../headers-more-nginx-module-0.15 \ --add-module=../headers-more-nginx-module-0.15 \
--add-module=../srcache-nginx-module-0.12 \ --add-module=../srcache-nginx-module-0.12 \
--add-module=../array-var-nginx-module-0.02 \ --add-module=../array-var-nginx-module-0.03rc1 \
--add-module=../memc-nginx-module-0.12 \ --add-module=../memc-nginx-module-0.12 \
--add-module=../redis2-nginx-module-0.07rc5 \ --add-module=../redis2-nginx-module-0.07 \
--add-module=../upstream-keepalive-nginx-module-0.3 \ --add-module=../upstream-keepalive-nginx-module-0.3 \
--add-module=../auth-request-nginx-module-0.2 \ --add-module=../auth-request-nginx-module-0.2 \
--add-module=../rds-json-nginx-module-0.11 \ --add-module=../rds-json-nginx-module-0.12rc1 \
--with-http_ssl_module --with-http_ssl_module
cd ../.. cd ../..
--- makefile --- makefile
.PHONY: all install .PHONY: all install clean
all: all:
cd build/lua-5.1.4 && $(MAKE) linux cd build/lua-5.1.4 && $(MAKE) linux
@ -739,26 +733,25 @@ export LUA_INC='$OPENRESTY_BUILD_DIR/lua-root/usr/local/openresty/lua/include'
cd .. cd ..
cd nginx-1.0.4 cd nginx-1.0.4
./configure --prefix=/usr/local/openresty/nginx \ ./configure --prefix=/usr/local/openresty/nginx \
--with-cc-opt='-O2' \
--add-module=../echo-nginx-module-0.37rc1 \ --add-module=../echo-nginx-module-0.37rc1 \
--add-module=../xss-nginx-module-0.03rc3 \ --add-module=../xss-nginx-module-0.03rc3 \
--add-module=../ngx_devel_kit-0.2.17 \ --add-module=../ngx_devel_kit-0.2.17 \
--add-module=../set-misc-nginx-module-0.21 \ --add-module=../set-misc-nginx-module-0.22rc1 \
--add-module=../form-input-nginx-module-0.07rc4 \ --add-module=../form-input-nginx-module-0.07rc5 \
--add-module=../encrypted-session-nginx-module-0.01 \ --add-module=../encrypted-session-nginx-module-0.01 \
--add-module=../ngx_lua-0.2.0 \ --add-module=../ngx_lua-0.2.1rc2 \
--add-module=../headers-more-nginx-module-0.15 \ --add-module=../headers-more-nginx-module-0.15 \
--add-module=../srcache-nginx-module-0.12 \ --add-module=../srcache-nginx-module-0.12 \
--add-module=../array-var-nginx-module-0.02 \ --add-module=../array-var-nginx-module-0.03rc1 \
--add-module=../memc-nginx-module-0.12 \ --add-module=../memc-nginx-module-0.12 \
--add-module=../redis2-nginx-module-0.07rc5 \ --add-module=../redis2-nginx-module-0.07 \
--add-module=../upstream-keepalive-nginx-module-0.3 \ --add-module=../upstream-keepalive-nginx-module-0.3 \
--add-module=../auth-request-nginx-module-0.2 \ --add-module=../auth-request-nginx-module-0.2 \
--add-module=../rds-json-nginx-module-0.11 \ --add-module=../rds-json-nginx-module-0.12rc1 \
--with-http_ssl_module --with-http_ssl_module
cd ../.. cd ../..
--- makefile --- makefile
.PHONY: all install .PHONY: all install clean
all: all:
cd build/lua-5.1.4 && $(MAKE) solaris cd build/lua-5.1.4 && $(MAKE) solaris
@ -787,27 +780,26 @@ export LUA_INC='$OPENRESTY_BUILD_DIR/lua-root/usr/local/openresty/lua/include'
cd .. cd ..
cd nginx-1.0.4 cd nginx-1.0.4
./configure --prefix=/usr/local/openresty/nginx \ ./configure --prefix=/usr/local/openresty/nginx \
--with-cc-opt='-O2' \
--add-module=../echo-nginx-module-0.37rc1 \ --add-module=../echo-nginx-module-0.37rc1 \
--add-module=../xss-nginx-module-0.03rc3 \ --add-module=../xss-nginx-module-0.03rc3 \
--add-module=../ngx_devel_kit-0.2.17 \ --add-module=../ngx_devel_kit-0.2.17 \
--add-module=../set-misc-nginx-module-0.21 \ --add-module=../set-misc-nginx-module-0.22rc1 \
--add-module=../form-input-nginx-module-0.07rc4 \ --add-module=../form-input-nginx-module-0.07rc5 \
--add-module=../encrypted-session-nginx-module-0.01 \ --add-module=../encrypted-session-nginx-module-0.01 \
--add-module=../drizzle-nginx-module-0.1.1rc1 \ --add-module=../drizzle-nginx-module-0.1.1rc2 \
--add-module=../ngx_lua-0.2.0 \ --add-module=../ngx_lua-0.2.1rc2 \
--add-module=../headers-more-nginx-module-0.15 \ --add-module=../headers-more-nginx-module-0.15 \
--add-module=../srcache-nginx-module-0.12 \ --add-module=../srcache-nginx-module-0.12 \
--add-module=../array-var-nginx-module-0.02 \ --add-module=../array-var-nginx-module-0.03rc1 \
--add-module=../memc-nginx-module-0.12 \ --add-module=../memc-nginx-module-0.12 \
--add-module=../redis2-nginx-module-0.07rc5 \ --add-module=../redis2-nginx-module-0.07 \
--add-module=../upstream-keepalive-nginx-module-0.3 \ --add-module=../upstream-keepalive-nginx-module-0.3 \
--add-module=../auth-request-nginx-module-0.2 \ --add-module=../auth-request-nginx-module-0.2 \
--add-module=../rds-json-nginx-module-0.11 \ --add-module=../rds-json-nginx-module-0.12rc1 \
--with-http_ssl_module --with-http_ssl_module
cd ../.. cd ../..
--- makefile --- makefile
.PHONY: all install .PHONY: all install clean
all: all:
cd build/lua-5.1.4 && $(MAKE) solaris cd build/lua-5.1.4 && $(MAKE) solaris
@ -836,27 +828,26 @@ export LUA_INC='$OPENRESTY_BUILD_DIR/lua-root/usr/local/openresty/lua/include'
cd .. cd ..
cd nginx-1.0.4 cd nginx-1.0.4
./configure --prefix=/usr/local/openresty/nginx \ ./configure --prefix=/usr/local/openresty/nginx \
--with-cc-opt='-O2' \
--add-module=../echo-nginx-module-0.37rc1 \ --add-module=../echo-nginx-module-0.37rc1 \
--add-module=../xss-nginx-module-0.03rc3 \ --add-module=../xss-nginx-module-0.03rc3 \
--add-module=../ngx_devel_kit-0.2.17 \ --add-module=../ngx_devel_kit-0.2.17 \
--add-module=../set-misc-nginx-module-0.21 \ --add-module=../set-misc-nginx-module-0.22rc1 \
--add-module=../form-input-nginx-module-0.07rc4 \ --add-module=../form-input-nginx-module-0.07rc5 \
--add-module=../encrypted-session-nginx-module-0.01 \ --add-module=../encrypted-session-nginx-module-0.01 \
--add-module=../drizzle-nginx-module-0.1.1rc1 \ --add-module=../drizzle-nginx-module-0.1.1rc2 \
--add-module=../ngx_lua-0.2.0 \ --add-module=../ngx_lua-0.2.1rc2 \
--add-module=../headers-more-nginx-module-0.15 \ --add-module=../headers-more-nginx-module-0.15 \
--add-module=../srcache-nginx-module-0.12 \ --add-module=../srcache-nginx-module-0.12 \
--add-module=../array-var-nginx-module-0.02 \ --add-module=../array-var-nginx-module-0.03rc1 \
--add-module=../memc-nginx-module-0.12 \ --add-module=../memc-nginx-module-0.12 \
--add-module=../redis2-nginx-module-0.07rc5 \ --add-module=../redis2-nginx-module-0.07 \
--add-module=../upstream-keepalive-nginx-module-0.3 \ --add-module=../upstream-keepalive-nginx-module-0.3 \
--add-module=../auth-request-nginx-module-0.2 \ --add-module=../auth-request-nginx-module-0.2 \
--add-module=../rds-json-nginx-module-0.11 \ --add-module=../rds-json-nginx-module-0.12rc1 \
--with-http_ssl_module --with-http_ssl_module
cd ../.. cd ../..
--- makefile --- makefile
.PHONY: all install .PHONY: all install clean
all: all:
cd build/lua-5.1.4 && $(MAKE) solaris cd build/lua-5.1.4 && $(MAKE) solaris
@ -880,6 +871,7 @@ The http_drizzle_module is not enabled while --with-libdrizzle is specified.
--- exit: 255 --- exit: 255
=== TEST 16: ngx_drizzle enabled and --with-libdrizzle is specified === TEST 16: ngx_drizzle enabled and --with-libdrizzle is specified
--- cmd: ./configure --with-libdrizzle=/opt/drizzle --with-http_drizzle_module --dry-run --- cmd: ./configure --with-libdrizzle=/opt/drizzle --with-http_drizzle_module --dry-run
--- out --- out
@ -890,35 +882,34 @@ export LIBDRIZZLE_LIB='/opt/drizzle/lib'
export LIBDRIZZLE_INC='/opt/drizzle/include/libdrizzle-1.0' export LIBDRIZZLE_INC='/opt/drizzle/include/libdrizzle-1.0'
cd lua-5.1.4 cd lua-5.1.4
make linux make linux
make install INSTALL_TOP=/home/agentz/git/ngx_openresty/ngx_openresty-1.0.4.0/build/lua-root/usr/local/openresty/lua make install INSTALL_TOP=/home/agentz/git/ngx_openresty/ngx_openresty-1.0.4.1/build/lua-root/usr/local/openresty/lua
export LUA_LIB='/home/agentz/git/ngx_openresty/ngx_openresty-1.0.4.0/build/lua-root/usr/local/openresty/lua/lib' export LUA_LIB='/home/agentz/git/ngx_openresty/ngx_openresty-1.0.4.1/build/lua-root/usr/local/openresty/lua/lib'
export LUA_INC='/home/agentz/git/ngx_openresty/ngx_openresty-1.0.4.0/build/lua-root/usr/local/openresty/lua/include' export LUA_INC='/home/agentz/git/ngx_openresty/ngx_openresty-1.0.4.1/build/lua-root/usr/local/openresty/lua/include'
cd .. cd ..
cd nginx-1.0.4 cd nginx-1.0.4
./configure --prefix=/usr/local/openresty/nginx \ ./configure --prefix=/usr/local/openresty/nginx \
--with-cc-opt='-O2' \
--add-module=../echo-nginx-module-0.37rc1 \ --add-module=../echo-nginx-module-0.37rc1 \
--add-module=../xss-nginx-module-0.03rc3 \ --add-module=../xss-nginx-module-0.03rc3 \
--add-module=../ngx_devel_kit-0.2.17 \ --add-module=../ngx_devel_kit-0.2.17 \
--add-module=../set-misc-nginx-module-0.21 \ --add-module=../set-misc-nginx-module-0.22rc1 \
--add-module=../form-input-nginx-module-0.07rc4 \ --add-module=../form-input-nginx-module-0.07rc5 \
--add-module=../encrypted-session-nginx-module-0.01 \ --add-module=../encrypted-session-nginx-module-0.01 \
--add-module=../drizzle-nginx-module-0.1.1rc1 \ --add-module=../drizzle-nginx-module-0.1.1rc2 \
--add-module=../ngx_lua-0.2.0 \ --add-module=../ngx_lua-0.2.1rc2 \
--add-module=../headers-more-nginx-module-0.15 \ --add-module=../headers-more-nginx-module-0.15 \
--add-module=../srcache-nginx-module-0.12 \ --add-module=../srcache-nginx-module-0.12 \
--add-module=../array-var-nginx-module-0.02 \ --add-module=../array-var-nginx-module-0.03rc1 \
--add-module=../memc-nginx-module-0.12 \ --add-module=../memc-nginx-module-0.12 \
--add-module=../redis2-nginx-module-0.07rc5 \ --add-module=../redis2-nginx-module-0.07 \
--add-module=../upstream-keepalive-nginx-module-0.3 \ --add-module=../upstream-keepalive-nginx-module-0.3 \
--add-module=../auth-request-nginx-module-0.2 \ --add-module=../auth-request-nginx-module-0.2 \
--add-module=../rds-json-nginx-module-0.11 \ --add-module=../rds-json-nginx-module-0.12rc1 \
--with-ld-opt='-Wl,-rpath,/opt/drizzle/lib' \ --with-ld-opt='-Wl,-rpath,/opt/drizzle/lib' \
--with-http_ssl_module --with-http_ssl_module
cd ../.. cd ../..
--- err --- err
--- makefile --- makefile
.PHONY: all install .PHONY: all install clean
all: all:
cd build/lua-5.1.4 && $(MAKE) linux cd build/lua-5.1.4 && $(MAKE) linux
@ -931,3 +922,150 @@ install:
clean: clean:
rm -rf build rm -rf build
=== TEST 17: --with-cc
--- cmd: ./configure --with-cc=gcc-4.2 --dry-run --platform=solaris
--- out
platform: solaris (solaris)
cp -rp bundle/ build/
cd build
cd lua-5.1.4
make CC=gcc-4.2 solaris
make install CC=gcc-4.2 INSTALL_TOP=$OPENRESTY_BUILD_DIR/lua-root/usr/local/openresty/lua
export LUA_LIB='$OPENRESTY_BUILD_DIR/lua-root/usr/local/openresty/lua/lib'
export LUA_INC='$OPENRESTY_BUILD_DIR/lua-root/usr/local/openresty/lua/include'
cd ..
cd nginx-1.0.4
./configure --prefix=/usr/local/openresty/nginx \
--add-module=../echo-nginx-module-0.37rc1 \
--add-module=../xss-nginx-module-0.03rc3 \
--add-module=../ngx_devel_kit-0.2.17 \
--add-module=../set-misc-nginx-module-0.22rc1 \
--add-module=../form-input-nginx-module-0.07rc5 \
--add-module=../encrypted-session-nginx-module-0.01 \
--add-module=../ngx_lua-0.2.1rc2 \
--add-module=../headers-more-nginx-module-0.15 \
--add-module=../srcache-nginx-module-0.12 \
--add-module=../array-var-nginx-module-0.03rc1 \
--add-module=../memc-nginx-module-0.12 \
--add-module=../redis2-nginx-module-0.07 \
--add-module=../upstream-keepalive-nginx-module-0.3 \
--add-module=../auth-request-nginx-module-0.2 \
--add-module=../rds-json-nginx-module-0.12rc1 \
--with-cc=gcc-4.2 --with-http_ssl_module
cd ../..
--- makefile
.PHONY: all install clean
all:
cd build/lua-5.1.4 && $(MAKE) CC=gcc-4.2 solaris
cd build/nginx-1.0.4 && $(MAKE)
install:
cd build/lua-5.1.4 && $(MAKE) install CC=gcc-4.2 INSTALL_TOP=$(DESTDIR)/usr/local/openresty/lua
cd build/nginx-1.0.4 && $(MAKE) install DESTDIR=$(DESTDIR)
clean:
rm -rf build
=== TEST 18: --with-debug & luajit
--- cmd: ./configure --with-luajit --with-debug --dry-run
--- out
platform: linux (linux)
cp -rp bundle/ build/
cd build
cd LuaJIT-2.0.0-beta8
make CCDEBUG=-g Q= PREFIX=/usr/local/openresty/luajit
make install CCDEBUG=-g Q= PREFIX=/usr/local/openresty/luajit DESTDIR=$OPENRESTY_BUILD_DIR/luajit-root
export LUAJIT_LIB='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/lib'
export LUAJIT_INC='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.0'
cd ..
cd nginx-1.0.4
./configure --prefix=/usr/local/openresty/nginx \
--with-debug \
--with-cc-opt='-O0' \
--add-module=../echo-nginx-module-0.37rc1 \
--add-module=../xss-nginx-module-0.03rc3 \
--add-module=../ngx_devel_kit-0.2.17 \
--add-module=../set-misc-nginx-module-0.22rc1 \
--add-module=../form-input-nginx-module-0.07rc5 \
--add-module=../encrypted-session-nginx-module-0.01 \
--add-module=../ngx_lua-0.2.1rc2 \
--add-module=../headers-more-nginx-module-0.15 \
--add-module=../srcache-nginx-module-0.12 \
--add-module=../array-var-nginx-module-0.03rc1 \
--add-module=../memc-nginx-module-0.12 \
--add-module=../redis2-nginx-module-0.07 \
--add-module=../upstream-keepalive-nginx-module-0.3 \
--add-module=../auth-request-nginx-module-0.2 \
--add-module=../rds-json-nginx-module-0.12rc1 \
--with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib' \
--with-http_ssl_module
cd ../..
--- makefile
.PHONY: all install clean
all:
cd build/LuaJIT-2.0.0-beta8 && $(MAKE) CCDEBUG=-g Q= PREFIX=/usr/local/openresty/luajit
cd build/nginx-1.0.4 && $(MAKE)
install:
cd build/LuaJIT-2.0.0-beta8 && $(MAKE) install CCDEBUG=-g Q= PREFIX=/usr/local/openresty/luajit DESTDIR=$(DESTDIR)
cd build/nginx-1.0.4 && $(MAKE) install DESTDIR=$(DESTDIR)
clean:
rm -rf build
=== TEST 19: --with-debug & luajit & --with-cc=cl
--- cmd: ./configure --with-luajit --with-debug --dry-run --with-cc=cl
--- out
platform: linux (linux)
cp -rp bundle/ build/
cd build
cd LuaJIT-2.0.0-beta8
make CCDEBUG=-g Q= HOST_CC=cl PREFIX=/usr/local/openresty/luajit
make install CCDEBUG=-g Q= HOST_CC=cl PREFIX=/usr/local/openresty/luajit DESTDIR=$OPENRESTY_BUILD_DIR/luajit-root
export LUAJIT_LIB='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/lib'
export LUAJIT_INC='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.0'
cd ..
cd nginx-1.0.4
./configure --prefix=/usr/local/openresty/nginx \
--with-debug \
--with-cc-opt='-O0' \
--add-module=../echo-nginx-module-0.37rc1 \
--add-module=../xss-nginx-module-0.03rc3 \
--add-module=../ngx_devel_kit-0.2.17 \
--add-module=../set-misc-nginx-module-0.22rc1 \
--add-module=../form-input-nginx-module-0.07rc5 \
--add-module=../encrypted-session-nginx-module-0.01 \
--add-module=../ngx_lua-0.2.1rc2 \
--add-module=../headers-more-nginx-module-0.15 \
--add-module=../srcache-nginx-module-0.12 \
--add-module=../array-var-nginx-module-0.03rc1 \
--add-module=../memc-nginx-module-0.12 \
--add-module=../redis2-nginx-module-0.07 \
--add-module=../upstream-keepalive-nginx-module-0.3 \
--add-module=../auth-request-nginx-module-0.2 \
--add-module=../rds-json-nginx-module-0.12rc1 \
--with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib' \
--with-cc=cl --with-http_ssl_module
cd ../..
--- makefile
.PHONY: all install clean
all:
cd build/LuaJIT-2.0.0-beta8 && $(MAKE) CCDEBUG=-g Q= HOST_CC=cl PREFIX=/usr/local/openresty/luajit
cd build/nginx-1.0.4 && $(MAKE)
install:
cd build/LuaJIT-2.0.0-beta8 && $(MAKE) install CCDEBUG=-g Q= HOST_CC=cl PREFIX=/usr/local/openresty/luajit DESTDIR=$(DESTDIR)
cd build/nginx-1.0.4 && $(MAKE) install DESTDIR=$(DESTDIR)
clean:
rm -rf build

47
util/configure vendored
View File

@ -105,12 +105,19 @@ my $prefix = '/usr/local/openresty';
my %resty_opts; my %resty_opts;
my $dry_run; my $dry_run;
my @ngx_rpaths; my @ngx_rpaths;
my $cc;
my (@ngx_opts, @ngx_cc_opts, @ngx_ld_opts); my (@ngx_opts, @ngx_cc_opts, @ngx_ld_opts);
for my $opt (@ARGV) { for my $opt (@ARGV) {
next unless defined $opt; next unless defined $opt;
if ($opt =~ /^--with-cc=(.+)/) {
$cc = $1;
push @ngx_opts, $opt;
next;
}
if ($opt eq '--dry-run') { if ($opt eq '--dry-run') {
$dry_run = 1; $dry_run = 1;
next; next;
@ -275,10 +282,12 @@ sub build_resty_opts {
$opts_line .= " \\\n --with-debug"; $opts_line .= " \\\n --with-debug";
} else { } else {
unshift @ngx_cc_opts, '-O2'; #unshift @ngx_cc_opts, '-O2';
} }
$opts_line .= " \\\n --with-cc-opt='@ngx_cc_opts'"; if (@ngx_cc_opts) {
$opts_line .= " \\\n --with-cc-opt='@ngx_cc_opts'";
}
if (-d 'build') { if (-d 'build') {
system("rm -rf build"); system("rm -rf build");
@ -315,14 +324,25 @@ sub build_resty_opts {
cd $luajit_src; cd $luajit_src;
shell "make PREFIX=$luajit_prefix", $dry_run; my $extra_opts = ' TARGET_STRIP=@:';
shell "make install PREFIX=$luajit_prefix DESTDIR=$luajit_root", $dry_run;
if ($opts->{debug}) {
$extra_opts = ' CCDEBUG=-g Q=';
}
if (defined $cc) {
$extra_opts .= " HOST_CC=$cc";
}
shell "make$extra_opts PREFIX=$luajit_prefix", $dry_run;
shell "make install$extra_opts PREFIX=$luajit_prefix DESTDIR=$luajit_root", $dry_run;
push @make_cmds, "cd build/$luajit_src && " push @make_cmds, "cd build/$luajit_src && "
. "\$(MAKE) PREFIX=$luajit_prefix"; . "\$(MAKE)$extra_opts PREFIX=$luajit_prefix";
push @make_install_cmds, "cd build/$luajit_src && " push @make_install_cmds, "cd build/$luajit_src && "
. "\$(MAKE) install PREFIX=$luajit_prefix DESTDIR=\$(DESTDIR)"; . "\$(MAKE) install$extra_opts PREFIX=$luajit_prefix DESTDIR=\$(DESTDIR)";
env LUAJIT_LIB => "$luajit_root$luajit_prefix/lib"; env LUAJIT_LIB => "$luajit_root$luajit_prefix/lib";
env LUAJIT_INC => "$luajit_root$luajit_prefix/include/luajit-2.0"; env LUAJIT_INC => "$luajit_root$luajit_prefix/include/luajit-2.0";
@ -352,16 +372,21 @@ sub build_resty_opts {
cd $lua_src; cd $lua_src;
shell "make $platform", $dry_run; my $extra_opts = '';
shell "make install INSTALL_TOP=$lua_root$lua_prefix", $dry_run; if (defined $cc) {
$extra_opts .= " CC=$cc";
}
shell "make$extra_opts $platform", $dry_run;
shell "make install$extra_opts INSTALL_TOP=$lua_root$lua_prefix", $dry_run;
env LUA_LIB => "$lua_root$lua_prefix/lib"; env LUA_LIB => "$lua_root$lua_prefix/lib";
env LUA_INC => "$lua_root$lua_prefix/include"; env LUA_INC => "$lua_root$lua_prefix/include";
push @make_cmds, "cd build/$lua_src && \$(MAKE) $platform"; push @make_cmds, "cd build/$lua_src && \$(MAKE)$extra_opts $platform";
push @make_install_cmds, "cd build/$lua_src && " push @make_install_cmds, "cd build/$lua_src && "
. "\$(MAKE) install INSTALL_TOP=\$(DESTDIR)$lua_prefix"; . "\$(MAKE) install$extra_opts INSTALL_TOP=\$(DESTDIR)$lua_prefix";
cd '..'; cd '..';
} }
@ -596,7 +621,7 @@ sub gen_makefile {
open my $out, ">Makefile" or open my $out, ">Makefile" or
die "Cannot open Makefile for writing: $!\n"; die "Cannot open Makefile for writing: $!\n";
print $out ".PHONY: all install\n\n"; print $out ".PHONY: all install clean\n\n";
print $out "all:\n\t" . join("\n\t", @make_cmds) . "\n\n"; print $out "all:\n\t" . join("\n\t", @make_cmds) . "\n\n";

View File

@ -44,12 +44,12 @@ for my $t_file (@t_files) {
warn "\n- $orig"; warn "\n- $orig";
warn "+ $_"; warn "+ $_";
} elsif (s{\bbuild/$pat\S+}{build/$dir}g && $orig ne $_) { } elsif (s{\bbuild/$pat[^/ \t\n]*\d[^/ \t\n]*}{build/$dir}g && $orig ne $_) {
$changed++; $changed++;
warn "\n- $orig"; warn "\n- $orig";
warn "+ $_"; warn "+ $_";
} elsif (s{^cd $pat\S+}{cd $dir}g && $orig ne $_) { } elsif (s{^cd $pat[^/ \t\n]+}{cd $dir}g && $orig ne $_) {
$changed++; $changed++;
warn "\n- $orig"; warn "\n- $orig";

View File

@ -63,12 +63,12 @@ $root/util/get-tarball "http://github.com/simpl/ngx_devel_kit/tarball/v$ver" -O
tar -xzf ngx_devel_kit-$ver.tar.gz || exit 1 tar -xzf ngx_devel_kit-$ver.tar.gz || exit 1
mv simpl-ngx_devel_kit-* ngx_devel_kit-$ver || exit 1 mv simpl-ngx_devel_kit-* ngx_devel_kit-$ver || exit 1
ver=0.21 ver=0.22rc1
$root/util/get-tarball "http://github.com/agentzh/set-misc-nginx-module/tarball/v$ver" -O set-misc-nginx-module-$ver.tar.gz || exit 1 $root/util/get-tarball "http://github.com/agentzh/set-misc-nginx-module/tarball/v$ver" -O set-misc-nginx-module-$ver.tar.gz || exit 1
tar -xzf set-misc-nginx-module-$ver.tar.gz || exit 1 tar -xzf set-misc-nginx-module-$ver.tar.gz || exit 1
mv agentzh-set-misc-nginx-module-* set-misc-nginx-module-$ver || exit 1 mv agentzh-set-misc-nginx-module-* set-misc-nginx-module-$ver || exit 1
ver=0.11 ver=0.12rc1
$root/util/get-tarball "http://github.com/agentzh/rds-json-nginx-module/tarball/v$ver" -O rds-json-nginx-module-$ver.tar.gz || exit 1 $root/util/get-tarball "http://github.com/agentzh/rds-json-nginx-module/tarball/v$ver" -O rds-json-nginx-module-$ver.tar.gz || exit 1
tar -xzf rds-json-nginx-module-$ver.tar.gz || exit 1 tar -xzf rds-json-nginx-module-$ver.tar.gz || exit 1
mv agentzh-rds-json-nginx-module-* rds-json-nginx-module-$ver || exit 1 mv agentzh-rds-json-nginx-module-* rds-json-nginx-module-$ver || exit 1
@ -80,21 +80,21 @@ mv agentzh-headers-more-nginx-module-* headers-more-nginx-module-$ver || exit 1
################################# #################################
ver=0.1.1rc1 ver=0.1.1rc2
$root/util/get-tarball "http://github.com/chaoslawful/drizzle-nginx-module/tarball/v$ver" -O drizzle-nginx-module-$ver.tar.gz || exit 1 $root/util/get-tarball "http://github.com/chaoslawful/drizzle-nginx-module/tarball/v$ver" -O drizzle-nginx-module-$ver.tar.gz || exit 1
tar -xzf drizzle-nginx-module-$ver.tar.gz || exit 1 tar -xzf drizzle-nginx-module-$ver.tar.gz || exit 1
mv chaoslawful-drizzle-nginx-module-* drizzle-nginx-module-$ver || exit 1 mv chaoslawful-drizzle-nginx-module-* drizzle-nginx-module-$ver || exit 1
################################# #################################
ver=0.2.0 ver=0.2.1rc2
$root/util/get-tarball "http://github.com/chaoslawful/lua-nginx-module/tarball/v$ver" -O lua-nginx-module-$ver.tar.gz || exit 1 $root/util/get-tarball "http://github.com/chaoslawful/lua-nginx-module/tarball/v$ver" -O lua-nginx-module-$ver.tar.gz || exit 1
tar -xzf lua-nginx-module-$ver.tar.gz || exit 1 tar -xzf lua-nginx-module-$ver.tar.gz || exit 1
mv chaoslawful-lua-nginx-module-* ngx_lua-$ver || exit 1 mv chaoslawful-lua-nginx-module-* ngx_lua-$ver || exit 1
################################# #################################
ver=0.02 ver=0.03rc1
$root/util/get-tarball "http://github.com/agentzh/array-var-nginx-module/tarball/v$ver" -O array-var-nginx-module-$ver.tar.gz || exit 1 $root/util/get-tarball "http://github.com/agentzh/array-var-nginx-module/tarball/v$ver" -O array-var-nginx-module-$ver.tar.gz || exit 1
tar -xzf array-var-nginx-module-$ver.tar.gz || exit 1 tar -xzf array-var-nginx-module-$ver.tar.gz || exit 1
mv agentzh-array-var-nginx-module-* array-var-nginx-module-$ver || exit 1 mv agentzh-array-var-nginx-module-* array-var-nginx-module-$ver || exit 1
@ -115,14 +115,14 @@ mv agentzh-srcache-nginx-module-* srcache-nginx-module-$ver || exit 1
################################# #################################
ver=0.07rc4 ver=0.07rc5
$root/util/get-tarball "http://github.com/calio/form-input-nginx-module/tarball/v$ver" -O form-input-nginx-module-$ver.tar.gz || exit 1 $root/util/get-tarball "http://github.com/calio/form-input-nginx-module/tarball/v$ver" -O form-input-nginx-module-$ver.tar.gz || exit 1
tar -xzf form-input-nginx-module-$ver.tar.gz || exit 1 tar -xzf form-input-nginx-module-$ver.tar.gz || exit 1
mv calio-form-input-nginx-module-* form-input-nginx-module-$ver || exit 1 mv calio-form-input-nginx-module-* form-input-nginx-module-$ver || exit 1
################################# #################################
ver=0.10rc3 ver=0.10rc4
$root/util/get-tarball "http://github.com/calio/iconv-nginx-module/tarball/v$ver" -O iconv-nginx-module-$ver.tar.gz || exit 1 $root/util/get-tarball "http://github.com/calio/iconv-nginx-module/tarball/v$ver" -O iconv-nginx-module-$ver.tar.gz || exit 1
tar -xzf iconv-nginx-module-$ver.tar.gz || exit 1 tar -xzf iconv-nginx-module-$ver.tar.gz || exit 1
mv calio-iconv-nginx-module-* iconv-nginx-module-$ver || exit 1 mv calio-iconv-nginx-module-* iconv-nginx-module-$ver || exit 1
@ -151,14 +151,14 @@ mv ngx_http_auth_request_module-* auth-request-nginx-module-$ver || exit 1
################################# #################################
ver=0.8 ver=0.9rc1
$root/util/get-tarball "https://github.com/FRiCKLE/ngx_postgres/tarball/$ver" -O ngx_postgres-$ver.tar.gz || exit 1 $root/util/get-tarball "https://github.com/FRiCKLE/ngx_postgres/tarball/$ver" -O ngx_postgres-$ver.tar.gz || exit 1
tar -xzf ngx_postgres-$ver.tar.gz || exit 1 tar -xzf ngx_postgres-$ver.tar.gz || exit 1
mv FRiCKLE-ngx_postgres-* ngx_postgres-$ver || exit 1 mv FRiCKLE-ngx_postgres-* ngx_postgres-$ver || exit 1
################################# #################################
ver=0.07rc5 ver=0.07
$root/util/get-tarball "http://github.com/agentzh/redis2-nginx-module/tarball/v$ver" -O redis2-nginx-module-$ver.tar.gz || exit 1 $root/util/get-tarball "http://github.com/agentzh/redis2-nginx-module/tarball/v$ver" -O redis2-nginx-module-$ver.tar.gz || exit 1
tar -xzf redis2-nginx-module-$ver.tar.gz || exit 1 tar -xzf redis2-nginx-module-$ver.tar.gz || exit 1
mv agentzh-redis2-nginx-module-* redis2-nginx-module-$ver || exit 1 mv agentzh-redis2-nginx-module-* redis2-nginx-module-$ver || exit 1
@ -181,7 +181,7 @@ cp $root/patches/lua-$ver-makefile_install_fix.patch lua-makefile-fix.patch || e
patch -p0 < lua-makefile-fix.patch || exit 1 patch -p0 < lua-makefile-fix.patch || exit 1
rm lua-makefile-fix.patch rm lua-makefile-fix.patch || exit 1
################################# #################################
@ -189,7 +189,11 @@ ver=2.0.0-beta8
$root/util/get-tarball "http://luajit.org/download/LuaJIT-$ver.tar.gz" -O "LuaJIT-$ver.tar.gz" || exit 1 $root/util/get-tarball "http://luajit.org/download/LuaJIT-$ver.tar.gz" -O "LuaJIT-$ver.tar.gz" || exit 1
tar -xzf LuaJIT-$ver.tar.gz || exit 1 tar -xzf LuaJIT-$ver.tar.gz || exit 1
#patch -p0 < $root/patches/LuaJIT-$ver-symlink_lib.patch || exit 1 cd LuaJIT-$ver || exit 1;
$root/util/get-tarball http://luajit.org/download/beta8_hotfix1.patch -O beta8_hotfix1.patch
patch -p1 < beta8_hotfix1.patch || exit 1
rm beta8_hotfix1.patch || exit 1
cd ..
################################# #################################

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
main_ver=1.0.4 main_ver=1.0.4
minor_ver=0 minor_ver=1
version=$main_ver.$minor_ver version=$main_ver.$minor_ver
echo $version echo $version