[pkg-lighttpd] r472 - in lighttpd/trunk: . debian doc src tests tests/docroot tests/docroot/123 tests/docroot/www tests/docroot/www/expire tests/docroot/www/go tests/docroot/www/indexfile

Olaf van der Spek olafvdspek-guest at alioth.debian.org
Wed Aug 11 15:14:07 UTC 2010


Author: olafvdspek-guest
Date: 2010-08-11 15:14:05 +0000 (Wed, 11 Aug 2010)
New Revision: 472

Added:
   lighttpd/trunk/doc/config/
   lighttpd/trunk/doc/initscripts/
   lighttpd/trunk/doc/scripts/
   lighttpd/trunk/src/fdevent_libev.c
Removed:
   lighttpd/trunk/doc/lighttpd.conf
   lighttpd/trunk/doc/lighttpd.user
   lighttpd/trunk/doc/rc.lighttpd
   lighttpd/trunk/doc/rc.lighttpd.redhat
   lighttpd/trunk/doc/rrdtool-graph.sh
   lighttpd/trunk/doc/spawn-php.sh
   lighttpd/trunk/doc/sysconfig.lighttpd
   lighttpd/trunk/src/fdevent_linux_rtsig.c
Modified:
   lighttpd/trunk/AUTHORS
   lighttpd/trunk/Makefile.in
   lighttpd/trunk/NEWS
   lighttpd/trunk/SConstruct
   lighttpd/trunk/aclocal.m4
   lighttpd/trunk/config.h.in
   lighttpd/trunk/configure
   lighttpd/trunk/configure.ac
   lighttpd/trunk/debian/changelog
   lighttpd/trunk/debian/lighttpd.init
   lighttpd/trunk/doc/Makefile.am
   lighttpd/trunk/doc/Makefile.in
   lighttpd/trunk/src/Makefile.am
   lighttpd/trunk/src/Makefile.in
   lighttpd/trunk/src/SConscript
   lighttpd/trunk/src/array.c
   lighttpd/trunk/src/base.h
   lighttpd/trunk/src/configfile.c
   lighttpd/trunk/src/configparser.c
   lighttpd/trunk/src/connections.c
   lighttpd/trunk/src/data_string.c
   lighttpd/trunk/src/etag.c
   lighttpd/trunk/src/fdevent.c
   lighttpd/trunk/src/fdevent.h
   lighttpd/trunk/src/fdevent_freebsd_kqueue.c
   lighttpd/trunk/src/fdevent_linux_sysepoll.c
   lighttpd/trunk/src/fdevent_poll.c
   lighttpd/trunk/src/fdevent_select.c
   lighttpd/trunk/src/fdevent_solaris_devpoll.c
   lighttpd/trunk/src/http_auth.c
   lighttpd/trunk/src/keyvalue.c
   lighttpd/trunk/src/keyvalue.h
   lighttpd/trunk/src/mod_accesslog.c
   lighttpd/trunk/src/mod_cgi.c
   lighttpd/trunk/src/mod_dirlisting.c
   lighttpd/trunk/src/mod_extforward.c
   lighttpd/trunk/src/mod_fastcgi.c
   lighttpd/trunk/src/mod_proxy.c
   lighttpd/trunk/src/mod_redirect.c
   lighttpd/trunk/src/mod_scgi.c
   lighttpd/trunk/src/mod_ssi_exprparser.c
   lighttpd/trunk/src/mod_staticfile.c
   lighttpd/trunk/src/mod_status.c
   lighttpd/trunk/src/network.c
   lighttpd/trunk/src/plugin.c
   lighttpd/trunk/src/server.c
   lighttpd/trunk/src/stat_cache.c
   lighttpd/trunk/src/stat_cache.h
   lighttpd/trunk/tests/Makefile.in
   lighttpd/trunk/tests/docroot/123/Makefile.in
   lighttpd/trunk/tests/docroot/Makefile.in
   lighttpd/trunk/tests/docroot/www/Makefile.in
   lighttpd/trunk/tests/docroot/www/expire/Makefile.in
   lighttpd/trunk/tests/docroot/www/go/Makefile.in
   lighttpd/trunk/tests/docroot/www/indexfile/Makefile.in
Log:
Upstream 1.4.27rc2-r2758


Modified: lighttpd/trunk/AUTHORS
===================================================================
--- lighttpd/trunk/AUTHORS	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/AUTHORS	2010-08-11 15:14:05 UTC (rev 472)
@@ -1 +1,6 @@
-jan kneschke <jan at kneschke.de>
+Jan Kneschke <jan at kneschke.de>
+Elan Ruusamäe <glen at delfi.ee>
+Marcus Rückert <darix at opensu.se>
+mOo <moo.lighttpd at gmail.com>
+Robert Jakabosky <bobby at neoawareness.com>
+Stefan Bühler <stbuehler at web.de>

Modified: lighttpd/trunk/Makefile.in
===================================================================
--- lighttpd/trunk/Makefile.in	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/Makefile.in	2010-08-11 15:14:05 UTC (rev 472)
@@ -152,6 +152,8 @@
 LD = @LD@
 LDAP_LIB = @LDAP_LIB@
 LDFLAGS = @LDFLAGS@
+LIBEV_CFLAGS = @LIBEV_CFLAGS@
+LIBEV_LIBS = @LIBEV_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -183,6 +185,8 @@
 PCRECONFIG = @PCRECONFIG@
 PCRE_LIB = @PCRE_LIB@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 RANLIB = @RANLIB@
 SED = @SED@
 SENDFILE_LIB = @SENDFILE_LIB@

Modified: lighttpd/trunk/NEWS
===================================================================
--- lighttpd/trunk/NEWS	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/NEWS	2010-08-11 15:14:05 UTC (rev 472)
@@ -11,6 +11,28 @@
   * Fix detecting git repository (fixes #2173, thx ncopa)
   * [mod_compress] Fix segfault when etags are disabled (fixes #2169)
   * Reset uri.authority before TLS servername handling, reset all "keep-alive" data in connection_del (fixes #2125)
+  * Print double quotes properly when dumping config file (fixes #1806)
+  * Include IP addresses on error log on password failures (fixes #2191)
+  * Fix stalls while reading from ssl sockets (fixes #2197)
+  * Fix etag formatting on boxes with 32-bit longs
+  * Fix two compiler warnings
+  * mod_accesslog: fix %p for ipv6 sockets (fixes #2228, thx jo.henke)
+  * mod_fastcgi: Send 502 "Bad Gateway" if we couldn't open the file for X-Sendfile (fixes #2226)
+  * mod_staticfile: add debug output if we ignore a file with static-file.exclude-extensions (fixes #2215)
+  * mod_cgi: fix race condition leaving response not forwarded to client (fixes #2217)
+  * mod_accesslog: Fix var declarations mixed in source (fixes #2233)
+  * mod_status: Add version to status page (fixes #2219)
+  * mod_accesslog: optimize accesslog_append_escaped (fixes #2236, thx crypt)
+  * autotools: don't recreate parser files with lemon after lemon rebuild
+  * openssl: silence annoying error messages for errno==0 (fixes #2213)
+  * array.c: improve array_get_unused_element to check data type; fix mem leak if unused_element didn't find a matching entry (fixes #2145)
+  * add check to stop loading plugins twice
+  * cleanup fdevent code, removed linux-rtsig handler, replaced some fprintf calls
+  * only require FDEVENT_IN bit to be set for listening connections (fixes #2227)
+  * add libev fdevent handler: server.event-handler = "libev"
+  * mod_proxy: return response as soon as it is available (fixes #2196)
+  * don't overwrite global server.force-lowercase-filenames setting (fixes #2042)
+  * bind to IPV6-only if ipv6 address was specified (http://redmine.lighttpd.net/projects/lighttpd/wiki/IPv6-Config)
 
 - 1.4.26 - 2010-02-07
   * Fix request parser to handle packets with splitted \r\n\r\n (fixes #2105)

Modified: lighttpd/trunk/SConstruct
===================================================================
--- lighttpd/trunk/SConstruct	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/SConstruct	2010-08-11 15:14:05 UTC (rev 472)
@@ -157,7 +157,7 @@
 
 	checkFuncs(autoconf, Split('fork stat lstat strftime dup2 getcwd inet_ntoa inet_ntop memset mmap munmap strchr \
 			strdup strerror strstr strtol sendfile  getopt socket \
-			gethostbyname poll sigtimedwait epoll_ctl getrlimit chroot \
+			gethostbyname poll epoll_ctl getrlimit chroot \
 			getuid select signal pathconf madvise prctl\
 			writev sigaction sendfile64 send_file kqueue port_create localtime_r posix_fadvise issetugid inet_pton'))
 

Modified: lighttpd/trunk/aclocal.m4
===================================================================
--- lighttpd/trunk/aclocal.m4	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/aclocal.m4	2010-08-11 15:14:05 UTC (rev 472)
@@ -20,6 +20,7 @@
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# serial 1 (pkg-config-0.24)
 # 
 # Copyright © 2004 Scott James Remnant <scott at netsplit.com>.
 #
@@ -47,7 +48,10 @@
 AC_DEFUN([PKG_PROG_PKG_CONFIG],
 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 fi
@@ -60,7 +64,6 @@
 		AC_MSG_RESULT([no])
 		PKG_CONFIG=""
 	fi
-		
 fi[]dnl
 ])# PKG_PROG_PKG_CONFIG
 
@@ -69,34 +72,31 @@
 # Check to see whether a particular set of modules exists.  Similar
 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
 #
-#
-# Similar to PKG_CHECK_MODULES, make sure that the first instance of
-# this or PKG_CHECK_MODULES is called, or make sure to call
-# PKG_CHECK_EXISTS manually
+# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+# only at the first occurence in configure.ac, so if the first place
+# it's called might be skipped (such as if it is within an "if", you
+# have to call PKG_CHECK_EXISTS manually
 # --------------------------------------------------------------
 AC_DEFUN([PKG_CHECK_EXISTS],
 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 if test -n "$PKG_CONFIG" && \
     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
-  m4_ifval([$2], [$2], [:])
+  m4_default([$2], [:])
 m4_ifvaln([$3], [else
   $3])dnl
 fi])
 
-
 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 # ---------------------------------------------
 m4_define([_PKG_CONFIG],
-[if test -n "$PKG_CONFIG"; then
-    if test -n "$$1"; then
-        pkg_cv_[]$1="$$1"
-    else
-        PKG_CHECK_EXISTS([$3],
-                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
-			 [pkg_failed=yes])
-    fi
-else
-	pkg_failed=untried
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+		     [pkg_failed=yes])
+ else
+    pkg_failed=untried
 fi[]dnl
 ])# _PKG_CONFIG
 
@@ -138,16 +138,17 @@
 See the pkg-config man page for more details.])
 
 if test $pkg_failed = yes; then
+   	AC_MSG_RESULT([no])
         _PKG_SHORT_ERRORS_SUPPORTED
         if test $_pkg_short_errors_supported = yes; then
-	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
         else 
-	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
-	ifelse([$4], , [AC_MSG_ERROR(dnl
+	m4_default([$4], [AC_MSG_ERROR(
 [Package requirements ($2) were not met:
 
 $$1_PKG_ERRORS
@@ -155,25 +156,24 @@
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-_PKG_TEXT
-])],
-		[AC_MSG_RESULT([no])
-                $4])
+_PKG_TEXT])dnl
+        ])
 elif test $pkg_failed = untried; then
-	ifelse([$4], , [AC_MSG_FAILURE(dnl
+     	AC_MSG_RESULT([no])
+	m4_default([$4], [AC_MSG_FAILURE(
 [The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
 _PKG_TEXT
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
-		[$4])
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
+        ])
 else
 	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
         AC_MSG_RESULT([yes])
-	ifelse([$3], , :, [$3])
+	$3
 fi[]dnl
 ])# PKG_CHECK_MODULES
 

Modified: lighttpd/trunk/config.h.in
===================================================================
--- lighttpd/trunk/config.h.in	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/config.h.in	2010-08-11 15:14:05 UTC (rev 472)
@@ -27,6 +27,9 @@
 /* Define to 1 if you have the <errmsg.h> header file. */
 #undef HAVE_ERRMSG_H
 
+/* Define to 1 if you have the <ev.h> header file. */
+#undef HAVE_EV_H
+
 /* Define to 1 if you have the `FAMNoExists' function. */
 #undef HAVE_FAMNOEXISTS
 
@@ -108,6 +111,9 @@
 /* libdl */
 #undef HAVE_LIBDL
 
+/* libev support */
+#undef HAVE_LIBEV
+
 /* libfam */
 #undef HAVE_LIBFAM
 
@@ -225,9 +231,6 @@
 /* Define to 1 if you have the `signal' function. */
 #undef HAVE_SIGNAL
 
-/* Define to 1 if you have the `sigtimedwait' function. */
-#undef HAVE_SIGTIMEDWAIT
-
 /* Define to 1 if you have the `socket' function. */
 #undef HAVE_SOCKET
 

Modified: lighttpd/trunk/configure
===================================================================
--- lighttpd/trunk/configure	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/configure	2010-08-11 15:14:05 UTC (rev 472)
@@ -763,7 +763,6 @@
 XML_CFLAGS
 FAM_LIBS
 FAM_CFLAGS
-PKG_CONFIG
 BZ_LIB
 Z_LIB
 PCRE_LIB
@@ -776,6 +775,11 @@
 MYSQL_INCLUDE
 MYSQL_LIBS
 MYSQL_CONFIG
+LIBEV_LIBS
+LIBEV_CFLAGS
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
 LIBOBJS
 OTOOL64
 OTOOL
@@ -903,6 +907,7 @@
 with_pic
 enable_fast_install
 enable_libtool_lock
+with_libev
 with_mysql
 with_ldap
 with_attr
@@ -934,6 +939,10 @@
 CPPFLAGS
 CPP
 PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
+LIBEV_CFLAGS
+LIBEV_LIBS
 FAM_CFLAGS
 FAM_LIBS
 XML_CFLAGS
@@ -1581,6 +1590,8 @@
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
+  --with-libev[=PATH]     Include libev support for fdevent handlers in
+                          PATH/include and PATH/lib
   --with-mysql[=PATH]     Include MySQL support. PATH is the path to
                           'mysql_config'
   --with-ldap             enable LDAP support
@@ -1611,6 +1622,13 @@
               you have headers in a nonstandard directory <include dir>
   CPP         C preprocessor
   PKG_CONFIG  path to pkg-config utility
+  PKG_CONFIG_PATH
+              directories to add to pkg-config's search path
+  PKG_CONFIG_LIBDIR
+              path overriding pkg-config's built-in search path
+  LIBEV_CFLAGS
+              C compiler flags for LIBEV, overriding pkg-config
+  LIBEV_LIBS  linker flags for LIBEV, overriding pkg-config
   FAM_CFLAGS  C compiler flags for FAM, overriding pkg-config
   FAM_LIBS    linker flags for FAM, overriding pkg-config
   XML_CFLAGS  C compiler flags for XML, overriding pkg-config
@@ -5716,13 +5734,13 @@
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:5719: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:5737: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:5722: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:5740: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:5725: output\"" >&5)
+  (eval echo "\"\$as_me:5743: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -6916,7 +6934,7 @@
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 6919 "configure"' > conftest.$ac_ext
+  echo '#line 6937 "configure"' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -8116,11 +8134,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8119: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8137: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8123: \$? = $ac_status" >&5
+   echo "$as_me:8141: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8455,11 +8473,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8458: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8476: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8462: \$? = $ac_status" >&5
+   echo "$as_me:8480: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8560,11 +8578,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8563: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8581: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8567: \$? = $ac_status" >&5
+   echo "$as_me:8585: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -8615,11 +8633,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8618: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8636: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8622: \$? = $ac_status" >&5
+   echo "$as_me:8640: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -10999,7 +11017,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11002 "configure"
+#line 11020 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11095,7 +11113,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11098 "configure"
+#line 11116 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12141,6 +12159,362 @@
 done
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libev support" >&5
+$as_echo_n "checking for libev support... " >&6; }
+
+# Check whether --with-libev was given.
+if test "${with_libev+set}" = set; then :
+  withval=$with_libev; WITH_LIBEV=$withval
+else
+  WITH_LIBEV=no
+fi
+
+
+LIBEV_CFLAGS=""
+LIBEV_LIBS=""
+
+if test "$WITH_LIBEV" != "no"; then
+
+
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+	if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+  ac_pt_PKG_CONFIG=$PKG_CONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_PKG_CONFIG" = x; then
+    PKG_CONFIG=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKG_CONFIG=$ac_pt_PKG_CONFIG
+  fi
+else
+  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+	_pkg_min_version=0.9.0
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	else
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+		PKG_CONFIG=""
+	fi
+fi
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBEV" >&5
+$as_echo_n "checking for LIBEV... " >&6; }
+
+if test -n "$LIBEV_CFLAGS"; then
+    pkg_cv_LIBEV_CFLAGS="$LIBEV_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libev\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libev") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_LIBEV_CFLAGS=`$PKG_CONFIG --cflags "libev" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$LIBEV_LIBS"; then
+    pkg_cv_LIBEV_LIBS="$LIBEV_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libev\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libev") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_LIBEV_LIBS=`$PKG_CONFIG --libs "libev" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        LIBEV_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libev" 2>&1`
+        else
+	        LIBEV_PKG_ERRORS=`$PKG_CONFIG --print-errors "libev" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$LIBEV_PKG_ERRORS" >&5
+
+
+
+		if test "$WITH_LIBEV" != "yes"; then
+			LIBEV_CFLAGS="-I$WITH_LIBEV/include"
+			LIBEV_LIBS="-L$WITH_LIBEV/lib -lev"
+		else
+			for ac_header in ev.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "ev.h" "ac_cv_header_ev_h" "$ac_includes_default"
+if test "x$ac_cv_header_ev_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_EV_H 1
+_ACEOF
+
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ev_loop in -lev" >&5
+$as_echo_n "checking for ev_loop in -lev... " >&6; }
+if test "${ac_cv_lib_ev_ev_loop+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lev  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ev_loop ();
+int
+main ()
+{
+return ev_loop ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_ev_ev_loop=yes
+else
+  ac_cv_lib_ev_ev_loop=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ev_ev_loop" >&5
+$as_echo "$ac_cv_lib_ev_ev_loop" >&6; }
+if test "x$ac_cv_lib_ev_ev_loop" = x""yes; then :
+
+						LIBEV_CFLAGS=""
+						LIBEV_LIBS="-lev"
+
+else
+
+					as_fn_error "libev not found" "$LINENO" 5
+
+
+fi
+
+else
+
+					as_fn_error "libev not found" "$LINENO" 5
+
+
+fi
+
+done
+
+		fi
+
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+
+		if test "$WITH_LIBEV" != "yes"; then
+			LIBEV_CFLAGS="-I$WITH_LIBEV/include"
+			LIBEV_LIBS="-L$WITH_LIBEV/lib -lev"
+		else
+			for ac_header in ev.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "ev.h" "ac_cv_header_ev_h" "$ac_includes_default"
+if test "x$ac_cv_header_ev_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_EV_H 1
+_ACEOF
+
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ev_loop in -lev" >&5
+$as_echo_n "checking for ev_loop in -lev... " >&6; }
+if test "${ac_cv_lib_ev_ev_loop+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lev  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ev_loop ();
+int
+main ()
+{
+return ev_loop ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_ev_ev_loop=yes
+else
+  ac_cv_lib_ev_ev_loop=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ev_ev_loop" >&5
+$as_echo "$ac_cv_lib_ev_ev_loop" >&6; }
+if test "x$ac_cv_lib_ev_ev_loop" = x""yes; then :
+
+						LIBEV_CFLAGS=""
+						LIBEV_LIBS="-lev"
+
+else
+
+					as_fn_error "libev not found" "$LINENO" 5
+
+
+fi
+
+else
+
+					as_fn_error "libev not found" "$LINENO" 5
+
+
+fi
+
+done
+
+		fi
+
+else
+	LIBEV_CFLAGS=$pkg_cv_LIBEV_CFLAGS
+	LIBEV_LIBS=$pkg_cv_LIBEV_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+
+
+$as_echo "#define HAVE_LIBEV 1" >>confdefs.h
+
+fi
+
+
+
+
 MYSQL_INCLUDE=""
 MYSQL_LIBS=""
 
@@ -13258,131 +13632,14 @@
 
   if test "x$FAM_LIBS" = x; then
 
-
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-	if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_PKG_CONFIG"; then
-  ac_pt_PKG_CONFIG=$PKG_CONFIG
-  # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $ac_pt_PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-if test -n "$ac_pt_PKG_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
-$as_echo "$ac_pt_PKG_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_pt_PKG_CONFIG" = x; then
-    PKG_CONFIG=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    PKG_CONFIG=$ac_pt_PKG_CONFIG
-  fi
-else
-  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-fi
-
-fi
-if test -n "$PKG_CONFIG"; then
-	_pkg_min_version=0.9.0
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
-$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
-	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	else
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-		PKG_CONFIG=""
-	fi
-
-fi
-
 pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FAM" >&5
 $as_echo_n "checking for FAM... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$FAM_CFLAGS"; then
-        pkg_cv_FAM_CFLAGS="$FAM_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$FAM_CFLAGS"; then
+    pkg_cv_FAM_CFLAGS="$FAM_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gamin >= 0.1.0\""; } >&5
   ($PKG_CONFIG --exists --print-errors "gamin >= 0.1.0") 2>&5
   ac_status=$?
@@ -13392,15 +13649,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$FAM_LIBS"; then
-        pkg_cv_FAM_LIBS="$FAM_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$FAM_LIBS"; then
+    pkg_cv_FAM_LIBS="$FAM_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gamin >= 0.1.0\""; } >&5
   ($PKG_CONFIG --exists --print-errors "gamin >= 0.1.0") 2>&5
   ac_status=$?
@@ -13410,14 +13665,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -13425,9 +13681,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        FAM_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gamin >= 0.1.0"`
+	        FAM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gamin >= 0.1.0" 2>&1`
         else
-	        FAM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gamin >= 0.1.0"`
+	        FAM_PKG_ERRORS=`$PKG_CONFIG --print-errors "gamin >= 0.1.0" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$FAM_PKG_ERRORS" >&5
@@ -13441,9 +13697,10 @@
 
 Alternatively, you may set the environment variables FAM_CFLAGS
 and FAM_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" "$LINENO" 5
+See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
@@ -13510,11 +13767,10 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML" >&5
 $as_echo_n "checking for XML... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$XML_CFLAGS"; then
-        pkg_cv_XML_CFLAGS="$XML_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$XML_CFLAGS"; then
+    pkg_cv_XML_CFLAGS="$XML_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5
   ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5
   ac_status=$?
@@ -13524,15 +13780,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$XML_LIBS"; then
-        pkg_cv_XML_LIBS="$XML_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$XML_LIBS"; then
+    pkg_cv_XML_LIBS="$XML_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5
   ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5
   ac_status=$?
@@ -13542,14 +13796,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -13557,9 +13812,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        XML_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libxml-2.0"`
+	        XML_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libxml-2.0" 2>&1`
         else
-	        XML_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0"`
+	        XML_PKG_ERRORS=`$PKG_CONFIG --print-errors "libxml-2.0" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$XML_PKG_ERRORS" >&5
@@ -13573,9 +13828,10 @@
 
 Alternatively, you may set the environment variables XML_CFLAGS
 and XML_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" "$LINENO" 5
+See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
@@ -13607,11 +13863,10 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLITE" >&5
 $as_echo_n "checking for SQLITE... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$SQLITE_CFLAGS"; then
-        pkg_cv_SQLITE_CFLAGS="$SQLITE_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$SQLITE_CFLAGS"; then
+    pkg_cv_SQLITE_CFLAGS="$SQLITE_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sqlite3\""; } >&5
   ($PKG_CONFIG --exists --print-errors "sqlite3") 2>&5
   ac_status=$?
@@ -13621,15 +13876,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$SQLITE_LIBS"; then
-        pkg_cv_SQLITE_LIBS="$SQLITE_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$SQLITE_LIBS"; then
+    pkg_cv_SQLITE_LIBS="$SQLITE_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sqlite3\""; } >&5
   ($PKG_CONFIG --exists --print-errors "sqlite3") 2>&5
   ac_status=$?
@@ -13639,14 +13892,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -13654,9 +13908,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        SQLITE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "sqlite3"`
+	        SQLITE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "sqlite3" 2>&1`
         else
-	        SQLITE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "sqlite3"`
+	        SQLITE_PKG_ERRORS=`$PKG_CONFIG --print-errors "sqlite3" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$SQLITE_PKG_ERRORS" >&5
@@ -13670,9 +13924,10 @@
 
 Alternatively, you may set the environment variables SQLITE_CFLAGS
 and SQLITE_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" "$LINENO" 5
+See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
@@ -13956,11 +14211,10 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
 $as_echo_n "checking for LUA... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$LUA_CFLAGS"; then
-        pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$LUA_CFLAGS"; then
+    pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$WITH_LUA >= 5.1\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$WITH_LUA >= 5.1") 2>&5
   ac_status=$?
@@ -13970,15 +14224,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$LUA_LIBS"; then
-        pkg_cv_LUA_LIBS="$LUA_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$LUA_LIBS"; then
+    pkg_cv_LUA_LIBS="$LUA_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$WITH_LUA >= 5.1\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$WITH_LUA >= 5.1") 2>&5
   ac_status=$?
@@ -13988,14 +14240,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -14003,26 +14256,23 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$WITH_LUA >= 5.1"`
+	        LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$WITH_LUA >= 5.1" 2>&1`
         else
-	        LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$WITH_LUA >= 5.1"`
+	        LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "$WITH_LUA >= 5.1" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$LUA_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
 
 pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
 $as_echo_n "checking for LUA... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$LUA_CFLAGS"; then
-        pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$LUA_CFLAGS"; then
+    pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.1 >= 5.1\""; } >&5
   ($PKG_CONFIG --exists --print-errors "lua5.1 >= 5.1") 2>&5
   ac_status=$?
@@ -14032,15 +14282,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$LUA_LIBS"; then
-        pkg_cv_LUA_LIBS="$LUA_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$LUA_LIBS"; then
+    pkg_cv_LUA_LIBS="$LUA_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.1 >= 5.1\""; } >&5
   ($PKG_CONFIG --exists --print-errors "lua5.1 >= 5.1") 2>&5
   ac_status=$?
@@ -14050,14 +14298,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -14065,26 +14314,23 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua5.1 >= 5.1"`
+	        LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua5.1 >= 5.1" 2>&1`
         else
-	        LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua5.1 >= 5.1"`
+	        LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua5.1 >= 5.1" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$LUA_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
 
 pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
 $as_echo_n "checking for LUA... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$LUA_CFLAGS"; then
-        pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$LUA_CFLAGS"; then
+    pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua-5.1 >= 5.1\""; } >&5
   ($PKG_CONFIG --exists --print-errors "lua-5.1 >= 5.1") 2>&5
   ac_status=$?
@@ -14094,15 +14340,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$LUA_LIBS"; then
-        pkg_cv_LUA_LIBS="$LUA_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$LUA_LIBS"; then
+    pkg_cv_LUA_LIBS="$LUA_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua-5.1 >= 5.1\""; } >&5
   ($PKG_CONFIG --exists --print-errors "lua-5.1 >= 5.1") 2>&5
   ac_status=$?
@@ -14112,14 +14356,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -14127,9 +14372,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua-5.1 >= 5.1"`
+	        LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua-5.1 >= 5.1" 2>&1`
         else
-	        LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua-5.1 >= 5.1"`
+	        LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua-5.1 >= 5.1" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$LUA_PKG_ERRORS" >&5
@@ -14143,9 +14388,10 @@
 
 Alternatively, you may set the environment variables LUA_CFLAGS
 and LUA_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" "$LINENO" 5
+See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
@@ -14174,17 +14420,18 @@
 fi
 
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 
 pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
 $as_echo_n "checking for LUA... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$LUA_CFLAGS"; then
-        pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$LUA_CFLAGS"; then
+    pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua-5.1 >= 5.1\""; } >&5
   ($PKG_CONFIG --exists --print-errors "lua-5.1 >= 5.1") 2>&5
   ac_status=$?
@@ -14194,15 +14441,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$LUA_LIBS"; then
-        pkg_cv_LUA_LIBS="$LUA_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$LUA_LIBS"; then
+    pkg_cv_LUA_LIBS="$LUA_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua-5.1 >= 5.1\""; } >&5
   ($PKG_CONFIG --exists --print-errors "lua-5.1 >= 5.1") 2>&5
   ac_status=$?
@@ -14212,14 +14457,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -14227,9 +14473,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua-5.1 >= 5.1"`
+	        LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua-5.1 >= 5.1" 2>&1`
         else
-	        LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua-5.1 >= 5.1"`
+	        LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua-5.1 >= 5.1" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$LUA_PKG_ERRORS" >&5
@@ -14243,9 +14489,10 @@
 
 Alternatively, you may set the environment variables LUA_CFLAGS
 and LUA_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" "$LINENO" 5
+See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
@@ -14289,17 +14536,18 @@
 fi
 
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 
 pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
 $as_echo_n "checking for LUA... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$LUA_CFLAGS"; then
-        pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$LUA_CFLAGS"; then
+    pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.1 >= 5.1\""; } >&5
   ($PKG_CONFIG --exists --print-errors "lua5.1 >= 5.1") 2>&5
   ac_status=$?
@@ -14309,15 +14557,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$LUA_LIBS"; then
-        pkg_cv_LUA_LIBS="$LUA_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$LUA_LIBS"; then
+    pkg_cv_LUA_LIBS="$LUA_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.1 >= 5.1\""; } >&5
   ($PKG_CONFIG --exists --print-errors "lua5.1 >= 5.1") 2>&5
   ac_status=$?
@@ -14327,14 +14573,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -14342,26 +14589,23 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua5.1 >= 5.1"`
+	        LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua5.1 >= 5.1" 2>&1`
         else
-	        LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua5.1 >= 5.1"`
+	        LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua5.1 >= 5.1" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$LUA_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
 
 pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
 $as_echo_n "checking for LUA... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$LUA_CFLAGS"; then
-        pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$LUA_CFLAGS"; then
+    pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua-5.1 >= 5.1\""; } >&5
   ($PKG_CONFIG --exists --print-errors "lua-5.1 >= 5.1") 2>&5
   ac_status=$?
@@ -14371,15 +14615,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$LUA_LIBS"; then
-        pkg_cv_LUA_LIBS="$LUA_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$LUA_LIBS"; then
+    pkg_cv_LUA_LIBS="$LUA_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua-5.1 >= 5.1\""; } >&5
   ($PKG_CONFIG --exists --print-errors "lua-5.1 >= 5.1") 2>&5
   ac_status=$?
@@ -14389,14 +14631,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -14404,9 +14647,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua-5.1 >= 5.1"`
+	        LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua-5.1 >= 5.1" 2>&1`
         else
-	        LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua-5.1 >= 5.1"`
+	        LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua-5.1 >= 5.1" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$LUA_PKG_ERRORS" >&5
@@ -14420,9 +14663,10 @@
 
 Alternatively, you may set the environment variables LUA_CFLAGS
 and LUA_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" "$LINENO" 5
+See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
@@ -14451,17 +14695,18 @@
 fi
 
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 
 pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
 $as_echo_n "checking for LUA... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$LUA_CFLAGS"; then
-        pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$LUA_CFLAGS"; then
+    pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua-5.1 >= 5.1\""; } >&5
   ($PKG_CONFIG --exists --print-errors "lua-5.1 >= 5.1") 2>&5
   ac_status=$?
@@ -14471,15 +14716,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$LUA_LIBS"; then
-        pkg_cv_LUA_LIBS="$LUA_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$LUA_LIBS"; then
+    pkg_cv_LUA_LIBS="$LUA_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua-5.1 >= 5.1\""; } >&5
   ($PKG_CONFIG --exists --print-errors "lua-5.1 >= 5.1") 2>&5
   ac_status=$?
@@ -14489,14 +14732,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -14504,9 +14748,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua-5.1 >= 5.1"`
+	        LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua-5.1 >= 5.1" 2>&1`
         else
-	        LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua-5.1 >= 5.1"`
+	        LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua-5.1 >= 5.1" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$LUA_PKG_ERRORS" >&5
@@ -14520,9 +14764,10 @@
 
 Alternatively, you may set the environment variables LUA_CFLAGS
 and LUA_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" "$LINENO" 5
+See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
@@ -14741,7 +14986,7 @@
 
 for ac_func in dup2 getcwd inet_ntoa inet_ntop memset mmap munmap strchr \
 		  strdup strerror strstr strtol sendfile  getopt socket lstat \
-		  gethostbyname poll sigtimedwait epoll_ctl getrlimit chroot \
+		  gethostbyname poll epoll_ctl getrlimit chroot \
 		  getuid select signal pathconf madvise posix_fadvise posix_madvise \
 		  writev sigaction sendfile64 send_file kqueue port_create localtime_r gmtime_r
 do :
@@ -15045,7 +15290,7 @@
 _ACEOF
 
 
-ac_config_files="$ac_config_files Makefile src/Makefile doc/Makefile tests/Makefile tests/docroot/Makefile tests/docroot/123/Makefile tests/docroot/www/Makefile tests/docroot/www/go/Makefile tests/docroot/www/indexfile/Makefile tests/docroot/www/expire/Makefile distribute.sh"
+ac_config_files="$ac_config_files Makefile src/Makefile doc/config/conf.d/Makefile doc/config/vhosts.d/Makefile doc/config/Makefile doc/scripts/Makefile doc/initscripts/Makefile doc/Makefile tests/Makefile tests/docroot/Makefile tests/docroot/123/Makefile tests/docroot/www/Makefile tests/docroot/www/go/Makefile tests/docroot/www/indexfile/Makefile tests/docroot/www/expire/Makefile distribute.sh"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -16029,6 +16274,11 @@
     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+    "doc/config/conf.d/Makefile") CONFIG_FILES="$CONFIG_FILES doc/config/conf.d/Makefile" ;;
+    "doc/config/vhosts.d/Makefile") CONFIG_FILES="$CONFIG_FILES doc/config/vhosts.d/Makefile" ;;
+    "doc/config/Makefile") CONFIG_FILES="$CONFIG_FILES doc/config/Makefile" ;;
+    "doc/scripts/Makefile") CONFIG_FILES="$CONFIG_FILES doc/scripts/Makefile" ;;
+    "doc/initscripts/Makefile") CONFIG_FILES="$CONFIG_FILES doc/initscripts/Makefile" ;;
     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
     "tests/docroot/Makefile") CONFIG_FILES="$CONFIG_FILES tests/docroot/Makefile" ;;

Modified: lighttpd/trunk/configure.ac
===================================================================
--- lighttpd/trunk/configure.ac	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/configure.ac	2010-08-11 15:14:05 UTC (rev 472)
@@ -83,6 +83,43 @@
 AC_FUNC_STRFTIME
 AC_CHECK_FUNCS([issetugid inet_pton])
 
+dnl checking for libev
+AC_MSG_CHECKING(for libev support)
+AC_ARG_WITH(libev,
+    AC_HELP_STRING([--with-libev@<:@=PATH@:>@],[Include libev support for fdevent handlers in PATH/include and PATH/lib]),
+    [WITH_LIBEV=$withval],[WITH_LIBEV=no])
+
+LIBEV_CFLAGS=""
+LIBEV_LIBS=""
+
+if test "$WITH_LIBEV" != "no"; then
+	PKG_CHECK_MODULES(LIBEV, libev, [], [
+		dnl no pkg-config for libev, searching manually:
+
+		if test "$WITH_LIBEV" != "yes"; then
+			LIBEV_CFLAGS="-I$WITH_LIBEV/include"
+			LIBEV_LIBS="-L$WITH_LIBEV/lib -lev"
+		else
+			AC_CHECK_HEADERS([ev.h],[
+				AC_CHECK_LIB([ev], [ev_loop], [
+						LIBEV_CFLAGS=""
+						LIBEV_LIBS="-lev"
+					],[
+					AC_MSG_ERROR([libev not found])
+					]
+				)],[
+					AC_MSG_ERROR([libev not found])
+				]
+			)
+		fi
+	])
+
+	AC_DEFINE([HAVE_LIBEV], [1], [libev support])
+fi
+
+AC_SUBST(LIBEV_CFLAGS)
+AC_SUBST(LIBEV_LIBS)
+
 dnl Checks for database.
 MYSQL_INCLUDE=""
 MYSQL_LIBS=""
@@ -469,7 +506,7 @@
 
 AC_CHECK_FUNCS([dup2 getcwd inet_ntoa inet_ntop memset mmap munmap strchr \
 		  strdup strerror strstr strtol sendfile  getopt socket lstat \
-		  gethostbyname poll sigtimedwait epoll_ctl getrlimit chroot \
+		  gethostbyname poll epoll_ctl getrlimit chroot \
 		  getuid select signal pathconf madvise posix_fadvise posix_madvise \
 		  writev sigaction sendfile64 send_file kqueue port_create localtime_r gmtime_r])
 
@@ -567,7 +604,14 @@
 LIGHTTPD_VERSION_ID=`echo $PACKAGE_VERSION | $AWK -F '.' '{print "(" $1 " << 16 | " $2 " << 8 | " $3 ")"}'`
 AC_DEFINE_UNQUOTED([LIGHTTPD_VERSION_ID], [$LIGHTTPD_VERSION_ID], [lighttpd-version-id])
 
-AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile tests/Makefile \
+AC_CONFIG_FILES([Makefile src/Makefile
+		 doc/config/conf.d/Makefile \
+		 doc/config/vhosts.d/Makefile \
+		 doc/config/Makefile \
+		 doc/scripts/Makefile \
+		 doc/initscripts/Makefile \
+		 doc/Makefile \
+		 tests/Makefile \
 		 tests/docroot/Makefile \
 		 tests/docroot/123/Makefile \
 		 tests/docroot/www/Makefile \

Modified: lighttpd/trunk/debian/changelog
===================================================================
--- lighttpd/trunk/debian/changelog	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/debian/changelog	2010-08-11 15:14:05 UTC (rev 472)
@@ -1,6 +1,13 @@
+lighttpd (1.4.27~rc2-1) UNRELEASED; urgency=low
+
+  * New upstream release
+
+ -- Olaf van der Spek <olaf at router>  Wed, 11 Aug 2010 17:11:06 +0200
+
 lighttpd (1.4.27~rc1-1) UNRELEASED; urgency=low
 
   * New upstream release (closes: 572031)
+  * Add check_syntax() from Ubuntu (closes: 589200)
 
  -- Olaf van der Spek <olaf at router>  Wed, 02 Jun 2010 15:03:11 +0200
 

Modified: lighttpd/trunk/debian/lighttpd.init
===================================================================
--- lighttpd/trunk/debian/lighttpd.init	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/debian/lighttpd.init	2010-08-11 15:14:05 UTC (rev 472)
@@ -24,6 +24,11 @@
 
 set -e
 
+check_syntax()
+{
+	$DAEMON -t $DAEMON_OPTS || exit $?
+}
+
 if [ "$1" != status ]; then
 	# be sure there is a /var/run/lighttpd, even with tmpfs
 	mkdir --mode 750 --parents /var/run/lighttpd
@@ -34,6 +39,7 @@
 
 case "$1" in
     start)
+	check_syntax
         log_daemon_msg "Starting $DESC" $NAME
         if ! start-stop-daemon --start --oknodo --quiet \
             --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS
@@ -55,6 +61,7 @@
         fi
         ;;
     reload|force-reload)
+	check_syntax
         log_daemon_msg "Reloading $DESC configuration" $NAME
         if start-stop-daemon --stop --signal INT --quiet \
             --pidfile $PIDFILE --exec $DAEMON

Modified: lighttpd/trunk/doc/Makefile.am
===================================================================
--- lighttpd/trunk/doc/Makefile.am	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/doc/Makefile.am	2010-08-11 15:14:05 UTC (rev 472)
@@ -1,3 +1,4 @@
+SUBDIRS=config scripts initscripts
 dist_man8_MANS=lighttpd.8
 
 DOCS=accesslog.txt \
@@ -76,11 +77,8 @@
 	 evhost.html \
 	 magnet.html
 
-EXTRA_DIST=lighttpd.conf lighttpd.user \
-	rc.lighttpd rc.lighttpd.redhat sysconfig.lighttpd \
-	rrdtool-graph.sh \
+EXTRA_DIST= \
 	state.dot fastcgi-state.dot \
-	spawn-php.sh \
 	newstyle.css \
 	oldstyle.css \
 	$(DOCS)

Modified: lighttpd/trunk/doc/Makefile.in
===================================================================
--- lighttpd/trunk/doc/Makefile.in	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/doc/Makefile.in	2010-08-11 15:14:05 UTC (rev 472)
@@ -56,6 +56,13 @@
 am__v_at_0 = @
 SOURCES =
 DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -81,7 +88,40 @@
 am__installdirs = "$(DESTDIR)$(man8dir)"
 NROFF = nroff
 MANS = $(dist_man8_MANS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
@@ -123,6 +163,8 @@
 LD = @LD@
 LDAP_LIB = @LDAP_LIB@
 LDFLAGS = @LDFLAGS@
+LIBEV_CFLAGS = @LIBEV_CFLAGS@
+LIBEV_LIBS = @LIBEV_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -154,6 +196,8 @@
 PCRECONFIG = @PCRECONFIG@
 PCRE_LIB = @PCRE_LIB@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 RANLIB = @RANLIB@
 SED = @SED@
 SENDFILE_LIB = @SENDFILE_LIB@
@@ -225,6 +269,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+SUBDIRS = config scripts initscripts
 dist_man8_MANS = lighttpd.8
 DOCS = accesslog.txt \
 authentication.txt \
@@ -302,16 +347,13 @@
 	 evhost.html \
 	 magnet.html
 
-EXTRA_DIST = lighttpd.conf lighttpd.user \
-	rc.lighttpd rc.lighttpd.redhat sysconfig.lighttpd \
-	rrdtool-graph.sh \
+EXTRA_DIST = \
 	state.dot fastcgi-state.dot \
-	spawn-php.sh \
 	newstyle.css \
 	oldstyle.css \
 	$(DOCS)
 
-all: all-am
+all: all-recursive
 
 .SUFFIXES:
 .SUFFIXES: .html .txt
@@ -385,13 +427,142 @@
 	test -z "$$files" || { \
 	  echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
 	  cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
 tags: TAGS
-TAGS:
 
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
 ctags: CTAGS
-CTAGS:
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
 
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
 distdir: $(DISTFILES)
 	@list='$(MANS)'; if test -n "$$list"; then \
 	  list=`for p in $$list; do \
@@ -435,22 +606,51 @@
 	    || exit 1; \
 	  fi; \
 	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
 check-am: all-am
-check: check-am
+check: check-recursive
 all-am: Makefile $(MANS)
-installdirs:
+installdirs: installdirs-recursive
+installdirs-am:
 	for dir in "$(DESTDIR)$(man8dir)"; do \
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
 
 install-am: all-am
 	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-installcheck: installcheck-am
+installcheck: installcheck-recursive
 install-strip:
 	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
 	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
@@ -467,67 +667,67 @@
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
 	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
+clean: clean-recursive
 
 clean-am: clean-generic clean-libtool clean-local mostlyclean-am
 
-distclean: distclean-am
+distclean: distclean-recursive
 	-rm -f Makefile
-distclean-am: clean-am distclean-generic
+distclean-am: clean-am distclean-generic distclean-tags
 
-dvi: dvi-am
+dvi: dvi-recursive
 
 dvi-am:
 
-html: html-am
+html: html-recursive
 
 html-am: html-local
 
-info: info-am
+info: info-recursive
 
 info-am:
 
 install-data-am: install-man
 
-install-dvi: install-dvi-am
+install-dvi: install-dvi-recursive
 
 install-dvi-am:
 
 install-exec-am:
 
-install-html: install-html-am
+install-html: install-html-recursive
 
 install-html-am:
 
-install-info: install-info-am
+install-info: install-info-recursive
 
 install-info-am:
 
 install-man: install-man8
 
-install-pdf: install-pdf-am
+install-pdf: install-pdf-recursive
 
 install-pdf-am:
 
-install-ps: install-ps-am
+install-ps: install-ps-recursive
 
 install-ps-am:
 
 installcheck-am:
 
-maintainer-clean: maintainer-clean-am
+maintainer-clean: maintainer-clean-recursive
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
-mostlyclean: mostlyclean-am
+mostlyclean: mostlyclean-recursive
 
 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
 
-pdf: pdf-am
+pdf: pdf-recursive
 
 pdf-am:
 
-ps: ps-am
+ps: ps-recursive
 
 ps-am:
 
@@ -535,19 +735,23 @@
 
 uninstall-man: uninstall-man8
 
-.MAKE: install-am install-strip
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+	install-am install-strip tags-recursive
 
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	clean-local distclean distclean-generic distclean-libtool \
-	distdir dvi dvi-am html html-am html-local info info-am \
-	install install-am install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am install-man \
-	install-man8 install-pdf install-pdf-am install-ps \
-	install-ps-am install-strip installcheck installcheck-am \
-	installdirs maintainer-clean maintainer-clean-generic \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-generic clean-libtool \
+	clean-local ctags ctags-recursive distclean distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am html-local info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-man8 \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	installdirs-am maintainer-clean maintainer-clean-generic \
 	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
-	ps ps-am uninstall uninstall-am uninstall-man uninstall-man8
+	ps ps-am tags tags-recursive uninstall uninstall-am \
+	uninstall-man uninstall-man8
 
 
 .txt.html:

Deleted: lighttpd/trunk/doc/lighttpd.conf
===================================================================
--- lighttpd/trunk/doc/lighttpd.conf	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/doc/lighttpd.conf	2010-08-11 15:14:05 UTC (rev 472)
@@ -1,322 +0,0 @@
-# lighttpd configuration file
-#
-# use it as a base for lighttpd 1.0.0 and above
-#
-# $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $
-
-############ Options you really have to take care of ####################
-
-## modules to load
-# at least mod_access and mod_accesslog should be loaded
-# all other module should only be loaded if really neccesary
-# - saves some time
-# - saves memory
-server.modules              = (
-#                               "mod_rewrite",
-#                               "mod_redirect",
-#                               "mod_alias",
-                                "mod_access",
-#                               "mod_trigger_b4_dl",
-#                               "mod_auth",
-#                               "mod_status",
-#                               "mod_setenv",
-#                               "mod_fastcgi",
-#                               "mod_proxy",
-#                               "mod_simple_vhost",
-#                               "mod_evhost",
-#                               "mod_userdir",
-#                               "mod_cgi",
-#                               "mod_compress",
-#                               "mod_ssi",
-#                               "mod_usertrack",
-#                               "mod_expire",
-#                               "mod_secdownload",
-#                               "mod_rrdtool",
-                                "mod_accesslog" )
-
-## A static document-root. For virtual hosting take a look at the
-## mod_simple_vhost module.
-server.document-root        = "/srv/www/htdocs/"
-
-## where to send error-messages to
-server.errorlog             = "/var/log/lighttpd/error.log"
-
-# files to check for if .../ is requested
-index-file.names            = ( "index.php", "index.html",
-                                "index.htm", "default.htm" )
-
-## set the event-handler (read the performance section in the manual)
-# server.event-handler = "freebsd-kqueue" # needed on OS X
-
-# mimetype mapping
-mimetype.assign             = (
-  ".pdf"          =>      "application/pdf",
-  ".sig"          =>      "application/pgp-signature",
-  ".spl"          =>      "application/futuresplash",
-  ".class"        =>      "application/octet-stream",
-  ".ps"           =>      "application/postscript",
-  ".torrent"      =>      "application/x-bittorrent",
-  ".dvi"          =>      "application/x-dvi",
-  ".gz"           =>      "application/x-gzip",
-  ".pac"          =>      "application/x-ns-proxy-autoconfig",
-  ".swf"          =>      "application/x-shockwave-flash",
-  ".tar.gz"       =>      "application/x-tgz",
-  ".tgz"          =>      "application/x-tgz",
-  ".tar"          =>      "application/x-tar",
-  ".zip"          =>      "application/zip",
-  ".mp3"          =>      "audio/mpeg",
-  ".m3u"          =>      "audio/x-mpegurl",
-  ".wma"          =>      "audio/x-ms-wma",
-  ".wax"          =>      "audio/x-ms-wax",
-  ".ogg"          =>      "application/ogg",
-  ".wav"          =>      "audio/x-wav",
-  ".gif"          =>      "image/gif",
-  ".jar"          =>      "application/x-java-archive",
-  ".jpg"          =>      "image/jpeg",
-  ".jpeg"         =>      "image/jpeg",
-  ".png"          =>      "image/png",
-  ".xbm"          =>      "image/x-xbitmap",
-  ".xpm"          =>      "image/x-xpixmap",
-  ".xwd"          =>      "image/x-xwindowdump",
-  ".css"          =>      "text/css",
-  ".html"         =>      "text/html",
-  ".htm"          =>      "text/html",
-  ".js"           =>      "text/javascript",
-  ".asc"          =>      "text/plain",
-  ".c"            =>      "text/plain",
-  ".cpp"          =>      "text/plain",
-  ".log"          =>      "text/plain",
-  ".conf"         =>      "text/plain",
-  ".text"         =>      "text/plain",
-  ".txt"          =>      "text/plain",
-  ".dtd"          =>      "text/xml",
-  ".xml"          =>      "text/xml",
-  ".mpeg"         =>      "video/mpeg",
-  ".mpg"          =>      "video/mpeg",
-  ".mov"          =>      "video/quicktime",
-  ".qt"           =>      "video/quicktime",
-  ".avi"          =>      "video/x-msvideo",
-  ".asf"          =>      "video/x-ms-asf",
-  ".asx"          =>      "video/x-ms-asf",
-  ".wmv"          =>      "video/x-ms-wmv",
-  ".bz2"          =>      "application/x-bzip",
-  ".tbz"          =>      "application/x-bzip-compressed-tar",
-  ".tar.bz2"      =>      "application/x-bzip-compressed-tar",
-  # default mime type
-  ""              =>      "application/octet-stream",
- )
-
-# Use the "Content-Type" extended attribute to obtain mime type if possible
-#mimetype.use-xattr        = "enable"
-
-
-## send a different Server: header
-## be nice and keep it at lighttpd
-# server.tag                 = "lighttpd"
-
-#### accesslog module
-accesslog.filename          = "/var/log/lighttpd/access.log"
-
-## deny access the file-extensions
-#
-# ~    is for backupfiles from vi, emacs, joe, ...
-# .inc is often used for code includes which should in general not be part
-#      of the document-root
-url.access-deny             = ( "~", ".inc" )
-
-$HTTP["url"] =~ "\.pdf$" {
-  server.range-requests = "disable"
-}
-
-##
-# which extensions should not be handle via static-file transfer
-#
-# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
-static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
-
-######### Options that are good to be but not neccesary to be changed #######
-
-## bind to port (default: 80)
-#server.port                = 81
-
-## bind to localhost (default: all interfaces)
-#server.bind                = "127.0.0.1"
-
-## error-handler for status 404
-#server.error-handler-404   = "/error-handler.html"
-#server.error-handler-404   = "/error-handler.php"
-
-## to help the rc.scripts
-#server.pid-file            = "/var/run/lighttpd.pid"
-
-
-###### virtual hosts
-##
-##  If you want name-based virtual hosting add the next three settings and load
-##  mod_simple_vhost
-##
-## document-root =
-##   virtual-server-root + virtual-server-default-host + virtual-server-docroot
-## or
-##   virtual-server-root + http-host + virtual-server-docroot
-##
-#simple-vhost.server-root   = "/srv/www/vhosts/"
-#simple-vhost.default-host  = "www.example.org"
-#simple-vhost.document-root = "/htdocs/"
-
-
-##
-## Format: <errorfile-prefix><status-code>.html
-## -> ..../status-404.html for 'File not found'
-#server.errorfile-prefix    = "/usr/share/lighttpd/errors/status-"
-#server.errorfile-prefix    = "/srv/www/errors/status-"
-
-## virtual directory listings
-#dir-listing.activate       = "enable"
-## select encoding for directory listings
-#dir-listing.encoding        = "utf-8"
-
-## enable debugging
-#debug.log-request-header   = "enable"
-#debug.log-response-header  = "enable"
-#debug.log-request-handling = "enable"
-#debug.log-file-not-found   = "enable"
-
-### only root can use these options
-#
-# chroot() to directory (default: no chroot() )
-#server.chroot              = "/"
-
-## change uid to <uid> (default: don't care)
-#server.username            = "wwwrun"
-
-## change uid to <uid> (default: don't care)
-#server.groupname           = "wwwrun"
-
-#### compress module
-#compress.cache-dir         = "/var/cache/lighttpd/compress/"
-#compress.filetype          = ("text/plain", "text/html")
-
-#### proxy module
-## read proxy.txt for more info
-#proxy.server               = ( ".php" =>
-#                               ( "localhost" =>
-#                                 (
-#                                   "host" => "192.168.0.101",
-#                                   "port" => 80
-#                                 )
-#                               )
-#                             )
-
-#### fastcgi module
-## read fastcgi.txt for more info
-## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
-#fastcgi.server             = ( ".php" =>
-#                               ( "localhost" =>
-#                                 (
-#                                   "socket" => "/var/run/lighttpd/php-fastcgi.socket",
-#                                   "bin-path" => "/usr/local/bin/php-cgi"
-#                                 )
-#                               )
-#                            )
-
-#### CGI module
-#cgi.assign                 = ( ".pl"  => "/usr/bin/perl",
-#                               ".cgi" => "/usr/bin/perl" )
-#
-
-#### SSL engine
-#ssl.engine                 = "enable"
-#ssl.pemfile                = "/etc/ssl/private/lighttpd.pem"
-
-#### status module
-#status.status-url          = "/server-status"
-#status.config-url          = "/server-config"
-
-#### auth module
-## read authentication.txt for more info
-#auth.backend               = "plain"
-#auth.backend.plain.userfile = "lighttpd.user"
-#auth.backend.plain.groupfile = "lighttpd.group"
-
-#auth.backend.ldap.hostname = "localhost"
-#auth.backend.ldap.base-dn  = "dc=my-domain,dc=com"
-#auth.backend.ldap.filter   = "(uid=$)"
-
-#auth.require               = ( "/server-status" =>
-#                               (
-#                                 "method"  => "digest",
-#                                 "realm"   => "download archiv",
-#                                 "require" => "user=jan"
-#                               ),
-#                               "/server-config" =>
-#                               (
-#                                 "method"  => "digest",
-#                                 "realm"   => "download archiv",
-#                                 "require" => "valid-user"
-#                               )
-#                             )
-
-#### url handling modules (rewrite, redirect, access)
-#url.rewrite                = ( "^/$"             => "/server-status" )
-#url.redirect               = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
-#### both rewrite/redirect support back reference to regex conditional using %n
-#$HTTP["host"] =~ "^www\.(.*)" {
-#  url.redirect            = ( "^/(.*)" => "http://%1/$1" )
-#}
-
-#
-# define a pattern for the host url finding
-# %% => % sign
-# %0 => domain name + tld
-# %1 => tld
-# %2 => domain name without tld
-# %3 => subdomain 1 name
-# %4 => subdomain 2 name
-#
-#evhost.path-pattern        = "/srv/www/vhosts/%3/htdocs/"
-
-#### expire module
-#expire.url                 = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
-
-#### ssi
-#ssi.extension              = ( ".shtml" )
-
-#### rrdtool
-#rrdtool.binary             = "/usr/bin/rrdtool"
-#rrdtool.db-name            = "/var/lib/lighttpd/lighttpd.rrd"
-
-#### setenv
-#setenv.add-request-header  = ( "TRAV_ENV" => "mysql://user@host/db" )
-#setenv.add-response-header = ( "X-Secret-Message" => "42" )
-
-## for mod_trigger_b4_dl
-# trigger-before-download.gdbm-filename = "/var/lib/lighttpd/trigger.db"
-# trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
-# trigger-before-download.trigger-url = "^/trigger/"
-# trigger-before-download.download-url = "^/download/"
-# trigger-before-download.deny-url = "http://127.0.0.1/index.html"
-# trigger-before-download.trigger-timeout = 10
-
-#### variable usage:
-## variable name without "." is auto prefixed by "var." and becomes "var.bar"
-#bar = 1
-#var.mystring = "foo"
-
-## integer add
-#bar += 1
-## string concat, with integer cast as string, result: "www.foo1.com"
-#server.name = "www." + mystring + var.bar + ".com"
-## array merge
-#index-file.names = (foo + ".php") + index-file.names
-#index-file.names += (foo + ".php")
-
-#### include
-#include /etc/lighttpd/lighttpd-inc.conf
-## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
-#include "lighttpd-inc.conf"
-
-#### include_shell
-#include_shell "echo var.a=1"
-## the above is same as:
-#var.a=1

Deleted: lighttpd/trunk/doc/lighttpd.user
===================================================================
--- lighttpd/trunk/doc/lighttpd.user	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/doc/lighttpd.user	2010-08-11 15:14:05 UTC (rev 472)
@@ -1 +0,0 @@
-dummy:test123

Deleted: lighttpd/trunk/doc/rc.lighttpd
===================================================================
--- lighttpd/trunk/doc/rc.lighttpd	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/doc/rc.lighttpd	2010-08-11 15:14:05 UTC (rev 472)
@@ -1,155 +0,0 @@
-#! /bin/sh
-# Copyright (c) 1995-2002 SuSE Linux AG, Nuernberg, Germany.
-# All rights reserved.
-#
-# Author: Kurt Garloff <feedback at suse.de>
-#
-# /etc/init.d/FOO
-#
-#   and symbolic its link
-#
-# /(usr/)sbin/rcFOO
-#
-# LSB compliant service control script; see http://www.linuxbase.org/spec/
-#
-# System startup script for some example service or daemon FOO (template)
-#
-### BEGIN INIT INFO
-# Provides: FOO
-# Required-Start: $remote_fs $syslog
-# Required-Stop:  $remote_fs $syslog
-# Default-Start:  3 5
-# Default-Stop:   0 1 2 6
-# Description:    Start FOO to allow XY and provide YZ
-#	continued on second line by '#<TAB>'
-### END INIT INFO
-#
-# Note on Required-Start: It does specify the init script ordering,
-# not real dependencies. Depencies have to be handled by admin
-# resp. the configuration tools (s)he uses.
-
-# Source SuSE config (if still necessary, most info has been moved)
-test -r /etc/rc.config && . /etc/rc.config
-
-# Check for missing binaries (stale symlinks should not happen)
-LIGHTTPD_BIN=/usr/sbin/lighttpd
-test -x $LIGHTTPD_BIN || exit 5
-
-# Check for existence of needed config file and read it
-LIGHTTPD_CONFIG=/etc/sysconfig/lighttpd
-test -r $LIGHTTPD_CONFIG || exit 6
-. $LIGHTTPD_CONFIG
-
-# Shell functions sourced from /etc/rc.status:
-#      rc_check         check and set local and overall rc status
-#      rc_status        check and set local and overall rc status
-#      rc_status -v     ditto but be verbose in local rc status
-#      rc_status -v -r  ditto and clear the local rc status
-#      rc_failed        set local and overall rc status to failed
-#      rc_failed <num>  set local and overall rc status to <num><num>
-#      rc_reset         clear local rc status (overall remains)
-#      rc_exit          exit appropriate to overall rc status
-#      rc_active	checks whether a service is activated by symlinks
-. /etc/rc.status
-
-# First reset status of this service
-rc_reset
-
-# Return values acc. to LSB for all commands but status:
-# 0 - success
-# 1 - generic or unspecified error
-# 2 - invalid or excess argument(s)
-# 3 - unimplemented feature (e.g. "reload")
-# 4 - insufficient privilege
-# 5 - program is not installed
-# 6 - program is not configured
-# 7 - program is not running
-#
-# Note that starting an already running service, stopping
-# or restarting a not-running service as well as the restart
-# with force-reload (in case signalling is not supported) are
-# considered a success.
-
-case "$1" in
-    start)
-	echo -n "Starting lighttpd"
-	## Start daemon with startproc(8). If this fails
-	## the echo return value is set appropriate.
-
-	# NOTE: startproc returns 0, even if service is
-	# already running to match LSB spec.
-	startproc $LIGHTTPD_BIN -f $LIGHTTPD_CONF_PATH
-
-	# Remember status and be verbose
-	rc_status -v
-	;;
-    stop)
-	echo -n "Shutting down lighttpd"
-	## Stop daemon with killproc(8) and if this fails
-	## set echo the echo return value.
-
-	killproc -TERM $LIGHTTPD_BIN
-
-	# Remember status and be verbose
-	rc_status -v
-	;;
-    try-restart)
-	## Stop the service and if this succeeds (i.e. the
-	## service was running before), start it again.
-	## Note: try-restart is not (yet) part of LSB (as of 0.7.5)
-	$0 status >/dev/null &&  $0 restart
-
-	# Remember status and be quiet
-	rc_status
-	;;
-    restart)
-	## Stop the service and regardless of whether it was
-	## running or not, start it again.
-	$0 stop
-	$0 start
-
-	# Remember status and be quiet
-	rc_status
-	;;
-    force-reload|reload)
-	## Like force-reload, but if daemon does not support
-	## signalling, do nothing (!)
-
-	# If it supports signalling:
-	echo -n "Reload service LIGHTTPD"
-	killproc -INT $LIGHTTPD_BIN
-	$0 start
-	touch /var/run/lighttpd.pid
-	rc_status -v
-
-	## Otherwise if it does not support reload:
-	#rc_failed 3
-	#rc_status -v
-	;;
-    status)
-	echo -n "Checking for service LIGHTTPD: "
-	## Check status with checkproc(8), if process is running
-	## checkproc will return with exit status 0.
-
-	# Return value is slightly different for the status command:
-	# 0 - service running
-	# 1 - service dead, but /var/run/  pid  file exists
-	# 2 - service dead, but /var/lock/ lock file exists
-	# 3 - service not running
-
-	# NOTE: checkproc returns LSB compliant status values.
-	checkproc $LIGHTTPD_BIN
-	rc_status -v
-	;;
-    probe)
-	## Optional: Probe for the necessity of a reload,
-	## print out the argument which is required for a reload.
-
-	test /etc/lighttpd/lighttpd.conf -nt /var/run/lighttpd.pid && echo reload
-	;;
-    *)
-	echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
-	exit 1
-	;;
-esac
-rc_exit

Deleted: lighttpd/trunk/doc/rc.lighttpd.redhat
===================================================================
--- lighttpd/trunk/doc/rc.lighttpd.redhat	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/doc/rc.lighttpd.redhat	2010-08-11 15:14:05 UTC (rev 472)
@@ -1,87 +0,0 @@
-#!/bin/sh
-#
-# lighttpd     Startup script for the lighttpd server
-#
-# chkconfig: - 85 15
-# description: Lightning fast webserver with light system requirements
-#
-# processname: lighttpd
-# config: /etc/lighttpd/lighttpd.conf
-# config: /etc/sysconfig/lighttpd
-# pidfile: /var/run/lighttpd.pid
-#
-# Note: pidfile is assumed to be created
-# by lighttpd (config: server.pid-file).
-# If not, uncomment 'pidof' line.
-
-# Source function library
-. /etc/rc.d/init.d/functions
-
-if [ -f /etc/sysconfig/lighttpd ]; then
-	. /etc/sysconfig/lighttpd
-fi
-
-if [ -z "$LIGHTTPD_CONF_PATH" ]; then
-	LIGHTTPD_CONF_PATH="/etc/lighttpd/lighttpd.conf"
-fi
-
-prog="lighttpd"
-lighttpd="/usr/sbin/lighttpd"
-RETVAL=0
-
-start() {
-	echo -n $"Starting $prog: "
-	daemon $lighttpd -f $LIGHTTPD_CONF_PATH
-	RETVAL=$?
-	echo
-	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
-	return $RETVAL
-}
-
-stop() {
-	echo -n $"Stopping $prog: "
-	killproc $lighttpd
-	RETVAL=$?
-	echo
-	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
-	return $RETVAL
-}
-
-reload() {
-	echo -n $"Reloading $prog: "
-	killproc $lighttpd -HUP
-	RETVAL=$?
-	echo
-	return $RETVAL
-}
-
-case "$1" in
-	start)
-		start
-		;;
-	stop)
-		stop
-		;;
-	restart)
-		stop
-		start
-		;;
-	condrestart)
-		if [ -f /var/lock/subsys/$prog ]; then
-			stop
-			start
-		fi
-		;;
-	reload)
-		reload
-		;;
-	status)
-		status $lighttpd
-		RETVAL=$?
-		;;
-	*)
-		echo $"Usage: $0 {start|stop|restart|condrestart|reload|status}"
-		RETVAL=1
-esac
-
-exit $RETVAL

Deleted: lighttpd/trunk/doc/rrdtool-graph.sh
===================================================================
--- lighttpd/trunk/doc/rrdtool-graph.sh	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/doc/rrdtool-graph.sh	2010-08-11 15:14:05 UTC (rev 472)
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-RRDTOOL=/usr/bin/rrdtool
-OUTDIR=/var/www/servers/www.example.org/pages/rrd/
-INFILE=/var/www/lighttpd.rrd
-OUTPRE=lighttpd-traffic
-
-DISP="DEF:bin=$INFILE:InOctets:AVERAGE \
-      DEF:binmin=$INFILE:InOctets:MIN \
-      DEF:binmax=$INFILE:InOctets:MAX \
-      DEF:bout=$INFILE:OutOctets:AVERAGE \
-      DEF:boutmin=$INFILE:OutOctets:MIN \
-      DEF:boutmax=$INFILE:OutOctets:MAX \
-      LINE1:bin#0000FF:in \
-      LINE1:binmin#2222FF: \
-      STACK:binmax#2222FF: \
-      LINE1:bout#FF0000:out \
-      LINE1:boutmin#FF2222: \
-      STACK:boutmax#FF2222: \
-      -v bytes/s"
-
-$RRDTOOL graph $OUTDIR/$OUTPRE-hour.png -a PNG --start -14400 $DISP
-$RRDTOOL graph $OUTDIR/$OUTPRE-day.png -a PNG --start -86400 $DISP
-$RRDTOOL graph $OUTDIR/$OUTPRE-month.png -a PNG --start -2592000 $DISP
-
-OUTPRE=lighttpd-requests
-
-DISP="DEF:req=$INFILE:Requests:AVERAGE \
-      DEF:reqmin=$INFILE:Requests:MIN \
-      DEF:reqmax=$INFILE:Requests:MAX \
-      LINE1:req#0000FF:requests \
-      LINE1:reqmin#2222FF: \
-      STACK:reqmax#2222FF: \
-      -v req/s"
-
-$RRDTOOL graph $OUTDIR/$OUTPRE-hour.png -a PNG --start -14400 $DISP
-$RRDTOOL graph $OUTDIR/$OUTPRE-day.png -a PNG --start -86400 $DISP
-$RRDTOOL graph $OUTDIR/$OUTPRE-month.png -a PNG --start -2592000 $DISP

Deleted: lighttpd/trunk/doc/spawn-php.sh
===================================================================
--- lighttpd/trunk/doc/spawn-php.sh	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/doc/spawn-php.sh	2010-08-11 15:14:05 UTC (rev 472)
@@ -1,54 +0,0 @@
-#!/bin/bash
-
-## ABSOLUTE path to the spawn-fcgi binary
-SPAWNFCGI="/home/weigon/projects/spawn-fcgi/src/spawn-fcgi"
-
-## ABSOLUTE path to the PHP binary
-FCGIPROGRAM="/usr/local/bin/php"
-
-## TCP port to which to bind on localhost
-FCGIPORT="1026"
-
-## number of PHP children to spawn
-PHP_FCGI_CHILDREN=10
-
-## maximum number of requests a single PHP process can serve before it is restarted
-PHP_FCGI_MAX_REQUESTS=1000
-
-## IP addresses from which PHP should access server connections
-FCGI_WEB_SERVER_ADDRS="127.0.0.1,192.168.2.10"
-
-# allowed environment variables, separated by spaces
-ALLOWED_ENV="ORACLE_HOME PATH USER"
-
-## if this script is run as root, switch to the following user
-USERID=wwwrun
-GROUPID=wwwrun
-
-
-################## no config below this line
-
-if test x$PHP_FCGI_CHILDREN = x; then
-  PHP_FCGI_CHILDREN=5
-fi
-
-export PHP_FCGI_MAX_REQUESTS
-export FCGI_WEB_SERVER_ADDRS
-
-ALLOWED_ENV="$ALLOWED_ENV PHP_FCGI_MAX_REQUESTS FCGI_WEB_SERVER_ADDRS"
-
-if test x$UID = x0; then
-  EX="$SPAWNFCGI -p $FCGIPORT -f $FCGIPROGRAM -u $USERID -g $GROUPID -C $PHP_FCGI_CHILDREN"
-else
-  EX="$SPAWNFCGI -p $FCGIPORT -f $FCGIPROGRAM -C $PHP_FCGI_CHILDREN"
-fi
-
-# copy the allowed environment variables
-E=
-
-for i in $ALLOWED_ENV; do
-  E="$E $i=${!i}"
-done
-
-# clean the environment and set up a new one
-env - $E $EX

Deleted: lighttpd/trunk/doc/sysconfig.lighttpd
===================================================================
--- lighttpd/trunk/doc/sysconfig.lighttpd	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/doc/sysconfig.lighttpd	2010-08-11 15:14:05 UTC (rev 472)
@@ -1 +0,0 @@
-LIGHTTPD_CONF_PATH=/etc/lighttpd/lighttpd.conf

Modified: lighttpd/trunk/src/Makefile.am
===================================================================
--- lighttpd/trunk/src/Makefile.am	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/Makefile.am	2010-08-11 15:14:05 UTC (rev 472)
@@ -40,12 +40,12 @@
 parsers:
 else
 configparser.h: configparser.c
-configparser.c: $(srcdir)/configparser.y $(srcdir)/lempar.c lemon$(EXEEXT)
+configparser.c: $(srcdir)/configparser.y $(srcdir)/lempar.c | lemon$(EXEEXT)
 	rm -f configparser.h
 	$(LEMON) -q $(srcdir)/configparser.y $(srcdir)/lempar.c
 
 mod_ssi_exprparser.h: mod_ssi_exprparser.c
-mod_ssi_exprparser.c: $(srcdir)/mod_ssi_exprparser.y $(srcdir)/lempar.c lemon$(EXEEXT)
+mod_ssi_exprparser.c: $(srcdir)/mod_ssi_exprparser.y $(srcdir)/lempar.c | lemon$(EXEEXT)
 	rm -f mod_ssi_exprparser.h
 	$(LEMON) -q $(srcdir)/mod_ssi_exprparser.y $(srcdir)/lempar.c
 
@@ -62,7 +62,7 @@
       stat_cache.c plugin.c joblist.c etag.c array.c \
       data_string.c data_count.c data_array.c \
       data_integer.c md5.c data_fastcgi.c \
-      fdevent_select.c fdevent_linux_rtsig.c \
+      fdevent_select.c fdevent_libev.c \
       fdevent_poll.c fdevent_linux_sysepoll.c \
       fdevent_solaris_devpoll.c fdevent_freebsd_kqueue.c \
       data_config.c bitset.c \
@@ -86,9 +86,9 @@
 # everything
 lib_LTLIBRARIES += liblightcomp.la
 liblightcomp_la_SOURCES=$(common_src)
-liblightcomp_la_CFLAGS=$(AM_CFLAGS)
+liblightcomp_la_CFLAGS=$(AM_CFLAGS) $(LIBEV_CFLAGS)
 liblightcomp_la_LDFLAGS = -avoid-version -no-undefined
-liblightcomp_la_LIBADD = $(PCRE_LIB) $(SSL_LIB) $(FAM_LIBS)
+liblightcomp_la_LIBADD = $(PCRE_LIB) $(SSL_LIB) $(FAM_LIBS) $(LIBEV_LIBS)
 common_libadd = liblightcomp.la
 else
 src += $(common_src)
@@ -283,9 +283,9 @@
 DEFS= @DEFS@ -DHAVE_VERSION_H -DLIBRARY_DIR="\"$(libdir)\"" -DSBIN_DIR="\"$(sbindir)\""
 
 lighttpd_SOURCES = $(src)
-lighttpd_LDADD = $(PCRE_LIB) $(DL_LIB) $(SENDFILE_LIB) $(ATTR_LIB) $(common_libadd) $(SSL_LIB) $(FAM_LIBS)
+lighttpd_LDADD = $(PCRE_LIB) $(DL_LIB) $(SENDFILE_LIB) $(ATTR_LIB) $(common_libadd) $(SSL_LIB) $(FAM_LIBS) $(LIBEV_LIBS)
 lighttpd_LDFLAGS = -export-dynamic
-lighttpd_CCPFLAGS = $(FAM_CFLAGS)
+lighttpd_CCPFLAGS = $(FAM_CFLAGS) $(LIBEV_CFLAGS)
 
 proc_open_SOURCES = proc_open.c buffer.c
 proc_open_CPPFLAGS= -DDEBUG_PROC_OPEN

Modified: lighttpd/trunk/src/Makefile.in
===================================================================
--- lighttpd/trunk/src/Makefile.in	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/Makefile.in	2010-08-11 15:14:05 UTC (rev 472)
@@ -85,12 +85,12 @@
 am__DEPENDENCIES_1 =
 @NO_RDYNAMIC_TRUE at liblightcomp_la_DEPENDENCIES =  \
 @NO_RDYNAMIC_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- at NO_RDYNAMIC_TRUE@	$(am__DEPENDENCIES_1)
+ at NO_RDYNAMIC_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
 am__liblightcomp_la_SOURCES_DIST = buffer.c log.c keyvalue.c chunk.c \
 	http_chunk.c stream.c fdevent.c stat_cache.c plugin.c \
 	joblist.c etag.c array.c data_string.c data_count.c \
 	data_array.c data_integer.c md5.c data_fastcgi.c \
-	fdevent_select.c fdevent_linux_rtsig.c fdevent_poll.c \
+	fdevent_select.c fdevent_libev.c fdevent_poll.c \
 	fdevent_linux_sysepoll.c fdevent_solaris_devpoll.c \
 	fdevent_freebsd_kqueue.c data_config.c bitset.c \
 	inet_ntop_cache.c crc32.c connections-glue.c configfile-glue.c \
@@ -108,7 +108,7 @@
 	liblightcomp_la-data_array.lo liblightcomp_la-data_integer.lo \
 	liblightcomp_la-md5.lo liblightcomp_la-data_fastcgi.lo \
 	liblightcomp_la-fdevent_select.lo \
-	liblightcomp_la-fdevent_linux_rtsig.lo \
+	liblightcomp_la-fdevent_libev.lo \
 	liblightcomp_la-fdevent_poll.lo \
 	liblightcomp_la-fdevent_linux_sysepoll.lo \
 	liblightcomp_la-fdevent_solaris_devpoll.lo \
@@ -370,12 +370,11 @@
 	buffer.c log.c keyvalue.c chunk.c http_chunk.c stream.c \
 	fdevent.c stat_cache.c plugin.c joblist.c etag.c array.c \
 	data_string.c data_count.c data_array.c data_integer.c md5.c \
-	data_fastcgi.c fdevent_select.c fdevent_linux_rtsig.c \
-	fdevent_poll.c fdevent_linux_sysepoll.c \
-	fdevent_solaris_devpoll.c fdevent_freebsd_kqueue.c \
-	data_config.c bitset.c inet_ntop_cache.c crc32.c \
-	connections-glue.c configfile-glue.c http-header-glue.c \
-	network_write.c network_linux_sendfile.c \
+	data_fastcgi.c fdevent_select.c fdevent_libev.c fdevent_poll.c \
+	fdevent_linux_sysepoll.c fdevent_solaris_devpoll.c \
+	fdevent_freebsd_kqueue.c data_config.c bitset.c \
+	inet_ntop_cache.c crc32.c connections-glue.c configfile-glue.c \
+	http-header-glue.c network_write.c network_linux_sendfile.c \
 	network_freebsd_sendfile.c network_writev.c \
 	network_solaris_sendfilev.c network_openssl.c splaytree.c \
 	status_counter.c
@@ -386,7 +385,7 @@
 	data_string.$(OBJEXT) data_count.$(OBJEXT) \
 	data_array.$(OBJEXT) data_integer.$(OBJEXT) md5.$(OBJEXT) \
 	data_fastcgi.$(OBJEXT) fdevent_select.$(OBJEXT) \
-	fdevent_linux_rtsig.$(OBJEXT) fdevent_poll.$(OBJEXT) \
+	fdevent_libev.$(OBJEXT) fdevent_poll.$(OBJEXT) \
 	fdevent_linux_sysepoll.$(OBJEXT) \
 	fdevent_solaris_devpoll.$(OBJEXT) \
 	fdevent_freebsd_kqueue.$(OBJEXT) data_config.$(OBJEXT) \
@@ -407,7 +406,7 @@
 lighttpd_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
 lighttpd_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
 	$(lighttpd_LDFLAGS) $(LDFLAGS) -o $@
@@ -526,6 +525,8 @@
 LD = @LD@
 LDAP_LIB = @LDAP_LIB@
 LDFLAGS = @LDFLAGS@
+LIBEV_CFLAGS = @LIBEV_CFLAGS@
+LIBEV_LIBS = @LIBEV_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -557,6 +558,8 @@
 PCRECONFIG = @PCRECONFIG@
 PCRE_LIB = @PCRE_LIB@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 RANLIB = @RANLIB@
 SED = @SED@
 SENDFILE_LIB = @SENDFILE_LIB@
@@ -641,7 +644,7 @@
       stat_cache.c plugin.c joblist.c etag.c array.c \
       data_string.c data_count.c data_array.c \
       data_integer.c md5.c data_fastcgi.c \
-      fdevent_select.c fdevent_linux_rtsig.c \
+      fdevent_select.c fdevent_libev.c \
       fdevent_poll.c fdevent_linux_sysepoll.c \
       fdevent_solaris_devpoll.c fdevent_freebsd_kqueue.c \
       data_config.c bitset.c \
@@ -671,9 +674,9 @@
 	mod_access.la mod_compress.la mod_auth.la mod_rewrite.la \
 	mod_redirect.la mod_status.la mod_accesslog.la
 @NO_RDYNAMIC_TRUE at liblightcomp_la_SOURCES = $(common_src)
- at NO_RDYNAMIC_TRUE@liblightcomp_la_CFLAGS = $(AM_CFLAGS)
+ at NO_RDYNAMIC_TRUE@liblightcomp_la_CFLAGS = $(AM_CFLAGS) $(LIBEV_CFLAGS)
 @NO_RDYNAMIC_TRUE at liblightcomp_la_LDFLAGS = -avoid-version -no-undefined
- at NO_RDYNAMIC_TRUE@liblightcomp_la_LIBADD = $(PCRE_LIB) $(SSL_LIB) $(FAM_LIBS)
+ at NO_RDYNAMIC_TRUE@liblightcomp_la_LIBADD = $(PCRE_LIB) $(SSL_LIB) $(FAM_LIBS) $(LIBEV_LIBS)
 @NO_RDYNAMIC_FALSE at common_libadd = 
 @NO_RDYNAMIC_TRUE at common_libadd = liblightcomp.la
 mod_flv_streaming_la_SOURCES = mod_flv_streaming.c
@@ -792,9 +795,9 @@
       version.h
 
 lighttpd_SOURCES = $(src)
-lighttpd_LDADD = $(PCRE_LIB) $(DL_LIB) $(SENDFILE_LIB) $(ATTR_LIB) $(common_libadd) $(SSL_LIB) $(FAM_LIBS)
+lighttpd_LDADD = $(PCRE_LIB) $(DL_LIB) $(SENDFILE_LIB) $(ATTR_LIB) $(common_libadd) $(SSL_LIB) $(FAM_LIBS) $(LIBEV_LIBS)
 lighttpd_LDFLAGS = -export-dynamic
-lighttpd_CCPFLAGS = $(FAM_CFLAGS)
+lighttpd_CCPFLAGS = $(FAM_CFLAGS) $(LIBEV_CFLAGS)
 proc_open_SOURCES = proc_open.c buffer.c
 proc_open_CPPFLAGS = -DDEBUG_PROC_OPEN
 
@@ -1034,7 +1037,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/etag.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fdevent.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fdevent_freebsd_kqueue.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fdevent_linux_rtsig.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fdevent_libev.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fdevent_linux_sysepoll.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fdevent_poll.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fdevent_select.Po at am__quote@
@@ -1063,7 +1066,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/liblightcomp_la-etag.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/liblightcomp_la-fdevent.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/liblightcomp_la-fdevent_freebsd_kqueue.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/liblightcomp_la-fdevent_linux_rtsig.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/liblightcomp_la-fdevent_libev.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/liblightcomp_la-fdevent_linux_sysepoll.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/liblightcomp_la-fdevent_poll.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/liblightcomp_la-fdevent_select.Plo at am__quote@
@@ -1321,13 +1324,13 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblightcomp_la_CFLAGS) $(CFLAGS) -c -o liblightcomp_la-fdevent_select.lo `test -f 'fdevent_select.c' || echo '$(srcdir)/'`fdevent_select.c
 
-liblightcomp_la-fdevent_linux_rtsig.lo: fdevent_linux_rtsig.c
- at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblightcomp_la_CFLAGS) $(CFLAGS) -MT liblightcomp_la-fdevent_linux_rtsig.lo -MD -MP -MF $(DEPDIR)/liblightcomp_la-fdevent_linux_rtsig.Tpo -c -o liblightcomp_la-fdevent_linux_rtsig.lo `test -f 'fdevent_linux_rtsig.c' || echo '$(srcdir)/'`fdevent_linux_rtsig.c
- at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/liblightcomp_la-fdevent_linux_rtsig.Tpo $(DEPDIR)/liblightcomp_la-fdevent_linux_rtsig.Plo
+liblightcomp_la-fdevent_libev.lo: fdevent_libev.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblightcomp_la_CFLAGS) $(CFLAGS) -MT liblightcomp_la-fdevent_libev.lo -MD -MP -MF $(DEPDIR)/liblightcomp_la-fdevent_libev.Tpo -c -o liblightcomp_la-fdevent_libev.lo `test -f 'fdevent_libev.c' || echo '$(srcdir)/'`fdevent_libev.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/liblightcomp_la-fdevent_libev.Tpo $(DEPDIR)/liblightcomp_la-fdevent_libev.Plo
 @am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='fdevent_linux_rtsig.c' object='liblightcomp_la-fdevent_linux_rtsig.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='fdevent_libev.c' object='liblightcomp_la-fdevent_libev.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblightcomp_la_CFLAGS) $(CFLAGS) -c -o liblightcomp_la-fdevent_linux_rtsig.lo `test -f 'fdevent_linux_rtsig.c' || echo '$(srcdir)/'`fdevent_linux_rtsig.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblightcomp_la_CFLAGS) $(CFLAGS) -c -o liblightcomp_la-fdevent_libev.lo `test -f 'fdevent_libev.c' || echo '$(srcdir)/'`fdevent_libev.c
 
 liblightcomp_la-fdevent_poll.lo: fdevent_poll.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblightcomp_la_CFLAGS) $(CFLAGS) -MT liblightcomp_la-fdevent_poll.lo -MD -MP -MF $(DEPDIR)/liblightcomp_la-fdevent_poll.Tpo -c -o liblightcomp_la-fdevent_poll.lo `test -f 'fdevent_poll.c' || echo '$(srcdir)/'`fdevent_poll.c
@@ -1814,12 +1817,12 @@
 
 @CROSS_COMPILING_TRUE at parsers:
 @CROSS_COMPILING_FALSE at configparser.h: configparser.c
- at CROSS_COMPILING_FALSE@configparser.c: $(srcdir)/configparser.y $(srcdir)/lempar.c lemon$(EXEEXT)
+ at CROSS_COMPILING_FALSE@configparser.c: $(srcdir)/configparser.y $(srcdir)/lempar.c | lemon$(EXEEXT)
 @CROSS_COMPILING_FALSE@	rm -f configparser.h
 @CROSS_COMPILING_FALSE@	$(LEMON) -q $(srcdir)/configparser.y $(srcdir)/lempar.c
 
 @CROSS_COMPILING_FALSE at mod_ssi_exprparser.h: mod_ssi_exprparser.c
- at CROSS_COMPILING_FALSE@mod_ssi_exprparser.c: $(srcdir)/mod_ssi_exprparser.y $(srcdir)/lempar.c lemon$(EXEEXT)
+ at CROSS_COMPILING_FALSE@mod_ssi_exprparser.c: $(srcdir)/mod_ssi_exprparser.y $(srcdir)/lempar.c | lemon$(EXEEXT)
 @CROSS_COMPILING_FALSE@	rm -f mod_ssi_exprparser.h
 @CROSS_COMPILING_FALSE@	$(LEMON) -q $(srcdir)/mod_ssi_exprparser.y $(srcdir)/lempar.c
 

Modified: lighttpd/trunk/src/SConscript
===================================================================
--- lighttpd/trunk/src/SConscript	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/SConscript	2010-08-11 15:14:05 UTC (rev 472)
@@ -10,7 +10,7 @@
       stat_cache.c plugin.c joblist.c etag.c array.c \
       data_string.c data_count.c data_array.c \
       data_integer.c md5.c data_fastcgi.c \
-      fdevent_select.c fdevent_linux_rtsig.c \
+      fdevent_select.c fdevent_libev.c \
       fdevent_poll.c fdevent_linux_sysepoll.c \
       fdevent_solaris_devpoll.c fdevent_freebsd_kqueue.c \
       data_config.c bitset.c \

Modified: lighttpd/trunk/src/array.c
===================================================================
--- lighttpd/trunk/src/array.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/array.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -130,20 +130,21 @@
 
 data_unset *array_get_unused_element(array *a, data_type_t t) {
 	data_unset *ds = NULL;
+	unsigned int i;
 
-	UNUSED(t);
+	for (i = a->used; i < a->size; i++) {
+		if (a->data[i] && a->data[i]->type == t) {
+			ds = a->data[i];
 
-	if (a->size == 0) return NULL;
+			/* make empty slot at a->used for next insert */
+			a->data[i] = a->data[a->used];
+			a->data[a->used] = NULL;
 
-	if (a->used == a->size) return NULL;
-
-	if (a->data[a->used]) {
-		ds = a->data[a->used];
-
-		a->data[a->used] = NULL;
+			return ds;
+		}
 	}
 
-	return ds;
+	return NULL;
 }
 
 void array_set_key_value(array *hdrs, const char *key, size_t key_len, const char *value, size_t val_len) {
@@ -194,7 +195,7 @@
 		if (a->data[ndx]->type == str->type) {
 			str->insert_dup(a->data[ndx], str);
 		} else {
-			fprintf(stderr, "a\n");
+			SEGFAULT();
 		}
 		return 0;
 	}
@@ -224,6 +225,9 @@
 
 	ndx = (int) a->used;
 
+	/* make sure there is nothing here */
+	if (a->data[ndx]) a->data[ndx]->free(a->data[ndx]);
+
 	a->data[a->used++] = str;
 
 	if (pos != ndx &&

Modified: lighttpd/trunk/src/base.h
===================================================================
--- lighttpd/trunk/src/base.h	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/base.h	2010-08-11 15:14:05 UTC (rev 472)
@@ -282,7 +282,7 @@
 	buffer *ssl_verifyclient_username;
 	unsigned short ssl_verifyclient_export_cert;
 
-	unsigned short use_ipv6;
+	unsigned short use_ipv6, set_v6only; /* set_v6only is only a temporary option */
 	unsigned short defer_accept;
 	unsigned short is_ssl;
 	unsigned short allow_http11;

Modified: lighttpd/trunk/src/configfile.c
===================================================================
--- lighttpd/trunk/src/configfile.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/configfile.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -100,6 +100,9 @@
 		{ "ssl.verifyclient.depth",      NULL, T_CONFIG_SHORT,   T_CONFIG_SCOPE_SERVER },     /* 58 */
 		{ "ssl.verifyclient.username",   NULL, T_CONFIG_STRING,  T_CONFIG_SCOPE_SERVER },     /* 59 */
 		{ "ssl.verifyclient.exportcert", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER },     /* 60 */
+
+		{ "server.set-v6only",           NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 61 */
+
 		{ "server.host",                 "use server.bind instead", T_CONFIG_DEPRECATED, T_CONFIG_SCOPE_UNSET },
 		{ "server.docroot",              "use server.document-root instead", T_CONFIG_DEPRECATED, T_CONFIG_SCOPE_UNSET },
 		{ "server.virtual-root",         "load mod_simple_vhost and use simple-vhost.server-root instead", T_CONFIG_DEPRECATED, T_CONFIG_SCOPE_UNSET },
@@ -170,6 +173,7 @@
 		s->is_ssl        = 0;
 		s->ssl_use_sslv2 = 0;
 		s->use_ipv6      = 0;
+		s->set_v6only    = 1;
 		s->defer_accept  = 0;
 #ifdef HAVE_LSTAT
 		s->follow_symlink = 1;
@@ -180,7 +184,7 @@
 		s->etag_use_mtime = 1;
 		s->etag_use_size  = 1;
 		s->range_requests = 1;
-		s->force_lowercase_filenames = 0;
+		s->force_lowercase_filenames = (i == 0) ? 2 : 0; /* we wan't to detect later if user changed this for global section */
 		s->global_kbytes_per_second = 0;
 		s->global_bytes_per_second_cnt = 0;
 		s->global_bytes_per_second_cnt_ptr = &s->global_bytes_per_second_cnt;
@@ -194,6 +198,7 @@
 
 		cv[7].destination = s->server_tag;
 		cv[8].destination = &(s->use_ipv6);
+		cv[61].destination = &(s->set_v6only);
 		cv[54].destination = &(s->defer_accept);
 
 
@@ -1171,9 +1176,8 @@
 
 	struct ev_map { fdevent_handler_t et; const char *name; } event_handlers[] =
 	{
-		/* - poll is most reliable
+		/* - epoll is most reliable
 		 * - select works everywhere
-		 * - linux-* are experimental
 		 */
 #ifdef USE_LINUX_EPOLL
 		{ FDEVENT_HANDLER_LINUX_SYSEPOLL, "linux-sysepoll" },
@@ -1184,8 +1188,8 @@
 #ifdef USE_SELECT
 		{ FDEVENT_HANDLER_SELECT,         "select" },
 #endif
-#ifdef USE_LINUX_SIGIO
-		{ FDEVENT_HANDLER_LINUX_RTSIG,    "linux-rtsig" },
+#ifdef USE_LIBEV
+		{ FDEVENT_HANDLER_LIBEV,          "libev" },
 #endif
 #ifdef USE_SOLARIS_DEVPOLL
 		{ FDEVENT_HANDLER_SOLARIS_DEVPOLL,"solaris-devpoll" },
@@ -1230,35 +1234,39 @@
 
 	buffer_to_lower(srv->tmp_buf);
 
-	if (0 == stat(srv->tmp_buf->ptr, &st1)) {
-		int is_lower = 0;
+	if (2 == s->force_lowercase_filenames) { /* user didn't configure it in global section? */
+		s->force_lowercase_filenames = 0; /* default to 0 */
 
-		is_lower = buffer_is_equal(srv->tmp_buf, s->document_root);
+		if (0 == stat(srv->tmp_buf->ptr, &st1)) {
+			int is_lower = 0;
 
-		/* lower-case existed, check upper-case */
-		buffer_copy_string_buffer(srv->tmp_buf, s->document_root);
+			is_lower = buffer_is_equal(srv->tmp_buf, s->document_root);
 
-		buffer_to_upper(srv->tmp_buf);
+			/* lower-case existed, check upper-case */
+			buffer_copy_string_buffer(srv->tmp_buf, s->document_root);
 
-		/* we have to handle the special case that upper and lower-casing results in the same filename
-		 * as in server.document-root = "/" or "/12345/" */
+			buffer_to_upper(srv->tmp_buf);
 
-		if (is_lower && buffer_is_equal(srv->tmp_buf, s->document_root)) {
-			/* lower-casing and upper-casing didn't result in
-			 * an other filename, no need to stat(),
-			 * just assume it is case-sensitive. */
+			/* we have to handle the special case that upper and lower-casing results in the same filename
+			 * as in server.document-root = "/" or "/12345/" */
 
-			s->force_lowercase_filenames = 0;
-		} else if (0 == stat(srv->tmp_buf->ptr, &st2)) {
+			if (is_lower && buffer_is_equal(srv->tmp_buf, s->document_root)) {
+				/* lower-casing and upper-casing didn't result in
+				 * an other filename, no need to stat(),
+				 * just assume it is case-sensitive. */
 
-			/* upper case exists too, doesn't the FS handle this ? */
+				s->force_lowercase_filenames = 0;
+			} else if (0 == stat(srv->tmp_buf->ptr, &st2)) {
 
-			/* upper and lower have the same inode -> case-insensitve FS */
+				/* upper case exists too, doesn't the FS handle this ? */
 
-			if (st1.st_ino == st2.st_ino) {
 				/* upper and lower have the same inode -> case-insensitve FS */
 
-				s->force_lowercase_filenames = 1;
+				if (st1.st_ino == st2.st_ino) {
+					/* upper and lower have the same inode -> case-insensitve FS */
+
+					s->force_lowercase_filenames = 1;
+				}
 			}
 		}
 	}

Modified: lighttpd/trunk/src/configparser.c
===================================================================
--- lighttpd/trunk/src/configparser.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/configparser.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -4,7 +4,7 @@
 /* First off, code is include which follows the "include" declaration
 ** in the input file. */
 #include <stdio.h>
-#line 5 "../../src/configparser.y"
+#line 5 "./configparser.y"
 
 #include "configfile.h"
 #include "buffer.h"
@@ -518,42 +518,42 @@
     case 23:
     case 24:
     case 25:
-#line 144 "../../src/configparser.y"
+#line 144 "./configparser.y"
 { buffer_free((yypminor->yy0)); }
 #line 523 "configparser.c"
       break;
     case 35:
-#line 135 "../../src/configparser.y"
+#line 135 "./configparser.y"
 { (yypminor->yy41)->free((yypminor->yy41)); }
 #line 528 "configparser.c"
       break;
     case 36:
-#line 136 "../../src/configparser.y"
+#line 136 "./configparser.y"
 { (yypminor->yy41)->free((yypminor->yy41)); }
 #line 533 "configparser.c"
       break;
     case 37:
-#line 137 "../../src/configparser.y"
+#line 137 "./configparser.y"
 { (yypminor->yy41)->free((yypminor->yy41)); }
 #line 538 "configparser.c"
       break;
     case 39:
-#line 138 "../../src/configparser.y"
+#line 138 "./configparser.y"
 { array_free((yypminor->yy40)); }
 #line 543 "configparser.c"
       break;
     case 40:
-#line 139 "../../src/configparser.y"
+#line 139 "./configparser.y"
 { array_free((yypminor->yy40)); }
 #line 548 "configparser.c"
       break;
     case 41:
-#line 140 "../../src/configparser.y"
+#line 140 "./configparser.y"
 { buffer_free((yypminor->yy43)); }
 #line 553 "configparser.c"
       break;
     case 42:
-#line 141 "../../src/configparser.y"
+#line 141 "./configparser.y"
 { buffer_free((yypminor->yy43)); }
 #line 558 "configparser.c"
       break;
@@ -823,7 +823,7 @@
         /* No destructor defined for global */
         break;
       case 5:
-#line 117 "../../src/configparser.y"
+#line 117 "./configparser.y"
 { yymsp[-1].minor.yy78 = NULL; }
 #line 828 "configparser.c"
   yy_destructor(1,&yymsp[0].minor);
@@ -838,7 +838,7 @@
   yy_destructor(1,&yymsp[0].minor);
         break;
       case 9:
-#line 146 "../../src/configparser.y"
+#line 146 "./configparser.y"
 {
   if (ctx->ok) {
     buffer_copy_string_buffer(yymsp[0].minor.yy41->key, yymsp[-2].minor.yy43);
@@ -866,7 +866,7 @@
   yy_destructor(2,&yymsp[-1].minor);
         break;
       case 10:
-#line 170 "../../src/configparser.y"
+#line 170 "./configparser.y"
 {
   array *vars = ctx->current->value;
   data_unset *du;
@@ -909,7 +909,7 @@
   yy_destructor(3,&yymsp[-1].minor);
         break;
       case 11:
-#line 209 "../../src/configparser.y"
+#line 209 "./configparser.y"
 {
   if (strchr(yymsp[0].minor.yy0->ptr, '.') == NULL) {
     yygotominor.yy43 = buffer_init_string("var.");
@@ -924,7 +924,7 @@
 #line 924 "configparser.c"
         break;
       case 12:
-#line 221 "../../src/configparser.y"
+#line 221 "./configparser.y"
 {
   yygotominor.yy41 = configparser_merge_data(yymsp[-2].minor.yy41, yymsp[0].minor.yy41);
   if (NULL == yygotominor.yy41) {
@@ -938,7 +938,7 @@
   yy_destructor(5,&yymsp[-1].minor);
         break;
       case 13:
-#line 231 "../../src/configparser.y"
+#line 231 "./configparser.y"
 {
   yygotominor.yy41 = yymsp[0].minor.yy41;
   yymsp[0].minor.yy41 = NULL;
@@ -946,7 +946,7 @@
 #line 946 "configparser.c"
         break;
       case 14:
-#line 236 "../../src/configparser.y"
+#line 236 "./configparser.y"
 {
   yygotominor.yy41 = NULL;
   if (strncmp(yymsp[0].minor.yy43->ptr, "env.", sizeof("env.") - 1) == 0) {
@@ -976,7 +976,7 @@
 #line 976 "configparser.c"
         break;
       case 15:
-#line 263 "../../src/configparser.y"
+#line 263 "./configparser.y"
 {
   yygotominor.yy41 = (data_unset *)data_string_init();
   buffer_copy_string_buffer(((data_string *)(yygotominor.yy41))->value, yymsp[0].minor.yy0);
@@ -986,7 +986,7 @@
 #line 986 "configparser.c"
         break;
       case 16:
-#line 270 "../../src/configparser.y"
+#line 270 "./configparser.y"
 {
   yygotominor.yy41 = (data_unset *)data_integer_init();
   ((data_integer *)(yygotominor.yy41))->value = strtol(yymsp[0].minor.yy0->ptr, NULL, 10);
@@ -996,7 +996,7 @@
 #line 996 "configparser.c"
         break;
       case 17:
-#line 276 "../../src/configparser.y"
+#line 276 "./configparser.y"
 {
   yygotominor.yy41 = (data_unset *)data_array_init();
   array_free(((data_array *)(yygotominor.yy41))->value);
@@ -1006,7 +1006,7 @@
 #line 1006 "configparser.c"
         break;
       case 18:
-#line 282 "../../src/configparser.y"
+#line 282 "./configparser.y"
 {
   yygotominor.yy40 = array_init();
 }
@@ -1015,7 +1015,7 @@
   yy_destructor(9,&yymsp[0].minor);
         break;
       case 19:
-#line 285 "../../src/configparser.y"
+#line 285 "./configparser.y"
 {
   yygotominor.yy40 = yymsp[-1].minor.yy40;
   yymsp[-1].minor.yy40 = NULL;
@@ -1025,7 +1025,7 @@
   yy_destructor(9,&yymsp[0].minor);
         break;
       case 20:
-#line 290 "../../src/configparser.y"
+#line 290 "./configparser.y"
 {
   if (buffer_is_empty(yymsp[0].minor.yy41->key) ||
       NULL == array_get_element(yymsp[-2].minor.yy40, yymsp[0].minor.yy41->key->ptr)) {
@@ -1046,7 +1046,7 @@
   yy_destructor(10,&yymsp[-1].minor);
         break;
       case 21:
-#line 307 "../../src/configparser.y"
+#line 307 "./configparser.y"
 {
   yygotominor.yy40 = yymsp[-1].minor.yy40;
   yymsp[-1].minor.yy40 = NULL;
@@ -1055,7 +1055,7 @@
   yy_destructor(10,&yymsp[0].minor);
         break;
       case 22:
-#line 312 "../../src/configparser.y"
+#line 312 "./configparser.y"
 {
   yygotominor.yy40 = array_init();
   array_insert_unique(yygotominor.yy40, yymsp[0].minor.yy41);
@@ -1064,7 +1064,7 @@
 #line 1064 "configparser.c"
         break;
       case 23:
-#line 318 "../../src/configparser.y"
+#line 318 "./configparser.y"
 {
   yygotominor.yy41 = yymsp[0].minor.yy41;
   yymsp[0].minor.yy41 = NULL;
@@ -1072,7 +1072,7 @@
 #line 1072 "configparser.c"
         break;
       case 24:
-#line 322 "../../src/configparser.y"
+#line 322 "./configparser.y"
 {
   buffer_copy_string_buffer(yymsp[0].minor.yy41->key, yymsp[-2].minor.yy43);
   buffer_free(yymsp[-2].minor.yy43);
@@ -1090,7 +1090,7 @@
       case 26:
         break;
       case 27:
-#line 334 "../../src/configparser.y"
+#line 334 "./configparser.y"
 {
   data_config *dc;
   dc = (data_config *)array_get_element(ctx->srv->config_context, "global");
@@ -1101,7 +1101,7 @@
   yy_destructor(12,&yymsp[0].minor);
         break;
       case 28:
-#line 341 "../../src/configparser.y"
+#line 341 "./configparser.y"
 {
   data_config *cur;
 
@@ -1119,7 +1119,7 @@
   yy_destructor(14,&yymsp[0].minor);
         break;
       case 29:
-#line 352 "../../src/configparser.y"
+#line 352 "./configparser.y"
 {
   if (yymsp[-3].minor.yy78->context_ndx >= yymsp[0].minor.yy78->context_ndx) {
     fprintf(stderr, "unreachable else condition\n");
@@ -1136,7 +1136,7 @@
   yy_destructor(15,&yymsp[-1].minor);
         break;
       case 30:
-#line 364 "../../src/configparser.y"
+#line 364 "./configparser.y"
 {
   yygotominor.yy78 = yymsp[0].minor.yy78;
   yymsp[0].minor.yy78 = NULL;
@@ -1144,7 +1144,7 @@
 #line 1144 "configparser.c"
         break;
       case 31:
-#line 369 "../../src/configparser.y"
+#line 369 "./configparser.y"
 {
   data_config *cur;
 
@@ -1162,7 +1162,7 @@
   yy_destructor(14,&yymsp[0].minor);
         break;
       case 32:
-#line 380 "../../src/configparser.y"
+#line 380 "./configparser.y"
 {
   data_config *dc;
   buffer *b, *rvalue, *op;
@@ -1318,7 +1318,7 @@
   yy_destructor(19,&yymsp[-2].minor);
         break;
       case 33:
-#line 529 "../../src/configparser.y"
+#line 529 "./configparser.y"
 {
   yygotominor.yy27 = CONFIG_COND_EQ;
 }
@@ -1326,7 +1326,7 @@
   yy_destructor(20,&yymsp[0].minor);
         break;
       case 34:
-#line 532 "../../src/configparser.y"
+#line 532 "./configparser.y"
 {
   yygotominor.yy27 = CONFIG_COND_MATCH;
 }
@@ -1334,7 +1334,7 @@
   yy_destructor(21,&yymsp[0].minor);
         break;
       case 35:
-#line 535 "../../src/configparser.y"
+#line 535 "./configparser.y"
 {
   yygotominor.yy27 = CONFIG_COND_NE;
 }
@@ -1342,7 +1342,7 @@
   yy_destructor(22,&yymsp[0].minor);
         break;
       case 36:
-#line 538 "../../src/configparser.y"
+#line 538 "./configparser.y"
 {
   yygotominor.yy27 = CONFIG_COND_NOMATCH;
 }
@@ -1350,7 +1350,7 @@
   yy_destructor(23,&yymsp[0].minor);
         break;
       case 37:
-#line 542 "../../src/configparser.y"
+#line 542 "./configparser.y"
 {
   yygotominor.yy43 = NULL;
   if (ctx->ok) {
@@ -1370,7 +1370,7 @@
 #line 1370 "configparser.c"
         break;
       case 38:
-#line 559 "../../src/configparser.y"
+#line 559 "./configparser.y"
 {
   if (ctx->ok) {
     if (0 != config_parse_file(ctx->srv, ctx, yymsp[0].minor.yy43->ptr)) {
@@ -1384,7 +1384,7 @@
   yy_destructor(24,&yymsp[-1].minor);
         break;
       case 39:
-#line 569 "../../src/configparser.y"
+#line 569 "./configparser.y"
 {
   if (ctx->ok) {
     if (0 != config_parse_cmd(ctx->srv, ctx, yymsp[0].minor.yy43->ptr)) {
@@ -1424,7 +1424,7 @@
   while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
   /* Here code is inserted which will be executed whenever the
   ** parser fails */
-#line 108 "../../src/configparser.y"
+#line 108 "./configparser.y"
 
   ctx->ok = 0;
 

Modified: lighttpd/trunk/src/connections.c
===================================================================
--- lighttpd/trunk/src/connections.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/connections.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -310,6 +310,8 @@
 		/* the other end close the connection -> KEEP-ALIVE */
 
 		return -2;
+	} else {
+		joblist_append(srv, con);
 	}
 
 	return 0;
@@ -320,6 +322,7 @@
 #endif
 }
 
+/* 0: everything ok, -1: error, -2: con closed */
 static int connection_handle_read(server *srv, connection *con) {
 	int len;
 	buffer *b;
@@ -1174,22 +1177,26 @@
 	return 0;
 }
 
-static handler_t connection_handle_fdevent(void *s, void *context, int revents) {
-	server     *srv = (server *)s;
+static handler_t connection_handle_fdevent(server *srv, void *context, int revents) {
 	connection *con = context;
 
 	joblist_append(srv, con);
 
-	if (revents & FDEVENT_IN) {
-		con->is_readable = 1;
-#if 0
-		log_error_write(srv, __FILE__, __LINE__, "sd", "read-wait - done", con->fd);
-#endif
+	if (con->conf.is_ssl) {
+		/* ssl may read and write for both reads and writes */
+		if (revents & (FDEVENT_IN | FDEVENT_OUT)) {
+			con->is_readable = 1;
+			con->is_writable = 1;
+		}
+	} else {
+		if (revents & FDEVENT_IN) {
+			con->is_readable = 1;
+		}
+		if (revents & FDEVENT_OUT) {
+			con->is_writable = 1;
+			/* we don't need the event twice */
+		}
 	}
-	if (revents & FDEVENT_OUT) {
-		con->is_writable = 1;
-		/* we don't need the event twice */
-	}
 
 
 	if (revents & ~(FDEVENT_IN | FDEVENT_OUT)) {
@@ -1699,7 +1706,7 @@
 										ssl_r, ret,
 										ERR_error_string(err, NULL));
 							} while((err = ERR_get_error()));
-						} else {
+						} else if (errno != 0) { /* ssl bug (see lighttpd ticket #2213): sometimes errno == 0 */
 							log_error_write(srv, __FILE__, __LINE__, "sddds", "SSL (error):",
 									ssl_r, ret, errno,
 									strerror(errno));

Modified: lighttpd/trunk/src/data_string.c
===================================================================
--- lighttpd/trunk/src/data_string.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/data_string.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -69,9 +69,26 @@
 
 static void data_string_print(const data_unset *d, int depth) {
 	data_string *ds = (data_string *)d;
+	unsigned int i;
 	UNUSED(depth);
 
-	fprintf(stdout, "\"%s\"", ds->value->used ? ds->value->ptr : "");
+	/* empty and uninitialized strings */
+	if (ds->value->used < 1) {
+		fputs("\"\"", stdout);
+		return;
+	}
+
+	/* print out the string as is, except prepend " with backslash */
+	putc('"', stdout);
+	for (i = 0; i < ds->value->used - 1; i++) {
+		unsigned char c = ds->value->ptr[i];
+		if (c == '"') {
+			fputs("\\\"", stdout);
+		} else {
+			putc(c, stdout);
+		}
+	}
+	putc('"', stdout);
 }
 
 

Modified: lighttpd/trunk/src/etag.c
===================================================================
--- lighttpd/trunk/src/etag.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/etag.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -44,7 +44,7 @@
 
 	buffer_reset(mut);
 	buffer_copy_string_len(mut, CONST_STR_LEN("\""));
-	buffer_append_long(mut, h);
+	buffer_append_off_t(mut, h);
 	buffer_append_string_len(mut, CONST_STR_LEN("\""));
 
 	return 0;

Modified: lighttpd/trunk/src/fdevent.c
===================================================================
--- lighttpd/trunk/src/fdevent.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/fdevent.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -1,5 +1,5 @@
-#include "fdevent.h"
-#include "buffer.h"
+#include "base.h"
+#include "log.h"
 
 #include <sys/types.h>
 
@@ -11,64 +11,65 @@
 #include <fcntl.h>
 
 
-fdevents *fdevent_init(size_t maxfds, fdevent_handler_t type) {
+fdevents *fdevent_init(server *srv, size_t maxfds, fdevent_handler_t type) {
 	fdevents *ev;
 
 	ev = calloc(1, sizeof(*ev));
+	ev->srv = srv;
 	ev->fdarray = calloc(maxfds, sizeof(*ev->fdarray));
 	ev->maxfds = maxfds;
 
 	switch(type) {
 	case FDEVENT_HANDLER_POLL:
 		if (0 != fdevent_poll_init(ev)) {
-			fprintf(stderr, "%s.%d: event-handler poll failed\n",
-				__FILE__, __LINE__);
+			log_error_write(ev->srv, __FILE__, __LINE__, "S",
+				"event-handler poll failed");
 
 			return NULL;
 		}
-		break;
+		return ev;
 	case FDEVENT_HANDLER_SELECT:
 		if (0 != fdevent_select_init(ev)) {
-			fprintf(stderr, "%s.%d: event-handler select failed\n",
-				__FILE__, __LINE__);
+			log_error_write(ev->srv, __FILE__, __LINE__, "S",
+				"event-handler select failed");
 			return NULL;
 		}
-		break;
-	case FDEVENT_HANDLER_LINUX_RTSIG:
-		if (0 != fdevent_linux_rtsig_init(ev)) {
-			fprintf(stderr, "%s.%d: event-handler linux-rtsig failed, try to set server.event-handler = \"poll\" or \"select\"\n",
-				__FILE__, __LINE__);
-			return NULL;
-		}
-		break;
+		return ev;
 	case FDEVENT_HANDLER_LINUX_SYSEPOLL:
 		if (0 != fdevent_linux_sysepoll_init(ev)) {
-			fprintf(stderr, "%s.%d: event-handler linux-sysepoll failed, try to set server.event-handler = \"poll\" or \"select\"\n",
-				__FILE__, __LINE__);
+			log_error_write(ev->srv, __FILE__, __LINE__, "S",
+				"event-handler linux-sysepoll failed, try to set server.event-handler = \"poll\" or \"select\"");
 			return NULL;
 		}
-		break;
+		return ev;
 	case FDEVENT_HANDLER_SOLARIS_DEVPOLL:
 		if (0 != fdevent_solaris_devpoll_init(ev)) {
-			fprintf(stderr, "%s.%d: event-handler solaris-devpoll failed, try to set server.event-handler = \"poll\" or \"select\"\n",
-				__FILE__, __LINE__);
+			log_error_write(ev->srv, __FILE__, __LINE__, "S",
+				"event-handler solaris-devpoll failed, try to set server.event-handler = \"poll\" or \"select\"");
 			return NULL;
 		}
-		break;
+		return ev;
 	case FDEVENT_HANDLER_FREEBSD_KQUEUE:
 		if (0 != fdevent_freebsd_kqueue_init(ev)) {
-			fprintf(stderr, "%s.%d: event-handler freebsd-kqueue failed, try to set server.event-handler = \"poll\" or \"select\"\n",
-				__FILE__, __LINE__);
+			log_error_write(ev->srv, __FILE__, __LINE__, "S",
+				"event-handler freebsd-kqueue failed, try to set server.event-handler = \"poll\" or \"select\"");
 			return NULL;
 		}
+		return ev;
+	case FDEVENT_HANDLER_LIBEV:
+		if (0 != fdevent_libev_init(ev)) {
+			log_error_write(ev->srv, __FILE__, __LINE__, "S",
+				"event-handler libev failed, try to set server.event-handler = \"poll\" or \"select\"");
+			return NULL;
+		}
+		return ev;
+	case FDEVENT_HANDLER_UNSET:
 		break;
-	default:
-		fprintf(stderr, "%s.%d: event-handler is unknown, try to set server.event-handler = \"poll\" or \"select\"\n",
-			__FILE__, __LINE__);
-		return NULL;
 	}
 
-	return ev;
+	log_error_write(ev->srv, __FILE__, __LINE__, "S",
+		"event-handler is unknown, try to set server.event-handler = \"poll\" or \"select\"");
+	return NULL;
 }
 
 void fdevent_free(fdevents *ev) {
@@ -110,6 +111,7 @@
 	fdn->handler = handler;
 	fdn->fd      = fd;
 	fdn->ctx     = ctx;
+	fdn->handler_ctx = NULL;
 
 	ev->fdarray[fd] = fdn;
 

Modified: lighttpd/trunk/src/fdevent.h
===================================================================
--- lighttpd/trunk/src/fdevent.h	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/fdevent.h	2010-08-11 15:14:05 UTC (rev 472)
@@ -32,10 +32,6 @@
 # else
 #  include <sys/poll.h>
 # endif
-# if defined HAVE_SIGTIMEDWAIT && defined(__linux__)
-#  define USE_LINUX_SIGIO
-#  include <signal.h>
-# endif
 #endif
 
 #if defined HAVE_SELECT
@@ -63,9 +59,18 @@
 # include <sys/port.h>
 #endif
 
+#if defined HAVE_LIBEV
+# define USE_LIBEV
+# include <ev.h>
+#endif
 
-typedef handler_t (*fdevent_handler)(void *srv, void *ctx, int revents);
+struct server;
 
+typedef handler_t (*fdevent_handler)(struct server *srv, void *ctx, int revents);
+
+/* these are the POLL* values from <bits/poll.h> (linux poll)
+ */
+
 #define FDEVENT_IN     BV(0)
 #define FDEVENT_PRI    BV(1)
 #define FDEVENT_OUT    BV(2)
@@ -83,45 +88,26 @@
 typedef enum { FDEVENT_HANDLER_UNSET,
 		FDEVENT_HANDLER_SELECT,
 		FDEVENT_HANDLER_POLL,
-		FDEVENT_HANDLER_LINUX_RTSIG,
 		FDEVENT_HANDLER_LINUX_SYSEPOLL,
 		FDEVENT_HANDLER_SOLARIS_DEVPOLL,
 		FDEVENT_HANDLER_FREEBSD_KQUEUE,
-		FDEVENT_HANDLER_SOLARIS_PORT
+		FDEVENT_HANDLER_SOLARIS_PORT,
+		FDEVENT_HANDLER_LIBEV
 } fdevent_handler_t;
 
-/**
- * a mapping from fd to connection structure
- *
- */
-typedef struct {
-	int fd;                  /**< the fd */
-	void *conn;              /**< a reference the corresponding data-structure */
-	fd_event_t fd_type;      /**< type of the fd */
-	int events;              /**< registered events */
-	int revents;
-} fd_conn;
 
-typedef struct {
-	fd_conn *ptr;
-
-	size_t size;
-	size_t used;
-} fd_conn_buffer;
-
-/**
- * array of unused fd's
- *
- */
-
 typedef struct _fdnode {
 	fdevent_handler handler;
 	void *ctx;
+	void *handler_ctx;
 	int fd;
-
-	struct _fdnode *prev, *next;
 } fdnode;
 
+/**
+ * array of unused fd's
+ *
+ */
+
 typedef struct {
 	int *ptr;
 
@@ -134,18 +120,12 @@
  *
  */
 typedef struct fdevents {
+	struct server *srv;
 	fdevent_handler_t type;
 
 	fdnode **fdarray;
 	size_t maxfds;
 
-#ifdef USE_LINUX_SIGIO
-	int in_sigio;
-	int signum;
-	sigset_t sigset;
-	siginfo_t siginfo;
-	bitset *sigbset;
-#endif
 #ifdef USE_LINUX_EPOLL
 	int epoll_fd;
 	struct epoll_event *epoll_events;
@@ -176,11 +156,13 @@
 #ifdef USE_FREEBSD_KQUEUE
 	int kq_fd;
 	struct kevent *kq_results;
-	bitset *kq_bevents;
 #endif
 #ifdef USE_SOLARIS_PORT
 	int port_fd;
 #endif
+#ifdef USE_LIBEV
+	struct ev_loop *libev_loop;
+#endif
 	int (*reset)(struct fdevents *ev);
 	void (*free)(struct fdevents *ev);
 
@@ -196,8 +178,8 @@
 	int (*fcntl_set)(struct fdevents *ev, int fd);
 } fdevents;
 
-fdevents *fdevent_init(size_t maxfds, fdevent_handler_t type);
-int fdevent_reset(fdevents *ev);
+fdevents *fdevent_init(struct server *srv, size_t maxfds, fdevent_handler_t type);
+int fdevent_reset(fdevents *ev); /* "init" after fork() */
 void fdevent_free(fdevents *ev);
 
 int fdevent_event_add(fdevents *ev, int *fde_ndx, int fd, int events);
@@ -218,11 +200,9 @@
 
 int fdevent_select_init(fdevents *ev);
 int fdevent_poll_init(fdevents *ev);
-int fdevent_linux_rtsig_init(fdevents *ev);
 int fdevent_linux_sysepoll_init(fdevents *ev);
 int fdevent_solaris_devpoll_init(fdevents *ev);
 int fdevent_freebsd_kqueue_init(fdevents *ev);
+int fdevent_libev_init(fdevents *ev);
 
 #endif
-
-

Modified: lighttpd/trunk/src/fdevent_freebsd_kqueue.c
===================================================================
--- lighttpd/trunk/src/fdevent_freebsd_kqueue.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/fdevent_freebsd_kqueue.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -1,6 +1,6 @@
 #include "fdevent.h"
 #include "buffer.h"
-#include "server.h"
+#include "log.h"
 
 #include <sys/types.h>
 
@@ -19,31 +19,29 @@
 static void fdevent_freebsd_kqueue_free(fdevents *ev) {
 	close(ev->kq_fd);
 	free(ev->kq_results);
-	bitset_free(ev->kq_bevents);
 }
 
 static int fdevent_freebsd_kqueue_event_del(fdevents *ev, int fde_ndx, int fd) {
-	int filter, ret;
-	struct kevent kev;
+	int ret;
+	struct kevent kev[2];
 	struct timespec ts;
 
 	if (fde_ndx < 0) return -1;
 
-	filter = bitset_test_bit(ev->kq_bevents, fd) ? EVFILT_READ : EVFILT_WRITE;
+	EV_SET(&kev[0], fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);
+	EV_SET(&kev[1], fd, EVFILT_WRITE, EV_DELETE, 0, 0, NULL);
 
-	EV_SET(&kev, fd, filter, EV_DELETE, 0, 0, NULL);
-
 	ts.tv_sec  = 0;
 	ts.tv_nsec = 0;
 
 	ret = kevent(ev->kq_fd,
-		     &kev, 1,
-		     NULL, 0,
-		     &ts);
+		&kev, 2,
+		NULL, 0,
+		&ts);
 
 	if (ret == -1) {
-		fprintf(stderr, "%s.%d: kqueue failed polling: %s\n",
-			__FILE__, __LINE__, strerror(errno));
+		log_error_write(ev->srv, __FILE__, __LINE__, "SS",
+			"kqueue event delete failed: ", strerror(errno));
 
 		return -1;
 	}
@@ -66,23 +64,17 @@
 	ts.tv_nsec = 0;
 
 	ret = kevent(ev->kq_fd,
-		     &kev, 1,
-		     NULL, 0,
-		     &ts);
+		&kev, 1,
+		NULL, 0,
+		&ts);
 
 	if (ret == -1) {
-		fprintf(stderr, "%s.%d: kqueue failed polling: %s\n",
-			__FILE__, __LINE__, strerror(errno));
+		log_error_write(ev->srv, __FILE__, __LINE__, "SS",
+			"kqueue event add failed: ", strerror(errno));
 
 		return -1;
 	}
 
-	if (filter == EVFILT_READ) {
-		bitset_set_bit(ev->kq_bevents, fd);
-	} else {
-		bitset_clear_bit(ev->kq_bevents, fd);
-	}
-
 	return fd;
 }
 
@@ -94,9 +86,9 @@
 	ts.tv_nsec = (timeout_ms % 1000) * 1000000;
 
 	ret = kevent(ev->kq_fd,
-		     NULL, 0,
-		     ev->kq_results, ev->maxfds,
-		     &ts);
+		NULL, 0,
+		ev->kq_results, ev->maxfds,
+		&ts);
 
 	if (ret == -1) {
 		switch(errno) {
@@ -104,8 +96,8 @@
 			/* we got interrupted, perhaps just a SIGCHLD of a CGI script */
 			return 0;
 		default:
-			fprintf(stderr, "%s.%d: kqueue failed polling: %s\n",
-				__FILE__, __LINE__, strerror(errno));
+			log_error_write(ev->srv, __FILE__, __LINE__, "SS",
+				"kqueue failed polling: ", strerror(errno));
 			break;
 		}
 	}
@@ -149,8 +141,8 @@
 
 static int fdevent_freebsd_kqueue_reset(fdevents *ev) {
 	if (-1 == (ev->kq_fd = kqueue())) {
-		fprintf(stderr, "%s.%d: kqueue failed (%s), try to set server.event-handler = \"poll\" or \"select\"\n",
-			__FILE__, __LINE__, strerror(errno));
+		log_error_write(ev->srv, __FILE__, __LINE__, "SSS",
+			"kqueue failed (", strerror(errno), "), try to set server.event-handler = \"poll\" or \"select\"");
 
 		return -1;
 	}
@@ -178,13 +170,12 @@
 	ev->kq_fd = -1;
 
 	ev->kq_results = calloc(ev->maxfds, sizeof(*ev->kq_results));
-	ev->kq_bevents = bitset_init(ev->maxfds);
 
 	/* check that kqueue works */
 
 	if (-1 == (ev->kq_fd = kqueue())) {
-		fprintf(stderr, "%s.%d: kqueue failed (%s), try to set server.event-handler = \"poll\" or \"select\"\n",
-			__FILE__, __LINE__, strerror(errno));
+		log_error_write(ev->srv, __FILE__, __LINE__, "SSS",
+			"kqueue failed (", strerror(errno), "), try to set server.event-handler = \"poll\" or \"select\"");
 
 		return -1;
 	}
@@ -198,8 +189,8 @@
 int fdevent_freebsd_kqueue_init(fdevents *ev) {
 	UNUSED(ev);
 
-	fprintf(stderr, "%s.%d: kqueue not available, try to set server.event-handler = \"poll\" or \"select\"\n",
-			__FILE__, __LINE__);
+	log_error_write(ev->srv, __FILE__, __LINE__, "S",
+		"kqueue not available, try to set server.event-handler = \"poll\" or \"select\"");
 
 	return -1;
 }

Copied: lighttpd/trunk/src/fdevent_libev.c (from rev 471, lighttpd/branches/upstream/current/src/fdevent_libev.c)
===================================================================
--- lighttpd/trunk/src/fdevent_libev.c	                        (rev 0)
+++ lighttpd/trunk/src/fdevent_libev.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -0,0 +1,168 @@
+#include "fdevent.h"
+#include "buffer.h"
+#include "log.h"
+
+#include <assert.h>
+
+#ifdef USE_LIBEV
+static void io_watcher_cb(struct ev_loop *loop, ev_io *w, int revents) {
+	fdevents *ev = w->data;
+	fdnode *fdn = ev->fdarray[w->fd];
+	int r = 0;
+	UNUSED(loop);
+
+	if (revents & EV_READ) r |= FDEVENT_IN;
+	if (revents & EV_WRITE) r |= FDEVENT_OUT;
+	if (revents & EV_ERROR) r |= FDEVENT_ERR;
+
+	switch (r = (*fdn->handler)(ev->srv, fdn->ctx, r)) {
+	case HANDLER_FINISHED:
+	case HANDLER_GO_ON:
+	case HANDLER_WAIT_FOR_EVENT:
+	case HANDLER_WAIT_FOR_FD:
+		break;
+	case HANDLER_ERROR:
+		/* should never happen */
+		SEGFAULT();
+		break;
+	default:
+		log_error_write(ev->srv, __FILE__, __LINE__, "d", r);
+		break;
+	}
+}
+
+static void fdevent_libev_free(fdevents *ev) {
+	UNUSED(ev);
+}
+
+static int fdevent_libev_event_del(fdevents *ev, int fde_ndx, int fd) {
+	fdnode *fdn;
+	ev_io *watcher;
+
+	if (-1 == fde_ndx) return -1;
+
+	fdn = ev->fdarray[fd];
+	watcher = fdn->handler_ctx;
+
+	if (!watcher) return -1;
+
+	ev_io_stop(ev->libev_loop, watcher);
+	free(watcher);
+	fdn->handler_ctx = NULL;
+
+	return -1;
+}
+
+static int fdevent_libev_event_add(fdevents *ev, int fde_ndx, int fd, int events) {
+	fdnode *fdn = ev->fdarray[fd];
+	ev_io *watcher = fdn->handler_ctx;
+	int ev_events = 0;
+	UNUSED(fde_ndx);
+
+	if (events & FDEVENT_IN)  ev_events |= EV_READ;
+	if (events & FDEVENT_OUT) ev_events |= EV_WRITE;
+
+	if (!watcher) {
+		fdn->handler_ctx = watcher = calloc(1, sizeof(ev_io));
+		assert(watcher);
+
+		ev_io_init(watcher, io_watcher_cb, fd, ev_events);
+		watcher->data = ev;
+		ev_io_start(ev->libev_loop, watcher);
+	} else {
+		if ((watcher->events & ev_events) != ev_events) {
+			ev_io_stop(ev->libev_loop, watcher);
+			ev_io_set(watcher, watcher->fd, watcher->events | ev_events);
+			ev_io_start(ev->libev_loop, watcher);
+		}
+	}
+
+	return fd;
+}
+
+static void timeout_watcher_cb(struct ev_loop *loop, ev_timer *w, int revents) {
+	UNUSED(loop);
+	UNUSED(w);
+	UNUSED(revents);
+}
+
+
+static int fdevent_libev_poll(fdevents *ev, int timeout_ms) {
+	ev_timer timeout_watcher;
+
+	ev_init(&timeout_watcher, timeout_watcher_cb);
+	ev_timer_set(&timeout_watcher, ((ev_tstamp) timeout_ms)/1000.0, 0.0);
+	ev_timer_start(ev->libev_loop, &timeout_watcher);
+
+	ev_loop(ev->libev_loop, EVLOOP_ONESHOT);
+
+	ev_timer_stop(ev->libev_loop, &timeout_watcher);
+
+	return 0;
+}
+
+static int fdevent_libev_event_get_revent(fdevents *ev, size_t ndx) {
+	UNUSED(ev);
+	UNUSED(ndx);
+
+	return 0;
+}
+
+static int fdevent_libev_event_get_fd(fdevents *ev, size_t ndx) {
+	UNUSED(ev);
+	UNUSED(ndx);
+
+	return -1;
+}
+
+static int fdevent_libev_event_next_fdndx(fdevents *ev, int ndx) {
+	UNUSED(ev);
+	UNUSED(ndx);
+
+	return -1;
+}
+
+static int fdevent_libev_reset(fdevents *ev) {
+	UNUSED(ev);
+
+	ev_default_fork();
+
+	return 0;
+}
+
+int fdevent_libev_init(fdevents *ev) {
+	ev->type = FDEVENT_HANDLER_LIBEV;
+#define SET(x) \
+	ev->x = fdevent_libev_##x;
+
+	SET(free);
+	SET(poll);
+	SET(reset);
+
+	SET(event_del);
+	SET(event_add);
+
+	SET(event_next_fdndx);
+	SET(event_get_fd);
+	SET(event_get_revent);
+
+	if (NULL == (ev->libev_loop = ev_default_loop(0))) {
+		log_error_write(ev->srv, __FILE__, __LINE__, "S",
+			"ev_default_loop failed , try to set server.event-handler = \"poll\" or \"select\"");
+
+		return -1;
+	}
+
+	return 0;
+}
+
+#else
+int fdevent_libev_init(fdevents *ev) {
+	UNUSED(ev);
+
+	log_error_write(ev->srv, __FILE__, __LINE__, "S",
+		"libev not supported, try to set server.event-handler = \"poll\" or \"select\"");
+
+	return -1;
+}
+#endif

Deleted: lighttpd/trunk/src/fdevent_linux_rtsig.c
===================================================================
--- lighttpd/trunk/src/fdevent_linux_rtsig.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/fdevent_linux_rtsig.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -1,258 +0,0 @@
-#include "fdevent.h"
-#include "buffer.h"
-
-#include <sys/types.h>
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <signal.h>
-#include <limits.h>
-
-#include <fcntl.h>
-
-#ifdef USE_LINUX_SIGIO
-static void fdevent_linux_rtsig_free(fdevents *ev) {
-	free(ev->pollfds);
-	if (ev->unused.ptr) free(ev->unused.ptr);
-
-	bitset_free(ev->sigbset);
-}
-
-
-static int fdevent_linux_rtsig_event_del(fdevents *ev, int fde_ndx, int fd) {
-	if (fde_ndx < 0) return -1;
-
-	if ((size_t)fde_ndx >= ev->used) {
-		fprintf(stderr, "%s.%d: del! out of range %d %zu\n", __FILE__, __LINE__, fde_ndx, ev->used);
-		SEGFAULT();
-	}
-
-	if (ev->pollfds[fde_ndx].fd == fd) {
-		size_t k = fde_ndx;
-
-		ev->pollfds[k].fd = -1;
-
-		bitset_clear_bit(ev->sigbset, fd);
-
-		if (ev->unused.size == 0) {
-			ev->unused.size = 16;
-			ev->unused.ptr = malloc(sizeof(*(ev->unused.ptr)) * ev->unused.size);
-		} else if (ev->unused.size == ev->unused.used) {
-			ev->unused.size += 16;
-			ev->unused.ptr = realloc(ev->unused.ptr, sizeof(*(ev->unused.ptr)) * ev->unused.size);
-		}
-
-		ev->unused.ptr[ev->unused.used++] = k;
-	} else {
-		fprintf(stderr, "%s.%d: del! %d %d\n", __FILE__, __LINE__, ev->pollfds[fde_ndx].fd, fd);
-
-		SEGFAULT();
-	}
-
-	return -1;
-}
-
-#if 0
-static int fdevent_linux_rtsig_event_compress(fdevents *ev) {
-	size_t j;
-
-	if (ev->used == 0) return 0;
-	if (ev->unused.used != 0) return 0;
-
-	for (j = ev->used - 1; j + 1 > 0; j--) {
-		if (ev->pollfds[j].fd == -1) ev->used--;
-	}
-
-
-	return 0;
-}
-#endif
-
-static int fdevent_linux_rtsig_event_add(fdevents *ev, int fde_ndx, int fd, int events) {
-	/* known index */
-	if (fde_ndx != -1) {
-		if (ev->pollfds[fde_ndx].fd == fd) {
-			ev->pollfds[fde_ndx].events = events;
-
-			return fde_ndx;
-		}
-		fprintf(stderr, "%s.%d: add: (%d, %d)\n", __FILE__, __LINE__, fde_ndx, ev->pollfds[fde_ndx].fd);
-		SEGFAULT();
-	}
-
-	if (ev->unused.used > 0) {
-		int k = ev->unused.ptr[--ev->unused.used];
-
-		ev->pollfds[k].fd = fd;
-		ev->pollfds[k].events = events;
-
-		bitset_set_bit(ev->sigbset, fd);
-
-		return k;
-	} else {
-		if (ev->size == 0) {
-			ev->size = 16;
-			ev->pollfds = malloc(sizeof(*ev->pollfds) * ev->size);
-		} else if (ev->size == ev->used) {
-			ev->size += 16;
-			ev->pollfds = realloc(ev->pollfds, sizeof(*ev->pollfds) * ev->size);
-		}
-
-		ev->pollfds[ev->used].fd = fd;
-		ev->pollfds[ev->used].events = events;
-
-		bitset_set_bit(ev->sigbset, fd);
-
-		return ev->used++;
-	}
-}
-
-static int fdevent_linux_rtsig_poll(fdevents *ev, int timeout_ms) {
-	struct timespec ts;
-	int r;
-
-#if 0
-	fdevent_linux_rtsig_event_compress(ev);
-#endif
-
-	ev->in_sigio = 1;
-
-	ts.tv_sec =  timeout_ms / 1000;
-	ts.tv_nsec = (timeout_ms % 1000) * 1000000;
-	r = sigtimedwait(&(ev->sigset), &(ev->siginfo), &(ts));
-
-	if (r == -1) {
-		if (errno == EAGAIN) return 0;
-		return r;
-	} else if (r == SIGIO) {
-		struct sigaction act;
-
-		/* flush the signal queue */
-		memset(&act, 0, sizeof(act));
-		act.sa_handler = SIG_IGN;
-		sigaction(ev->signum, &act, NULL);
-
-		/* re-enable the signal queue */
-		act.sa_handler = SIG_DFL;
-		sigaction(ev->signum, &act, NULL);
-
-		ev->in_sigio = 0;
-		r = poll(ev->pollfds, ev->used, timeout_ms);
-
-		return r;
-	} else if (r == ev->signum) {
-#  if 0
-		fprintf(stderr, "event: %d %02lx\n", ev->siginfo.si_fd, ev->siginfo.si_band);
-#  endif
-		return bitset_test_bit(ev->sigbset, ev->siginfo.si_fd);
-	} else {
-		/* ? */
-		return -1;
-	}
-}
-
-static int fdevent_linux_rtsig_event_get_revent(fdevents *ev, size_t ndx) {
-	if (ev->in_sigio == 1) {
-#  if 0
-		if (ev->siginfo.si_band == POLLERR) {
-			fprintf(stderr, "event: %d %02lx %02x %s\n", ev->siginfo.si_fd, ev->siginfo.si_band, errno, strerror(errno));
-		}
-#  endif
-		if (ndx != 0) {
-			fprintf(stderr, "+\n");
-			return 0;
-		}
-
-		return ev->siginfo.si_band & 0x3f;
-	} else {
-		if (ndx >= ev->used) {
-			fprintf(stderr, "%s.%d: event: %zu %zu\n", __FILE__, __LINE__, ndx, ev->used);
-			return 0;
-		}
-		return ev->pollfds[ndx].revents;
-	}
-}
-
-static int fdevent_linux_rtsig_event_get_fd(fdevents *ev, size_t ndx) {
-	if (ev->in_sigio == 1) {
-		return ev->siginfo.si_fd;
-	} else {
-		return ev->pollfds[ndx].fd;
-	}
-}
-
-static int fdevent_linux_rtsig_fcntl_set(fdevents *ev, int fd) {
-	static pid_t pid = 0;
-
-	if (pid == 0) pid = getpid();
-
-	if (-1 == fcntl(fd, F_SETSIG, ev->signum)) return -1;
-
-	if (-1 == fcntl(fd, F_SETOWN, (int) pid)) return -1;
-
-	return fcntl(fd, F_SETFL, O_ASYNC | O_NONBLOCK | O_RDWR);
-}
-
-
-static int fdevent_linux_rtsig_event_next_fdndx(fdevents *ev, int ndx) {
-	if (ev->in_sigio == 1) {
-		if (ndx < 0) return 0;
-		return -1;
-	} else {
-		size_t i;
-
-		i = (ndx < 0) ? 0 : ndx + 1;
-		for (; i < ev->used; i++) {
-			if (ev->pollfds[i].revents) break;
-		}
-
-		return i;
-	}
-}
-
-int fdevent_linux_rtsig_init(fdevents *ev) {
-	ev->type = FDEVENT_HANDLER_LINUX_RTSIG;
-#define SET(x) \
-	ev->x = fdevent_linux_rtsig_##x;
-
-	SET(free);
-	SET(poll);
-
-	SET(event_del);
-	SET(event_add);
-
-	SET(event_next_fdndx);
-	SET(fcntl_set);
-	SET(event_get_fd);
-	SET(event_get_revent);
-
-	ev->signum = SIGRTMIN + 1;
-
-	sigemptyset(&(ev->sigset));
-	sigaddset(&(ev->sigset), ev->signum);
-	sigaddset(&(ev->sigset), SIGIO);
-	if (-1 == sigprocmask(SIG_BLOCK, &(ev->sigset), NULL)) {
-		fprintf(stderr, "%s.%d: sigprocmask failed (%s), try to set server.event-handler = \"poll\" or \"select\"\n",
-			__FILE__, __LINE__, strerror(errno));
-
-		return -1;
-	}
-
-	ev->in_sigio = 1;
-
-	ev->sigbset = bitset_init(ev->maxfds);
-
-	return 0;
-}
-#else
-int fdevent_linux_rtsig_init(fdevents *ev) {
-	UNUSED(ev);
-
-	fprintf(stderr, "%s.%d: linux-rtsig not supported, try to set server.event-handler = \"poll\" or \"select\"\n",
-		__FILE__, __LINE__);
-	return -1;
-}
-#endif

Modified: lighttpd/trunk/src/fdevent_linux_sysepoll.c
===================================================================
--- lighttpd/trunk/src/fdevent_linux_sysepoll.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/fdevent_linux_sysepoll.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -1,5 +1,6 @@
 #include "fdevent.h"
 #include "buffer.h"
+#include "log.h"
 
 #include <sys/types.h>
 
@@ -28,7 +29,8 @@
 	ep.data.ptr = NULL;
 
 	if (0 != epoll_ctl(ev->epoll_fd, EPOLL_CTL_DEL, fd, &ep)) {
-		fprintf(stderr, "%s.%d: epoll_ctl failed: %s, dying\n", __FILE__, __LINE__, strerror(errno));
+		log_error_write(ev->srv, __FILE__, __LINE__, "SSS",
+			"epoll_ctl failed: ", strerror(errno), ", dying");
 
 		SEGFAULT();
 
@@ -66,7 +68,8 @@
 	ep.data.fd = fd;
 
 	if (0 != epoll_ctl(ev->epoll_fd, add ? EPOLL_CTL_ADD : EPOLL_CTL_MOD, fd, &ep)) {
-		fprintf(stderr, "%s.%d: epoll_ctl failed: %s, dying\n", __FILE__, __LINE__, strerror(errno));
+		log_error_write(ev->srv, __FILE__, __LINE__, "SSS",
+			"epoll_ctl failed: ", strerror(errno), ", dying");
 
 		SEGFAULT();
 
@@ -95,7 +98,8 @@
 
 static int fdevent_linux_sysepoll_event_get_fd(fdevents *ev, size_t ndx) {
 # if 0
-	fprintf(stderr, "%s.%d: %d, %d\n", __FILE__, __LINE__, ndx, ev->epoll_events[ndx].data.fd);
+	log_error_write(ev->srv, __FILE__, __LINE__, "SD, D",
+		"fdevent_linux_sysepoll_event_get_fd: ", (int) ndx, ev->epoll_events[ndx].data.fd);
 # endif
 
 	return ev->epoll_events[ndx].data.fd;
@@ -127,15 +131,15 @@
 	SET(event_get_revent);
 
 	if (-1 == (ev->epoll_fd = epoll_create(ev->maxfds))) {
-		fprintf(stderr, "%s.%d: epoll_create failed (%s), try to set server.event-handler = \"poll\" or \"select\"\n",
-			__FILE__, __LINE__, strerror(errno));
+		log_error_write(ev->srv, __FILE__, __LINE__, "SSS",
+			"epoll_create failed (", strerror(errno), "), try to set server.event-handler = \"poll\" or \"select\"");
 
 		return -1;
 	}
 
 	if (-1 == fcntl(ev->epoll_fd, F_SETFD, FD_CLOEXEC)) {
-		fprintf(stderr, "%s.%d: epoll_create failed (%s), try to set server.event-handler = \"poll\" or \"select\"\n",
-			__FILE__, __LINE__, strerror(errno));
+		log_error_write(ev->srv, __FILE__, __LINE__, "SSS",
+			"fcntl on epoll-fd failed (", strerror(errno), "), try to set server.event-handler = \"poll\" or \"select\"");
 
 		close(ev->epoll_fd);
 
@@ -151,8 +155,8 @@
 int fdevent_linux_sysepoll_init(fdevents *ev) {
 	UNUSED(ev);
 
-	fprintf(stderr, "%s.%d: linux-sysepoll not supported, try to set server.event-handler = \"poll\" or \"select\"\n",
-		__FILE__, __LINE__);
+	log_error_write(ev->srv, __FILE__, __LINE__, "S",
+		"linux-sysepoll not supported, try to set server.event-handler = \"poll\" or \"select\"");
 
 	return -1;
 }

Modified: lighttpd/trunk/src/fdevent_poll.c
===================================================================
--- lighttpd/trunk/src/fdevent_poll.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/fdevent_poll.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -1,5 +1,6 @@
 #include "fdevent.h"
 #include "buffer.h"
+#include "log.h"
 
 #include <sys/types.h>
 
@@ -21,7 +22,8 @@
 	if (fde_ndx < 0) return -1;
 
 	if ((size_t)fde_ndx >= ev->used) {
-		fprintf(stderr, "%s.%d: del! out of range %d %zd\n", __FILE__, __LINE__, fde_ndx, ev->used);
+		log_error_write(ev->srv, __FILE__, __LINE__, "SdD",
+			"del! out of range ", fde_ndx, (int) ev->used);
 		SEGFAULT();
 	}
 
@@ -42,6 +44,9 @@
 
 		ev->unused.ptr[ev->unused.used++] = k;
 	} else {
+		log_error_write(ev->srv, __FILE__, __LINE__, "SdD",
+			"del! ", ev->pollfds[fde_ndx].fd, fd);
+
 		SEGFAULT();
 	}
 
@@ -62,15 +67,20 @@
 #endif
 
 static int fdevent_poll_event_add(fdevents *ev, int fde_ndx, int fd, int events) {
+	int pevents = 0;
+	if (events & FDEVENT_IN)  pevents |= POLLIN;
+	if (events & FDEVENT_OUT) pevents |= POLLOUT;
+
 	/* known index */
 
 	if (fde_ndx != -1) {
 		if (ev->pollfds[fde_ndx].fd == fd) {
-			ev->pollfds[fde_ndx].events = events;
+			ev->pollfds[fde_ndx].events = pevents;
 
 			return fde_ndx;
 		}
-		fprintf(stderr, "%s.%d: add: (%d, %d)\n", __FILE__, __LINE__, fde_ndx, ev->pollfds[fde_ndx].fd);
+		log_error_write(ev->srv, __FILE__, __LINE__, "SdD",
+			"add: ", fde_ndx, ev->pollfds[fde_ndx].fd);
 		SEGFAULT();
 	}
 
@@ -78,7 +88,7 @@
 		int k = ev->unused.ptr[--ev->unused.used];
 
 		ev->pollfds[k].fd = fd;
-		ev->pollfds[k].events = events;
+		ev->pollfds[k].events = pevents;
 
 		return k;
 	} else {
@@ -91,7 +101,7 @@
 		}
 
 		ev->pollfds[ev->used].fd = fd;
-		ev->pollfds[ev->used].events = events;
+		ev->pollfds[ev->used].events = pevents;
 
 		return ev->used++;
 	}
@@ -106,8 +116,10 @@
 
 static int fdevent_poll_event_get_revent(fdevents *ev, size_t ndx) {
 	int r, poll_r;
+
 	if (ndx >= ev->used) {
-		fprintf(stderr, "%s.%d: dying because: event: %zd >= %zd\n", __FILE__, __LINE__, ndx, ev->used);
+		log_error_write(ev->srv, __FILE__, __LINE__, "sii",
+			"dying because: event: ", (int) ndx, (int) ev->used);
 
 		SEGFAULT();
 
@@ -122,7 +134,7 @@
 	r = 0;
 	poll_r = ev->pollfds[ndx].revents;
 
-	/* map POLL* to FDEVEN_* */
+	/* map POLL* to FDEVEN_*; they are probably the same, but still. */
 
 	if (poll_r & POLLIN) r |= FDEVENT_IN;
 	if (poll_r & POLLOUT) r |= FDEVENT_OUT;
@@ -143,10 +155,10 @@
 
 	i = (ndx < 0) ? 0 : ndx + 1;
 	for (; i < ev->used; i++) {
-		if (ev->pollfds[i].revents) break;
+		if (ev->pollfds[i].revents) return i;
 	}
 
-	return i;
+	return -1;
 }
 
 int fdevent_poll_init(fdevents *ev) {
@@ -174,8 +186,9 @@
 int fdevent_poll_init(fdevents *ev) {
 	UNUSED(ev);
 
-	fprintf(stderr, "%s.%d: poll is not supported, try to set server.event-handler = \"select\"\n",
-			__FILE__, __LINE__);
+	log_error_write(srv, __FILE__, __LINE__,
+		"s", "poll is not supported, try to set server.event-handler = \"select\"");
+
 	return -1;
 }
 #endif

Modified: lighttpd/trunk/src/fdevent_select.c
===================================================================
--- lighttpd/trunk/src/fdevent_select.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/fdevent_select.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -1,5 +1,6 @@
 #include "fdevent.h"
 #include "buffer.h"
+#include "log.h"
 
 #include <sys/time.h>
 #include <sys/types.h>
@@ -95,12 +96,12 @@
 	i = (ndx < 0) ? 0 : ndx + 1;
 
 	for (; i < ev->select_max_fd + 1; i++) {
-		if (FD_ISSET(i, &(ev->select_read))) break;
-		if (FD_ISSET(i, &(ev->select_write))) break;
-		if (FD_ISSET(i, &(ev->select_error))) break;
+		if (FD_ISSET(i, &(ev->select_read))) return i;
+		if (FD_ISSET(i, &(ev->select_write))) return i;
+		if (FD_ISSET(i, &(ev->select_error))) return i;
 	}
 
-	return i;
+	return -1;
 }
 
 int fdevent_select_init(fdevents *ev) {

Modified: lighttpd/trunk/src/fdevent_solaris_devpoll.c
===================================================================
--- lighttpd/trunk/src/fdevent_solaris_devpoll.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/fdevent_solaris_devpoll.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -1,5 +1,6 @@
 #include "fdevent.h"
 #include "buffer.h"
+#include "log.h"
 
 #include <sys/types.h>
 
@@ -30,9 +31,8 @@
 	pfd.revents = 0;
 
 	if (-1 == write(ev->devpoll_fd, &pfd, sizeof(pfd))) {
-		fprintf(stderr, "%s.%d: (del) write failed: (%d, %s)\n",
-			__FILE__, __LINE__,
-			fd, strerror(errno));
+		log_error_write(ev->srv, __FILE__, __LINE__, "S(D, S)",
+			"(del) write failed: ", fd, strerror(errno));
 
 		return -1;
 	}
@@ -44,16 +44,19 @@
 	struct pollfd pfd;
 	int add = 0;
 
+	int pevents = 0;
+	if (events & FDEVENT_IN)  pevents |= POLLIN;
+	if (events & FDEVENT_OUT) pevents |= POLLOUT;
+
 	if (fde_ndx == -1) add = 1;
 
 	pfd.fd = fd;
-	pfd.events = events;
+	pfd.events = pevents;
 	pfd.revents = 0;
 
 	if (-1 == write(ev->devpoll_fd, &pfd, sizeof(pfd))) {
-		fprintf(stderr, "%s.%d: (del) write failed: (%d, %s)\n",
-			__FILE__, __LINE__,
-			fd, strerror(errno));
+		log_error_write(ev->srv, __FILE__, __LINE__, "S(D, S)",
+			"(add) write failed: ", fd, strerror(errno));
 
 		return -1;
 	}
@@ -75,7 +78,21 @@
 }
 
 static int fdevent_solaris_devpoll_event_get_revent(fdevents *ev, size_t ndx) {
-	return ev->devpollfds[ndx].revents;
+	int r, poll_r;
+
+	r = 0;
+	poll_r = ev->devpollfds[ndx].revents;
+
+	/* map POLL* to FDEVEN_*; they are probably the same, but still. */
+
+	if (poll_r & POLLIN) r |= FDEVENT_IN;
+	if (poll_r & POLLOUT) r |= FDEVENT_OUT;
+	if (poll_r & POLLERR) r |= FDEVENT_ERR;
+	if (poll_r & POLLHUP) r |= FDEVENT_HUP;
+	if (poll_r & POLLNVAL) r |= FDEVENT_NVAL;
+	if (poll_r & POLLPRI) r |= FDEVENT_PRI;
+
+	return r;
 }
 
 static int fdevent_solaris_devpoll_event_get_fd(fdevents *ev, size_t ndx) {
@@ -96,15 +113,15 @@
 	/* a forked process does only inherit the filedescriptor,
 	 * but every operation on the device will lead to a EACCES */
 	if ((ev->devpoll_fd = open("/dev/poll", O_RDWR)) < 0) {
-		fprintf(stderr, "%s.%d: opening /dev/poll failed (%s), try to set server.event-handler = \"poll\" or \"select\"\n",
-			__FILE__, __LINE__, strerror(errno));
+		log_error_write(ev->srv, __FILE__, __LINE__, "SSS",
+			"opening /dev/poll failed (", strerror(errno), "), try to set server.event-handler = \"poll\" or \"select\"");
 
 		return -1;
 	}
 
 	if (fcntl(ev->devpoll_fd, F_SETFD, FD_CLOEXEC) < 0) {
-		fprintf(stderr, "%s.%d: opening /dev/poll failed (%s), try to set server.event-handler = \"poll\" or \"select\"\n",
-			__FILE__, __LINE__, strerror(errno));
+		log_error_write(ev->srv, __FILE__, __LINE__, "SSS",
+			"fcntl /dev/poll fd failed (", strerror(errno), "), try to set server.event-handler = \"poll\" or \"select\"");
 
 		close(ev->devpoll_fd);
 
@@ -131,8 +148,8 @@
 	ev->devpollfds = malloc(sizeof(*ev->devpollfds) * ev->maxfds);
 
 	if ((ev->devpoll_fd = open("/dev/poll", O_RDWR)) < 0) {
-		fprintf(stderr, "%s.%d: opening /dev/poll failed (%s), try to set server.event-handler = \"poll\" or \"select\"\n",
-			__FILE__, __LINE__, strerror(errno));
+		log_error_write(ev->srv, __FILE__, __LINE__, "SSS",
+			"opening /dev/poll failed (", strerror(errno), "), try to set server.event-handler = \"poll\" or \"select\"");
 
 		return -1;
 	}
@@ -149,8 +166,8 @@
 int fdevent_solaris_devpoll_init(fdevents *ev) {
 	UNUSED(ev);
 
-	fprintf(stderr, "%s.%d: solaris-devpoll not supported, try to set server.event-handler = \"poll\" or \"select\"\n",
-			__FILE__, __LINE__);
+	log_error_write(ev->srv, __FILE__, __LINE__, "S",
+		"solaris-devpoll not supported, try to set server.event-handler = \"poll\" or \"select\"");
 
 	return -1;
 }

Modified: lighttpd/trunk/src/http_auth.c
===================================================================
--- lighttpd/trunk/src/http_auth.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/http_auth.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -653,7 +653,6 @@
 		 */
 
 		if (password->used < 13 + 1) {
-			fprintf(stderr, "%s.%d\n", __FILE__, __LINE__);
 			return -1;
 		}
 
@@ -664,7 +663,6 @@
 			char *dollar = NULL;
 
 			if (NULL == (dollar = strchr(password->ptr + 3, '$'))) {
-				fprintf(stderr, "%s.%d\n", __FILE__, __LINE__);
 				return -1;
 			}
 
@@ -672,7 +670,6 @@
 		}
 
 		if (salt_len > sizeof(salt) - 1) {
-			fprintf(stderr, "%s.%d\n", __FILE__, __LINE__);
 			return -1;
 		}
 
@@ -684,8 +681,6 @@
 
 		if (0 == strcmp(password->ptr, crypted)) {
 			return 0;
-		} else {
-			fprintf(stderr, "%s.%d\n", __FILE__, __LINE__);
 		}
 
 #endif
@@ -869,7 +864,7 @@
 		if (AUTH_BACKEND_UNSET == p->conf.auth_backend) {
 			log_error_write(srv, __FILE__, __LINE__, "s", "auth.backend is not set");
 		} else {
-			log_error_write(srv, __FILE__, __LINE__, "s", "get_password failed");
+			log_error_write(srv, __FILE__, __LINE__, "ss", "get_password failed, IP:", inet_ntop_cache_get_ip(srv, &(con->dst_addr)));
 		}
 
 		return 0;
@@ -877,7 +872,7 @@
 
 	/* password doesn't match */
 	if (http_auth_basic_password_compare(srv, p, req, username, realm->value, password, pw)) {
-		log_error_write(srv, __FILE__, __LINE__, "sbbss", "password doesn't match for ", con->uri.path, username, ", IP:", inet_ntop_cache_get_ip(srv, &(con->dst_addr)));
+		log_error_write(srv, __FILE__, __LINE__, "sbsBss", "password doesn't match for", con->uri.path, "username:", username, ", IP:", inet_ntop_cache_get_ip(srv, &(con->dst_addr)));
 
 		buffer_free(username);
 		buffer_free(password);
@@ -1138,7 +1133,7 @@
 				"digest: digest mismatch", a2, respons);
 		}
 
-		log_error_write(srv, __FILE__, __LINE__, "sss",
+		log_error_write(srv, __FILE__, __LINE__, "ssss",
 				"digest: auth failed for ", username, ": wrong password, IP:", inet_ntop_cache_get_ip(srv, &(con->dst_addr)));
 
 		buffer_free(b);

Modified: lighttpd/trunk/src/keyvalue.c
===================================================================
--- lighttpd/trunk/src/keyvalue.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/keyvalue.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -1,5 +1,6 @@
 #include "server.h"
 #include "keyvalue.h"
+#include "log.h"
 
 #include <stdlib.h>
 #include <string.h>
@@ -312,7 +313,7 @@
 	return kvb;
 }
 
-int pcre_keyvalue_buffer_append(pcre_keyvalue_buffer *kvb, const char *key, const char *value) {
+int pcre_keyvalue_buffer_append(server *srv, pcre_keyvalue_buffer *kvb, const char *key, const char *value) {
 #ifdef HAVE_PCRE_H
 	size_t i;
 	const char *errptr;
@@ -346,7 +347,8 @@
 	if (NULL == (kv->key = pcre_compile(key,
 					  0, &errptr, &erroff, NULL))) {
 
-		fprintf(stderr, "%s.%d: rexexp compilation error at %s\n", __FILE__, __LINE__, errptr);
+		log_error_write(srv, __FILE__, __LINE__, "SS",
+			"rexexp compilation error at ", errptr);
 		return -1;
 	}
 

Modified: lighttpd/trunk/src/keyvalue.h
===================================================================
--- lighttpd/trunk/src/keyvalue.h	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/keyvalue.h	2010-08-11 15:14:05 UTC (rev 472)
@@ -9,6 +9,8 @@
 # include <pcre.h>
 #endif
 
+struct server;
+
 typedef enum {
 	HTTP_METHOD_UNSET = -1,
 	HTTP_METHOD_GET,
@@ -102,7 +104,7 @@
 void httpauth_keyvalue_buffer_free(httpauth_keyvalue_buffer *kvb);
 
 pcre_keyvalue_buffer *pcre_keyvalue_buffer_init(void);
-int pcre_keyvalue_buffer_append(pcre_keyvalue_buffer *kvb, const char *key, const char *value);
+int pcre_keyvalue_buffer_append(struct server *srv, pcre_keyvalue_buffer *kvb, const char *key, const char *value);
 void pcre_keyvalue_buffer_free(pcre_keyvalue_buffer *kvb);
 
 #endif

Modified: lighttpd/trunk/src/mod_accesslog.c
===================================================================
--- lighttpd/trunk/src/mod_accesslog.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/mod_accesslog.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -157,49 +157,62 @@
 }
 
 static void accesslog_append_escaped(buffer *dest, buffer *str) {
+	char *ptr, *start, *end;
+
 	/* replaces non-printable chars with \xHH where HH is the hex representation of the byte */
 	/* exceptions: " => \", \ => \\, whitespace chars => \n \t etc. */
 	if (str->used == 0) return;
 	buffer_prepare_append(dest, str->used - 1);
 
-	for (unsigned int i = 0; i < str->used - 1; i++) {
-		if (str->ptr[i] >= ' ' && str->ptr[i] <= '~') {
-			/* printable chars */
-			buffer_append_string_len(dest, &str->ptr[i], 1);
-		} else switch (str->ptr[i]) {
-		case '"':
-			BUFFER_APPEND_STRING_CONST(dest, "\\\"");
-			break;
-		case '\\':
-			BUFFER_APPEND_STRING_CONST(dest, "\\\\");
-			break;
-		case '\b':
-			BUFFER_APPEND_STRING_CONST(dest, "\\b");
-			break;
-		case '\n':
-			BUFFER_APPEND_STRING_CONST(dest, "\\n");
-			break;
-		case '\r':
-			BUFFER_APPEND_STRING_CONST(dest, "\\r");
-			break;
-		case '\t':
-			BUFFER_APPEND_STRING_CONST(dest, "\\t");
-			break;
-		case '\v':
-			BUFFER_APPEND_STRING_CONST(dest, "\\v");
-			break;
-		default: {
-				/* non printable char => \xHH */
-				char hh[5] = {'\\','x',0,0,0};
-				char h = str->ptr[i] / 16;
-				hh[2] = (h > 9) ? (h - 10 + 'A') : (h + '0');
-				h = str->ptr[i] % 16;
-				hh[3] = (h > 9) ? (h - 10 + 'A') : (h + '0');
-				buffer_append_string_len(dest, &hh[0], 4);
+	for (ptr = start = str->ptr, end = str->ptr + str->used - 1; ptr < end; ptr++) {
+		if (*ptr >= ' ' && *ptr <= '~') {
+			/* nothing to change, add later as one block */
+		} else {
+			/* copy previous part */
+			if (start < ptr) {
+				buffer_append_string_len(dest, start, ptr - start);
 			}
-			break;
+			start = ptr + 1;
+
+			switch (*ptr) {
+			case '"':
+				BUFFER_APPEND_STRING_CONST(dest, "\\\"");
+				break;
+			case '\\':
+				BUFFER_APPEND_STRING_CONST(dest, "\\\\");
+				break;
+			case '\b':
+				BUFFER_APPEND_STRING_CONST(dest, "\\b");
+				break;
+			case '\n':
+				BUFFER_APPEND_STRING_CONST(dest, "\\n");
+				break;
+			case '\r':
+				BUFFER_APPEND_STRING_CONST(dest, "\\r");
+				break;
+			case '\t':
+				BUFFER_APPEND_STRING_CONST(dest, "\\t");
+				break;
+			case '\v':
+				BUFFER_APPEND_STRING_CONST(dest, "\\v");
+				break;
+			default: {
+					/* non printable char => \xHH */
+					char hh[5] = {'\\','x',0,0,0};
+					char h = *ptr / 16;
+					hh[2] = (h > 9) ? (h - 10 + 'A') : (h + '0');
+					h = *ptr % 16;
+					hh[3] = (h > 9) ? (h - 10 + 'A') : (h + '0');
+					buffer_append_string_len(dest, &hh[0], 4);
+				}
+				break;
+			}
 		}
 	}
+
+	if (start < end) {
+		buffer_append_string_len(dest, start, end - start);
+	}
 }
 
 static int accesslog_parse_format(server *srv, format_fields *fields, buffer *format) {
@@ -845,7 +858,7 @@
 				break;
 			case FORMAT_SERVER_PORT:
 				{
-					char *colon = strchr(((server_socket*)(con->srv_socket))->srv_token->ptr, ':');
+					char *colon = strrchr(((server_socket*)(con->srv_socket))->srv_token->ptr, ':');
 					if (colon) {
 						buffer_append_string(b, colon+1);
 					} else {

Modified: lighttpd/trunk/src/mod_cgi.c
===================================================================
--- lighttpd/trunk/src/mod_cgi.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/mod_cgi.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -577,6 +577,8 @@
 				connection_set_state(srv, con, CON_STATE_HANDLE_REQUEST);
 				con->http_status = 500;
 				con->mode = DIRECT;
+			} else {
+				con->file_finished = 1;
 			}
 
 			if (WIFEXITED(status)) {
@@ -607,8 +609,7 @@
 }
 
 
-static handler_t cgi_handle_fdevent(void *s, void *ctx, int revents) {
-	server      *srv  = (server *)s;
+static handler_t cgi_handle_fdevent(server *srv, void *ctx, int revents) {
 	handler_ctx *hctx = ctx;
 	connection  *con  = hctx->remote_conn;
 
@@ -635,9 +636,14 @@
 			/* if we get a IN|HUP and have read everything don't exec the close twice */
 			return HANDLER_FINISHED;
 		case FDEVENT_HANDLED_ERROR:
-			connection_set_state(srv, con, CON_STATE_HANDLE_REQUEST);
-			con->http_status = 500;
-			con->mode = DIRECT;
+			/* Send an error if we haven't sent any data yet */
+			if (0 == con->file_started) {
+				connection_set_state(srv, con, CON_STATE_HANDLE_REQUEST);
+				con->http_status = 500;
+				con->mode = DIRECT;
+			} else {
+				con->file_finished = 1;
+			}
 
 			log_error_write(srv, __FILE__, __LINE__, "s", "demuxer failed: ");
 			break;
@@ -1302,6 +1308,11 @@
 	return HANDLER_GO_ON;
 }
 
+/*
+ * - HANDLER_GO_ON : not our job
+ * - HANDLER_FINISHED: got response header
+ * - HANDLER_WAIT_FOR_EVENT: waiting for response header
+ */
 SUBREQUEST_FUNC(mod_cgi_handle_subrequest) {
 	int status;
 	plugin_data *p = p_d;
@@ -1313,7 +1324,13 @@
 #if 0
 	log_error_write(srv, __FILE__, __LINE__, "sdd", "subrequest, pid =", hctx, hctx->pid);
 #endif
-	if (hctx->pid == 0) return HANDLER_FINISHED;
+
+	if (hctx->pid == 0) {
+		/* cgi already dead */
+		if (!con->file_started) return HANDLER_WAIT_FOR_EVENT;
+		return HANDLER_FINISHED;
+	}
+
 #ifndef __WIN32
 	switch(waitpid(hctx->pid, &status, WNOHANG)) {
 	case 0:
@@ -1351,25 +1368,25 @@
 
 		return HANDLER_FINISHED;
 	default:
-		/* cgi process exited cleanly
-		 *
-		 * check if we already got the response
+		/* cgi process exited
 		 */
 
-		if (!con->file_started) return HANDLER_WAIT_FOR_EVENT;
+		hctx->pid = 0;
 
+		/* we already have response headers? just continue */
+		if (con->file_started) return HANDLER_FINISHED;
+
 		if (WIFEXITED(status)) {
-			/* nothing */
-		} else {
-			log_error_write(srv, __FILE__, __LINE__, "s", "cgi died ?");
+			/* clean exit - just continue */
+			return HANDLER_WAIT_FOR_EVENT;
+		}
 
-			con->mode = DIRECT;
-			con->http_status = 500;
+		/* cgi proc died, and we didn't get any data yet - send error message and close cgi con */
+		log_error_write(srv, __FILE__, __LINE__, "s", "cgi died ?");
 
-		}
+		con->http_status = 500;
+		con->mode = DIRECT;
 
-		hctx->pid = 0;
-
 		fdevent_event_del(srv->ev, &(hctx->fde_ndx), hctx->fd);
 		fdevent_unregister(srv->ev, hctx->fd);
 

Modified: lighttpd/trunk/src/mod_dirlisting.c
===================================================================
--- lighttpd/trunk/src/mod_dirlisting.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/mod_dirlisting.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -924,7 +924,7 @@
 	}
 
 	if (HANDLER_ERROR == stat_cache_get_entry(srv, con, con->physical.path, &sce)) {
-		fprintf(stderr, "%s.%d: %s\n", __FILE__, __LINE__, con->physical.path->ptr);
+		log_error_write(srv, __FILE__, __LINE__,  "SB", "stat_cache_get_entry failed: ", con->physical.path);
 		SEGFAULT();
 	}
 

Modified: lighttpd/trunk/src/mod_extforward.c
===================================================================
--- lighttpd/trunk/src/mod_extforward.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/mod_extforward.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -16,6 +16,7 @@
 #include <string.h>
 #include <stdio.h>
 #include <netinet/in.h>
+#include <errno.h>
 
 /**
  * mod_extforward.c for lighttpd, by comman.kang <at> gmail <dot> com
@@ -302,7 +303,7 @@
 	return NULL;
 }
 
-static struct addrinfo *ipstr_to_sockaddr(const char *host) {
+static struct addrinfo *ipstr_to_sockaddr(server *srv, const char *host) {
 	struct addrinfo hints, *res0;
 	int result;
 
@@ -319,17 +320,17 @@
 #endif
 	hints.ai_flags = AI_NUMERICHOST | AI_NUMERICSERV;
 
+	errno = 0;
 	result = getaddrinfo(host, NULL, &hints, &res0);
 
 	if (result != 0) {
-		fprintf(stderr, "could not resolve hostname %s because %s\n", host, gai_strerror(result));
+		log_error_write(srv, __FILE__, __LINE__, "SSSs(S)",
+			"could not resolve hostname ", host, " because ", gai_strerror(result), strerror(errno));
 
-		if (result == EAI_SYSTEM)
-			perror("The system error is ");
-
 		return NULL;
 	} else if (res0 == 0) {
-		fprintf(stderr, "Problem in resolving hostname %s: succeeded, but no information returned\n", host);
+		log_error_write(srv, __FILE__, __LINE__, "SSS",
+			"Problem in resolving hostname ", host, ": succeeded, but no information returned");
 	}
 
 	return res0;
@@ -424,7 +425,7 @@
  			log_error_write(srv, __FILE__, __LINE__, "ss", "using address:", real_remote_addr);
 		}
 #ifdef HAVE_IPV6
-		addrlist = ipstr_to_sockaddr(real_remote_addr);
+		addrlist = ipstr_to_sockaddr(srv, real_remote_addr);
 		sock.plain.sa_family = AF_UNSPEC;
 		for (addrs_left = addrlist; addrs_left != NULL; addrs_left = addrs_left -> ai_next) {
 			sock.plain.sa_family = addrs_left->ai_family;

Modified: lighttpd/trunk/src/mod_fastcgi.c
===================================================================
--- lighttpd/trunk/src/mod_fastcgi.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/mod_fastcgi.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -302,7 +302,7 @@
 
 	array *ext_mapping;
 
-	int debug;
+	unsigned int debug;
 } plugin_config;
 
 typedef struct {
@@ -370,7 +370,7 @@
 
 
 /* ok, we need a prototype */
-static handler_t fcgi_handle_fdevent(void *s, void *ctx, int revents);
+static handler_t fcgi_handle_fdevent(server *srv, void *ctx, int revents);
 
 static void reset_signals(void) {
 #ifdef SIGTTOU
@@ -1166,7 +1166,7 @@
 
 	config_values_t cv[] = {
 		{ "fastcgi.server",              NULL, T_CONFIG_LOCAL, T_CONFIG_SCOPE_CONNECTION },       /* 0 */
-		{ "fastcgi.debug",               NULL, T_CONFIG_SHORT, T_CONFIG_SCOPE_CONNECTION },       /* 1 */
+		{ "fastcgi.debug",               NULL, T_CONFIG_INT  , T_CONFIG_SCOPE_CONNECTION },       /* 1 */
 		{ "fastcgi.map-extensions",      NULL, T_CONFIG_ARRAY, T_CONFIG_SCOPE_CONNECTION },       /* 2 */
 		{ NULL,                          NULL, T_CONFIG_UNSET, T_CONFIG_SCOPE_UNSET }
 	};
@@ -2195,20 +2195,6 @@
 
 	hctx->wb->bytes_in += sizeof(header);
 
-#if 0
-	for (i = 0; i < hctx->write_buffer->used; i++) {
-		fprintf(stderr, "%02x ", hctx->write_buffer->ptr[i]);
-		if ((i+1) % 16 == 0) {
-			size_t j;
-			for (j = i-15; j <= i; j++) {
-				fprintf(stderr, "%c",
-					isprint((unsigned char)hctx->write_buffer->ptr[j]) ? hctx->write_buffer->ptr[j] : '.');
-			}
-			fprintf(stderr, "\n");
-		}
-	}
-#endif
-
 	return 0;
 }
 
@@ -2680,6 +2666,10 @@
 						log_error_write(srv, __FILE__, __LINE__, "sb",
 							"send-file error: couldn't get stat_cache entry for:",
 							ds->value);
+						con->http_status = 502;
+						hctx->send_content_body = 0;
+						con->file_started = 1;
+						break;
 					}
 				}
 
@@ -3261,8 +3251,7 @@
 	}
 }
 
-static handler_t fcgi_handle_fdevent(void *s, void *ctx, int revents) {
-	server      *srv  = (server *)s;
+static handler_t fcgi_handle_fdevent(server *srv, void *ctx, int revents) {
 	handler_ctx *hctx = ctx;
 	connection  *con  = hctx->remote_conn;
 	plugin_data *p    = hctx->plugin_data;

Modified: lighttpd/trunk/src/mod_proxy.c
===================================================================
--- lighttpd/trunk/src/mod_proxy.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/mod_proxy.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -112,7 +112,7 @@
 
 
 /* ok, we need a prototype */
-static handler_t proxy_handle_fdevent(void *s, void *ctx, int revents);
+static handler_t proxy_handle_fdevent(server *srv, void *ctx, int revents);
 
 static handler_ctx * handler_ctx_init() {
 	handler_ctx * hctx;
@@ -960,7 +960,7 @@
 
 		return HANDLER_WAIT_FOR_FD;
 	case HANDLER_WAIT_FOR_EVENT:
-		return HANDLER_WAIT_FOR_EVENT;
+		break;
 	case HANDLER_WAIT_FOR_FD:
 		return HANDLER_WAIT_FOR_FD;
 	default:
@@ -974,8 +974,7 @@
 	}
 }
 
-static handler_t proxy_handle_fdevent(void *s, void *ctx, int revents) {
-	server      *srv  = (server *)s;
+static handler_t proxy_handle_fdevent(server *srv, void *ctx, int revents) {
 	handler_ctx *hctx = ctx;
 	connection  *con  = hctx->remote_conn;
 	plugin_data *p    = hctx->plugin_data;

Modified: lighttpd/trunk/src/mod_redirect.c
===================================================================
--- lighttpd/trunk/src/mod_redirect.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/mod_redirect.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -118,7 +118,7 @@
 				return HANDLER_ERROR;
 			}
 
-			if (0 != pcre_keyvalue_buffer_append(s->redirect,
+			if (0 != pcre_keyvalue_buffer_append(srv, s->redirect,
 							     ((data_string *)(da->value->data[j]))->key->ptr,
 							     ((data_string *)(da->value->data[j]))->value->ptr)) {
 

Modified: lighttpd/trunk/src/mod_scgi.c
===================================================================
--- lighttpd/trunk/src/mod_scgi.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/mod_scgi.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -328,7 +328,7 @@
 
 
 /* ok, we need a prototype */
-static handler_t scgi_handle_fdevent(void *s, void *ctx, int revents);
+static handler_t scgi_handle_fdevent(server *srv, void *ctx, int revents);
 
 int scgi_proclist_sort_down(server *srv, scgi_extension_host *host, scgi_proc *proc);
 
@@ -1676,20 +1676,6 @@
 		}
 	}
 
-#if 0
-	for (i = 0; i < hctx->write_buffer->used; i++) {
-		fprintf(stderr, "%02x ", hctx->write_buffer->ptr[i]);
-		if ((i+1) % 16 == 0) {
-			size_t j;
-			for (j = i-15; j <= i; j++) {
-				fprintf(stderr, "%c",
-					isprint((unsigned char)hctx->write_buffer->ptr[j]) ? hctx->write_buffer->ptr[j] : '.');
-			}
-			fprintf(stderr, "\n");
-		}
-	}
-#endif
-
 	return 0;
 }
 
@@ -2494,8 +2480,7 @@
 }
 
 
-static handler_t scgi_handle_fdevent(void *s, void *ctx, int revents) {
-	server      *srv  = (server *)s;
+static handler_t scgi_handle_fdevent(server *srv, void *ctx, int revents) {
 	handler_ctx *hctx = ctx;
 	connection  *con  = hctx->remote_conn;
 	plugin_data *p    = hctx->plugin_data;

Modified: lighttpd/trunk/src/mod_ssi_exprparser.c
===================================================================
--- lighttpd/trunk/src/mod_ssi_exprparser.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/mod_ssi_exprparser.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -4,7 +4,7 @@
 /* First off, code is include which follows the "include" declaration
 ** in the input file. */
 #include <stdio.h>
-#line 6 "../../src/mod_ssi_exprparser.y"
+#line 6 "./mod_ssi_exprparser.y"
 
 #include "mod_ssi_expr.h"
 #include "buffer.h"
@@ -347,7 +347,7 @@
     case 10:
     case 11:
     case 12:
-#line 22 "../../src/mod_ssi_exprparser.y"
+#line 22 "./mod_ssi_exprparser.y"
 { buffer_free((yypminor->yy0)); }
 #line 352 "mod_ssi_exprparser.c"
       break;
@@ -578,7 +578,7 @@
   **     break;
   */
       case 0:
-#line 29 "../../src/mod_ssi_exprparser.y"
+#line 29 "./mod_ssi_exprparser.y"
 {
   ctx->val.bo = ssi_val_tobool(yymsp[0].minor.yy29);
   ctx->val.type = SSI_TYPE_BOOL;
@@ -588,7 +588,7 @@
 #line 588 "mod_ssi_exprparser.c"
         break;
       case 1:
-#line 36 "../../src/mod_ssi_exprparser.y"
+#line 36 "./mod_ssi_exprparser.y"
 {
   int cmp;
 
@@ -617,14 +617,14 @@
 #line 617 "mod_ssi_exprparser.c"
         break;
       case 2:
-#line 61 "../../src/mod_ssi_exprparser.y"
+#line 61 "./mod_ssi_exprparser.y"
 {
   yygotominor.yy29 = yymsp[0].minor.yy29;
 }
 #line 624 "mod_ssi_exprparser.c"
         break;
       case 3:
-#line 64 "../../src/mod_ssi_exprparser.y"
+#line 64 "./mod_ssi_exprparser.y"
 {
   int e;
 
@@ -639,7 +639,7 @@
   yy_destructor(1,&yymsp[-1].minor);
         break;
       case 4:
-#line 75 "../../src/mod_ssi_exprparser.y"
+#line 75 "./mod_ssi_exprparser.y"
 {
   int e;
 
@@ -654,7 +654,7 @@
   yy_destructor(2,&yymsp[-1].minor);
         break;
       case 5:
-#line 86 "../../src/mod_ssi_exprparser.y"
+#line 86 "./mod_ssi_exprparser.y"
 {
   int e;
 
@@ -668,7 +668,7 @@
   yy_destructor(9,&yymsp[-1].minor);
         break;
       case 6:
-#line 95 "../../src/mod_ssi_exprparser.y"
+#line 95 "./mod_ssi_exprparser.y"
 {
   yygotominor.yy29 = yymsp[-1].minor.yy29;
 }
@@ -677,7 +677,7 @@
   yy_destructor(11,&yymsp[0].minor);
         break;
       case 7:
-#line 99 "../../src/mod_ssi_exprparser.y"
+#line 99 "./mod_ssi_exprparser.y"
 {
   yygotominor.yy29 = ssi_val_init();
   yygotominor.yy29->str = yymsp[0].minor.yy19;
@@ -686,14 +686,14 @@
 #line 686 "mod_ssi_exprparser.c"
         break;
       case 8:
-#line 105 "../../src/mod_ssi_exprparser.y"
+#line 105 "./mod_ssi_exprparser.y"
 {
   yygotominor.yy19 = yymsp[0].minor.yy0;
 }
 #line 693 "mod_ssi_exprparser.c"
         break;
       case 9:
-#line 109 "../../src/mod_ssi_exprparser.y"
+#line 109 "./mod_ssi_exprparser.y"
 {
   yygotominor.yy19 = yymsp[-1].minor.yy19;
   buffer_append_string_buffer(yygotominor.yy19, yymsp[0].minor.yy0);
@@ -702,37 +702,37 @@
 #line 702 "mod_ssi_exprparser.c"
         break;
       case 10:
-#line 115 "../../src/mod_ssi_exprparser.y"
+#line 115 "./mod_ssi_exprparser.y"
 { yygotominor.yy8 = SSI_COND_EQ; }
 #line 707 "mod_ssi_exprparser.c"
   yy_destructor(3,&yymsp[0].minor);
         break;
       case 11:
-#line 116 "../../src/mod_ssi_exprparser.y"
+#line 116 "./mod_ssi_exprparser.y"
 { yygotominor.yy8 = SSI_COND_NE; }
 #line 713 "mod_ssi_exprparser.c"
   yy_destructor(4,&yymsp[0].minor);
         break;
       case 12:
-#line 117 "../../src/mod_ssi_exprparser.y"
+#line 117 "./mod_ssi_exprparser.y"
 { yygotominor.yy8 = SSI_COND_LE; }
 #line 719 "mod_ssi_exprparser.c"
   yy_destructor(8,&yymsp[0].minor);
         break;
       case 13:
-#line 118 "../../src/mod_ssi_exprparser.y"
+#line 118 "./mod_ssi_exprparser.y"
 { yygotominor.yy8 = SSI_COND_GE; }
 #line 725 "mod_ssi_exprparser.c"
   yy_destructor(6,&yymsp[0].minor);
         break;
       case 14:
-#line 119 "../../src/mod_ssi_exprparser.y"
+#line 119 "./mod_ssi_exprparser.y"
 { yygotominor.yy8 = SSI_COND_LT; }
 #line 731 "mod_ssi_exprparser.c"
   yy_destructor(7,&yymsp[0].minor);
         break;
       case 15:
-#line 120 "../../src/mod_ssi_exprparser.y"
+#line 120 "./mod_ssi_exprparser.y"
 { yygotominor.yy8 = SSI_COND_GT; }
 #line 737 "mod_ssi_exprparser.c"
   yy_destructor(5,&yymsp[0].minor);
@@ -764,7 +764,7 @@
   while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
   /* Here code is inserted which will be executed whenever the
   ** parser fails */
-#line 14 "../../src/mod_ssi_exprparser.y"
+#line 14 "./mod_ssi_exprparser.y"
 
   ctx->ok = 0;
 

Modified: lighttpd/trunk/src/mod_staticfile.c
===================================================================
--- lighttpd/trunk/src/mod_staticfile.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/mod_staticfile.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -385,6 +385,9 @@
 		if (ds->value->used == 0) continue;
 
 		if (buffer_is_equal_right_len(con->physical.path, ds->value, ds->value->used - 1)) {
+			if (con->conf.log_request_handling) {
+				log_error_write(srv, __FILE__, __LINE__,  "s",  "-- NOT handling file as static file, extension forbidden");
+			}
 			return HANDLER_GO_ON;
 		}
 	}

Modified: lighttpd/trunk/src/mod_status.c
===================================================================
--- lighttpd/trunk/src/mod_status.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/mod_status.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -299,7 +299,7 @@
 
 
 	/* connection listing */
-	buffer_append_string_len(b, CONST_STR_LEN("<h1>Server-Status</h1>"));
+	buffer_append_string_len(b, CONST_STR_LEN("<h1>Server-Status (" PACKAGE_NAME " " PACKAGE_VERSION ")</h1>"));
 
 	buffer_append_string_len(b, CONST_STR_LEN("<table summary=\"status\" class=\"status\">"));
 	buffer_append_string_len(b, CONST_STR_LEN("<tr><td>Hostname</td><td class=\"string\">"));
@@ -676,22 +676,21 @@
 
 	struct ev_map { fdevent_handler_t et; const char *name; } event_handlers[] =
 	{
-		/* - poll is most reliable
+		/* - epoll is most reliable
 		 * - select works everywhere
-		 * - linux-* are experimental
 		 */
+#ifdef USE_LINUX_EPOLL
+		{ FDEVENT_HANDLER_LINUX_SYSEPOLL, "linux-sysepoll" },
+#endif
 #ifdef USE_POLL
 		{ FDEVENT_HANDLER_POLL,           "poll" },
 #endif
 #ifdef USE_SELECT
 		{ FDEVENT_HANDLER_SELECT,         "select" },
 #endif
-#ifdef USE_LINUX_EPOLL
-		{ FDEVENT_HANDLER_LINUX_SYSEPOLL, "linux-sysepoll" },
+#ifdef USE_LIBEV
+		{ FDEVENT_HANDLER_LIBEV,          "libev" },
 #endif
-#ifdef USE_LINUX_SIGIO
-		{ FDEVENT_HANDLER_LINUX_RTSIG,    "linux-rtsig" },
-#endif
 #ifdef USE_SOLARIS_DEVPOLL
 		{ FDEVENT_HANDLER_SOLARIS_DEVPOLL,"solaris-devpoll" },
 #endif

Modified: lighttpd/trunk/src/network.c
===================================================================
--- lighttpd/trunk/src/network.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/network.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -27,15 +27,14 @@
 # include <openssl/rand.h>
 #endif
 
-static handler_t network_server_handle_fdevent(void *s, void *context, int revents) {
-	server     *srv = (server *)s;
+static handler_t network_server_handle_fdevent(server *srv, void *context, int revents) {
 	server_socket *srv_socket = (server_socket *)context;
 	connection *con;
 	int loops = 0;
 
 	UNUSED(context);
 
-	if (revents != FDEVENT_IN) {
+	if (0 == (revents & FDEVENT_IN)) {
 		log_error_write(srv, __FILE__, __LINE__, "sdd",
 				"strange event for server socket",
 				srv_socket->fd,
@@ -226,7 +225,7 @@
 
 	val = 1;
 	if (setsockopt(srv_socket->fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)) < 0) {
-		log_error_write(srv, __FILE__, __LINE__, "ss", "socketsockopt failed:", strerror(errno));
+		log_error_write(srv, __FILE__, __LINE__, "ss", "socketsockopt(SO_REUSEADDR) failed:", strerror(errno));
 		goto error_free_socket;
 	}
 
@@ -237,10 +236,21 @@
 		srv_socket->addr.ipv6.sin6_family = AF_INET6;
 		if (host == NULL) {
 			srv_socket->addr.ipv6.sin6_addr = in6addr_any;
+			log_error_write(srv, __FILE__, __LINE__, "s", "warning: please use server.use-ipv6 only for hostnames, not without server.bind / empty address; your config will break if the kernel default for IPV6_V6ONLY changes");
 		} else {
 			struct addrinfo hints, *res;
 			int r;
 
+			if (s->set_v6only) {
+				val = 1;
+				if (-1 == setsockopt(srv_socket->fd, IPPROTO_IPV6, IPV6_V6ONLY, &val, sizeof(val))) {
+					log_error_write(srv, __FILE__, __LINE__, "ss", "socketsockopt(IPV6_V6ONLY) failed:", strerror(errno));
+					goto error_free_socket;
+				}
+			} else {
+				log_error_write(srv, __FILE__, __LINE__, "s", "warning: server.set-v6only will be removed soon, update your config to have different sockets for ipv4 and ipv6");
+			}
+
 			memset(&hints, 0, sizeof(hints));
 
 			hints.ai_family   = AF_INET6;

Modified: lighttpd/trunk/src/plugin.c
===================================================================
--- lighttpd/trunk/src/plugin.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/plugin.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -120,12 +120,19 @@
 	plugin *p;
 	int (*init)(plugin *pl);
 	const char *error;
-	size_t i;
+	size_t i, j;
 
 	for (i = 0; i < srv->srvconf.modules->used; i++) {
 		data_string *d = (data_string *)srv->srvconf.modules->data[i];
 		char *modules = d->value->ptr;
 
+		for (j = 0; j < i; j++) {
+			if (buffer_is_equal(d->value, ((data_string *) srv->srvconf.modules->data[j])->value)) {
+				log_error_write(srv, __FILE__, __LINE__, "sbs", "Cannot load plugin", d->value, "more than once");
+				return -1;
+			}
+		}
+
 		buffer_copy_string_buffer(srv->tmp_buf, srv->srvconf.modules_dir);
 
 		buffer_append_string_len(srv->tmp_buf, CONST_STR_LEN("/"));

Modified: lighttpd/trunk/src/server.c
===================================================================
--- lighttpd/trunk/src/server.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/server.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -213,7 +213,9 @@
 
 	if ((NULL != (frandom = fopen("/dev/urandom", "rb")) || NULL != (frandom = fopen("/dev/random", "rb")))
 	            && 1 == fread(srv->entropy, sizeof(srv->entropy), 1, frandom)) {
-		srand(*(unsigned int*)srv->entropy);
+		unsigned int e;
+		memcpy(&e, srv->entropy, sizeof(e) < sizeof(srv->entropy) ? sizeof(e) : sizeof(srv->entropy));
+		srand(e);
 		srv->is_real_entropy = 1;
 	} else {
 		unsigned int j;
@@ -394,6 +396,11 @@
 #else
       "\t- kqueue (FreeBSD)\n"
 #endif
+#ifdef USE_LIBEV
+      "\t+ libev (generic)\n"
+#else
+      "\t- libev (generic)\n"
+#endif
       "\nNetwork handler:\n\n"
 #if defined(USE_LINUX_SENDFILE) || defined(USE_FREEBSD_SENDFILE) || defined(USE_SOLARIS_SENDFILEV) || defined(USE_AIX_SENDFILE)
       "\t+ sendfile\n"
@@ -1101,7 +1108,7 @@
 	}
 #endif
 
-	if (NULL == (srv->ev = fdevent_init(srv->max_fds + 1, srv->event_handler))) {
+	if (NULL == (srv->ev = fdevent_init(srv, srv->max_fds + 1, srv->event_handler))) {
 		log_error_write(srv, __FILE__, __LINE__,
 				"s", "fdevent_init failed");
 		return -1;
@@ -1433,6 +1440,8 @@
 				handler_t r;
 
 				fd_ndx  = fdevent_event_next_fdndx (srv->ev, fd_ndx);
+				if (-1 == fd_ndx) break; /* not all fdevent handlers know how many fds got an event */
+
 				revents = fdevent_event_get_revent (srv->ev, fd_ndx);
 				fd      = fdevent_event_get_fd     (srv->ev, fd_ndx);
 				handler = fdevent_get_handler(srv->ev, fd);

Modified: lighttpd/trunk/src/stat_cache.c
===================================================================
--- lighttpd/trunk/src/stat_cache.c	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/stat_cache.c	2010-08-11 15:14:05 UTC (rev 472)
@@ -238,9 +238,8 @@
 }
 
 #ifdef HAVE_FAM_H
-handler_t stat_cache_handle_fdevent(void *_srv, void *_fce, int revent) {
+handler_t stat_cache_handle_fdevent(server *srv, void *_fce, int revent) {
 	size_t i;
-	server *srv = _srv;
 	stat_cache *sc = srv->stat_cache;
 	size_t events;
 
@@ -433,7 +432,8 @@
 	} else {
 #ifdef DEBUG_STAT_CACHE
 		if (i != ctrl.used) {
-			fprintf(stderr, "%s.%d: %08x was already inserted but not found in cache, %s\n", __FILE__, __LINE__, file_ndx, name->ptr);
+			log_error_write(srv, __FILE__, __LINE__, "xSB",
+				file_ndx, "was already inserted but not found in cache, ", name);
 		}
 		assert(i == ctrl.used);
 #endif

Modified: lighttpd/trunk/src/stat_cache.h
===================================================================
--- lighttpd/trunk/src/stat_cache.h	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/src/stat_cache.h	2010-08-11 15:14:05 UTC (rev 472)
@@ -7,7 +7,7 @@
 void stat_cache_free(stat_cache *fc);
 
 handler_t stat_cache_get_entry(server *srv, connection *con, buffer *name, stat_cache_entry **fce);
-handler_t stat_cache_handle_fdevent(void *_srv, void *_fce, int revent);
+handler_t stat_cache_handle_fdevent(server *srv, void *_fce, int revent);
 
 int stat_cache_trigger_cleanup(server *srv);
 #endif

Modified: lighttpd/trunk/tests/Makefile.in
===================================================================
--- lighttpd/trunk/tests/Makefile.in	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/tests/Makefile.in	2010-08-11 15:14:05 UTC (rev 472)
@@ -174,6 +174,8 @@
 LD = @LD@
 LDAP_LIB = @LDAP_LIB@
 LDFLAGS = @LDFLAGS@
+LIBEV_CFLAGS = @LIBEV_CFLAGS@
+LIBEV_LIBS = @LIBEV_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -205,6 +207,8 @@
 PCRECONFIG = @PCRECONFIG@
 PCRE_LIB = @PCRE_LIB@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 RANLIB = @RANLIB@
 SED = @SED@
 SENDFILE_LIB = @SENDFILE_LIB@

Modified: lighttpd/trunk/tests/docroot/123/Makefile.in
===================================================================
--- lighttpd/trunk/tests/docroot/123/Makefile.in	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/tests/docroot/123/Makefile.in	2010-08-11 15:14:05 UTC (rev 472)
@@ -97,6 +97,8 @@
 LD = @LD@
 LDAP_LIB = @LDAP_LIB@
 LDFLAGS = @LDFLAGS@
+LIBEV_CFLAGS = @LIBEV_CFLAGS@
+LIBEV_LIBS = @LIBEV_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -128,6 +130,8 @@
 PCRECONFIG = @PCRECONFIG@
 PCRE_LIB = @PCRE_LIB@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 RANLIB = @RANLIB@
 SED = @SED@
 SENDFILE_LIB = @SENDFILE_LIB@

Modified: lighttpd/trunk/tests/docroot/Makefile.in
===================================================================
--- lighttpd/trunk/tests/docroot/Makefile.in	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/tests/docroot/Makefile.in	2010-08-11 15:14:05 UTC (rev 472)
@@ -137,6 +137,8 @@
 LD = @LD@
 LDAP_LIB = @LDAP_LIB@
 LDFLAGS = @LDFLAGS@
+LIBEV_CFLAGS = @LIBEV_CFLAGS@
+LIBEV_LIBS = @LIBEV_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -168,6 +170,8 @@
 PCRECONFIG = @PCRECONFIG@
 PCRE_LIB = @PCRE_LIB@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 RANLIB = @RANLIB@
 SED = @SED@
 SENDFILE_LIB = @SENDFILE_LIB@

Modified: lighttpd/trunk/tests/docroot/www/Makefile.in
===================================================================
--- lighttpd/trunk/tests/docroot/www/Makefile.in	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/tests/docroot/www/Makefile.in	2010-08-11 15:14:05 UTC (rev 472)
@@ -137,6 +137,8 @@
 LD = @LD@
 LDAP_LIB = @LDAP_LIB@
 LDFLAGS = @LDFLAGS@
+LIBEV_CFLAGS = @LIBEV_CFLAGS@
+LIBEV_LIBS = @LIBEV_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -168,6 +170,8 @@
 PCRECONFIG = @PCRECONFIG@
 PCRE_LIB = @PCRE_LIB@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 RANLIB = @RANLIB@
 SED = @SED@
 SENDFILE_LIB = @SENDFILE_LIB@

Modified: lighttpd/trunk/tests/docroot/www/expire/Makefile.in
===================================================================
--- lighttpd/trunk/tests/docroot/www/expire/Makefile.in	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/tests/docroot/www/expire/Makefile.in	2010-08-11 15:14:05 UTC (rev 472)
@@ -97,6 +97,8 @@
 LD = @LD@
 LDAP_LIB = @LDAP_LIB@
 LDFLAGS = @LDFLAGS@
+LIBEV_CFLAGS = @LIBEV_CFLAGS@
+LIBEV_LIBS = @LIBEV_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -128,6 +130,8 @@
 PCRECONFIG = @PCRECONFIG@
 PCRE_LIB = @PCRE_LIB@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 RANLIB = @RANLIB@
 SED = @SED@
 SENDFILE_LIB = @SENDFILE_LIB@

Modified: lighttpd/trunk/tests/docroot/www/go/Makefile.in
===================================================================
--- lighttpd/trunk/tests/docroot/www/go/Makefile.in	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/tests/docroot/www/go/Makefile.in	2010-08-11 15:14:05 UTC (rev 472)
@@ -97,6 +97,8 @@
 LD = @LD@
 LDAP_LIB = @LDAP_LIB@
 LDFLAGS = @LDFLAGS@
+LIBEV_CFLAGS = @LIBEV_CFLAGS@
+LIBEV_LIBS = @LIBEV_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -128,6 +130,8 @@
 PCRECONFIG = @PCRECONFIG@
 PCRE_LIB = @PCRE_LIB@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 RANLIB = @RANLIB@
 SED = @SED@
 SENDFILE_LIB = @SENDFILE_LIB@

Modified: lighttpd/trunk/tests/docroot/www/indexfile/Makefile.in
===================================================================
--- lighttpd/trunk/tests/docroot/www/indexfile/Makefile.in	2010-08-11 15:10:44 UTC (rev 471)
+++ lighttpd/trunk/tests/docroot/www/indexfile/Makefile.in	2010-08-11 15:14:05 UTC (rev 472)
@@ -97,6 +97,8 @@
 LD = @LD@
 LDAP_LIB = @LDAP_LIB@
 LDFLAGS = @LDFLAGS@
+LIBEV_CFLAGS = @LIBEV_CFLAGS@
+LIBEV_LIBS = @LIBEV_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -128,6 +130,8 @@
 PCRECONFIG = @PCRECONFIG@
 PCRE_LIB = @PCRE_LIB@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 RANLIB = @RANLIB@
 SED = @SED@
 SENDFILE_LIB = @SENDFILE_LIB@




More information about the pkg-lighttpd-maintainers mailing list