summaryrefslogtreecommitdiffhomepage
path: root/auto
diff options
context:
space:
mode:
Diffstat (limited to 'auto')
-rw-r--r--auto/help38
-rw-r--r--auto/make36
-rw-r--r--auto/modules/java10
-rw-r--r--auto/modules/perl8
-rw-r--r--auto/modules/php8
-rw-r--r--auto/modules/python8
-rw-r--r--auto/modules/ruby8
-rw-r--r--auto/options116
-rw-r--r--auto/save4
-rw-r--r--auto/summary8
10 files changed, 120 insertions, 124 deletions
diff --git a/auto/help b/auto/help
index a3884679..5de528ba 100644
--- a/auto/help
+++ b/auto/help
@@ -11,23 +11,31 @@ cat << END
--cc-opt=OPTIONS set additional C compiler options
--ld-opt=OPTIONS set additional linker options
- --prefix=DIRECTORY set prefix for relative pathnames, default: none
- --bindir=DIRECTORY set user executables directory name
- default: "$NXT_BINDIR"
- --sbindir=DIRECTORY set system admin executables directory name
- default: "$NXT_SBINDIR"
- --libdir=DIRECTORY set library directory name, default: "$NXT_LIBDIR"
- --incdir=DIRECTORY set includes directory name, default: "$NXT_INCDIR"
- --mandir=DIRECTORY set man pages directory name, default: "$NXT_MANDIR"
- --modules=DIRECTORY set modules directory name, default: "$NXT_MODULES"
- --state=DIRECTORY set state directory name, default: "$NXT_STATE"
- --tmp=DIRECTORY set tmp directory name, default: "$NXT_TMP"
-
- --pid=FILE set pid filename, default: "$NXT_PID"
- --log=FILE set log filename, default: "$NXT_LOG"
+ --prefix=DIR default: "/usr/local"
+ --exec-prefix=DIR default: "\$prefix"
+ --bindir=DIR default: "\$exec_prefix/bin"
+ --sbindir=DIR default: "\$exec_prefix/sbin"
+ --includedir=DIR default: "\$prefix/include"
+ --libdir=DIR default: "\$exec_prefix/lib"
+ --modulesdir=DIR default: "\$libdir/unit/modules"
+ --datarootdir=DIR default: "\$prefix/share"
+ --mandir=DIR default: "\$datarootdir/man"
+ --localstatedir=DIR default: "\$prefix/var"
+ --libstatedir=DIR default: "\$localstatedir/lib/unit"
+ --runstatedir=DIR default: "\$localstatedir/run/unit"
+ --logdir=DIR default: "\$localstatedir/log/unit"
+ --tmpdir=DIR default: "/tmp"
+
+ --incdir=DIR [deprecated] synonym for --includedir
+ --modules=DIR [deprecated] synonym for --modulesdir
+ --state=DIR [deprecated] synonym for --libstatedir
+ --tmp=DIR [deprecated] synonym for --tmpdir
+
+ --pid=FILE set pid filename, default: "\$runstatedir/unit.pid"
+ --log=FILE set log filename, default: "\$logdir/unit.log"
--control=ADDRESS set address of control API socket
- default: "$NXT_CONTROL"
+ default: "unix:\$runstatedir/control.unit.sock"
--user=USER set non-privileged processes to run as specified user
default: "$NXT_USER"
diff --git a/auto/make b/auto/make
index 5324f49c..66f2b1ec 100644
--- a/auto/make
+++ b/auto/make
@@ -366,8 +366,12 @@ ${NXT_DAEMON}-install: $NXT_DAEMON install-check
test -d \$(DESTDIR)$NXT_SBINDIR \
|| install -d \$(DESTDIR)$NXT_SBINDIR
install -p $NXT_BUILD_DIR/$NXT_DAEMON \$(DESTDIR)$NXT_SBINDIR/
- test -d \$(DESTDIR)$NXT_STATE \
- || install -d \$(DESTDIR)$NXT_STATE
+ test -d \$(DESTDIR)$NXT_LIBSTATEDIR \
+ || install -d \$(DESTDIR)$NXT_LIBSTATEDIR
+ test -d \$(DESTDIR)$NXT_LOGDIR \
+ || install -d \$(DESTDIR)$NXT_LOGDIR
+ test -d \$(DESTDIR)$NXT_RUNSTATEDIR \
+ || install -d \$(DESTDIR)$NXT_RUNSTATEDIR
manpage-install: manpage install-check
test -d \$(DESTDIR)$NXT_MANDIR/man8 \
@@ -397,8 +401,8 @@ libunit-install: $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC
|| install -d \$(DESTDIR)$NXT_LIBDIR
install -p -m u=rw,go=r $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC \
\$(DESTDIR)$NXT_LIBDIR/
- test -d \$(DESTDIR)$NXT_INCDIR \
- || install -d \$(DESTDIR)$NXT_INCDIR
+ test -d \$(DESTDIR)$NXT_INCLUDEDIR \
+ || install -d \$(DESTDIR)$NXT_INCLUDEDIR
install -p -m u=rw,go=r src/nxt_unit.h \
src/nxt_unit_field.h \
src/nxt_unit_request.h \
@@ -409,22 +413,22 @@ libunit-install: $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC
$NXT_BUILD_DIR/nxt_auto_config.h \
$NXT_BUILD_DIR/nxt_version.h \
src/nxt_websocket_header.h \
- \$(DESTDIR)$NXT_INCDIR/
+ \$(DESTDIR)$NXT_INCLUDEDIR/
libunit-uninstall:
rm -f \$(DESTDIR)$NXT_LIBDIR/$NXT_LIB_UNIT_STATIC
@rmdir -p \$(DESTDIR)$NXT_LIBDIR 2>/dev/null || true
- rm -f \$(DESTDIR)$NXT_INCDIR/nxt_unit.h \
- \$(DESTDIR)$NXT_INCDIR/nxt_unit_field.h \
- \$(DESTDIR)$NXT_INCDIR/nxt_unit_request.h \
- \$(DESTDIR)$NXT_INCDIR/nxt_unit_response.h \
- \$(DESTDIR)$NXT_INCDIR/nxt_unit_sptr.h \
- \$(DESTDIR)$NXT_INCDIR/nxt_unit_typedefs.h \
- \$(DESTDIR)$NXT_INCDIR/nxt_unit_websocket.h \
- \$(DESTDIR)$NXT_INCDIR/nxt_auto_config.h \
- \$(DESTDIR)$NXT_INCDIR/nxt_version.h \
- \$(DESTDIR)$NXT_INCDIR/nxt_websocket_header.h
- @rmdir -p \$(DESTDIR)$NXT_INCDIR 2>/dev/null || true
+ rm -f \$(DESTDIR)$NXT_INCLUDEDIR/nxt_unit.h \
+ \$(DESTDIR)$NXT_INCLUDEDIR/nxt_unit_field.h \
+ \$(DESTDIR)$NXT_INCLUDEDIR/nxt_unit_request.h \
+ \$(DESTDIR)$NXT_INCLUDEDIR/nxt_unit_response.h \
+ \$(DESTDIR)$NXT_INCLUDEDIR/nxt_unit_sptr.h \
+ \$(DESTDIR)$NXT_INCLUDEDIR/nxt_unit_typedefs.h \
+ \$(DESTDIR)$NXT_INCLUDEDIR/nxt_unit_websocket.h \
+ \$(DESTDIR)$NXT_INCLUDEDIR/nxt_auto_config.h \
+ \$(DESTDIR)$NXT_INCLUDEDIR/nxt_version.h \
+ \$(DESTDIR)$NXT_INCLUDEDIR/nxt_websocket_header.h
+ @rmdir -p \$(DESTDIR)$NXT_INCLUDEDIR 2>/dev/null || true
END
diff --git a/auto/modules/java b/auto/modules/java
index bdf17022..a6ce5e81 100644
--- a/auto/modules/java
+++ b/auto/modules/java
@@ -63,7 +63,7 @@ fi
. $NXT_AUTOCONF_DATA
-NXT_JARS=${NXT_JARS=$NXT_MODULES}
+NXT_JARS=${NXT_JARS=$NXT_MODULESDIR}
NXT_JAVA_MODULE=${NXT_JAVA_MODULE=java}
NXT_JAVA_LIB_PATH=${NXT_JAVA_LIB_PATH=}
@@ -535,9 +535,9 @@ ${NXT_JAVA_MODULE}-install: $NXT_BUILD_DIR/${NXT_JAVA_MODULE}.unit.so \\
$NXT_BUILD_DIR/$NXT_UNIT_JAR \\
$NXT_BUILD_DIR/$NXT_WS_API_JAR \\
java-shared-install
- install -d \$(DESTDIR)$NXT_MODULES
+ install -d \$(DESTDIR)$NXT_MODULESDIR
install -p $NXT_BUILD_DIR/${NXT_JAVA_MODULE}.unit.so \\
- \$(DESTDIR)$NXT_MODULES/
+ \$(DESTDIR)$NXT_MODULESDIR/
install -d \$(DESTDIR)$NXT_JARS
install -p -m 0644 $NXT_BUILD_DIR/$NXT_UNIT_JAR \$(DESTDIR)$NXT_JARS/
install -p -m 0644 $NXT_BUILD_DIR/$NXT_WS_API_JAR \$(DESTDIR)$NXT_JARS/
@@ -546,8 +546,8 @@ ${NXT_JAVA_MODULE}-install: $NXT_BUILD_DIR/${NXT_JAVA_MODULE}.unit.so \\
uninstall: ${NXT_JAVA_MODULE}-uninstall
${NXT_JAVA_MODULE}-uninstall: java-shared-uninstall
- rm -f \$(DESTDIR)$NXT_MODULES/${NXT_JAVA_MODULE}.unit.so
- @rmdir -p \$(DESTDIR)$NXT_MODULES 2>/dev/null || true
+ rm -f \$(DESTDIR)$NXT_MODULESDIR/${NXT_JAVA_MODULE}.unit.so
+ @rmdir -p \$(DESTDIR)$NXT_MODULESDIR 2>/dev/null || true
rm -f \$(DESTDIR)$NXT_JARS/$NXT_UNIT_JAR
rm -f \$(DESTDIR)$NXT_JARS/$NXT_WS_API_JAR
@rmdir -p \$(DESTDIR)$NXT_JARS 2>/dev/null || true
diff --git a/auto/modules/perl b/auto/modules/perl
index 2daebd0d..94f06879 100644
--- a/auto/modules/perl
+++ b/auto/modules/perl
@@ -195,15 +195,15 @@ $NXT_BUILD_DIR/${NXT_PERL_MODULE}.unit.so: $nxt_objs
install: ${NXT_PERL_MODULE}-install
${NXT_PERL_MODULE}-install: ${NXT_PERL_MODULE} install-check
- install -d \$(DESTDIR)$NXT_MODULES
+ install -d \$(DESTDIR)$NXT_MODULESDIR
install -p $NXT_BUILD_DIR/${NXT_PERL_MODULE}.unit.so \\
- \$(DESTDIR)$NXT_MODULES/
+ \$(DESTDIR)$NXT_MODULESDIR/
uninstall: ${NXT_PERL_MODULE}-uninstall
${NXT_PERL_MODULE}-uninstall:
- rm -f \$(DESTDIR)$NXT_MODULES/${NXT_PERL_MODULE}.unit.so
- @rmdir -p \$(DESTDIR)$NXT_MODULES 2>/dev/null || true
+ rm -f \$(DESTDIR)$NXT_MODULESDIR/${NXT_PERL_MODULE}.unit.so
+ @rmdir -p \$(DESTDIR)$NXT_MODULESDIR 2>/dev/null || true
END
diff --git a/auto/modules/php b/auto/modules/php
index f0ecb709..21dec215 100644
--- a/auto/modules/php
+++ b/auto/modules/php
@@ -275,15 +275,15 @@ $NXT_BUILD_DIR/${NXT_PHP_MODULE}.unit.so: $nxt_objs
install: ${NXT_PHP_MODULE}-install
${NXT_PHP_MODULE}-install: ${NXT_PHP_MODULE} install-check
- install -d \$(DESTDIR)$NXT_MODULES
+ install -d \$(DESTDIR)$NXT_MODULESDIR
install -p $NXT_BUILD_DIR/${NXT_PHP_MODULE}.unit.so \\
- \$(DESTDIR)$NXT_MODULES/
+ \$(DESTDIR)$NXT_MODULESDIR/
uninstall: ${NXT_PHP_MODULE}-uninstall
${NXT_PHP_MODULE}-uninstall:
- rm -f \$(DESTDIR)$NXT_MODULES/${NXT_PHP_MODULE}.unit.so
- @rmdir -p \$(DESTDIR)$NXT_MODULES 2>/dev/null || true
+ rm -f \$(DESTDIR)$NXT_MODULESDIR/${NXT_PHP_MODULE}.unit.so
+ @rmdir -p \$(DESTDIR)$NXT_MODULESDIR 2>/dev/null || true
END
diff --git a/auto/modules/python b/auto/modules/python
index 480ae1da..d7504fc8 100644
--- a/auto/modules/python
+++ b/auto/modules/python
@@ -223,15 +223,15 @@ $NXT_BUILD_DIR/${NXT_PYTHON_MODULE}.unit.so: $nxt_objs
install: ${NXT_PYTHON_MODULE}-install
${NXT_PYTHON_MODULE}-install: ${NXT_PYTHON_MODULE} install-check
- install -d \$(DESTDIR)$NXT_MODULES
+ install -d \$(DESTDIR)$NXT_MODULESDIR
install -p $NXT_BUILD_DIR/${NXT_PYTHON_MODULE}.unit.so \\
- \$(DESTDIR)$NXT_MODULES/
+ \$(DESTDIR)$NXT_MODULESDIR/
uninstall: ${NXT_PYTHON_MODULE}-uninstall
${NXT_PYTHON_MODULE}-uninstall:
- rm -f \$(DESTDIR)$NXT_MODULES/${NXT_PYTHON_MODULE}.unit.so
- @rmdir -p \$(DESTDIR)$NXT_MODULES 2>/dev/null || true
+ rm -f \$(DESTDIR)$NXT_MODULESDIR/${NXT_PYTHON_MODULE}.unit.so
+ @rmdir -p \$(DESTDIR)$NXT_MODULESDIR 2>/dev/null || true
END
diff --git a/auto/modules/ruby b/auto/modules/ruby
index 608193a6..99f6b286 100644
--- a/auto/modules/ruby
+++ b/auto/modules/ruby
@@ -261,15 +261,15 @@ $NXT_BUILD_DIR/${NXT_RUBY_MODULE}.unit.so: $nxt_objs
install: ${NXT_RUBY_MODULE}-install
${NXT_RUBY_MODULE}-install: ${NXT_RUBY_MODULE} install-check
- install -d \$(DESTDIR)$NXT_MODULES
+ install -d \$(DESTDIR)$NXT_MODULESDIR
install -p $NXT_BUILD_DIR/${NXT_RUBY_MODULE}.unit.so \\
- \$(DESTDIR)$NXT_MODULES/
+ \$(DESTDIR)$NXT_MODULESDIR/
uninstall: ${NXT_RUBY_MODULE}-uninstall
${NXT_RUBY_MODULE}-uninstall:
- rm -f \$(DESTDIR)$NXT_MODULES/${NXT_RUBY_MODULE}.unit.so
- @rmdir -p \$(DESTDIR)$NXT_MODULES 2>/dev/null || true
+ rm -f \$(DESTDIR)$NXT_MODULESDIR/${NXT_RUBY_MODULE}.unit.so
+ @rmdir -p \$(DESTDIR)$NXT_MODULESDIR 2>/dev/null || true
END
diff --git a/auto/options b/auto/options
index abcf531d..802ab701 100644
--- a/auto/options
+++ b/auto/options
@@ -9,8 +9,6 @@ NXT_CFLAGS=
NXT_CC_OPT=
NXT_LD_OPT=
-NXT_PREFIX=
-
NXT_DEBUG=NO
NXT_INET6=YES
@@ -44,6 +42,8 @@ NXT_TEST_BUILD_HPUX_SENDFILE=NO
NXT_TESTS=NO
+NXT_HELP=NO
+
for nxt_option
do
case "$nxt_option" in
@@ -57,14 +57,35 @@ do
--ld-opt=*) NXT_LD_OPT="$value" ;;
--prefix=*) NXT_PREFIX="$value" ;;
+ --exec-prefix=*) NXT_EXEC_PREFIX="$value" ;;
--bindir=*) NXT_BINDIR="$value" ;;
--sbindir=*) NXT_SBINDIR="$value" ;;
+ --includedir=*) NXT_INCLUDEDIR="$value" ;;
+ --incdir=*)
+ >&2 echo "[warn] option --incdir is deprecated; use --includedir"
+ NXT_INCLUDEDIR="$value"
+ ;;
--libdir=*) NXT_LIBDIR="$value" ;;
- --incdir=*) NXT_INCDIR="$value" ;;
+ --modulesdir=*) NXT_MODULESDIR="$value" ;;
+ --modules=*)
+ >&2 echo "[warn] option --modules is deprecated; use --modulesdir"
+ NXT_MODULESDIR="$value"
+ ;;
+ --datarootdir=*) NXT_DATAROOTDIR="$value" ;;
--mandir=*) NXT_MANDIR="$value" ;;
- --modules=*) NXT_MODULES="$value" ;;
- --state=*) NXT_STATE="$value" ;;
- --tmp=*) NXT_TMP="$value" ;;
+ --localstatedir=*) NXT_LOCALSTATEDIR="$value" ;;
+ --libstatedir=*) NXT_LIBSTATEDIR="$value" ;;
+ --state=*)
+ >&2 echo "[warn] option --state is deprecated; use --libstatedir"
+ NXT_LIBSTATEDIR="$value"
+ ;;
+ --logdir=*) NXT_LOGDIR="$value" ;;
+ --runstatedir=*) NXT_RUNSTATEDIR="$value" ;;
+ --tmpdir=*) NXT_TMPDIR="$value" ;;
+ --tmp=*)
+ >&2 echo "[warn] option --tmp is deprecated; use --tmpdir"
+ NXT_TMPDIR="$value"
+ ;;
--pid=*) NXT_PID="$value" ;;
--log=*) NXT_LOG="$value" ;;
@@ -124,63 +145,26 @@ do
done
-case "$NXT_PREFIX" in
- ""|*/) ;;
- *) NXT_PREFIX="$NXT_PREFIX/" ;;
-esac
-
-case "$NXT_BINDIR" in
- /*) ;;
- *) NXT_BINDIR="$NXT_PREFIX$NXT_BINDIR" ;;
-esac
-
-case "$NXT_SBINDIR" in
- /*) ;;
- *) NXT_SBINDIR="$NXT_PREFIX$NXT_SBINDIR" ;;
-esac
-
-case "$NXT_LIBDIR" in
- /*) ;;
- *) NXT_LIBDIR="$NXT_PREFIX$NXT_LIBDIR" ;;
-esac
-
-case "$NXT_INCDIR" in
- /*) ;;
- *) NXT_INCDIR="$NXT_PREFIX$NXT_INCDIR" ;;
-esac
-
-case "$NXT_MANDIR" in
- /*) ;;
- *) NXT_MANDIR="$NXT_PREFIX$NXT_MANDIR" ;;
-esac
-
-case "$NXT_MODULES" in
- /*) ;;
- *) NXT_MODULES="$NXT_PREFIX$NXT_MODULES" ;;
-esac
-
-case "$NXT_STATE" in
- /*) ;;
- *) NXT_STATE="$NXT_PREFIX$NXT_STATE" ;;
-esac
-
-case "$NXT_TMP" in
- /*) ;;
- *) NXT_TMP="$NXT_PREFIX$NXT_TMP" ;;
-esac
-
-case "$NXT_PID" in
- /*) ;;
- *) NXT_PID="$NXT_PREFIX$NXT_PID" ;;
-esac
-
-case "$NXT_LOG" in
- /*) ;;
- *) NXT_LOG="$NXT_PREFIX$NXT_LOG" ;;
-esac
-
-case "$NXT_CONTROL" in
- unix:/*) ;;
- unix:*) NXT_CONTROL="unix:$NXT_PREFIX${NXT_CONTROL##unix:}" ;;
- *) ;;
-esac
+NXT_PREFIX="${NXT_PREFIX-"/usr/local"}"
+
+NXT_EXEC_PREFIX="${NXT_EXEC_PREFIX-"$NXT_PREFIX"}"
+NXT_BINDIR="${NXT_BINDIR-"$NXT_EXEC_PREFIX/bin"}"
+NXT_SBINDIR="${NXT_SBINDIR-"$NXT_EXEC_PREFIX/sbin"}"
+
+NXT_INCLUDEDIR="${NXT_INCLUDEDIR-"$NXT_PREFIX/include"}"
+
+NXT_LIBDIR="${NXT_LIBDIR-"$NXT_PREFIX/lib"}"
+NXT_MODULESDIR="${NXT_MODULESDIR-"$NXT_LIBDIR/unit/modules"}"
+
+NXT_DATAROOTDIR="${NXT_DATAROOTDIR-"$NXT_PREFIX/share"}"
+NXT_MANDIR="${NXT_MANDIR-"$NXT_DATAROOTDIR/man"}"
+
+NXT_LOCALSTATEDIR="${NXT_LOCALSTATEDIR-"$NXT_PREFIX/var"}"
+NXT_LIBSTATEDIR="${NXT_LIBSTATEDIR-"$NXT_LOCALSTATEDIR/lib/unit"}"
+NXT_LOGDIR="${NXT_LOGDIR-"$NXT_LOCALSTATEDIR/log/unit"}"
+NXT_LOG="${NXT_LOG-"$NXT_LOGDIR/unit.log"}"
+NXT_RUNSTATEDIR="${NXT_RUNSTATEDIR-"$NXT_LOCALSTATEDIR/run/unit"}"
+NXT_CONTROL="${NXT_CONTROL-"unix:$NXT_RUNSTATEDIR/control.unit.sock"}"
+NXT_PID="${NXT_PID-"$NXT_RUNSTATEDIR/unit.pid"}"
+
+NXT_TMPDIR="${NXT_TMPDIR-"/tmp"}"
diff --git a/auto/save b/auto/save
index 19ef09ec..794b582a 100644
--- a/auto/save
+++ b/auto/save
@@ -28,7 +28,7 @@ NXT_LIB_AUX_LIBS=
NXT_LIB_UNIT_STATIC='$NXT_LIB_UNIT_STATIC'
-NXT_MODULES='$NXT_MODULES'
-NXT_TMP='$NXT_TMP'
+NXT_MODULESDIR='$NXT_MODULESDIR'
+NXT_TMPDIR='$NXT_TMPDIR'
END
diff --git a/auto/summary b/auto/summary
index 51db0eae..eff4881d 100644
--- a/auto/summary
+++ b/auto/summary
@@ -10,11 +10,11 @@ Unit configuration summary:
bin directory: ............. "$NXT_BINDIR"
sbin directory: ............ "$NXT_SBINDIR"
lib directory: ............. "$NXT_LIBDIR"
- include directory: ......... "$NXT_INCDIR"
+ include directory: ......... "$NXT_INCLUDEDIR"
man pages directory: ....... "$NXT_MANDIR"
- modules directory: ......... "$NXT_MODULES"
- state directory: ........... "$NXT_STATE"
- tmp directory: ............. "$NXT_TMP"
+ modules directory: ......... "$NXT_MODULESDIR"
+ state directory: ........... "$NXT_LIBSTATEDIR"
+ tmp directory: ............. "$NXT_TMPDIR"
pid file: .................. "$NXT_PID"
log file: .................. "$NXT_LOG"