diff options
author | Igor Sysoev <igor@sysoev.ru> | 2017-08-26 13:37:44 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2017-08-26 13:37:44 +0300 |
commit | 93f7104a653bd2e5fe2008eb8f42334d9df8542a (patch) | |
tree | bb0bfa2bf7b2af9b5514e4dfcdda316889c14074 /auto | |
parent | 0d65c896cfa45f5e3fef05d95c9409fd68ff45c8 (diff) | |
download | unit-93f7104a653bd2e5fe2008eb8f42334d9df8542a.tar.gz unit-93f7104a653bd2e5fe2008eb8f42334d9df8542a.tar.bz2 |
Added configure and command line option --help.
Diffstat (limited to 'auto')
-rw-r--r-- | auto/help | 42 | ||||
-rw-r--r-- | auto/modules/conf | 10 | ||||
-rw-r--r-- | auto/modules/go | 18 | ||||
-rw-r--r-- | auto/modules/php | 25 | ||||
-rw-r--r-- | auto/modules/python | 22 | ||||
-rw-r--r-- | auto/options | 15 |
6 files changed, 92 insertions, 40 deletions
diff --git a/auto/help b/auto/help new file mode 100644 index 00000000..f7755fed --- /dev/null +++ b/auto/help @@ -0,0 +1,42 @@ + +# Copyright (C) Igor Sysoev +# Copyright (C) NGINX, Inc. + + +cat << END + +./configure options: + + --cc=FILE set C compiler file name, default: $CC + --cc-opt=OPTIONS set additional C compiler options + --ld-opt=OPTIONS set additional linker options + + --prefix=DIRECTORY set prefix for relative path names, no by default + --pid=FILE set pid file name, default: $NXT_PID + --log=FILE set log file name, default: $NXT_LOG + --modules=DIRECTORY set modules directory, default: $NXT_MODULES + + --control=ADDRESS set address of control API socket + default: $NXT_CONTROL + + --user=USER set non-privileged processes to run as specified user + default: $NXT_USER + --group=GROUP set non-privileged processes to run as specified group + default: user's primary group + + --no-ipv6 disable IPv6 support + --no-unix-sockets disable Unix domain sockets support + + --debug enable debug logging + + + python OPTIONS configure Python module + run "./configure python --help" to see available options + + php OPTIONS configure PHP module + run "./configure php --help" to see available options + + go OPTIONS configure Go module + run "./configure go --help" to see available options + +END diff --git a/auto/modules/conf b/auto/modules/conf index e7f21b9e..8c0b7c0c 100644 --- a/auto/modules/conf +++ b/auto/modules/conf @@ -3,16 +3,6 @@ # Copyright (C) NGINX, Inc. -if [ ! -f $NXT_AUTOCONF_DATA ]; then - echo - echo Please run common $0 before configuring module \"$nxt_module\". - echo - exit 1 -fi - -. $NXT_AUTOCONF_DATA - - case "$nxt_module" in python) diff --git a/auto/modules/go b/auto/modules/go index dbba443d..27670dca 100644 --- a/auto/modules/go +++ b/auto/modules/go @@ -10,7 +10,7 @@ NXT_GO=go for nxt_option; do case "$nxt_option" in - -*=*) value=`$echo "$nxt_option" | sed -e 's/[-_a-zA-Z0-9]*=//'` ;; + -*=*) value=`echo "$nxt_option" | sed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) value="" ;; esac @@ -29,9 +29,9 @@ END ;; *) - $echo - $echo $0: error: invalid Go option \"$nxt_option\" - $echo + echo + echo $0: error: invalid Go option \"$nxt_option\" + echo exit 1 ;; @@ -40,6 +40,16 @@ END done +if [ ! -f $NXT_AUTOCONF_DATA ]; then + echo + echo Please run common $0 before configuring module \"$nxt_module\". + echo + exit 1 +fi + +. $NXT_AUTOCONF_DATA + + $echo "configuring Go package" $echo "configuring Go package ..." >> $NXT_AUTOCONF_ERR diff --git a/auto/modules/php b/auto/modules/php index c9fff12f..cf4f3837 100644 --- a/auto/modules/php +++ b/auto/modules/php @@ -9,7 +9,7 @@ shift for nxt_option; do case "$nxt_option" in - -*=*) value=`$echo "$nxt_option" | sed -e 's/[-_a-zA-Z0-9]*=//'` ;; + -*=*) value=`echo "$nxt_option" | sed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) value="" ;; esac @@ -21,27 +21,36 @@ for nxt_option; do --help) cat << END - --config=NAME set php-config name - --module=NAME set php module name - --lib-path=PATH set path to libphp.so library + --config=FILE set php-config filename + --module=NAME set unit php module name + --lib-path=DIRECTORY set directory path to libphp.so library END exit 0 ;; *) - $echo - $echo $0: error: invalid PHP option \"$nxt_option\" - $echo + echo + echo $0: error: invalid PHP option \"$nxt_option\" + echo exit 1 ;; esac - done +if [ ! -f $NXT_AUTOCONF_DATA ]; then + echo + echo Please run common $0 before configuring module \"$nxt_module\". + echo + exit 1 +fi + +. $NXT_AUTOCONF_DATA + + NXT_PHP_CONFIG=${NXT_PHP_CONFIG=php-config} NXT_PHP=${NXT_PHP_CONFIG%-config*} NXT_PHP_MODULE=${NXT_PHP_MODULE=${NXT_PHP##*/}} diff --git a/auto/modules/python b/auto/modules/python index d34abca9..b07ed19f 100644 --- a/auto/modules/python +++ b/auto/modules/python @@ -9,7 +9,7 @@ shift for nxt_option; do case "$nxt_option" in - -*=*) value=`$echo "$nxt_option" | sed -e 's/[-_a-zA-Z0-9]*=//'` ;; + -*=*) value=`echo "$nxt_option" | sed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) value="" ;; esac @@ -21,17 +21,17 @@ for nxt_option; do --help) cat << END - --config=NAME set python-config name - --module=NAME set python module name + --config=FILE set python-config filename + --module=NAME set unit python module name END exit 0 ;; *) - $echo - $echo $0: error: invalid Python option \"$nxt_option\" - $echo + echo + echo $0: error: invalid Python option \"$nxt_option\" + echo exit 1 ;; esac @@ -39,6 +39,16 @@ END done +if [ ! -f $NXT_AUTOCONF_DATA ]; then + echo + echo Please run common $0 before configuring module \"$nxt_module\". + echo + exit 1 +fi + +. $NXT_AUTOCONF_DATA + + NXT_PYTHON_CONFIG=${NXT_PYTHON_CONFIG=python-config} NXT_PYTHON=${NXT_PYTHON_CONFIG%-config*} NXT_PYTHON_MODULE=${NXT_PYTHON_MODULE=${NXT_PYTHON##*/}} diff --git a/auto/options b/auto/options index b21fe5c4..67f53258 100644 --- a/auto/options +++ b/auto/options @@ -4,23 +4,13 @@ # Copyright (C) NGINX, Inc. -CC=${CC:-cc} - -NXT_BUILD_DIR=build NXT_CONFIGURE_OPTIONS= NXT_CFLAGS= NXT_CC_OPT= NXT_LD_OPT= +NXT_BUILD_DIR=build NXT_PREFIX= -NXT_PID="nginext.pid" -NXT_LOG="nginext.log" -NXT_MODULES="modules" - -NXT_CONTROL="unix:control.unit.sock" - -NXT_USER="nobody" -NXT_GROUP= NXT_DEBUG=NO @@ -103,7 +93,8 @@ do *) $echo - $echo "$0: error: invalid option \"$nxt_option\"". + $echo $0: error: invalid option \"$nxt_option\". + $echo Run \"$0 --help\" to see available options. $echo exit 1 ;; |