summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2011-12-14 13:34:16 +0000
committerMaxim Dounin <mdounin@mdounin.ru>2011-12-14 13:34:16 +0000
commit0c9e5e185e775e6c7ffc7456261a9f8cd3c75075 (patch)
tree327f703a2b75bea6661426e3892ed7dace57167b
parent6692bd213c3029fb45933e139d001f6a315c5197 (diff)
downloadnginx-0c9e5e185e775e6c7ffc7456261a9f8cd3c75075.tar.gz
nginx-0c9e5e185e775e6c7ffc7456261a9f8cd3c75075.tar.bz2
Merge of r4231, r4300, r4303, r4304:
Configure/build changes and fixes: *) Revamped "configure --help" text. *) FreeBSD 10-current has recently gotten POSIX_FADV_* macros. A fix for the broken build applied. *) AIX 7 defines sys_nerr in errno.h, therefore <errno.h> included in the sys_nerr test. When sys_nerr and _sys_nerr are missed on a particular platform and our euristic for a maximum errno detection applied always print the maximum errno number we reached instead of printing void. This makes possible to build nginx on AIX 7.1. *) Made it possible to build/install from the SVN checkout.
-rw-r--r--auto/install18
-rw-r--r--auto/options77
-rwxr-xr-xauto/unix9
-rw-r--r--src/os/unix/ngx_files.c2
4 files changed, 61 insertions, 45 deletions
diff --git a/auto/install b/auto/install
index d77efbf74..d56be27ef 100644
--- a/auto/install
+++ b/auto/install
@@ -72,16 +72,28 @@ case ".$NGX_HTTP_LOG_PATH" in
esac
+if test -e man/nginx.8 ; then
+ NGX_MAN=man/nginx.8
+else
+ NGX_MAN=docs/man/nginx.8
+fi
+
+if test -d html ; then
+ NGX_HTML=html
+else
+ NGX_HTML=docs/html
+fi
+
cat << END >> $NGX_MAKEFILE
manpage: $NGX_OBJS/nginx.8
-$NGX_OBJS/nginx.8: man/nginx.8 $NGX_AUTO_CONFIG_H
+$NGX_OBJS/nginx.8: $NGX_MAN $NGX_AUTO_CONFIG_H
sed -e "s|%%PREFIX%%|$NGX_PREFIX|" \\
-e "s|%%PID_PATH%%|$NGX_PID_PATH|" \\
-e "s|%%CONF_PATH%%|$NGX_CONF_PATH|" \\
-e "s|%%ERROR_LOG_PATH%%|${NGX_ERROR_LOG_PATH:-stderr}|" \\
- < man/nginx.8 > $NGX_OBJS/nginx.8
+ < $NGX_MAN > \$@
install: $NGX_OBJS${ngx_dirsep}nginx${ngx_binext} \
$NGX_INSTALL_PERL_MODULES
@@ -135,7 +147,7 @@ install: $NGX_OBJS${ngx_dirsep}nginx${ngx_binext} \
mkdir -p '\$(DESTDIR)`dirname "$NGX_HTTP_LOG_PATH"`'
test -d '\$(DESTDIR)$NGX_PREFIX/html' \
- || cp -r html '\$(DESTDIR)$NGX_PREFIX'
+ || cp -R $NGX_HTML '\$(DESTDIR)$NGX_PREFIX'
END
diff --git a/auto/options b/auto/options
index f30917c89..07d22f519 100644
--- a/auto/options
+++ b/auto/options
@@ -304,21 +304,21 @@ if [ $help = yes ]; then
cat << END
- --help this message
+ --help print this message
- --prefix=PATH set the installation prefix
- --sbin-path=PATH set path to the nginx binary file
- --conf-path=PATH set path to the nginx.conf file
- --error-log-path=PATH set path to the error log
- --pid-path=PATH set path to nginx.pid file
- --lock-path=PATH set path to nginx.lock file
+ --prefix=PATH set installation prefix
+ --sbin-path=PATH set nginx binary pathname
+ --conf-path=PATH set nginx.conf pathname
+ --error-log-path=PATH set error log pathname
+ --pid-path=PATH set nginx.pid pathname
+ --lock-path=PATH set nginx.lock pathname
- --user=USER set non-privilege user
- for the worker processes
- --group=GROUP set non-privilege group
- for the worker processes
+ --user=USER set non-privileged user for
+ worker processes
+ --group=GROUP set non-privileged group for
+ worker processes
- --builddir=DIR set the build directory
+ --builddir=DIR set build directory
--with-rtsig_module enable rtsig module
--with-select_module enable select module
@@ -326,8 +326,8 @@ cat << END
--with-poll_module enable poll module
--without-poll_module disable poll module
- --with-file-aio enable file aio support
- --with-ipv6 enable ipv6 support
+ --with-file-aio enable file AIO support
+ --with-ipv6 enable IPv6 support
--with-http_ssl_module enable ngx_http_ssl_module
--with-http_realip_module enable ngx_http_realip_module
@@ -370,17 +370,20 @@ cat << END
disable ngx_http_upstream_ip_hash_module
--with-http_perl_module enable ngx_http_perl_module
- --with-perl_modules_path=PATH set path to the perl modules
- --with-perl=PATH set path to the perl binary
-
- --http-log-path=PATH set path to the http access log
- --http-client-body-temp-path=PATH set path to the http client request body
- temporary files
- --http-proxy-temp-path=PATH set path to the http proxy temporary files
- --http-fastcgi-temp-path=PATH set path to the http fastcgi temporary
- files
- --http-uwsgi-temp-path=PATH set path to the http uwsgi temporary files
- --http-scgi-temp-path=PATH set path to the http scgi temporary files
+ --with-perl_modules_path=PATH set Perl modules path
+ --with-perl=PATH set perl binary pathname
+
+ --http-log-path=PATH set http access log pathname
+ --http-client-body-temp-path=PATH set path to store
+ http client request body temporary files
+ --http-proxy-temp-path=PATH set path to store
+ http proxy temporary files
+ --http-fastcgi-temp-path=PATH set path to store
+ http fastcgi temporary files
+ --http-uwsgi-temp-path=PATH set path to store
+ http uwsgi temporary files
+ --http-scgi-temp-path=PATH set path to store
+ http scgi temporary files
--without-http disable HTTP server
--without-http-cache disable HTTP cache
@@ -396,40 +399,40 @@ cat << END
--add-module=PATH enable an external module
- --with-cc=PATH set path to C compiler
- --with-cpp=PATH set path to C preprocessor
- --with-cc-opt=OPTIONS set additional options for C compiler
- --with-ld-opt=OPTIONS set additional options for linker
- --with-cpu-opt=CPU build for specified CPU, the valid values:
+ --with-cc=PATH set C compiler pathname
+ --with-cpp=PATH set C preprocessor pathname
+ --with-cc-opt=OPTIONS set additional C compiler options
+ --with-ld-opt=OPTIONS set additional linker options
+ --with-cpu-opt=CPU build for the specified CPU, valid values:
pentium, pentiumpro, pentium3, pentium4,
athlon, opteron, sparc32, sparc64, ppc64
--without-pcre disable PCRE library usage
--with-pcre force PCRE library usage
--with-pcre=DIR set path to PCRE library sources
- --with-pcre-opt=OPTIONS set additional options for PCRE building
+ --with-pcre-opt=OPTIONS set additional build options for PCRE
--with-md5=DIR set path to md5 library sources
- --with-md5-opt=OPTIONS set additional options for md5 building
+ --with-md5-opt=OPTIONS set additional build options for md5
--with-md5-asm use md5 assembler sources
--with-sha1=DIR set path to sha1 library sources
- --with-sha1-opt=OPTIONS set additional options for sha1 building
+ --with-sha1-opt=OPTIONS set additional build options for sha1
--with-sha1-asm use sha1 assembler sources
--with-zlib=DIR set path to zlib library sources
- --with-zlib-opt=OPTIONS set additional options for zlib building
+ --with-zlib-opt=OPTIONS set additional build options for zlib
--with-zlib-asm=CPU use zlib assembler sources optimized
- for specified CPU, the valid values:
+ for the specified CPU, valid values:
pentium, pentiumpro
--with-libatomic force libatomic_ops library usage
--with-libatomic=DIR set path to libatomic_ops library sources
--with-openssl=DIR set path to OpenSSL library sources
- --with-openssl-opt=OPTIONS set additional options for OpenSSL building
+ --with-openssl-opt=OPTIONS set additional build options for OpenSSL
- --with-debug enable the debugging logging
+ --with-debug enable debug logging
END
diff --git a/auto/unix b/auto/unix
index ca533487c..7621e8fa2 100755
--- a/auto/unix
+++ b/auto/unix
@@ -496,7 +496,8 @@ ngx_feature_test="char buf[1]; ssize_t n; n = pwrite(1, buf, 1, 0)"
ngx_feature="sys_nerr"
ngx_feature_name="NGX_SYS_NERR"
ngx_feature_run=value
-ngx_feature_incs='#include <stdio.h>'
+ngx_feature_incs='#include <errno.h>
+ #include <stdio.h>'
ngx_feature_path=
ngx_feature_libs=
ngx_feature_test='printf("%d", sys_nerr);'
@@ -538,10 +539,10 @@ if [ $ngx_found = no ]; then
|| p == NULL
|| strncmp(p, "Unknown error", 13) == 0)
{
- printf("%d", n);
- return 0;
+ break;
}
- }'
+ }
+ printf("%d", n);'
. auto/feature
fi
diff --git a/src/os/unix/ngx_files.c b/src/os/unix/ngx_files.c
index ad26d2752..196323727 100644
--- a/src/os/unix/ngx_files.c
+++ b/src/os/unix/ngx_files.c
@@ -464,7 +464,7 @@ ngx_unlock_fd(ngx_fd_t fd)
}
-#if (NGX_HAVE_POSIX_FADVISE)
+#if (NGX_HAVE_POSIX_FADVISE) && !(NGX_HAVE_F_READAHEAD)
ngx_int_t
ngx_read_ahead(ngx_fd_t fd, size_t n)