diff options
author | Jérôme Loyet <fat@php.net> | 2010-11-11 02:34:47 +0000 |
---|---|---|
committer | Jérôme Loyet <fat@php.net> | 2010-11-11 02:34:47 +0000 |
commit | b38d57249e247a2bcf5f285185cae237928f90f9 (patch) | |
tree | a531a55ee0829776fdb06a01906ba6f60082101f /sapi/fpm/config.m4 | |
parent | 584ddb0c6e308c87ee69c45696bd4b481ee866c2 (diff) | |
download | php-git-b38d57249e247a2bcf5f285185cae237928f90f9.tar.gz |
- add "listen queue len" stat (thx to Andrei Nigmatulin)
Diffstat (limited to 'sapi/fpm/config.m4')
-rw-r--r-- | sapi/fpm/config.m4 | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4 index 6a2105d1e6..fc5de67804 100644 --- a/sapi/fpm/config.m4 +++ b/sapi/fpm/config.m4 @@ -516,6 +516,39 @@ AC_DEFUN([AC_FPM_BUILTIN_ATOMIC], AC_MSG_RESULT([no]) ]) ]) + +AC_DEFUN([AC_FPM_LQ], +[ + have_lq=no + + AC_MSG_CHECKING([for TCP_INFO]) + + AC_TRY_COMPILE([ #include <netinet/tcp.h> ], [struct tcp_info ti; int x = TCP_INFO;], [ + have_lq=tcp_info + AC_MSG_RESULT([yes]) + ], [ + AC_MSG_RESULT([no]) + ]) + + if test "$have_lq" = "tcp_info"; then + AC_DEFINE([HAVE_LQ_TCP_INFO], 1, [do we have TCP_INFO?]) + fi + + if test "$have_lq" = "no" ; then + AC_MSG_CHECKING([for SO_LISTENQLEN]) + + AC_TRY_COMPILE([ #include <sys/socket.h> ], [int x = SO_LISTENQLIMIT; int y = SO_LISTENQLEN;], [ + have_lq=so_listenq + AC_MSG_RESULT([yes]) + ], [ + AC_MSG_RESULT([no]) + ]) + + if test "$have_lq" = "tcp_info"; then + AC_DEFINE([HAVE_LQ_SO_LISTENQ], 1, [do we have SO_LISTENQxxx?]) + fi + fi +]) dnl }}} AC_MSG_CHECKING(for FPM build) @@ -543,6 +576,7 @@ if test "$PHP_FPM" != "no"; then AC_FPM_CLOCK AC_FPM_TRACE AC_FPM_BUILTIN_ATOMIC + AC_FPM_LQ PHP_ARG_WITH(fpm-user,, [ --with-fpm-user[=USER] Set the user for php-fpm to run as. (default: nobody)], nobody, no) |