From 0e60e4f73a62bf168dcc0ece770dafa27de35207 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Sun, 26 Apr 2009 19:37:38 +0000 Subject: [PATCH] add quotes for configure options with spaces --- auto/configure | 2 -- auto/options | 6 ++++++ src/core/nginx.c | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/auto/configure b/auto/configure index fa52ad90d..333b1626b 100755 --- a/auto/configure +++ b/auto/configure @@ -3,8 +3,6 @@ # Copyright (C) Igor Sysoev -NGX_CONFIGURE=`echo $@ | sed 's/"/\\\\"/g'` - . auto/options . auto/init . auto/sources diff --git a/auto/options b/auto/options index 8ec692e7d..0901fcd20 100644 --- a/auto/options +++ b/auto/options @@ -129,9 +129,12 @@ NGX_CPP_TEST=NO NGX_CPU_CACHE_LINE= +opt= for option do + opt="$opt `echo $option | sed -e \"s/\(--[^=]*=\)\(.* .*\)/\1'\2'/\"`" + case "$option" in -*=*) value=`echo "$option" | sed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) value="" ;; @@ -267,6 +270,9 @@ do done +NGX_CONFIGURE="$opt" + + if [ $help = yes ]; then cat << END diff --git a/src/core/nginx.c b/src/core/nginx.c index f08af79de..bf2f38db8 100644 --- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -232,7 +232,7 @@ main(int argc, char *const *argv) #ifdef NGX_COMPILER ngx_log_stderr(0, "built by " NGX_COMPILER); #endif - ngx_log_stderr(0, "configure arguments: " NGX_CONFIGURE); + ngx_log_stderr(0, "configure arguments:" NGX_CONFIGURE); } if (!ngx_test_config) {