# HG changeset patch # User Igor Sysoev # Date 1166903661 0 # Node ID 3a126fca07fcc26479eb9d1b3653dfbf8f02e470 # Parent 656dfccf74819df5987263c73f69b9d19a466694 the -V switch diff --git a/auto/configure b/auto/configure --- a/auto/configure +++ b/auto/configure @@ -3,6 +3,8 @@ # Copyright (C) Igor Sysoev +NGX_CONFIGURE=`echo $@ | sed 's/"/\\\\"/g'` + . auto/options . auto/init . auto/sources @@ -10,9 +12,10 @@ test -d $NGX_OBJS || mkdir $NGX_OBJS echo > $NGX_AUTO_HEADERS_H -echo > $NGX_AUTO_CONFIG_H echo > $NGX_AUTOCONF_ERR +echo "#define NGX_CONFIGURE \"$NGX_CONFIGURE\"" > $NGX_AUTO_CONFIG_H + if [ $NGX_DEBUG = YES ]; then have=NGX_DEBUG . auto/have diff --git a/src/core/nginx.c b/src/core/nginx.c --- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -176,6 +176,7 @@ ngx_module_t ngx_core_module = { ngx_uint_t ngx_max_module; static ngx_uint_t ngx_show_version; +static ngx_uint_t ngx_show_configure; static char *ngx_null_environ = NULL; @@ -235,10 +236,21 @@ main(int argc, char *const *argv) ngx_write_fd(ngx_stderr_fileno, "nginx version: " NGINX_VER CRLF, sizeof("nginx version: " NGINX_VER CRLF) - 1); +#ifndef __WATCOMC__ + + if (ngx_show_configure) { #ifdef NGX_COMPILER - ngx_write_fd(ngx_stderr_fileno, "built by " NGX_COMPILER CRLF, - sizeof("built by " NGX_COMPILER CRLF) - 1); + ngx_write_fd(ngx_stderr_fileno, "built by " NGX_COMPILER CRLF, + sizeof("built by " NGX_COMPILER CRLF) - 1); #endif + + ngx_write_fd(ngx_stderr_fileno, + "configure arguments " NGX_CONFIGURE CRLF, + sizeof("configure arguments " NGX_CONFIGURE CRLF) - 1); + } + +#endif + if (!ngx_test_config) { return 0; } @@ -498,6 +510,11 @@ ngx_getopt(ngx_cycle_t *cycle, int argc, ngx_show_version = 1; break; + case 'V': + ngx_show_version = 1; + ngx_show_configure = 1; + break; + case 't': ngx_test_config = 1; break;