Move SO_ACCEPTFILTER and TCP_DEFER_ACCEPT checks into configure.
NetBSD 5.0+ has SO_ACCEPTFILTER support merged from FreeBSD, and having
accept filter check in FreeBSD-specific ngx_freebsd_config.h prevents it
from being used on NetBSD. Therefore move the check into configure (and
do the same for Linux-specific TCP_DEFER_ACCEPT, just to be in line).
error_log related fixes:
*) Complain on invalid log levels.
Previously only first log level was required to be correct, while
error_log directive in fact accepts list of levels (e.g. one may
specify "error_log ... debug_core debug_http;"). This resulted
in (avoidable) wierd behaviour on missing semicolon after error_log
directive, e.g.
error_log /path/to/log info
index index.php;
silently skipped index directive and it's arguments (trying to
interpret them as log levels without checking to be correct).
*) Fixed configuration summary and manpage contents for the special
--error-log-path=stderr case.
Solaris related fixes:
*) Detect POSIX semaphores in librt on Solaris (ticket #3).
Patch by Denis Ivanov.
*) Lower optimization level for Sun Studio before 12.1.
At least Sun Studio 12 has problems with bit-fields exposed by nginx code
(caught by test suite). They seems to be fixed in Sun Studio 12.1. As a
workaround use "-fast -xalias_level=any" for older versions, it resolves
the problem.
Configure: catch up with new Linux version numbering (ticket #5).
Catch up with new Linux version numbering scheme as announced at [1] and
suppress unrecognized versions to actually use default 0.
[1] https://lkml.org/lkml/2011/5/29/204
This configure test must run before auto/make, because it adds library.
auto/unix was placed after auto/make just for historical reasons.
Patch by Denis F. Latypoff
Solaris strerror() invalid error code behaviour depends on version:
Solaris 10 returns "Unknown error" and sets errno to EINVAL,
Solaris 9 returns "Unknown error" and leaves errno intact,
Solaris 2 returns NULL.