aboutsummaryrefslogtreecommitdiff
path: root/src/core/nginx.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2006-12-23 19:54:21 +0000
committerIgor Sysoev <igor@sysoev.ru>2006-12-23 19:54:21 +0000
commitb8fec517237b2e49cf1e055f661fe75832403fbe (patch)
tree30d8c437667b6a1c223649bd131995929f0db201 /src/core/nginx.c
parente4f6f000773483714a57e471e4558daccfd681f9 (diff)
downloadnginx-b8fec517237b2e49cf1e055f661fe75832403fbe.tar.gz
nginx-b8fec517237b2e49cf1e055f661fe75832403fbe.zip
the -V switch
Diffstat (limited to 'src/core/nginx.c')
-rw-r--r--src/core/nginx.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/core/nginx.c b/src/core/nginx.c
index 2de666aa7..ff5995dd2 100644
--- 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, char *const *argv)
ngx_show_version = 1;
break;
+ case 'V':
+ ngx_show_version = 1;
+ ngx_show_configure = 1;
+ break;
+
case 't':
ngx_test_config = 1;
break;