summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArno Töll <arno@debian.org>2012-11-21 23:03:38 +0100
committerArno Töll <arno@debian.org>2012-11-21 23:03:38 +0100
commit19e84cab62acb124d75fd8e6b8da00c00f5d26b3 (patch)
treebe5044969e950f055fb6ac97eeda44a2f356e143
parent0e7d1e864fb7bc92f3bbab4a9a0f154ad00fd76e (diff)
downloadlighttpd-19e84cab62acb124d75fd8e6b8da00c00f5d26b3.tar.gz
Imported Upstream version 1.4.12~20060901upstream/1.4.12_20060901
-rw-r--r--Makefile.in5
-rw-r--r--NEWS8
-rw-r--r--aclocal.m4191
-rwxr-xr-xcompile145
-rwxr-xr-xconfig.guess617
-rwxr-xr-xconfig.sub185
-rwxr-xr-xconfigure872
-rw-r--r--configure.in2
-rw-r--r--cygwin/Makefile.in3
-rw-r--r--cygwin/lighttpd.README10
-rwxr-xr-xdepcomp125
-rw-r--r--doc/Makefile.in3
-rwxr-xr-xinstall-sh477
-rw-r--r--lighttpd.spec2
-rwxr-xr-xmissing139
-rwxr-xr-xmkinstalldirs111
-rw-r--r--openwrt/Makefile.in3
-rw-r--r--openwrt/control4
-rw-r--r--openwrt/lighttpd.mk2
-rw-r--r--src/Makefile.in3
-rw-r--r--src/base.h1
-rw-r--r--src/buffer.c12
-rw-r--r--src/connections.c34
-rw-r--r--src/mod_webdav.c1133
-rw-r--r--src/network.c3
-rw-r--r--src/network_openssl.c2
-rw-r--r--tests/Makefile.in3
-rw-r--r--tests/docroot/123/Makefile.in3
-rw-r--r--tests/docroot/Makefile.in3
-rw-r--r--tests/docroot/www/Makefile.in3
-rw-r--r--tests/docroot/www/expire/Makefile.in3
-rw-r--r--tests/docroot/www/go/Makefile.in3
-rw-r--r--tests/docroot/www/indexfile/Makefile.in3
33 files changed, 2500 insertions, 1613 deletions
diff --git a/Makefile.in b/Makefile.in
index 33e3307..8eea902 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -41,7 +41,7 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/distribute.sh.in $(srcdir)/lighttpd.spec.in \
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
compile config.guess config.sub depcomp install-sh ltmain.sh \
- missing mkinstalldirs
+ missing
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
@@ -49,7 +49,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno configure.status.lineno
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = lighttpd.spec distribute.sh
SOURCES =
@@ -169,6 +169,7 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
diff --git a/NEWS b/NEWS
index 5c03cf9..c44f662 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,14 @@
NEWS
====
+- 1.4.12 -
+
+ * added experimental LOCK support for webdav
+ * added Content-Range support for PUT in webdav
+ * fixed upload hangs with SSL
+ * fixed connection drops with SSL (aka bad retry)
+ * fixed path traversal with \ on cygwin
+
- 1.4.11 - 2006-03-09
* added ability to specify which ip address spawn-fci listens on
diff --git a/aclocal.m4 b/aclocal.m4
index b2f7550..72ac788 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -6171,63 +6171,162 @@ SED=$lt_cv_path_SED
AC_MSG_RESULT([$SED])
])
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+#
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
-dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
-dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
-dnl also defines GSTUFF_PKG_ERRORS on error
-AC_DEFUN([PKG_CHECK_MODULES], [
- succeeded=no
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+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
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
- if test -z "$PKG_CONFIG"; then
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
- fi
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# 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
+# --------------------------------------------------------------
+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_ifvaln([$3], [else
+ $3])dnl
+fi])
- if test "$PKG_CONFIG" = "no" ; then
- echo "*** The pkg-config script could not be found. Make sure it is"
- echo "*** in your path, or set the PKG_CONFIG environment variable"
- echo "*** to the full path to pkg-config."
- echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
- else
- PKG_CONFIG_MIN_VERSION=0.9.0
- if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
- AC_MSG_CHECKING(for $2)
- if $PKG_CONFIG --exists "$2" ; then
- AC_MSG_RESULT(yes)
- succeeded=yes
+# _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
+fi[]dnl
+])# _PKG_CONFIG
- AC_MSG_CHECKING($1_CFLAGS)
- $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
- AC_MSG_RESULT($$1_CFLAGS)
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
- AC_MSG_CHECKING($1_LIBS)
- $1_LIBS=`$PKG_CONFIG --libs "$2"`
- AC_MSG_RESULT($$1_LIBS)
- else
- $1_CFLAGS=""
- $1_LIBS=""
- ## If we have a custom action on failure, don't print errors, but
- ## do set a variable so people can do so.
- $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
- ifelse([$4], ,echo $$1_PKG_ERRORS,)
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ _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"`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
- AC_SUBST($1_CFLAGS)
- AC_SUBST($1_LIBS)
- else
- echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
- echo "*** See http://www.freedesktop.org/software/pkgconfig"
- fi
- fi
+ ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
- if test $succeeded = yes; then
- ifelse([$3], , :, [$3])
- else
- ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
- fi
-])
+$$1_PKG_ERRORS
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+_PKG_TEXT
+])],
+ [$4])
+elif test $pkg_failed = untried; then
+ ifelse([$4], , [AC_MSG_FAILURE(dnl
+[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://www.freedesktop.org/software/pkgconfig>.])],
+ [$4])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
#
diff --git a/compile b/compile
index 9bb997a..ad57e2f 100755
--- a/compile
+++ b/compile
@@ -1,8 +1,9 @@
#! /bin/sh
-
# Wrapper for compilers which do not understand `-c -o'.
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+scriptversion=2005-02-03.08
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
@@ -24,76 +25,118 @@
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
-# Usage:
-# compile PROGRAM [ARGS]...
-# `-o FOO.o' is removed from the args passed to the actual compile.
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
-prog=$1
-shift
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit $?
+ ;;
+esac
ofile=
cfile=
-args=
-while test $# -gt 0; do
- case "$1" in
- -o)
- # configure might choose to run compile as `compile cc -o foo foo.c'.
- # So we do something ugly here.
- ofile=$2
- shift
- case "$ofile" in
- *.o | *.obj)
- ;;
- *)
- args="$args -o $ofile"
- ofile=
- ;;
- esac
- ;;
- *.c)
- cfile=$1
- args="$args $1"
- ;;
- *)
- args="$args $1"
- ;;
- esac
- shift
+eat=
+
+for arg
+do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as `compile cc -o foo foo.c'.
+ # So we strip `-o arg' only if arg is an object.
+ eat=1
+ case $2 in
+ *.o | *.obj)
+ ofile=$2
+ ;;
+ *)
+ set x "$@" -o "$2"
+ shift
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ set x "$@" "$1"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
done
if test -z "$ofile" || test -z "$cfile"; then
- # If no `-o' option was seen then we might have been invoked from a
- # pattern rule where we don't need one. That is ok -- this is a
- # normal compilation that the losing compiler can handle. If no
- # `.c' file was seen then we are probably linking. That is also
- # ok.
- exec "$prog" $args
+ # If no `-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # `.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$@"
fi
# Name of file we expect compiler to create.
-cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
# Create the lock directory.
# Note: use `[/.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
-lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d
+lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
while true; do
- if mkdir $lockdir > /dev/null 2>&1; then
- break
- fi
- sleep 1
+ if mkdir "$lockdir" >/dev/null 2>&1; then
+ break
+ fi
+ sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
-trap "rmdir $lockdir; exit 1" 1 2 15
+trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
-"$prog" $args
-status=$?
+"$@"
+ret=$?
if test -f "$cofile"; then
- mv "$cofile" "$ofile"
+ mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+ mv "${cofile}bj" "$ofile"
fi
-rmdir $lockdir
-exit $status
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/config.guess b/config.guess
index ad5281e..2fc3acc 100755
--- a/config.guess
+++ b/config.guess
@@ -1,9 +1,9 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-timestamp='2005-08-03'
+timestamp='2003-06-17'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -17,15 +17,13 @@ timestamp='2005-08-03'
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
-
# Originally written by Per Bothner <per@bothner.com>.
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
@@ -55,7 +53,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@@ -68,11 +66,11 @@ Try \`$me --help' for more information."
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
+ echo "$timestamp" ; exit 0 ;;
--version | -v )
- echo "$version" ; exit ;;
+ echo "$version" ; exit 0 ;;
--help | --h* | -h )
- echo "$usage"; exit ;;
+ echo "$usage"; exit 0 ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
@@ -125,7 +123,7 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
+esac ;'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
@@ -138,6 +136,13 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+## for Red Hat Linux
+if test -f /etc/redhat-release ; then
+ VENDOR=redhat ;
+else
+ VENDOR= ;
+fi
+
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -198,29 +203,50 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
- exit ;;
+ exit 0 ;;
+ amiga:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hp300:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ macppc:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvmeppc:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ pmax:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sgi:OpenBSD:*:*)
+ echo mipseb-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sun3:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ wgrisc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
*:OpenBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- *:ekkoBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
- exit ;;
- macppc:MirBSD:*:*)
- echo powerppc-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- *:MirBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
+ echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
alpha:OSF1:*:*)
- case $UNAME_RELEASE in
- *4.0)
+ if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- ;;
- *5.*)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
- ;;
- esac
+ fi
# According to Compaq, /usr/sbin/psrinfo has been available on
# OSF/1 and Tru64 systems produced since 1995. I hope that
# covers most systems running today. This code pipes the CPU
@@ -258,49 +284,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
"EV7.9 (21364A)")
UNAME_MACHINE="alphaev79" ;;
esac
- # A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- exit ;;
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit 0 ;;
+ Alpha*:OpenVMS:*:*)
+ echo alpha-hp-vms
+ exit 0 ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
# of the specific Alpha model?
echo alpha-pc-interix
- exit ;;
+ exit 0 ;;
21064:Windows_NT:50:3)
echo alpha-dec-winnt3.5
- exit ;;
+ exit 0 ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
- exit ;;
+ exit 0;;
*:[Aa]miga[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-amigaos
- exit ;;
+ exit 0 ;;
*:[Mm]orph[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-morphos
- exit ;;
+ exit 0 ;;
*:OS/390:*:*)
echo i370-ibm-openedition
- exit ;;
- *:z/VM:*:*)
- echo s390-ibm-zvmoe
- exit ;;
- *:OS400:*:*)
- echo powerpc-ibm-os400
- exit ;;
+ exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
- exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
- echo arm-unknown-riscos
- exit ;;
+ exit 0;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
- exit ;;
+ exit 0;;
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
if test "`(/bin/universe) 2>/dev/null`" = att ; then
@@ -308,32 +327,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
else
echo pyramid-pyramid-bsd
fi
- exit ;;
+ exit 0 ;;
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
- exit ;;
+ exit 0 ;;
DRS?6000:unix:4.0:6*)
echo sparc-icl-nx6
- exit ;;
- DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ exit 0 ;;
+ DRS?6000:UNIX_SV:4.2*:7*)
case `/usr/bin/uname -p` in
- sparc) echo sparc-icl-nx7; exit ;;
+ sparc) echo sparc-icl-nx7 && exit 0 ;;
esac ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
+ exit 0 ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
+ exit 0 ;;
i86pc:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
+ exit 0 ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
+ exit 0 ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
Series*|S4*)
@@ -342,10 +361,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit ;;
+ exit 0 ;;
sun3*:SunOS:*:*)
echo m68k-sun-sunos${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
@@ -357,10 +376,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo sparc-sun-sunos${UNAME_RELEASE}
;;
esac
- exit ;;
+ exit 0 ;;
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
# "atarist" or "atariste" at least should have a processor
@@ -371,40 +390,37 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
echo m68k-milan-mint${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
echo m68k-hades-mint${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
- exit ;;
- m68k:machten:*:*)
- echo m68k-apple-machten${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
- exit ;;
+ exit 0 ;;
RISC*:ULTRIX:*:*)
echo mips-dec-ultrix${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -428,33 +444,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
exit (-1);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c &&
- dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`$dummy $dummyarg` &&
- { echo "$SYSTEM_NAME"; exit; }
+ $CC_FOR_BUILD -o $dummy $dummy.c \
+ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+ && exit 0
echo mips-mips-riscos${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
- exit ;;
+ exit 0 ;;
Motorola:*:4.3:PL8-*)
echo powerpc-harris-powermax
- exit ;;
+ exit 0 ;;
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
echo powerpc-harris-powermax
- exit ;;
+ exit 0 ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
- exit ;;
+ exit 0 ;;
m88k:CX/UX:7*:*)
echo m88k-harris-cxux7
- exit ;;
+ exit 0 ;;
m88k:*:4*:R4*)
echo m88k-motorola-sysv4
- exit ;;
+ exit 0 ;;
m88k:*:3*:R3*)
echo m88k-motorola-sysv3
- exit ;;
+ exit 0 ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
@@ -470,29 +485,29 @@ EOF
else
echo i586-dg-dgux${UNAME_RELEASE}
fi
- exit ;;
+ exit 0 ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
- exit ;;
+ exit 0 ;;
M88*:*:R3*:*)
# Delta 88k system running SVR3
echo m88k-motorola-sysv3
- exit ;;
+ exit 0 ;;
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
echo m88k-tektronix-sysv3
- exit ;;
+ exit 0 ;;
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
echo m68k-tektronix-bsd
- exit ;;
+ exit 0 ;;
*:IRIX*:*:*)
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit ;;
+ exit 0 ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i*86:AIX:*:*)
echo i386-ibm-aix
- exit ;;
+ exit 0 ;;
ia64:AIX:*:*)
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
@@ -500,7 +515,7 @@ EOF
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit ;;
+ exit 0 ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
eval $set_cc_for_build
@@ -515,18 +530,14 @@ EOF
exit(0);
}
EOF
- if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
- then
- echo "$SYSTEM_NAME"
- else
- echo rs6000-ibm-aix3.2.5
- fi
+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+ echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
else
echo rs6000-ibm-aix3.2
fi
- exit ;;
+ exit 0 ;;
*:AIX:*:[45])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
@@ -540,28 +551,28 @@ EOF
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit ;;
+ exit 0 ;;
*:AIX:*:*)
echo rs6000-ibm-aix
- exit ;;
+ exit 0 ;;
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
- exit ;;
+ exit 0 ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit ;; # report: romp-ibm BSD 4.3
+ exit 0 ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
- exit ;;
+ exit 0 ;;
DPX/2?00:B.O.S.:*:*)
echo m68k-bull-sysv3
- exit ;;
+ exit 0 ;;
9000/[34]??:4.3bsd:1.*:*)
echo m68k-hp-bsd
- exit ;;
+ exit 0 ;;
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
echo m68k-hp-bsd4.4
- exit ;;
+ exit 0 ;;
9000/[34678]??:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
case "${UNAME_MACHINE}" in
@@ -623,19 +634,9 @@ EOF
esac
if [ ${HP_ARCH} = "hppa2.0w" ]
then
- eval $set_cc_for_build
-
- # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
- # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
- # generating 64-bit code. GNU and HP use different nomenclature:
- #
- # $ CC_FOR_BUILD=cc ./config.guess
- # => hppa2.0w-hp-hpux11.23
- # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
- # => hppa64-hp-hpux11.23
-
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
- grep __LP64__ >/dev/null
+ # avoid double evaluation of $set_cc_for_build
+ test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
then
HP_ARCH="hppa2.0w"
else
@@ -643,11 +644,11 @@ EOF
fi
fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit ;;
+ exit 0 ;;
ia64:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ia64-hp-hpux${HPUX_REV}
- exit ;;
+ exit 0 ;;
3050*:HI-UX:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -675,166 +676,150 @@ EOF
exit (0);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
echo unknown-hitachi-hiuxwe2
- exit ;;
+ exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
echo hppa1.1-hp-bsd
- exit ;;
+ exit 0 ;;
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
- exit ;;
+ exit 0 ;;
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
- exit ;;
+ exit 0 ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
- exit ;;
+ exit 0 ;;
hp8??:OSF1:*:*)
echo hppa1.0-hp-osf
- exit ;;
+ exit 0 ;;
i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
echo ${UNAME_MACHINE}-unknown-osf1mk
else
echo ${UNAME_MACHINE}-unknown-osf1
fi
- exit ;;
+ exit 0 ;;
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
- exit ;;
+ exit 0 ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
- exit ;;
+ exit 0 ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit ;;
+ exit 0 ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
- exit ;;
+ exit 0 ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
- exit ;;
+ exit 0 ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
- exit ;;
+ exit 0 ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
+ exit 0 ;;
CRAY*[A-Z]90:*:*:*)
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-e 's/\.[^.]*$/.X/'
- exit ;;
+ exit 0 ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
+ exit 0 ;;
CRAY*T3E:*:*:*)
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
+ exit 0 ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
+ exit 0 ;;
*:UNICOS/mp:*:*)
- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
+ echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- 5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
+ exit 0 ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
sparc*:BSD/OS:*:*)
echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
*:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:FreeBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit ;;
+ exit 0 ;;
+ *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
+ # Determine whether the default compiler uses glibc.
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #if __GLIBC__ >= 2
+ LIBC=gnu
+ #else
+ LIBC=
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
+ exit 0 ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
- exit ;;
+ exit 0 ;;
i*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
- exit ;;
- i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
- exit ;;
+ exit 0 ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
- exit ;;
+ exit 0 ;;
x86:Interix*:[34]*)
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
- exit ;;
+ exit 0 ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
- exit ;;
+ exit 0 ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
# UNAME_MACHINE based on the output of uname instead of i386?
echo i586-pc-interix
- exit ;;
+ exit 0 ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
- exit ;;
- amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
- echo x86_64-unknown-cygwin
- exit ;;
+ exit 0 ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin
- exit ;;
+ exit 0 ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
+ exit 0 ;;
*:GNU:*:*)
- # the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit ;;
- *:GNU/*:*:*)
- # other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
- exit ;;
+ exit 0 ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
- exit ;;
+ exit 0 ;;
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
+ exit 0 ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
- exit ;;
- crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
- exit ;;
- frv:Linux:*:*)
- echo frv-unknown-linux-gnu
- exit ;;
+ exit 0 ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
+ echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu
+ exit 0 ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
+ exit 0 ;;
mips:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -852,7 +837,7 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
;;
mips64:Linux:*:*)
eval $set_cc_for_build
@@ -871,17 +856,14 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
;;
- or32:Linux:*:*)
- echo or32-unknown-linux-gnu
- exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit ;;
+ echo powerpc-${VENDOR:-unknown}-linux-gnu
+ exit 0 ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- exit ;;
+ echo powerpc64-${VENDOR:-unknown}-linux-gnu
+ exit 0 ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
@@ -895,7 +877,7 @@ EOF
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit ;;
+ exit 0 ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -903,25 +885,25 @@ EOF
PA8*) echo hppa2.0-unknown-linux-gnu ;;
*) echo hppa-unknown-linux-gnu ;;
esac
- exit ;;
+ exit 0 ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
- exit ;;
+ exit 0 ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
- exit ;;
+ echo ${UNAME_MACHINE}-${VENDOR:-ibm}-linux-gnu
+ exit 0 ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
+ exit 0 ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
+ exit 0 ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
+ exit 0 ;;
x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
- exit ;;
+ echo x86_64-${VENDOR:-unknown}-linux-gnu
+ exit 0 ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
@@ -939,15 +921,15 @@ EOF
;;
a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit ;;
+ exit 0 ;;
coff-i386)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit ;;
+ exit 0 ;;
"")
# Either a pre-BFD a.out linker (linux-gnuoldld) or
# one that does not give us useful --help.
echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
- exit ;;
+ exit 0 ;;
esac
# Determine whether the default compiler is a.out or elf
eval $set_cc_for_build
@@ -970,23 +952,17 @@ EOF
LIBC=gnuaout
#endif
#endif
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
- test x"${LIBC}" != x && {
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit
- }
- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+ test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR:-pc}-linux-${LIBC}" && exit 0
+ test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
# sysname and nodename.
echo i386-sequent-sysv4
- exit ;;
+ exit 0 ;;
i*86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
@@ -994,27 +970,24 @@ EOF
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit ;;
+ exit 0 ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
echo ${UNAME_MACHINE}-pc-os2-emx
- exit ;;
+ exit 0 ;;
i*86:XTS-300:*:STOP)
echo ${UNAME_MACHINE}-unknown-stop
- exit ;;
+ exit 0 ;;
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
- exit ;;
- i*86:syllable:*:*)
- echo ${UNAME_MACHINE}-pc-syllable
- exit ;;
+ exit 0 ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit ;;
+ exit 0 ;;
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
@@ -1022,16 +995,15 @@ EOF
else
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
fi
- exit ;;
- i*86:*:5:[678]*)
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ exit 0 ;;
+ i*86:*:5:[78]*)
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
- exit ;;
+ exit 0 ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
@@ -1049,73 +1021,73 @@ EOF
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
- exit ;;
+ exit 0 ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i386.
echo i386-pc-msdosdjgpp
- exit ;;
+ exit 0 ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
- exit ;;
+ exit 0 ;;
paragon:*:*:*)
echo i860-intel-osf1
- exit ;;
+ exit 0 ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
fi
- exit ;;
+ exit 0 ;;
mini*:CTIX:SYS*5:*)
# "miniframe"
echo m68010-convergent-sysv
- exit ;;
+ exit 0 ;;
mc68k:UNIX:SYSTEM5:3.51m)
echo m68k-convergent-sysv
- exit ;;
+ exit 0 ;;
M680?0:D-NIX:5.3:*)
echo m68k-diab-dnix
- exit ;;
- M68*:*:R3V[5678]*:*)
- test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
- 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ exit 0 ;;
+ M68*:*:R3V[567]*:*)
+ test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+ 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ && echo i486-ncr-sysv4.3${OS_REL} && exit 0
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4; exit; } ;;
+ && echo i486-ncr-sysv4 && exit 0 ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
- exit ;;
+ exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
- exit ;;
+ exit 0 ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
- exit ;;
+ exit 0 ;;
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
@@ -1123,73 +1095,68 @@ EOF
else
echo ns32k-sni-sysv
fi
- exit ;;
+ exit 0 ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
- exit ;;
+ exit 0 ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
echo hppa1.1-stratus-sysv4
- exit ;;
+ exit 0 ;;
*:*:*:FTX*)
# From seanf@swdc.stratus.com.
echo i860-stratus-sysv4
- exit ;;
- i*86:VOS:*:*)
- # From Paul.Green@stratus.com.
- echo ${UNAME_MACHINE}-stratus-vos
- exit ;;
+ exit 0 ;;
*:VOS:*:*)
# From Paul.Green@stratus.com.
echo hppa1.1-stratus-vos
- exit ;;
+ exit 0 ;;
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
news*:NEWS-OS:6*:*)
echo mips-sony-newsos6
- exit ;;
+ exit 0 ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
else
echo mips-unknown-sysv${UNAME_RELEASE}
fi
- exit ;;
+ exit 0 ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
- exit ;;
+ exit 0 ;;
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
echo powerpc-apple-beos
- exit ;;
+ exit 0 ;;
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
- exit ;;
+ exit 0 ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
SX-5:SUPER-UX:*:*)
echo sx5-nec-superux${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
*:Rhapsody:*:*)
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
*:Darwin:*:*)
- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
+ case `uname -p` in
*86) UNAME_PROCESSOR=i686 ;;
- unknown) UNAME_PROCESSOR=powerpc ;;
+ powerpc) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
if test "$UNAME_PROCESSOR" = "x86"; then
@@ -1197,25 +1164,22 @@ EOF
UNAME_MACHINE=pc
fi
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
*:QNX:*:4*)
echo i386-pc-qnx
- exit ;;
- NSE-?:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk${UNAME_RELEASE}
- exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
+ exit 0 ;;
+ NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
*:NonStop-UX:*:*)
echo mips-compaq-nonstopux
- exit ;;
+ exit 0 ;;
BS2000:POSIX*:*:*)
echo bs2000-siemens-sysv
- exit ;;
+ exit 0 ;;
DS/*:UNIX_System_V:*:*)
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
*:Plan9:*:*)
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
@@ -1226,44 +1190,28 @@ EOF
UNAME_MACHINE="$cputype"
fi
echo ${UNAME_MACHINE}-unknown-plan9
- exit ;;
+ exit 0 ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
- exit ;;
+ exit 0 ;;
*:TENEX:*:*)
echo pdp10-unknown-tenex
- exit ;;
+ exit 0 ;;
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
echo pdp10-dec-tops20
- exit ;;
+ exit 0 ;;
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
echo pdp10-xkl-tops20
- exit ;;
+ exit 0 ;;
*:TOPS-20:*:*)
echo pdp10-unknown-tops20
- exit ;;
+ exit 0 ;;
*:ITS:*:*)
echo pdp10-unknown-its
- exit ;;
+ exit 0 ;;
SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE}
- exit ;;
- *:DragonFly:*:*)
- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit ;;
- *:*VMS:*:*)
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- case "${UNAME_MACHINE}" in
- A*) echo alpha-dec-vms ; exit ;;
- I*) echo ia64-dec-vms ; exit ;;
- V*) echo vax-dec-vms ; exit ;;
- esac ;;
- *:XENIX:*:SysV)
- echo i386-pc-xenix
- exit ;;
- i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
- exit ;;
+ exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1295,7 +1243,7 @@ main ()
#endif
#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
+ printf ("arm-acorn-riscix"); exit (0);
#endif
#if defined (hp300) && !defined (hpux)
@@ -1384,12 +1332,11 @@ main ()
}
EOF
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
# Apollos put the system type in the environment.
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
# Convex versions that predate uname can use getsysinfo(1)
@@ -1398,22 +1345,22 @@ then
case `getsysinfo -f cpu_type` in
c1*)
echo c1-convex-bsd
- exit ;;
+ exit 0 ;;
c2*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit ;;
+ exit 0 ;;
c34*)
echo c34-convex-bsd
- exit ;;
+ exit 0 ;;
c38*)
echo c38-convex-bsd
- exit ;;
+ exit 0 ;;
c4*)
echo c4-convex-bsd
- exit ;;
+ exit 0 ;;
esac
fi
@@ -1424,9 +1371,7 @@ This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
-and
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+ ftp://ftp.gnu.org/pub/gnu/config/
If the version you run ($0) is already up to date, please
send the following data and any information you think might be
diff --git a/config.sub b/config.sub
index 1c366df..6b2ff9f 100755
--- a/config.sub
+++ b/config.sub
@@ -1,9 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-timestamp='2005-07-08'
+timestamp='2003-06-18'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -21,15 +21,14 @@ timestamp='2005-07-08'
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
-
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
#
@@ -71,7 +70,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@@ -84,11 +83,11 @@ Try \`$me --help' for more information."
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
+ echo "$timestamp" ; exit 0 ;;
--version | -v )
- echo "$version" ; exit ;;
+ echo "$version" ; exit 0 ;;
--help | --h* | -h )
- echo "$usage"; exit ;;
+ echo "$usage"; exit 0 ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
@@ -100,7 +99,7 @@ while test $# -gt 0 ; do
*local*)
# First pass through any local machine types.
echo $1
- exit ;;
+ exit 0;;
* )
break ;;
@@ -119,8 +118,7 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+ nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -146,7 +144,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray)
+ -apple | -axis)
os=
basic_machine=$1
;;
@@ -230,16 +228,14 @@ case $basic_machine in
| a29k \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- | am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
- | bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
- | ip2k | iq2000 \
- | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
+ | ip2k \
+ | m32r | m68000 | m68k | m88k | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -248,37 +244,31 @@ case $basic_machine in
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
- | ms1 \
| msp430 \
| ns16k | ns32k \
- | or32 \
+ | openrisc | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | s390 | s390x \
+ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b \
+ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
- | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | x86 | xscale | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
- m32c)
- basic_machine=$basic_machine-unknown
- ;;
m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
@@ -306,19 +296,19 @@ case $basic_machine in
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \
- | bfin-* | bs2000-* \
+ | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
- | clipper-* | craynv-* | cydra-* \
+ | clipper-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
- | ip2k-* | iq2000-* \
- | m32r-* | m32rle-* \
+ | ip2k-* \
+ | m32r-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* \
+ | m88110-* | m88k-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@@ -327,40 +317,34 @@ case $basic_machine in
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
- | mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
- | mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
- | mmix-* \
- | ms1-* \
| msp430-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
+ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | s390-* | s390x-* \
+ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
- | sparclite-* \
+ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
- | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
- | xstormy16-* | xtensa-* \
+ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
+ | xtensa-* \
| ymp-* \
| z8k-*)
;;
- m32c-*)
- ;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
@@ -377,9 +361,6 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
- abacus)
- basic_machine=abacus-unknown
- ;;
adobe68k)
basic_machine=m68010-adobe
os=-scout
@@ -397,9 +378,6 @@ case $basic_machine in
amd64)
basic_machine=x86_64-pc
;;
- amd64-*)
- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
amdahl)
basic_machine=580-amdahl
os=-sysv
@@ -459,27 +437,12 @@ case $basic_machine in
basic_machine=j90-cray
os=-unicos
;;
- craynv)
- basic_machine=craynv-cray
- os=-unicosmp
- ;;
- cr16c)
- basic_machine=cr16c-unknown
- os=-elf
- ;;
crds | unos)
basic_machine=m68k-crds
;;
- crisv32 | crisv32-* | etraxfs*)
- basic_machine=crisv32-axis
- ;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
- crx)
- basic_machine=crx-unknown
- os=-elf
- ;;
da30 | da30-*)
basic_machine=m68k-da30
;;
@@ -502,10 +465,6 @@ case $basic_machine in
basic_machine=m88k-motorola
os=-sysv3
;;
- djgpp)
- basic_machine=i586-pc
- os=-msdosdjgpp
- ;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
@@ -684,6 +643,10 @@ case $basic_machine in
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
+ mmix*)
+ basic_machine=mmix-knuth
+ os=-mmixware
+ ;;
monitor)
basic_machine=m68k-rom68k
os=-coff
@@ -764,6 +727,10 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
+ nv1)
+ basic_machine=nv1-cray
+ os=-unicosmp
+ ;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@@ -771,12 +738,9 @@ case $basic_machine in
basic_machine=hppa1.1-oki
os=-proelf
;;
- openrisc | openrisc-*)
+ or32 | or32-*)
basic_machine=or32-unknown
- ;;
- os400)
- basic_machine=powerpc-ibm
- os=-os400
+ os=-coff
;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
@@ -869,12 +833,6 @@ case $basic_machine in
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
- s390 | s390-*)
- basic_machine=s390-ibm
- ;;
- s390x | s390x-*)
- basic_machine=s390x-ibm
- ;;
sa29200)
basic_machine=a29k-amd
os=-udi
@@ -998,10 +956,6 @@ case $basic_machine in
tower | tower-32)
basic_machine=m68k-ncr
;;
- tpf)
- basic_machine=s390x-ibm
- os=-tpf
- ;;
udi29k)
basic_machine=a29k-amd
os=-udi
@@ -1045,10 +999,6 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
- xbox)
- basic_machine=i686-pc
- os=-mingw32
- ;;
xps | xps100)
basic_machine=xps100-honeywell
;;
@@ -1079,9 +1029,6 @@ case $basic_machine in
romp)
basic_machine=romp-ibm
;;
- mmix)
- basic_machine=mmix-knuth
- ;;
rs6000)
basic_machine=rs6000-ibm
;;
@@ -1098,9 +1045,12 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
- sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+ sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
sparc | sparcv8 | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
@@ -1174,21 +1124,19 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
- | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
- | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku*)
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1206,15 +1154,12 @@ case $os in
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
os=`echo $os | sed -e 's|mac|macos|'`
;;
- -linux-dietlibc)
- os=-linux-dietlibc
- ;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
@@ -1227,9 +1172,6 @@ case $os in
-opened*)
os=-openedition
;;
- -os400*)
- os=-os400
- ;;
-wince*)
os=-wince
;;
@@ -1251,9 +1193,6 @@ case $os in
-atheos*)
os=-atheos
;;
- -syllable*)
- os=-syllable
- ;;
-386bsd)
os=-bsd
;;
@@ -1276,9 +1215,6 @@ case $os in
-sinix*)
os=-sysv4
;;
- -tpf*)
- os=-tpf
- ;;
-triton*)
os=-sysv3
;;
@@ -1315,9 +1251,6 @@ case $os in
-kaos*)
os=-kaos
;;
- -zvmoe)
- os=-zvmoe
- ;;
-none)
;;
*)
@@ -1349,9 +1282,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@@ -1395,15 +1328,9 @@ case $basic_machine in
*-be)
os=-beos
;;
- *-haiku)
- os=-haiku
- ;;
*-ibm)
os=-aix
;;
- *-knuth)
- os=-mmixware
- ;;
*-wec)
os=-proelf
;;
@@ -1536,15 +1463,9 @@ case $basic_machine in
-mvs* | -opened*)
vendor=ibm
;;
- -os400*)
- vendor=ibm
- ;;
-ptx*)
vendor=sequent
;;
- -tpf*)
- vendor=ibm
- ;;
-vxsim* | -vxworks* | -windiss*)
vendor=wrs
;;
@@ -1569,7 +1490,7 @@ case $basic_machine in
esac
echo $basic_machine$os
-exit
+exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
diff --git a/configure b/configure
index 002d2c7..b268bdc 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for lighttpd 1.4.11.
+# Generated by GNU Autoconf 2.59 for lighttpd 1.4.12.
#
# Report bugs to <jan@kneschke.de>.
#
@@ -423,8 +423,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='lighttpd'
PACKAGE_TARNAME='lighttpd'
-PACKAGE_VERSION='1.4.11'
-PACKAGE_STRING='lighttpd 1.4.11'
+PACKAGE_VERSION='1.4.12'
+PACKAGE_STRING='lighttpd 1.4.12'
PACKAGE_BUGREPORT='jan@kneschke.de'
ac_unique_file="src/server.c"
@@ -465,7 +465,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP CPP LN_S NO_RDYNAMIC_TRUE NO_RDYNAMIC_FALSE U ANSI2KNR ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS MYSQL_CONFIG MYSQL_LIBS MYSQL_INCLUDE LDAP_LIB LBER_LIB ATTR_LIB DL_LIB SSL_LIB PCRECONFIG PCRE_LIB Z_LIB BZ_LIB PKG_CONFIG FAM_CFLAGS FAM_LIBS XML_CFLAGS XML_LIBS SQLITE_CFLAGS SQLITE_LIBS GDBM_LIB MEMCACHE_LIB LUACONFIG LUA_CFLAGS LUA_LIBS CRYPT_LIB SENDFILE_LIB CROSS_COMPILING_TRUE CROSS_COMPILING_FALSE CHECK_WITH_FASTCGI_TRUE CHECK_WITH_FASTCGI_FALSE LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP CPP LN_S NO_RDYNAMIC_TRUE NO_RDYNAMIC_FALSE U ANSI2KNR ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS MYSQL_CONFIG MYSQL_LIBS MYSQL_INCLUDE LDAP_LIB LBER_LIB ATTR_LIB DL_LIB SSL_LIB PCRECONFIG PCRE_LIB Z_LIB BZ_LIB PKG_CONFIG ac_pt_PKG_CONFIG FAM_CFLAGS FAM_LIBS XML_CFLAGS XML_LIBS SQLITE_CFLAGS SQLITE_LIBS GDBM_LIB MEMCACHE_LIB LUACONFIG LUA_CFLAGS LUA_LIBS CRYPT_LIB SENDFILE_LIB CROSS_COMPILING_TRUE CROSS_COMPILING_FALSE CHECK_WITH_FASTCGI_TRUE CHECK_WITH_FASTCGI_FALSE LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -946,6 +946,42 @@ ac_env_FFLAGS_set=${FFLAGS+set}
ac_env_FFLAGS_value=$FFLAGS
ac_cv_env_FFLAGS_set=${FFLAGS+set}
ac_cv_env_FFLAGS_value=$FFLAGS
+ac_env_PKG_CONFIG_set=${PKG_CONFIG+set}
+ac_env_PKG_CONFIG_value=$PKG_CONFIG
+ac_cv_env_PKG_CONFIG_set=${PKG_CONFIG+set}
+ac_cv_env_PKG_CONFIG_value=$PKG_CONFIG
+ac_env_FAM_CFLAGS_set=${FAM_CFLAGS+set}
+ac_env_FAM_CFLAGS_value=$FAM_CFLAGS
+ac_cv_env_FAM_CFLAGS_set=${FAM_CFLAGS+set}
+ac_cv_env_FAM_CFLAGS_value=$FAM_CFLAGS
+ac_env_FAM_LIBS_set=${FAM_LIBS+set}
+ac_env_FAM_LIBS_value=$FAM_LIBS
+ac_cv_env_FAM_LIBS_set=${FAM_LIBS+set}
+ac_cv_env_FAM_LIBS_value=$FAM_LIBS
+ac_env_XML_CFLAGS_set=${XML_CFLAGS+set}
+ac_env_XML_CFLAGS_value=$XML_CFLAGS
+ac_cv_env_XML_CFLAGS_set=${XML_CFLAGS+set}
+ac_cv_env_XML_CFLAGS_value=$XML_CFLAGS
+ac_env_XML_LIBS_set=${XML_LIBS+set}
+ac_env_XML_LIBS_value=$XML_LIBS
+ac_cv_env_XML_LIBS_set=${XML_LIBS+set}
+ac_cv_env_XML_LIBS_value=$XML_LIBS
+ac_env_SQLITE_CFLAGS_set=${SQLITE_CFLAGS+set}
+ac_env_SQLITE_CFLAGS_value=$SQLITE_CFLAGS
+ac_cv_env_SQLITE_CFLAGS_set=${SQLITE_CFLAGS+set}
+ac_cv_env_SQLITE_CFLAGS_value=$SQLITE_CFLAGS
+ac_env_SQLITE_LIBS_set=${SQLITE_LIBS+set}
+ac_env_SQLITE_LIBS_value=$SQLITE_LIBS
+ac_cv_env_SQLITE_LIBS_set=${SQLITE_LIBS+set}
+ac_cv_env_SQLITE_LIBS_value=$SQLITE_LIBS
+ac_env_LUA_CFLAGS_set=${LUA_CFLAGS+set}
+ac_env_LUA_CFLAGS_value=$LUA_CFLAGS
+ac_cv_env_LUA_CFLAGS_set=${LUA_CFLAGS+set}
+ac_cv_env_LUA_CFLAGS_value=$LUA_CFLAGS
+ac_env_LUA_LIBS_set=${LUA_LIBS+set}
+ac_env_LUA_LIBS_value=$LUA_LIBS
+ac_cv_env_LUA_LIBS_set=${LUA_LIBS+set}
+ac_cv_env_LUA_LIBS_value=$LUA_LIBS
#
# Report the --help message.
@@ -954,7 +990,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures lighttpd 1.4.11 to adapt to many kinds of systems.
+\`configure' configures lighttpd 1.4.12 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1021,7 +1057,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of lighttpd 1.4.11:";;
+ short | recursive ) echo "Configuration of lighttpd 1.4.12:";;
esac
cat <<\_ACEOF
@@ -1083,6 +1119,16 @@ Some influential environment variables:
CXXCPP C++ preprocessor
F77 Fortran 77 compiler command
FFLAGS Fortran 77 compiler flags
+ PKG_CONFIG path to pkg-config utility
+ 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
+ XML_LIBS linker flags for XML, overriding pkg-config
+ SQLITE_CFLAGS
+ C compiler flags for SQLITE, overriding pkg-config
+ SQLITE_LIBS linker flags for SQLITE, overriding pkg-config
+ LUA_CFLAGS C compiler flags for LUA, overriding pkg-config
+ LUA_LIBS linker flags for LUA, overriding pkg-config
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -1183,7 +1229,7 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-lighttpd configure 1.4.11
+lighttpd configure 1.4.12
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1197,7 +1243,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by lighttpd $as_me 1.4.11, which was
+It was created by lighttpd $as_me 1.4.12, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1925,7 +1971,7 @@ fi
# Define the identity of the package.
PACKAGE='lighttpd'
- VERSION='1.4.11'
+ VERSION='1.4.12'
cat >>confdefs.h <<_ACEOF
@@ -4881,7 +4927,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4884 "configure"' > conftest.$ac_ext
+ echo '#line 4930 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -5987,7 +6033,7 @@ fi
# Provide some information about the compiler.
-echo "$as_me:5990:" \
+echo "$as_me:6036:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -7085,11 +7131,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7088: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7134: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7092: \$? = $ac_status" >&5
+ echo "$as_me:7138: \$? = $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.
@@ -7347,11 +7393,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7350: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7396: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7354: \$? = $ac_status" >&5
+ echo "$as_me:7400: \$? = $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.
@@ -7409,11 +7455,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7412: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7458: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7416: \$? = $ac_status" >&5
+ echo "$as_me:7462: \$? = $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
@@ -8794,7 +8840,7 @@ linux*)
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 8797 "configure"' > conftest.$ac_ext
+ echo '#line 8843 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -9665,7 +9711,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9668 "configure"
+#line 9714 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9763,7 +9809,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9766 "configure"
+#line 9812 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12011,11 +12057,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12014: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12060: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:12018: \$? = $ac_status" >&5
+ echo "$as_me:12064: \$? = $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.
@@ -12073,11 +12119,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12076: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12122: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:12080: \$? = $ac_status" >&5
+ echo "$as_me:12126: \$? = $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
@@ -12588,7 +12634,7 @@ linux*)
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 12591 "configure"' > conftest.$ac_ext
+ echo '#line 12637 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -13459,7 +13505,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 13462 "configure"
+#line 13508 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13557,7 +13603,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 13560 "configure"
+#line 13606 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -14442,11 +14488,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14445: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14491: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:14449: \$? = $ac_status" >&5
+ echo "$as_me:14495: \$? = $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.
@@ -14504,11 +14550,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14507: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14553: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14511: \$? = $ac_status" >&5
+ echo "$as_me:14557: \$? = $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
@@ -15869,7 +15915,7 @@ linux*)
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 15872 "configure"' > conftest.$ac_ext
+ echo '#line 15918 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -16642,11 +16688,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16645: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16691: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16649: \$? = $ac_status" >&5
+ echo "$as_me:16695: \$? = $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.
@@ -16904,11 +16950,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16907: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16953: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16911: \$? = $ac_status" >&5
+ echo "$as_me:16957: \$? = $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.
@@ -16966,11 +17012,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16969: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17015: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16973: \$? = $ac_status" >&5
+ echo "$as_me:17019: \$? = $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
@@ -18351,7 +18397,7 @@ linux*)
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 18354 "configure"' > conftest.$ac_ext
+ echo '#line 18400 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -19222,7 +19268,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 19225 "configure"
+#line 19271 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -19320,7 +19366,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 19323 "configure"
+#line 19369 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -25589,11 +25635,11 @@ fi
if test "x$FAM_LIBS" = x; then
- succeeded=no
- if test -z "$PKG_CONFIG"; then
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
+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
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
@@ -25618,7 +25664,6 @@ do
done
done
- test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
;;
esac
fi
@@ -25632,53 +25677,177 @@ else
echo "${ECHO_T}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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
fi
+done
+done
- if test "$PKG_CONFIG" = "no" ; then
- echo "*** The pkg-config script could not be found. Make sure it is"
- echo "*** in your path, or set the PKG_CONFIG environment variable"
- echo "*** to the full path to pkg-config."
- echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
- else
- PKG_CONFIG_MIN_VERSION=0.9.0
- if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
- echo "$as_me:$LINENO: checking for gamin >= 0.1.0" >&5
-echo $ECHO_N "checking for gamin >= 0.1.0... $ECHO_C" >&6
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+
+if test -n "$ac_pt_PKG_CONFIG"; then
+ echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
+echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
- if $PKG_CONFIG --exists "gamin >= 0.1.0" ; then
- echo "$as_me:$LINENO: result: yes" >&5
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.9.0
+ echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
+echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
- succeeded=yes
-
- echo "$as_me:$LINENO: checking FAM_CFLAGS" >&5
-echo $ECHO_N "checking FAM_CFLAGS... $ECHO_C" >&6
- FAM_CFLAGS=`$PKG_CONFIG --cflags "gamin >= 0.1.0"`
- echo "$as_me:$LINENO: result: $FAM_CFLAGS" >&5
-echo "${ECHO_T}$FAM_CFLAGS" >&6
-
- echo "$as_me:$LINENO: checking FAM_LIBS" >&5
-echo $ECHO_N "checking FAM_LIBS... $ECHO_C" >&6
- FAM_LIBS=`$PKG_CONFIG --libs "gamin >= 0.1.0"`
- echo "$as_me:$LINENO: result: $FAM_LIBS" >&5
-echo "${ECHO_T}$FAM_LIBS" >&6
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ PKG_CONFIG=""
+ fi
+
+fi
+
+pkg_failed=no
+echo "$as_me:$LINENO: checking for FAM" >&5
+echo $ECHO_N "checking for FAM... $ECHO_C" >&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" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gamin >= 0.1.0\"") >&5
+ ($PKG_CONFIG --exists --print-errors "gamin >= 0.1.0") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_FAM_CFLAGS=`$PKG_CONFIG --cflags "gamin >= 0.1.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+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" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gamin >= 0.1.0\"") >&5
+ ($PKG_CONFIG --exists --print-errors "gamin >= 0.1.0") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_FAM_LIBS=`$PKG_CONFIG --libs "gamin >= 0.1.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+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
+ FAM_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gamin >= 0.1.0"`
else
- FAM_CFLAGS=""
- FAM_LIBS=""
- ## If we have a custom action on failure, don't print errors, but
- ## do set a variable so people can do so.
- FAM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gamin >= 0.1.0"`
- echo $FAM_PKG_ERRORS
+ FAM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gamin >= 0.1.0"`
fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$FAM_PKG_ERRORS" >&5
+ { { echo "$as_me:$LINENO: error: Package requirements (gamin >= 0.1.0) were not met:
+$FAM_PKG_ERRORS
- else
- echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
- echo "*** See http://www.freedesktop.org/software/pkgconfig"
- fi
- fi
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+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.
+" >&5
+echo "$as_me: error: Package requirements (gamin >= 0.1.0) were not met:
+
+$FAM_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+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.
+" >&2;}
+ { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+ { { echo "$as_me:$LINENO: error: 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.
- if test $succeeded = yes; then
+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.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+See \`config.log' for more details." >&5
+echo "$as_me: error: 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.
+
+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.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ FAM_CFLAGS=$pkg_cv_FAM_CFLAGS
+ FAM_LIBS=$pkg_cv_FAM_LIBS
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
@@ -25691,12 +25860,7 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
- else
- { { echo "$as_me:$LINENO: error: Library requirements (gamin >= 0.1.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
-echo "$as_me: error: Library requirements (gamin >= 0.1.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
- { (exit 1); exit 1; }; }
- fi
-
+fi
fi
OLD_LIBS=$LIBS
LIBS=$FAM_LIBS
@@ -25820,96 +25984,114 @@ echo "${ECHO_T}$WITH_WEBDAV_PROPS" >&6
if test "$WITH_WEBDAV_PROPS" != "no"; then
- succeeded=no
+pkg_failed=no
+echo "$as_me:$LINENO: checking for XML" >&5
+echo $ECHO_N "checking for XML... $ECHO_C" >&6
- if test -z "$PKG_CONFIG"; then
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\"") >&5
+ ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_XML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0" 2>/dev/null`
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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
- ;;
-esac
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-
if test -n "$PKG_CONFIG"; then
- echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
-echo "${ECHO_T}$PKG_CONFIG" >&6
+ if test -n "$XML_LIBS"; then
+ pkg_cv_XML_LIBS="$XML_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\"") >&5
+ ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_XML_LIBS=`$PKG_CONFIG --libs "libxml-2.0" 2>/dev/null`
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
fi
- fi
- if test "$PKG_CONFIG" = "no" ; then
- echo "*** The pkg-config script could not be found. Make sure it is"
- echo "*** in your path, or set the PKG_CONFIG environment variable"
- echo "*** to the full path to pkg-config."
- echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
- else
- PKG_CONFIG_MIN_VERSION=0.9.0
- if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
- echo "$as_me:$LINENO: checking for libxml-2.0" >&5
-echo $ECHO_N "checking for libxml-2.0... $ECHO_C" >&6
- if $PKG_CONFIG --exists "libxml-2.0" ; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- succeeded=yes
-
- echo "$as_me:$LINENO: checking XML_CFLAGS" >&5
-echo $ECHO_N "checking XML_CFLAGS... $ECHO_C" >&6
- XML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0"`
- echo "$as_me:$LINENO: result: $XML_CFLAGS" >&5
-echo "${ECHO_T}$XML_CFLAGS" >&6
-
- echo "$as_me:$LINENO: checking XML_LIBS" >&5
-echo $ECHO_N "checking XML_LIBS... $ECHO_C" >&6
- XML_LIBS=`$PKG_CONFIG --libs "libxml-2.0"`
- echo "$as_me:$LINENO: result: $XML_LIBS" >&5
-echo "${ECHO_T}$XML_LIBS" >&6
+if test $pkg_failed = yes; then
+
+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
+ XML_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libxml-2.0"`
else
- XML_CFLAGS=""
- XML_LIBS=""
- ## If we have a custom action on failure, don't print errors, but
- ## do set a variable so people can do so.
- XML_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0"`
- echo $XML_PKG_ERRORS
+ XML_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0"`
fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$XML_PKG_ERRORS" >&5
+ { { echo "$as_me:$LINENO: error: Package requirements (libxml-2.0) were not met:
+$XML_PKG_ERRORS
- else
- echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
- echo "*** See http://www.freedesktop.org/software/pkgconfig"
- fi
- fi
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
- if test $succeeded = yes; then
+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.
+" >&5
+echo "$as_me: error: Package requirements (libxml-2.0) were not met:
+
+$XML_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+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.
+" >&2;}
+ { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+ { { echo "$as_me:$LINENO: error: 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.
+
+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.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+See \`config.log' for more details." >&5
+echo "$as_me: error: 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.
+
+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.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ XML_CFLAGS=$pkg_cv_XML_CFLAGS
+ XML_LIBS=$pkg_cv_XML_LIBS
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
@@ -25922,103 +26104,116 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
- else
- { { echo "$as_me:$LINENO: error: Library requirements (libxml-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
-echo "$as_me: error: Library requirements (libxml-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
- { (exit 1); exit 1; }; }
- fi
-
+fi
- succeeded=no
+pkg_failed=no
+echo "$as_me:$LINENO: checking for SQLITE" >&5
+echo $ECHO_N "checking for SQLITE... $ECHO_C" >&6
- if test -z "$PKG_CONFIG"; then
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"sqlite3\"") >&5
+ ($PKG_CONFIG --exists --print-errors "sqlite3") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_SQLITE_CFLAGS=`$PKG_CONFIG --cflags "sqlite3" 2>/dev/null`
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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
- ;;
-esac
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-
if test -n "$PKG_CONFIG"; then
- echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
-echo "${ECHO_T}$PKG_CONFIG" >&6
+ if test -n "$SQLITE_LIBS"; then
+ pkg_cv_SQLITE_LIBS="$SQLITE_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"sqlite3\"") >&5
+ ($PKG_CONFIG --exists --print-errors "sqlite3") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_SQLITE_LIBS=`$PKG_CONFIG --libs "sqlite3" 2>/dev/null`
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
fi
- fi
- if test "$PKG_CONFIG" = "no" ; then
- echo "*** The pkg-config script could not be found. Make sure it is"
- echo "*** in your path, or set the PKG_CONFIG environment variable"
- echo "*** to the full path to pkg-config."
- echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
- else
- PKG_CONFIG_MIN_VERSION=0.9.0
- if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
- echo "$as_me:$LINENO: checking for sqlite3" >&5
-echo $ECHO_N "checking for sqlite3... $ECHO_C" >&6
- if $PKG_CONFIG --exists "sqlite3" ; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- succeeded=yes
-
- echo "$as_me:$LINENO: checking SQLITE_CFLAGS" >&5
-echo $ECHO_N "checking SQLITE_CFLAGS... $ECHO_C" >&6
- SQLITE_CFLAGS=`$PKG_CONFIG --cflags "sqlite3"`
- echo "$as_me:$LINENO: result: $SQLITE_CFLAGS" >&5
-echo "${ECHO_T}$SQLITE_CFLAGS" >&6
-
- echo "$as_me:$LINENO: checking SQLITE_LIBS" >&5
-echo $ECHO_N "checking SQLITE_LIBS... $ECHO_C" >&6
- SQLITE_LIBS=`$PKG_CONFIG --libs "sqlite3"`
- echo "$as_me:$LINENO: result: $SQLITE_LIBS" >&5
-echo "${ECHO_T}$SQLITE_LIBS" >&6
+if test $pkg_failed = yes; then
+
+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
+ SQLITE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "sqlite3"`
else
- SQLITE_CFLAGS=""
- SQLITE_LIBS=""
- ## If we have a custom action on failure, don't print errors, but
- ## do set a variable so people can do so.
- SQLITE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "sqlite3"`
- echo $SQLITE_PKG_ERRORS
+ SQLITE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "sqlite3"`
fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$SQLITE_PKG_ERRORS" >&5
+ { { echo "$as_me:$LINENO: error: Package requirements (sqlite3) were not met:
+$SQLITE_PKG_ERRORS
- else
- echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
- echo "*** See http://www.freedesktop.org/software/pkgconfig"
- fi
- fi
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+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.
+" >&5
+echo "$as_me: error: Package requirements (sqlite3) were not met:
+
+$SQLITE_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+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.
+" >&2;}
+ { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+ { { echo "$as_me:$LINENO: error: 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.
- if test $succeeded = yes; then
+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.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+See \`config.log' for more details." >&5
+echo "$as_me: error: 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.
+
+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.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ SQLITE_CFLAGS=$pkg_cv_SQLITE_CFLAGS
+ SQLITE_LIBS=$pkg_cv_SQLITE_LIBS
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
@@ -26031,12 +26226,7 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
- else
- { { echo "$as_me:$LINENO: error: Library requirements (sqlite3) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
-echo "$as_me: error: Library requirements (sqlite3) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
- { (exit 1); exit 1; }; }
- fi
-
+fi
fi
echo "$as_me:$LINENO: checking for gdbm" >&5
@@ -26837,96 +27027,114 @@ fi
if test x"$LUA_LIBS" = x; then
# try pkgconfig
- succeeded=no
+pkg_failed=no
+echo "$as_me:$LINENO: checking for LUA" >&5
+echo $ECHO_N "checking for LUA... $ECHO_C" >&6
- if test -z "$PKG_CONFIG"; then
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"lua\"") >&5
+ ($PKG_CONFIG --exists --print-errors "lua") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua" 2>/dev/null`
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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
- ;;
-esac
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-
if test -n "$PKG_CONFIG"; then
- echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
-echo "${ECHO_T}$PKG_CONFIG" >&6
+ if test -n "$LUA_LIBS"; then
+ pkg_cv_LUA_LIBS="$LUA_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"lua\"") >&5
+ ($PKG_CONFIG --exists --print-errors "lua") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua" 2>/dev/null`
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
fi
- fi
- if test "$PKG_CONFIG" = "no" ; then
- echo "*** The pkg-config script could not be found. Make sure it is"
- echo "*** in your path, or set the PKG_CONFIG environment variable"
- echo "*** to the full path to pkg-config."
- echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
- else
- PKG_CONFIG_MIN_VERSION=0.9.0
- if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
- echo "$as_me:$LINENO: checking for lua" >&5
-echo $ECHO_N "checking for lua... $ECHO_C" >&6
- if $PKG_CONFIG --exists "lua" ; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- succeeded=yes
-
- echo "$as_me:$LINENO: checking LUA_CFLAGS" >&5
-echo $ECHO_N "checking LUA_CFLAGS... $ECHO_C" >&6
- LUA_CFLAGS=`$PKG_CONFIG --cflags "lua"`
- echo "$as_me:$LINENO: result: $LUA_CFLAGS" >&5
-echo "${ECHO_T}$LUA_CFLAGS" >&6
-
- echo "$as_me:$LINENO: checking LUA_LIBS" >&5
-echo $ECHO_N "checking LUA_LIBS... $ECHO_C" >&6
- LUA_LIBS=`$PKG_CONFIG --libs "lua"`
- echo "$as_me:$LINENO: result: $LUA_LIBS" >&5
-echo "${ECHO_T}$LUA_LIBS" >&6
+if test $pkg_failed = yes; then
+
+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
+ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua"`
else
- LUA_CFLAGS=""
- LUA_LIBS=""
- ## If we have a custom action on failure, don't print errors, but
- ## do set a variable so people can do so.
- LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua"`
- echo $LUA_PKG_ERRORS
+ LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua"`
fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LUA_PKG_ERRORS" >&5
+ { { echo "$as_me:$LINENO: error: Package requirements (lua) were not met:
+$LUA_PKG_ERRORS
- else
- echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
- echo "*** See http://www.freedesktop.org/software/pkgconfig"
- fi
- fi
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+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.
+" >&5
+echo "$as_me: error: Package requirements (lua) were not met:
+
+$LUA_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+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.
+" >&2;}
+ { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+ { { echo "$as_me:$LINENO: error: 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.
+
+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.
- if test $succeeded = yes; then
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+See \`config.log' for more details." >&5
+echo "$as_me: error: 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.
+
+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.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
+ LUA_LIBS=$pkg_cv_LUA_LIBS
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
@@ -26939,12 +27147,7 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
- else
- { { echo "$as_me:$LINENO: error: Library requirements (lua) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
-echo "$as_me: error: Library requirements (lua) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
- { (exit 1); exit 1; }; }
- fi
-
+fi
fi
@@ -29201,7 +29404,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
-This file was extended by lighttpd $as_me 1.4.11, which was
+This file was extended by lighttpd $as_me 1.4.12, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -29264,7 +29467,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-lighttpd config.status 1.4.11
+lighttpd config.status 1.4.12
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
@@ -29568,6 +29771,7 @@ s,@PCRE_LIB@,$PCRE_LIB,;t t
s,@Z_LIB@,$Z_LIB,;t t
s,@BZ_LIB@,$BZ_LIB,;t t
s,@PKG_CONFIG@,$PKG_CONFIG,;t t
+s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
s,@FAM_CFLAGS@,$FAM_CFLAGS,;t t
s,@FAM_LIBS@,$FAM_LIBS,;t t
s,@XML_CFLAGS@,$XML_CFLAGS,;t t
diff --git a/configure.in b/configure.in
index 96391f5..5a11c2d 100644
--- a/configure.in
+++ b/configure.in
@@ -1,7 +1,7 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
-AC_INIT(lighttpd, 1.4.11, jan@kneschke.de)
+AC_INIT(lighttpd, 1.4.12, jan@kneschke.de)
AC_CONFIG_SRCDIR([src/server.c])
AC_CANONICAL_TARGET
diff --git a/cygwin/Makefile.in b/cygwin/Makefile.in
index f0339e1..68007f9 100644
--- a/cygwin/Makefile.in
+++ b/cygwin/Makefile.in
@@ -43,7 +43,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = lighttpd.README
SOURCES =
@@ -144,6 +144,7 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
diff --git a/cygwin/lighttpd.README b/cygwin/lighttpd.README
index 21a6b5f..2454c27 100644
--- a/cygwin/lighttpd.README
+++ b/cygwin/lighttpd.README
@@ -31,17 +31,17 @@ Canonical download:
------------------------------------
Build instructions:
- unpack lighttpd-1.4.11-<REL>-src.tar.bz2
+ unpack lighttpd-1.4.12-<REL>-src.tar.bz2
if you use setup to install this src package, it will be
unpacked under /usr/src automatically
cd /usr/src
- ./lighttpd-1.4.11-<REL>.sh all
+ ./lighttpd-1.4.12-<REL>.sh all
This will create:
- /usr/src/lighttpd-1.4.11-<REL>.tar.bz2
- /usr/src/lighttpd-1.4.11-<REL>-src.tar.bz2
+ /usr/src/lighttpd-1.4.12-<REL>.tar.bz2
+ /usr/src/lighttpd-1.4.12-<REL>-src.tar.bz2
-Or use './lighttpd-1.4.11-<REL>.sh prep' to get a patched source directory
+Or use './lighttpd-1.4.12-<REL>.sh prep' to get a patched source directory
-------------------------------------------
diff --git a/depcomp b/depcomp
index aea3d00..ffcd540 100755
--- a/depcomp
+++ b/depcomp
@@ -1,7 +1,9 @@
#! /bin/sh
-
# depcomp - compile a program generating dependencies as side-effects
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+
+scriptversion=2005-02-09.22
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,22 +27,45 @@
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+ depmode Dependency tracking mode.
+ source Source file read by `PROGRAMS ARGS'.
+ object Object file output by `PROGRAMS ARGS'.
+ DEPDIR directory where to store dependencies.
+ depfile Dependency file to output.
+ tmpdepfile Temporary file to use when outputing dependencies.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit $?
+ ;;
+esac
+
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
-# `libtool' can also be set to `yes' or `no'.
-
-if test -z "$depfile"; then
- base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
- dir=`echo "$object" | sed 's,/.*$,/,'`
- if test "$dir" = "$object"; then
- dir=
- fi
- # FIXME: should be _deps on DOS.
- depfile="$dir.deps/$base"
-fi
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
@@ -172,19 +197,25 @@ sgi)
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
- # in a .u file. This file always lives in the current directory.
- # Also, the AIX compiler puts `$object:' at the start of each line;
- # $object doesn't have directory information.
- stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
+ # in a .u file. In older versions, this file always lives in the
+ # current directory. Also, the AIX compiler puts `$object:' at the
+ # start of each line; $object doesn't have directory information.
+ # Version 6 uses the directory in both cases.
+ stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
- outname="$stripped.o"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
-
stat=$?
+
+ if test -f "$tmpdepfile"; then :
+ else
+ stripped=`echo "$stripped" | sed 's,^.*/,,'`
+ tmpdepfile="$stripped.u"
+ fi
+
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
@@ -192,6 +223,7 @@ aix)
fi
if test -f "$tmpdepfile"; then
+ outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
@@ -255,31 +287,47 @@ tru64)
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
- tmpdepfile1="$dir.libs/$base.lo.d"
- tmpdepfile2="$dir.libs/$base.d"
+ # With Tru64 cc, shared objects can also be used to make a
+ # static library. This mecanism is used in libtool 1.4 series to
+ # handle both shared and static libraries in a single compilation.
+ # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+ #
+ # With libtool 1.5 this exception was removed, and libtool now
+ # generates 2 separate objects for the 2 libraries. These two
+ # compilations output dependencies in in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
+ tmpdepfile2=$dir$base.o.d # libtool 1.5
+ tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
+ tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
- tmpdepfile1="$dir$base.o.d"
- tmpdepfile2="$dir$base.d"
+ tmpdepfile1=$dir$base.o.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ tmpdepfile4=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
- rm -f "$tmpdepfile1" "$tmpdepfile2"
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
exit $stat
fi
- if test -f "$tmpdepfile1"; then
- tmpdepfile="$tmpdepfile1"
- else
- tmpdepfile="$tmpdepfile2"
- fi
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ do
+ test -f "$tmpdepfile" && break
+ done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a space and a tab in the [].
- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
@@ -292,7 +340,7 @@ tru64)
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
- # always write the proprocessed file to stdout, regardless of -o.
+ # always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
@@ -388,7 +436,7 @@ makedepend)
cpp)
# Important note: in order to support this mode, a compiler *must*
- # always write the proprocessed file to stdout.
+ # always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
@@ -430,7 +478,7 @@ cpp)
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
- # always write the proprocessed file to stdout, regardless of -o,
+ # always write the preprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
"$@" || exit $?
IFS=" "
@@ -470,3 +518,12 @@ none)
esac
exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/doc/Makefile.in b/doc/Makefile.in
index b12f424..b133b09 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -43,7 +43,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
@@ -148,6 +148,7 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
diff --git a/install-sh b/install-sh
index 6ce63b9..1a83534 100755
--- a/install-sh
+++ b/install-sh
@@ -1,7 +1,8 @@
#!/bin/sh
-#
# install - install a program, script, or datafile
-#
+
+scriptversion=2005-02-02.21
+
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
@@ -41,13 +42,11 @@
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
-
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
-
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
@@ -59,236 +58,266 @@ stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
+chowncmd=
+chgrpcmd=
+stripcmd=
rmcmd="$rmprog -f"
mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
- case $1 in
- -c) instcmd=$cpprog
- shift
- continue;;
-
- -d) dir_arg=true
- shift
- continue;;
-
- -m) chmodcmd="$chmodprog $2"
- shift
- shift
- continue;;
-
- -o) chowncmd="$chownprog $2"
- shift
- shift
- continue;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift
- shift
- continue;;
-
- -s) stripcmd=$stripprog
- shift
- continue;;
-
- -t=*) transformarg=`echo $1 | sed 's/-t=//'`
- shift
- continue;;
-
- -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
- shift
- continue;;
-
- *) if [ x"$src" = x ]
- then
- src=$1
- else
- # this colon is to work around a 386BSD /bin/sh bug
- :
- dst=$1
- fi
- shift
- continue;;
- esac
-done
-
-if [ x"$src" = x ]
-then
- echo "$0: no input file specified" >&2
- exit 1
-else
- :
-fi
-
-if [ x"$dir_arg" != x ]; then
- dst=$src
- src=""
-
- if [ -d "$dst" ]; then
- instcmd=:
- chmodcmd=""
- else
- instcmd=$mkdirprog
- fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
-# if $src (and thus $dsttmp) contains '*'.
-
- if [ -f "$src" ] || [ -d "$src" ]
- then
- :
- else
- echo "$0: $src does not exist" >&2
- exit 1
- fi
-
- if [ x"$dst" = x ]
- then
- echo "$0: no destination specified" >&2
- exit 1
- else
- :
- fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
- if [ -d "$dst" ]
- then
- dst=$dst/`basename "$src"`
- else
- :
- fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-# this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
- '
-IFS="${IFS-$defaultIFS}"
-
-oIFS=$IFS
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS=$oIFS
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
- pathcomp=$pathcomp$1
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
+
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+-c (ignored)
+-d create directories instead of installing files.
+-g GROUP $chgrpprog installed files to GROUP.
+-m MODE $chmodprog installed files to MODE.
+-o USER $chownprog installed files to USER.
+-s $stripprog installed files.
+-t DIRECTORY install into DIRECTORY.
+-T report an error if DSTFILE is a directory.
+--help display this help and exit.
+--version display version info and exit.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test -n "$1"; do
+ case $1 in
+ -c) shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd=$stripprog
+ shift
+ continue;;
+
+ -t) dstarg=$2
shift
+ shift
+ continue;;
- if [ ! -d "$pathcomp" ] ;
- then
- $mkdirprog "$pathcomp"
- else
- :
- fi
-
- pathcomp=$pathcomp/
+ -T) no_target_directory=true
+ shift
+ continue;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ *) # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ test -n "$dir_arg$dstarg" && break
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dstarg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dstarg"
+ shift # fnord
+ fi
+ shift # arg
+ dstarg=$arg
+ done
+ break;;
+ esac
done
-fi
-
-if [ x"$dir_arg" != x ]
-then
- $doit $instcmd "$dst" &&
- if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
- if [ x"$transformarg" = x ]
- then
- dstfile=`basename "$dst"`
- else
- dstfile=`basename "$dst" $transformbasename |
- sed $transformarg`$transformbasename
- fi
-
-# don't allow the sed command to completely eliminate the filename
-
- if [ x"$dstfile" = x ]
- then
- dstfile=`basename "$dst"`
- else
- :
- fi
-
-# Make a couple of temp file names in the proper directory.
-
- dsttmp=$dstdir/_inst.$$_
- rmtmp=$dstdir/_rm.$$_
-
-# Trap to clean up temp files at exit.
-
- trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
- trap '(exit $?); exit' 1 2 13 15
-
-# Move or copy the file name to the temp name
-
- $doit $instcmd "$src" "$dsttmp" &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing. If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
-
-# Now remove or move aside any old file at destination location. We try this
-# two ways since rm can't unlink itself on some systems and the destination
-# file might be busy for other reasons. In this case, the final cleanup
-# might fail but the new file should still install successfully.
-
-{
- if [ -f "$dstdir/$dstfile" ]
- then
- $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
- $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
- {
- echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
- (exit 1); exit
- }
- else
- :
- fi
-} &&
-
-# Now rename the file to the real destination.
+if test -z "$1"; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
- $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+for src
+do
+ # Protect names starting with `-'.
+ case $src in
+ -*) src=./$src ;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ src=
+
+ if test -d "$dst"; then
+ mkdircmd=:
+ chmodcmd=
+ else
+ mkdircmd=$mkdirprog
+ fi
+ else
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dstarg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+
+ dst=$dstarg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst ;;
+ esac
-fi &&
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dstarg: Is a directory" >&2
+ exit 1
+ fi
+ dst=$dst/`basename "$src"`
+ fi
+ fi
+
+ # This sed command emulates the dirname command.
+ dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+
+ # Make sure that the destination directory exists.
+
+ # Skip lots of stat calls in the usual case.
+ if test ! -d "$dstdir"; then
+ defaultIFS='
+ '
+ IFS="${IFS-$defaultIFS}"
+
+ oIFS=$IFS
+ # Some sh's can't handle IFS=/ for some reason.
+ IFS='%'
+ set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+ shift
+ IFS=$oIFS
+
+ pathcomp=
+
+ while test $# -ne 0 ; do
+ pathcomp=$pathcomp$1
+ shift
+ if test ! -d "$pathcomp"; then
+ $mkdirprog "$pathcomp"
+ # mkdir can fail with a `File exist' error in case several
+ # install-sh are creating the directory concurrently. This
+ # is OK.
+ test -d "$pathcomp" || exit
+ fi
+ pathcomp=$pathcomp/
+ done
+ fi
+
+ if test -n "$dir_arg"; then
+ $doit $mkdircmd "$dst" \
+ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
+
+ else
+ dstfile=`basename "$dst"`
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Copy the file name to the temp name.
+ $doit $cpprog "$src" "$dsttmp" &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+
+ # Now rename the file to the real destination.
+ { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
+ || {
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ if test -f "$dstdir/$dstfile"; then
+ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
+ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+ || {
+ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+ (exit 1); exit 1
+ }
+ else
+ :
+ fi
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+ }
+ }
+ fi || { (exit 1); exit 1; }
+done
# The final little trick to "correctly" pass the exit status to the exit trap.
-
{
- (exit 0); exit
+ (exit 0); exit 0
}
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/lighttpd.spec b/lighttpd.spec
index 170ebbf..30e77b9 100644
--- a/lighttpd.spec
+++ b/lighttpd.spec
@@ -1,6 +1,6 @@
Summary: A fast webserver with minimal memory-footprint (lighttpd)
Name: lighttpd
-Version: 1.4.11
+Version: 1.4.12
Release: 1
Source: http://jan.kneschke.de/projects/lighttpd/download/lighttpd-%version.tar.gz
Packager: Jan Kneschke <jan@kneschke.de>
diff --git a/missing b/missing
index 6a37006..09edd88 100755
--- a/missing
+++ b/missing
@@ -1,6 +1,10 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
+
+scriptversion=2005-02-08.22
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
@@ -38,18 +42,24 @@ else
configure_ac=configure.in
fi
+msg="missing on your system"
+
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
+ # Exit code 63 means version mismatch. This often happens
+ # when the user try to use an ancient version of a tool on
+ # a file that requires a minimum version. In this case we
+ # we should proceed has if the program had been absent, or
+ # if --run hadn't been passed.
+ if test $? = 63; then
+ run=:
+ msg="probably too old"
+ fi
;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
-h|--h|--he|--hel|--help)
echo "\
@@ -74,11 +84,15 @@ Supported PROGRAM values:
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
- yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
- echo "missing 0.4 - GNU automake"
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
;;
-*)
@@ -87,14 +101,44 @@ Supported PROGRAM values:
exit 1
;;
- aclocal*)
+esac
+
+# Now exit if we have it, but it failed. Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case "$1" in
+ lex|yacc)
+ # Not GNU programs, they don't have --version.
+ ;;
+
+ tar)
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ exit 1
+ fi
+ ;;
+
+ *)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ # Could not run --version or --help. This is probably someone
+ # running `$TOOL --version' or `$TOOL --help' to check whether
+ # $TOOL exists and not knowing $TOOL uses missing.
+ exit 1
fi
+ ;;
+esac
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+ aclocal*)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
@@ -102,13 +146,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
autoconf)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
@@ -116,13 +155,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
autoheader)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
@@ -140,13 +174,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
automake*)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
@@ -156,16 +185,11 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
autom4te)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
- system. You might have modified some files without having the
+WARNING: \`$1' is needed, but is $msg.
+ You might have modified some files without having the
proper tools for further handling them.
- You can get \`$1Help2man' as part of \`Autoconf' from any GNU
+ You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
@@ -185,7 +209,7 @@ WARNING: \`$1' is needed, and you do not seem to have it handy on your
bison|yacc)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
@@ -215,7 +239,7 @@ WARNING: \`$1' is missing on your system. You should only need it if
lex|flex)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
@@ -237,13 +261,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
help2man)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
@@ -262,32 +281,27 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
makeinfo)
- if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
- # We have makeinfo, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
+ # The file to touch is that specified with -o ...
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
- file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+ # ... or it is the one specified with @setfilename ...
+ infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+ # ... or it is derived from the source name (dir/f.texi becomes f.info)
+ test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
touch $file
;;
tar)
shift
- if test -n "$run"; then
- echo 1>&2 "ERROR: \`tar' requires --run"
- exit 1
- fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
@@ -323,10 +337,10 @@ WARNING: I can't seem to be able to run \`tar' with the given arguments.
*)
echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
- system. You might have modified some files without having the
+WARNING: \`$1' is needed, and is $msg.
+ You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
- it often tells you about the needed prerequirements for installing
+ it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
@@ -334,3 +348,10 @@ WARNING: \`$1' is needed, and you do not seem to have it handy on your
esac
exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/mkinstalldirs b/mkinstalldirs
deleted file mode 100755
index d2d5f21..0000000
--- a/mkinstalldirs
+++ /dev/null
@@ -1,111 +0,0 @@
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman@prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain
-
-errstatus=0
-dirmode=""
-
-usage="\
-Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
-
-# process command line arguments
-while test $# -gt 0 ; do
- case $1 in
- -h | --help | --h*) # -h for help
- echo "$usage" 1>&2
- exit 0
- ;;
- -m) # -m PERM arg
- shift
- test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
- dirmode=$1
- shift
- ;;
- --) # stop option processing
- shift
- break
- ;;
- -*) # unknown option
- echo "$usage" 1>&2
- exit 1
- ;;
- *) # first non-opt arg
- break
- ;;
- esac
-done
-
-for file
-do
- if test -d "$file"; then
- shift
- else
- break
- fi
-done
-
-case $# in
- 0) exit 0 ;;
-esac
-
-case $dirmode in
- '')
- if mkdir -p -- . 2>/dev/null; then
- echo "mkdir -p -- $*"
- exec mkdir -p -- "$@"
- fi
- ;;
- *)
- if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
- echo "mkdir -m $dirmode -p -- $*"
- exec mkdir -m "$dirmode" -p -- "$@"
- fi
- ;;
-esac
-
-for file
-do
- set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
- shift
-
- pathcomp=
- for d
- do
- pathcomp="$pathcomp$d"
- case $pathcomp in
- -*) pathcomp=./$pathcomp ;;
- esac
-
- if test ! -d "$pathcomp"; then
- echo "mkdir $pathcomp"
-
- mkdir "$pathcomp" || lasterr=$?
-
- if test ! -d "$pathcomp"; then
- errstatus=$lasterr
- else
- if test ! -z "$dirmode"; then
- echo "chmod $dirmode $pathcomp"
- lasterr=""
- chmod "$dirmode" "$pathcomp" || lasterr=$?
-
- if test ! -z "$lasterr"; then
- errstatus=$lasterr
- fi
- fi
- fi
- fi
-
- pathcomp="$pathcomp/"
- done
-done
-
-exit $errstatus
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# End:
-# mkinstalldirs ends here
diff --git a/openwrt/Makefile.in b/openwrt/Makefile.in
index 6d4fc07..8cd22be 100644
--- a/openwrt/Makefile.in
+++ b/openwrt/Makefile.in
@@ -43,7 +43,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = control lighttpd.mk
SOURCES =
@@ -144,6 +144,7 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
diff --git a/openwrt/control b/openwrt/control
index d2bec04..ec80f98 100644
--- a/openwrt/control
+++ b/openwrt/control
@@ -1,8 +1,8 @@
Package: lighttpd
-Version: 1.4.11
+Version: 1.4.12
Architecture: mipsel
Maintainer: Jan Kneschke <jan@kneschke.de>
-Source: http://jan.kneschke.de/projects/lighttpd/download/lighttpd-1.4.11.tar.gz
+Source: http://jan.kneschke.de/projects/lighttpd/download/lighttpd-1.4.12.tar.gz
Section: net
Priority: optional
Depends:
diff --git a/openwrt/lighttpd.mk b/openwrt/lighttpd.mk
index adcc8d2..e198e3f 100644
--- a/openwrt/lighttpd.mk
+++ b/openwrt/lighttpd.mk
@@ -10,7 +10,7 @@
# For this example we'll use a fairly simple package that compiles easily
# and has sources available for download at sourceforge
-LIGHTTPD=lighttpd-1.4.11
+LIGHTTPD=lighttpd-1.4.12
LIGHTTPD_TARGET=.built
LIGHTTPD_DIR=$(BUILD_DIR)/$(LIGHTTPD)
LIGHTTPD_IPK=$(BUILD_DIR)/$(LIGHTTPD)_mipsel.ipk
diff --git a/src/Makefile.in b/src/Makefile.in
index 5b7e8c2..7a316ce 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -57,7 +57,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -418,6 +418,7 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
diff --git a/src/base.h b/src/base.h
index 98e23b8..0b5ca76 100644
--- a/src/base.h
+++ b/src/base.h
@@ -399,6 +399,7 @@ typedef struct {
#ifdef USE_OPENSSL
SSL *ssl;
+ int is_ssl_error_want;
#endif
} connection;
diff --git a/src/buffer.c b/src/buffer.c
index 40b8cb9..2026738 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -914,6 +914,18 @@ int buffer_path_simplify(buffer *dest, buffer *src)
start = dest->ptr;
out = dest->ptr;
slash = dest->ptr;
+
+
+#if defined(__WIN32) || defined(__CYGWIN__)
+ /* cygwin is treating \ and / the same, so we have to that too
+ */
+
+ for (walk = src->ptr; *walk; walk++) {
+ if (*walk == '\\') *walk = '/';
+ }
+ walk = src->ptr;
+#endif
+
while (*walk == ' ') {
walk++;
}
diff --git a/src/connections.c b/src/connections.c
index 3690448..fc67e59 100644
--- a/src/connections.c
+++ b/src/connections.c
@@ -198,12 +198,30 @@ static int connection_handle_read(server *srv, connection *con) {
server_socket *srv_sock = con->srv_socket;
#endif
- b = chunkqueue_get_append_buffer(con->read_queue);
- buffer_prepare_copy(b, 4096);
-
#ifdef USE_OPENSSL
if (srv_sock->is_ssl) {
+ /* don't resize the buffer if we were in SSL_ERROR_WANT_* */
+ if (!con->is_ssl_error_want) {
+ b = chunkqueue_get_append_buffer(con->read_queue);
+ buffer_prepare_copy(b, SSL_pending(con->ssl) + (16 * 1024)); /* the pending bytes + 16kb */
+ } else {
+ /* we have to get the last buffer */
+ chunk *c;
+
+ for (c = con->read_queue->first; c && c->next; c = c->next);
+
+ if (!c) {
+ b = chunkqueue_get_append_buffer(con->read_queue);
+ buffer_prepare_copy(b, SSL_pending(con->ssl) + (16 * 1024)); /* the pending bytes + 16kb */
+ } else {
+ log_error_write(srv, __FILE__, __LINE__, "s",
+ "(debug) re-using last buffer after a SSL_ERROR_WANT_READ - good, please report this to jan@kneschke.de");
+
+ b = c->mem;
+ }
+ }
len = SSL_read(con->ssl, b->ptr, b->size - 1);
+ con->is_ssl_error_want = 0; /* reset */
} else {
if (ioctl(con->fd, FIONREAD, &toread)) {
log_error_write(srv, __FILE__, __LINE__, "sd",
@@ -211,11 +229,14 @@ static int connection_handle_read(server *srv, connection *con) {
con->fd);
return -1;
}
+ b = chunkqueue_get_append_buffer(con->read_queue);
buffer_prepare_copy(b, toread);
len = read(con->fd, b->ptr, b->size - 1);
}
#elif defined(__WIN32)
+ b = chunkqueue_get_append_buffer(con->read_queue);
+ buffer_prepare_copy(b, 4 * 1024);
len = recv(con->fd, b->ptr, b->size - 1, 0);
#else
if (ioctl(con->fd, FIONREAD, &toread)) {
@@ -224,6 +245,7 @@ static int connection_handle_read(server *srv, connection *con) {
con->fd);
return -1;
}
+ b = chunkqueue_get_append_buffer(con->read_queue);
buffer_prepare_copy(b, toread);
len = read(con->fd, b->ptr, b->size - 1);
@@ -238,6 +260,8 @@ static int connection_handle_read(server *srv, connection *con) {
switch ((r = SSL_get_error(con->ssl, len))) {
case SSL_ERROR_WANT_READ:
+ case SSL_ERROR_WANT_WRITE:
+ con->is_ssl_error_want = 1;
return 0;
case SSL_ERROR_SYSCALL:
/**
@@ -777,6 +801,10 @@ int connection_reset(server *srv, connection *con) {
#else
memset(con->cond_cache, 0, sizeof(cond_cache_t) * srv->config_context->used);
#endif
+
+#ifdef USE_OPENSSL
+ con->is_ssl_error_want = 0;
+#endif
con->header_len = 0;
con->in_error_handler = 0;
diff --git a/src/mod_webdav.c b/src/mod_webdav.c
index c78e609..2e67c96 100644
--- a/src/mod_webdav.c
+++ b/src/mod_webdav.c
@@ -3,13 +3,13 @@
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
-#include <dirent.h>
#include <errno.h>
-#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <assert.h>
-#include <sys/mman.h>
+
+#include <unistd.h>
+#include <dirent.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -23,6 +23,11 @@
#include <sqlite3.h>
#endif
+#if defined(HAVE_LIBXML_H) && defined(HAVE_SQLITE3_H) && defined(HAVE_UUID_H)
+#define USE_LOCKS
+#include <uuid/uuid.h>
+#endif
+
#include "base.h"
#include "log.h"
#include "buffer.h"
@@ -33,13 +38,14 @@
#include "stream.h"
#include "stat_cache.h"
+#include "sys-mmap.h"
/**
* this is a webdav for a lighttpd plugin
*
- * at least a very basic one.
+ * at least a very basic one.
* - for now it is read-only and we only support PROPFIND
- *
+ *
*/
@@ -58,64 +64,70 @@ typedef struct {
sqlite3_stmt *stmt_delete_prop;
sqlite3_stmt *stmt_select_prop;
sqlite3_stmt *stmt_select_propnames;
-
+
sqlite3_stmt *stmt_delete_uri;
sqlite3_stmt *stmt_move_uri;
sqlite3_stmt *stmt_copy_uri;
+
+ sqlite3_stmt *stmt_remove_lock;
+ sqlite3_stmt *stmt_create_lock;
+ sqlite3_stmt *stmt_read_lock;
+ sqlite3_stmt *stmt_read_lock_by_uri;
+ sqlite3_stmt *stmt_refresh_lock;
#endif
} plugin_config;
typedef struct {
PLUGIN_DATA;
-
+
buffer *tmp_buf;
request_uri uri;
physical physical;
plugin_config **config_storage;
-
- plugin_config conf;
+
+ plugin_config conf;
} plugin_data;
/* init the plugin data */
INIT_FUNC(mod_webdav_init) {
plugin_data *p;
-
+
p = calloc(1, sizeof(*p));
-
+
p->tmp_buf = buffer_init();
p->uri.scheme = buffer_init();
p->uri.path_raw = buffer_init();
p->uri.path = buffer_init();
p->uri.authority = buffer_init();
-
+
p->physical.path = buffer_init();
p->physical.rel_path = buffer_init();
p->physical.doc_root = buffer_init();
p->physical.basedir = buffer_init();
-
+
return p;
}
/* detroy the plugin data */
FREE_FUNC(mod_webdav_free) {
plugin_data *p = p_d;
-
+
UNUSED(srv);
if (!p) return HANDLER_GO_ON;
-
+
if (p->config_storage) {
size_t i;
for (i = 0; i < srv->config_context->used; i++) {
plugin_config *s = p->config_storage[i];
if (!s) continue;
-
+
buffer_free(s->sqlite_db_name);
#ifdef USE_PROPPATCH
- if (s->sql) {
+ if (s->sql) {
sqlite3_finalize(s->stmt_delete_prop);
sqlite3_finalize(s->stmt_delete_uri);
sqlite3_finalize(s->stmt_copy_uri);
@@ -123,9 +135,15 @@ FREE_FUNC(mod_webdav_free) {
sqlite3_finalize(s->stmt_update_prop);
sqlite3_finalize(s->stmt_select_prop);
sqlite3_finalize(s->stmt_select_propnames);
+
+ sqlite3_finalize(s->stmt_read_lock);
+ sqlite3_finalize(s->stmt_read_lock_by_uri);
+ sqlite3_finalize(s->stmt_create_lock);
+ sqlite3_finalize(s->stmt_remove_lock);
+ sqlite3_finalize(s->stmt_refresh_lock);
sqlite3_close(s->sql);
}
-#endif
+#endif
free(s);
}
free(p->config_storage);
@@ -135,16 +153,16 @@ FREE_FUNC(mod_webdav_free) {
buffer_free(p->uri.path_raw);
buffer_free(p->uri.path);
buffer_free(p->uri.authority);
-
+
buffer_free(p->physical.path);
buffer_free(p->physical.rel_path);
buffer_free(p->physical.doc_root);
buffer_free(p->physical.basedir);
-
+
buffer_free(p->tmp_buf);
-
+
free(p);
-
+
return HANDLER_GO_ON;
}
@@ -153,32 +171,32 @@ FREE_FUNC(mod_webdav_free) {
SETDEFAULTS_FUNC(mod_webdav_set_defaults) {
plugin_data *p = p_d;
size_t i = 0;
-
- config_values_t cv[] = {
+
+ config_values_t cv[] = {
{ "webdav.activate", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 0 */
{ "webdav.is-readonly", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 1 */
{ "webdav.sqlite-db-name", NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_CONNECTION }, /* 2 */
{ "webdav.log-xml", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 3 */
{ NULL, NULL, T_CONFIG_UNSET, T_CONFIG_SCOPE_UNSET }
};
-
+
if (!p) return HANDLER_ERROR;
-
+
p->config_storage = calloc(1, srv->config_context->used * sizeof(specific_config *));
-
+
for (i = 0; i < srv->config_context->used; i++) {
plugin_config *s;
-
+
s = calloc(1, sizeof(plugin_config));
s->sqlite_db_name = buffer_init();
-
+
cv[0].destination = &(s->enabled);
cv[1].destination = &(s->is_readonly);
cv[2].destination = s->sqlite_db_name;
cv[3].destination = &(s->log_xml);
-
+
p->config_storage[i] = s;
-
+
if (0 != config_insert_values_global(srv, ((data_config *)srv->config_context->data[i])->value, cv)) {
return HANDLER_ERROR;
}
@@ -193,8 +211,26 @@ SETDEFAULTS_FUNC(mod_webdav_set_defaults) {
return HANDLER_ERROR;
}
- if (SQLITE_OK != sqlite3_prepare(s->sql,
- CONST_STR_LEN("SELECT value FROM properties WHERE resource = ? AND prop = ? AND ns = ?"),
+ if (SQLITE_OK != sqlite3_exec(s->sql,
+ "CREATE TABLE properties ("
+ " resource TEXT NOT NULL,"
+ " prop TEXT NOT NULL,"
+ " ns TEXT NOT NULL,"
+ " value TEXT NOT NULL,"
+ " PRIMARY KEY(resource, prop, ns))",
+ NULL, NULL, &err)) {
+
+ if (0 != strcmp(err, "table properties already exists")) {
+ log_error_write(srv, __FILE__, __LINE__, "ss", "can't open transaction:", err);
+ sqlite3_free(err);
+
+ return HANDLER_ERROR;
+ }
+ sqlite3_free(err);
+ }
+
+ if (SQLITE_OK != sqlite3_prepare(s->sql,
+ CONST_STR_LEN("SELECT value FROM properties WHERE resource = ? AND prop = ? AND ns = ?"),
&(s->stmt_select_prop), &next_stmt)) {
/* prepare failed */
@@ -202,8 +238,8 @@ SETDEFAULTS_FUNC(mod_webdav_set_defaults) {
return HANDLER_ERROR;
}
- if (SQLITE_OK != sqlite3_prepare(s->sql,
- CONST_STR_LEN("SELECT ns, prop FROM properties WHERE resource = ?"),
+ if (SQLITE_OK != sqlite3_prepare(s->sql,
+ CONST_STR_LEN("SELECT ns, prop FROM properties WHERE resource = ?"),
&(s->stmt_select_propnames), &next_stmt)) {
/* prepare failed */
@@ -211,16 +247,67 @@ SETDEFAULTS_FUNC(mod_webdav_set_defaults) {
return HANDLER_ERROR;
}
- if (SQLITE_OK != sqlite3_exec(s->sql,
- "CREATE TABLE properties ("
+
+ if (SQLITE_OK != sqlite3_prepare(s->sql,
+ CONST_STR_LEN("REPLACE INTO properties (resource, prop, ns, value) VALUES (?, ?, ?, ?)"),
+ &(s->stmt_update_prop), &next_stmt)) {
+ /* prepare failed */
+
+ log_error_write(srv, __FILE__, __LINE__, "ss", "sqlite3_prepare failed:", sqlite3_errmsg(s->sql));
+ return HANDLER_ERROR;
+ }
+
+ if (SQLITE_OK != sqlite3_prepare(s->sql,
+ CONST_STR_LEN("DELETE FROM properties WHERE resource = ? AND prop = ? AND ns = ?"),
+ &(s->stmt_delete_prop), &next_stmt)) {
+ /* prepare failed */
+ log_error_write(srv, __FILE__, __LINE__, "ss", "sqlite3_prepare failed", sqlite3_errmsg(s->sql));
+
+ return HANDLER_ERROR;
+ }
+
+ if (SQLITE_OK != sqlite3_prepare(s->sql,
+ CONST_STR_LEN("DELETE FROM properties WHERE resource = ?"),
+ &(s->stmt_delete_uri), &next_stmt)) {
+ /* prepare failed */
+ log_error_write(srv, __FILE__, __LINE__, "ss", "sqlite3_prepare failed", sqlite3_errmsg(s->sql));
+
+ return HANDLER_ERROR;
+ }
+
+ if (SQLITE_OK != sqlite3_prepare(s->sql,
+ CONST_STR_LEN("INSERT INTO properties SELECT ?, prop, ns, value FROM properties WHERE resource = ?"),
+ &(s->stmt_copy_uri), &next_stmt)) {
+ /* prepare failed */
+ log_error_write(srv, __FILE__, __LINE__, "ss", "sqlite3_prepare failed", sqlite3_errmsg(s->sql));
+
+ return HANDLER_ERROR;
+ }
+
+ if (SQLITE_OK != sqlite3_prepare(s->sql,
+ CONST_STR_LEN("UPDATE properties SET resource = ? WHERE resource = ?"),
+ &(s->stmt_move_uri), &next_stmt)) {
+ /* prepare failed */
+ log_error_write(srv, __FILE__, __LINE__, "ss", "sqlite3_prepare failed", sqlite3_errmsg(s->sql));
+
+ return HANDLER_ERROR;
+ }
+
+ /* LOCKS */
+
+ if (SQLITE_OK != sqlite3_exec(s->sql,
+ "CREATE TABLE locks ("
+ " locktoken TEXT NOT NULL,"
" resource TEXT NOT NULL,"
- " prop TEXT NOT NULL,"
- " ns TEXT NOT NULL,"
- " value TEXT NOT NULL,"
- " PRIMARY KEY(resource, prop, ns))",
+ " lockscope TEXT NOT NULL,"
+ " locktype TEXT NOT NULL,"
+ " owner TEXT NOT NULL,"
+ " depth INT NOT NULL,"
+ " timeout TIMESTAMP NOT NULL,"
+ " PRIMARY KEY(locktoken))",
NULL, NULL, &err)) {
- if (0 != strcmp(err, "table properties already exists")) {
+ if (0 != strcmp(err, "table locks already exists")) {
log_error_write(srv, __FILE__, __LINE__, "ss", "can't open transaction:", err);
sqlite3_free(err);
@@ -228,127 +315,140 @@ SETDEFAULTS_FUNC(mod_webdav_set_defaults) {
}
sqlite3_free(err);
}
-
- if (SQLITE_OK != sqlite3_prepare(s->sql,
- CONST_STR_LEN("REPLACE INTO properties (resource, prop, ns, value) VALUES (?, ?, ?, ?)"),
- &(s->stmt_update_prop), &next_stmt)) {
+
+ if (SQLITE_OK != sqlite3_prepare(s->sql,
+ CONST_STR_LEN("INSERT INTO locks (locktoken, resource, lockscope, locktype, owner, depth, timeout) VALUES (?,?,?,?,?,?, CURRENT_TIME + 600)"),
+ &(s->stmt_create_lock), &next_stmt)) {
/* prepare failed */
+ log_error_write(srv, __FILE__, __LINE__, "ss", "sqlite3_prepare failed", sqlite3_errmsg(s->sql));
- log_error_write(srv, __FILE__, __LINE__, "ss", "sqlite3_prepare failed:", sqlite3_errmsg(s->sql));
return HANDLER_ERROR;
}
- if (SQLITE_OK != sqlite3_prepare(s->sql,
- CONST_STR_LEN("DELETE FROM properties WHERE resource = ? AND prop = ? AND ns = ?"),
- &(s->stmt_delete_prop), &next_stmt)) {
+ if (SQLITE_OK != sqlite3_prepare(s->sql,
+ CONST_STR_LEN("DELETE FROM locks WHERE locktoken = ?"),
+ &(s->stmt_remove_lock), &next_stmt)) {
/* prepare failed */
log_error_write(srv, __FILE__, __LINE__, "ss", "sqlite3_prepare failed", sqlite3_errmsg(s->sql));
return HANDLER_ERROR;
}
- if (SQLITE_OK != sqlite3_prepare(s->sql,
- CONST_STR_LEN("DELETE FROM properties WHERE resource = ?"),
- &(s->stmt_delete_uri), &next_stmt)) {
+ if (SQLITE_OK != sqlite3_prepare(s->sql,
+ CONST_STR_LEN("SELECT locktoken, resource, lockscope, locktype, owner, depth, timeout FROM locks WHERE locktoken = ?"),
+ &(s->stmt_read_lock), &next_stmt)) {
/* prepare failed */
log_error_write(srv, __FILE__, __LINE__, "ss", "sqlite3_prepare failed", sqlite3_errmsg(s->sql));
return HANDLER_ERROR;
}
- if (SQLITE_OK != sqlite3_prepare(s->sql,
- CONST_STR_LEN("INSERT INTO properties SELECT ?, prop, ns, value FROM properties WHERE resource = ?"),
- &(s->stmt_copy_uri), &next_stmt)) {
+ if (SQLITE_OK != sqlite3_prepare(s->sql,
+ CONST_STR_LEN("SELECT locktoken, resource, lockscope, locktype, owner, depth, timeout FROM locks WHERE resource = ?"),
+ &(s->stmt_read_lock_by_uri), &next_stmt)) {
/* prepare failed */
log_error_write(srv, __FILE__, __LINE__, "ss", "sqlite3_prepare failed", sqlite3_errmsg(s->sql));
return HANDLER_ERROR;
}
- if (SQLITE_OK != sqlite3_prepare(s->sql,
- CONST_STR_LEN("UPDATE properties SET resource = ? WHERE resource = ?"),
- &(s->stmt_move_uri), &next_stmt)) {
+ if (SQLITE_OK != sqlite3_prepare(s->sql,
+ CONST_STR_LEN("UPDATE locks SET timeout = CURRENT_TIME + 600 WHERE locktoken = ?"),
+ &(s->stmt_refresh_lock), &next_stmt)) {
/* prepare failed */
log_error_write(srv, __FILE__, __LINE__, "ss", "sqlite3_prepare failed", sqlite3_errmsg(s->sql));
return HANDLER_ERROR;
}
+
+
#else
log_error_write(srv, __FILE__, __LINE__, "s", "Sorry, no sqlite3 and libxml2 support include, compile with --with-webdav-props");
return HANDLER_ERROR;
#endif
}
}
-
+
return HANDLER_GO_ON;
}
-#define PATCH(x) \
+#define PATCH_OPTION(x) \
p->conf.x = s->x;
static int mod_webdav_patch_connection(server *srv, connection *con, plugin_data *p) {
size_t i, j;
plugin_config *s = p->config_storage[0];
-
- PATCH(enabled);
- PATCH(is_readonly);
- PATCH(log_xml);
-
+
+ PATCH_OPTION(enabled);
+ PATCH_OPTION(is_readonly);
+ PATCH_OPTION(log_xml);
+
#ifdef USE_PROPPATCH
- PATCH(sql);
- PATCH(stmt_update_prop);
- PATCH(stmt_delete_prop);
- PATCH(stmt_select_prop);
- PATCH(stmt_select_propnames);
-
- PATCH(stmt_delete_uri);
- PATCH(stmt_move_uri);
- PATCH(stmt_copy_uri);
+ PATCH_OPTION(sql);
+ PATCH_OPTION(stmt_update_prop);
+ PATCH_OPTION(stmt_delete_prop);
+ PATCH_OPTION(stmt_select_prop);
+ PATCH_OPTION(stmt_select_propnames);
+
+ PATCH_OPTION(stmt_delete_uri);
+ PATCH_OPTION(stmt_move_uri);
+ PATCH_OPTION(stmt_copy_uri);
+
+ PATCH_OPTION(stmt_remove_lock);
+ PATCH_OPTION(stmt_refresh_lock);
+ PATCH_OPTION(stmt_create_lock);
+ PATCH_OPTION(stmt_read_lock);
+ PATCH_OPTION(stmt_read_lock_by_uri);
#endif
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
-
+
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
-
+
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];
-
+
if (buffer_is_equal_string(du->key, CONST_STR_LEN("webdav.activate"))) {
- PATCH(enabled);
+ PATCH_OPTION(enabled);
} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("webdav.is-readonly"))) {
- PATCH(is_readonly);
+ PATCH_OPTION(is_readonly);
} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("webdav.log-xml"))) {
- PATCH(log_xml);
+ PATCH_OPTION(log_xml);
} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("webdav.sqlite-db-name"))) {
#ifdef USE_PROPPATCH
- PATCH(sql);
- PATCH(stmt_update_prop);
- PATCH(stmt_delete_prop);
- PATCH(stmt_select_prop);
- PATCH(stmt_select_propnames);
-
- PATCH(stmt_delete_uri);
- PATCH(stmt_move_uri);
- PATCH(stmt_copy_uri);
+ PATCH_OPTION(sql);
+ PATCH_OPTION(stmt_update_prop);
+ PATCH_OPTION(stmt_delete_prop);
+ PATCH_OPTION(stmt_select_prop);
+ PATCH_OPTION(stmt_select_propnames);
+
+ PATCH_OPTION(stmt_delete_uri);
+ PATCH_OPTION(stmt_move_uri);
+ PATCH_OPTION(stmt_copy_uri);
+
+ PATCH_OPTION(stmt_remove_lock);
+ PATCH_OPTION(stmt_refresh_lock);
+ PATCH_OPTION(stmt_create_lock);
+ PATCH_OPTION(stmt_read_lock);
+ PATCH_OPTION(stmt_read_lock_by_uri);
#endif
}
}
}
-
+
return 0;
}
-#undef PATCH
URIHANDLER_FUNC(mod_webdav_uri_handler) {
plugin_data *p = p_d;
-
+
UNUSED(srv);
if (con->uri.path->used == 0) return HANDLER_GO_ON;
-
+
mod_webdav_patch_connection(srv, con, p);
if (!p->conf.enabled) return HANDLER_GO_ON;
@@ -362,20 +462,20 @@ URIHANDLER_FUNC(mod_webdav_uri_handler) {
if (p->conf.is_readonly) {
response_header_insert(srv, con, CONST_STR_LEN("Allow"), CONST_STR_LEN("PROPFIND"));
} else {
- response_header_insert(srv, con, CONST_STR_LEN("Allow"), CONST_STR_LEN("PROPFIND, DELETE, MKCOL, PUT, MOVE, COPY, PROPPATCH"));
+ response_header_insert(srv, con, CONST_STR_LEN("Allow"), CONST_STR_LEN("PROPFIND, DELETE, MKCOL, PUT, MOVE, COPY, PROPPATCH, LOCK, UNLOCK"));
}
break;
default:
break;
}
-
+
/* not found */
return HANDLER_GO_ON;
}
-static int webdav_gen_prop_tag(server *srv, connection *con,
- char *prop_name,
- char *prop_ns,
- char *value,
+static int webdav_gen_prop_tag(server *srv, connection *con,
+ char *prop_name,
+ char *prop_ns,
+ char *value,
buffer *b) {
UNUSED(srv);
@@ -414,7 +514,7 @@ static int webdav_gen_response_status_tag(server *srv, connection *con, physical
buffer_append_string_buffer(b, dst->rel_path);
buffer_append_string(b,"</D:href>\n");
buffer_append_string(b,"<D:status>\n");
-
+
if (con->request.http_version == HTTP_VERSION_1_1) {
BUFFER_COPY_STRING_CONST(b, "HTTP/1.1 ");
} else {
@@ -458,14 +558,13 @@ static int webdav_delete_file(server *srv, connection *con, plugin_data *p, phys
/* bind the values to the insert */
- sqlite3_bind_text(stmt, 1,
- dst->rel_path->ptr,
+ sqlite3_bind_text(stmt, 1,
+ dst->rel_path->ptr,
dst->rel_path->used - 1,
SQLITE_TRANSIENT);
-
+
if (SQLITE_DONE != sqlite3_step(stmt)) {
/* */
- WP();
}
}
#endif
@@ -493,12 +592,12 @@ static int webdav_delete_dir(server *srv, connection *con, plugin_data *p, physi
(de->d_name[0] == '.' && de->d_name[1] == '.' && de->d_name[2] == '\0')) {
continue;
/* ignore the parent dir */
- }
+ }
buffer_copy_string_buffer(d.path, dst->path);
BUFFER_APPEND_SLASH(d.path);
buffer_append_string(d.path, de->d_name);
-
+
buffer_copy_string_buffer(d.rel_path, dst->rel_path);
BUFFER_APPEND_SLASH(d.rel_path);
buffer_append_string(d.rel_path, de->d_name);
@@ -508,7 +607,7 @@ static int webdav_delete_dir(server *srv, connection *con, plugin_data *p, physi
/* don't about it yet, rmdir will fail too */
} else if (S_ISDIR(st.st_mode)) {
have_multi_status = webdav_delete_dir(srv, con, p, &d, b);
-
+
/* try to unlink it */
if (-1 == rmdir(d.path->ptr)) {
switch(errno) {
@@ -535,14 +634,13 @@ static int webdav_delete_dir(server *srv, connection *con, plugin_data *p, physi
/* bind the values to the insert */
- sqlite3_bind_text(stmt, 1,
- d.rel_path->ptr,
+ sqlite3_bind_text(stmt, 1,
+ d.rel_path->ptr,
d.rel_path->used - 1,
SQLITE_TRANSIENT);
-
+
if (SQLITE_DONE != sqlite3_step(stmt)) {
/* */
- WP();
}
}
#endif
@@ -569,7 +667,7 @@ static int webdav_copy_file(server *srv, connection *con, plugin_data *p, physic
if (stream_open(&s, src->path)) {
return 403;
}
-
+
if (-1 == (ofd = open(dst->path->ptr, O_WRONLY|O_TRUNC|O_CREAT|(overwrite ? 0 : O_EXCL), 0600))) {
/* opening the destination failed for some reason */
switch(errno) {
@@ -601,7 +699,7 @@ static int webdav_copy_file(server *srv, connection *con, plugin_data *p, physic
break;
}
}
-
+
stream_close(&s);
close(ofd);
@@ -614,19 +712,18 @@ static int webdav_copy_file(server *srv, connection *con, plugin_data *p, physic
sqlite3_reset(stmt);
/* bind the values to the insert */
- sqlite3_bind_text(stmt, 1,
- dst->rel_path->ptr,
+ sqlite3_bind_text(stmt, 1,
+ dst->rel_path->ptr,
dst->rel_path->used - 1,
SQLITE_TRANSIENT);
- sqlite3_bind_text(stmt, 2,
- src->rel_path->ptr,
+ sqlite3_bind_text(stmt, 2,
+ src->rel_path->ptr,
src->rel_path->used - 1,
SQLITE_TRANSIENT);
-
+
if (SQLITE_DONE != sqlite3_step(stmt)) {
/* */
- WP();
}
}
}
@@ -655,7 +752,7 @@ static int webdav_copy_dir(server *srv, connection *con, plugin_data *p, physica
(de->d_name[0] == '.' && de->d_name[1] == '.' && de->d_name[2] == '\0')) {
continue;
}
-
+
buffer_copy_string_buffer(s.path, src->path);
BUFFER_APPEND_SLASH(s.path);
buffer_append_string(s.path, de->d_name);
@@ -692,19 +789,18 @@ static int webdav_copy_dir(server *srv, connection *con, plugin_data *p, physica
sqlite3_reset(stmt);
/* bind the values to the insert */
- sqlite3_bind_text(stmt, 1,
- dst->rel_path->ptr,
+ sqlite3_bind_text(stmt, 1,
+ dst->rel_path->ptr,
dst->rel_path->used - 1,
SQLITE_TRANSIENT);
- sqlite3_bind_text(stmt, 2,
- src->rel_path->ptr,
+ sqlite3_bind_text(stmt, 2,
+ src->rel_path->ptr,
src->rel_path->used - 1,
SQLITE_TRANSIENT);
-
+
if (SQLITE_DONE != sqlite3_step(stmt)) {
/* */
- WP();
}
}
#endif
@@ -721,7 +817,7 @@ static int webdav_copy_dir(server *srv, connection *con, plugin_data *p, physica
buffer_free(s.rel_path);
buffer_free(d.path);
buffer_free(d.rel_path);
-
+
closedir(srcdir);
}
@@ -748,12 +844,12 @@ static int webdav_get_live_property(server *srv, connection *con, plugin_data *p
if (S_ISDIR(sce->st.st_mode)) {
buffer_append_string(b, "<D:getcontenttype>httpd/unix-directory</D:getcontenttype>");
found = 1;
- } else if(S_ISREG(sce->st.st_mode)) {
+ } else if(S_ISREG(sce->st.st_mode)) {
for (k = 0; k < con->conf.mimetypes->used; k++) {
data_string *ds = (data_string *)con->conf.mimetypes->data[k];
-
+
if (ds->key->used == 0) continue;
-
+
if (buffer_is_equal_right_len(dst->path, ds->key, ds->key->used - 1)) {
buffer_append_string(b,"<D:getcontenttype>");
buffer_append_string_buffer(b, ds->value);
@@ -807,23 +903,23 @@ static int webdav_get_property(server *srv, connection *con, plugin_data *p, phy
/* bind the values to the insert */
- sqlite3_bind_text(stmt, 1,
- dst->rel_path->ptr,
+ sqlite3_bind_text(stmt, 1,
+ dst->rel_path->ptr,
dst->rel_path->used - 1,
SQLITE_TRANSIENT);
- sqlite3_bind_text(stmt, 2,
+ sqlite3_bind_text(stmt, 2,
prop_name,
strlen(prop_name),
SQLITE_TRANSIENT);
- sqlite3_bind_text(stmt, 3,
+ sqlite3_bind_text(stmt, 3,
prop_ns,
strlen(prop_ns),
SQLITE_TRANSIENT);
/* it is the PK */
- while (SQLITE_ROW == sqlite3_step(p->conf.stmt_select_prop)) {
+ while (SQLITE_ROW == sqlite3_step(stmt)) {
/* there is a row for us, we only expect a single col 'value' */
- webdav_gen_prop_tag(srv, con, prop_name, prop_ns, (char *)sqlite3_column_text(p->conf.stmt_select_prop, 0), b);
+ webdav_gen_prop_tag(srv, con, prop_name, prop_ns, (char *)sqlite3_column_text(stmt, 0), b);
found = 1;
}
}
@@ -840,7 +936,7 @@ typedef struct {
char *prop;
} webdav_property;
-webdav_property live_properties[] = {
+webdav_property live_properties[] = {
{ "DAV:", "creationdate" },
{ "DAV:", "displayname" },
{ "DAV:", "getcontentlanguage" },
@@ -871,8 +967,8 @@ static int webdav_get_props(server *srv, connection *con, plugin_data *p, physic
webdav_property *prop;
prop = props->ptr[i];
-
- if (0 != webdav_get_property(srv, con, p,
+
+ if (0 != webdav_get_property(srv, con, p,
dst, prop->prop, prop->ns, b_200)) {
webdav_gen_prop_tag(srv, con, prop->prop, prop->ns, NULL, b_404);
}
@@ -916,12 +1012,12 @@ static int webdav_parse_chunkqueue(server *srv, connection *con, plugin_data *p,
if (-1 == c->file.fd && /* open the file if not already open */
-1 == (c->file.fd = open(c->file.name->ptr, O_RDONLY))) {
log_error_write(srv, __FILE__, __LINE__, "ss", "open failed: ", strerror(errno));
-
+
return -1;
}
-
+
if (MAP_FAILED == (c->file.mmap.start = mmap(0, c->file.length, PROT_READ, MAP_SHARED, c->file.fd, 0))) {
- log_error_write(srv, __FILE__, __LINE__, "ssbd", "mmap failed: ",
+ log_error_write(srv, __FILE__, __LINE__, "ssbd", "mmap failed: ",
strerror(errno), c->file.name, c->file.fd);
return -1;
@@ -938,7 +1034,7 @@ static int webdav_parse_chunkqueue(server *srv, connection *con, plugin_data *p,
if (XML_ERR_OK != (err = xmlParseChunk(ctxt, c->file.mmap.start + c->offset, weHave, 0))) {
log_error_write(srv, __FILE__, __LINE__, "sddd", "xmlParseChunk failed at:", cq->bytes_out, weHave, err);
}
-
+
c->offset += weHave;
cq->bytes_out += weHave;
@@ -956,7 +1052,7 @@ static int webdav_parse_chunkqueue(server *srv, connection *con, plugin_data *p,
if (XML_ERR_OK != (err = xmlParseChunk(ctxt, c->mem->ptr + c->offset, weHave, 0))) {
log_error_write(srv, __FILE__, __LINE__, "sddd", "xmlParseChunk failed at:", cq->bytes_out, weHave, err);
}
-
+
c->offset += weHave;
cq->bytes_out += weHave;
@@ -991,6 +1087,113 @@ static int webdav_parse_chunkqueue(server *srv, connection *con, plugin_data *p,
}
#endif
+int webdav_lockdiscovery(server *srv, connection *con,
+ buffer *locktoken, const char *lockscope, const char *locktype, int depth) {
+
+ buffer *b;
+
+ response_header_overwrite(srv, con, CONST_STR_LEN("Lock-Token"), CONST_BUF_LEN(locktoken));
+
+ response_header_overwrite(srv, con,
+ CONST_STR_LEN("Content-Type"),
+ CONST_STR_LEN("text/xml; charset=\"utf-8\""));
+
+ b = chunkqueue_get_append_buffer(con->write_queue);
+
+ buffer_copy_string(b, "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
+
+ buffer_append_string(b,"<D:prop xmlns:D=\"DAV:\" xmlns:ns0=\"urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/\">\n");
+ buffer_append_string(b,"<D:lockdiscovery>\n");
+ buffer_append_string(b,"<D:activelock>\n");
+
+ buffer_append_string(b,"<D:lockscope>");
+ buffer_append_string(b,"<D:");
+ buffer_append_string(b, lockscope);
+ buffer_append_string(b, "/>");
+ buffer_append_string(b,"</D:lockscope>\n");
+
+ buffer_append_string(b,"<D:locktype>");
+ buffer_append_string(b,"<D:");
+ buffer_append_string(b, locktype);
+ buffer_append_string(b, "/>");
+ buffer_append_string(b,"</D:locktype>\n");
+
+ buffer_append_string(b,"<D:depth>");
+ buffer_append_string(b, depth == 0 ? "0" : "infinity");
+ buffer_append_string(b,"</D:depth>\n");
+
+ buffer_append_string(b,"<D:timeout>");
+ buffer_append_string(b, "Second-600");
+ buffer_append_string(b,"</D:timeout>\n");
+
+ buffer_append_string(b,"<D:owner>");
+ buffer_append_string(b,"</D:owner>\n");
+
+ buffer_append_string(b,"<D:locktoken>");
+ buffer_append_string(b, "<D:href>");
+ buffer_append_string_buffer(b, locktoken);
+ buffer_append_string(b, "</D:href>");
+ buffer_append_string(b,"</D:locktoken>\n");
+
+ buffer_append_string(b,"</D:activelock>\n");
+ buffer_append_string(b,"</D:lockdiscovery>\n");
+ buffer_append_string(b,"</D:prop>\n");
+
+ return 0;
+}
+/**
+ * check if resource is having the right locks to access to resource
+ *
+ *
+ *
+ */
+int webdav_has_lock(server *srv, connection *con, plugin_data *p, buffer *uri) {
+ int has_lock = 1;
+
+#ifdef USE_LOCKS
+ data_string *ds;
+
+ /**
+ * If can have
+ * - <lock-token>
+ * - [etag]
+ *
+ * there is NOT, AND and OR
+ * and a list can be tagged
+ *
+ * (<lock-token>) is untagged
+ * <tag> (<lock-token>) is tagged
+ *
+ * as long as we don't handle collections it is simple. :)
+ *
+ * X-Litmus: locks: 11 (owner_modify)
+ * If: <http://127.0.0.1:1025/dav/litmus/lockme> (<opaquelocktoken:2165478d-0611-49c4-be92-e790d68a38f1>)
+ *
+ * X-Litmus: locks: 16 (fail_cond_put)
+ * If: (<DAV:no-lock> ["-1622396671"])
+ */
+ if (NULL != (ds = (data_string *)array_get_element(con->request.headers, "If"))) {
+ } else {
+ /* we didn't provided a lock-token -> */
+ /* if the resource is locked -> 423 */
+
+ sqlite3_stmt *stmt = p->conf.stmt_read_lock_by_uri;
+
+ sqlite3_reset(stmt);
+
+ sqlite3_bind_text(stmt, 1,
+ CONST_BUF_LEN(uri),
+ SQLITE_TRANSIENT);
+
+ while (SQLITE_ROW == sqlite3_step(stmt)) {
+ has_lock = 0;
+ }
+ }
+#endif
+
+ return has_lock;
+}
+
URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
plugin_data *p = p_d;
buffer *b;
@@ -1001,7 +1204,8 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
buffer *prop_200;
buffer *prop_404;
webdav_properties *req_props;
-
+ stat_cache_entry *sce = NULL;
+
UNUSED(srv);
if (!p->conf.enabled) return HANDLER_GO_ON;
@@ -1019,7 +1223,19 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
req_props = NULL;
/* is there a content-body ? */
-
+
+ switch (stat_cache_get_entry(srv, con, con->physical.path, &sce)) {
+ case HANDLER_ERROR:
+ if (errno == ENOENT) {
+ con->http_status = 404;
+ return HANDLER_FINISHED;
+ }
+ break;
+ default:
+ break;
+ }
+
+
#ifdef USE_PROPPATCH
/* any special requests or just allprop ? */
if (con->request.content_length) {
@@ -1087,14 +1303,13 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
/* get all property names (EMPTY) */
sqlite3_reset(stmt);
/* bind the values to the insert */
-
- sqlite3_bind_text(stmt, 1,
- con->uri.path->ptr,
+
+ sqlite3_bind_text(stmt, 1,
+ con->uri.path->ptr,
con->uri.path->used - 1,
SQLITE_TRANSIENT);
-
+
if (SQLITE_DONE != sqlite3_step(stmt)) {
- WP();
}
}
} else if (0 == xmlStrcmp(cmd->name, BAD_CAST "allprop")) {
@@ -1115,13 +1330,13 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
response_header_overwrite(srv, con, CONST_STR_LEN("Content-Type"), CONST_STR_LEN("text/xml; charset=\"utf-8\""));
b = chunkqueue_get_append_buffer(con->write_queue);
-
+
buffer_copy_string(b, "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
buffer_append_string(b,"<D:multistatus xmlns:D=\"DAV:\" xmlns:ns0=\"urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/\">\n");
/* allprop */
-
+
prop_200 = buffer_init();
prop_404 = buffer_init();
@@ -1129,7 +1344,7 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
case 0:
/* Depth: 0 */
webdav_get_props(srv, con, p, &(con->physical), req_props, prop_200, prop_404);
-
+
buffer_append_string(b,"<D:response>\n");
buffer_append_string(b,"<D:href>");
buffer_append_string_buffer(b, con->uri.scheme);
@@ -1145,9 +1360,9 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
buffer_append_string_buffer(b, prop_200);
buffer_append_string(b,"</D:prop>\n");
-
+
buffer_append_string(b,"<D:status>HTTP/1.1 200 OK</D:status>\n");
-
+
buffer_append_string(b,"</D:propstat>\n");
}
if (!buffer_is_empty(prop_404)) {
@@ -1157,16 +1372,16 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
buffer_append_string_buffer(b, prop_404);
buffer_append_string(b,"</D:prop>\n");
-
+
buffer_append_string(b,"<D:status>HTTP/1.1 404 Not Found</D:status>\n");
-
+
buffer_append_string(b,"</D:propstat>\n");
}
buffer_append_string(b,"</D:response>\n");
break;
- case 1:
+ case 1:
if (NULL != (dir = opendir(con->physical.path->ptr))) {
struct dirent *de;
physical d;
@@ -1179,7 +1394,7 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
if (de->d_name[0] == '.' && de->d_name[1] == '.' && de->d_name[2] == '\0') {
continue;
/* ignore the parent dir */
- }
+ }
buffer_copy_string_buffer(d.path, dst->path);
BUFFER_APPEND_SLASH(d.path);
@@ -1188,7 +1403,7 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
BUFFER_APPEND_SLASH(d.rel_path);
if (de->d_name[0] == '.' && de->d_name[1] == '\0') {
- /* don't append the . */
+ /* don't append the . */
} else {
buffer_append_string(d.path, de->d_name);
buffer_append_string(d.rel_path, de->d_name);
@@ -1198,7 +1413,7 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
buffer_reset(prop_404);
webdav_get_props(srv, con, p, &d, req_props, prop_200, prop_404);
-
+
buffer_append_string(b,"<D:response>\n");
buffer_append_string(b,"<D:href>");
buffer_append_string_buffer(b, con->uri.scheme);
@@ -1214,9 +1429,9 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
buffer_append_string_buffer(b, prop_200);
buffer_append_string(b,"</D:prop>\n");
-
+
buffer_append_string(b,"<D:status>HTTP/1.1 200 OK</D:status>\n");
-
+
buffer_append_string(b,"</D:propstat>\n");
}
if (!buffer_is_empty(prop_404)) {
@@ -1226,9 +1441,9 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
buffer_append_string_buffer(b, prop_404);
buffer_append_string(b,"</D:prop>\n");
-
+
buffer_append_string(b,"<D:status>HTTP/1.1 404 Not Found</D:status>\n");
-
+
buffer_append_string(b,"</D:propstat>\n");
}
@@ -1275,7 +1490,7 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
return HANDLER_FINISHED;
}
-
+
/* let's create the directory */
if (-1 == mkdir(con->physical.path->ptr, 0700)) {
@@ -1303,7 +1518,13 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
con->http_status = 403;
return HANDLER_FINISHED;
}
-
+
+ /* does the client have a lock for this connection ? */
+ if (!webdav_has_lock(srv, con, p, con->uri.path)) {
+ con->http_status = 423;
+ return HANDLER_FINISHED;
+ }
+
/* stat and unlink afterwards */
if (-1 == stat(con->physical.path->ptr, &st)) {
/* don't about it yet, unlink will fail too */
@@ -1323,7 +1544,7 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
response_header_overwrite(srv, con, CONST_STR_LEN("Content-Type"), CONST_STR_LEN("text/xml; charset=\"utf-8\""));
b = chunkqueue_get_append_buffer(con->write_queue);
-
+
buffer_copy_string(b, "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
buffer_append_string(b,"<D:multistatus xmlns:D=\"DAV:\">\n");
@@ -1331,7 +1552,7 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
buffer_append_string_buffer(b, multi_status_resp);
buffer_append_string(b,"</D:multistatus>\n");
-
+
if (p->conf.log_xml) {
log_error_write(srv, __FILE__, __LINE__, "sb", "XML-response-body:", b);
}
@@ -1340,7 +1561,7 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
con->file_finished = 1;
} else {
/* everything went fine, remove the directory */
-
+
if (-1 == rmdir(con->physical.path->ptr)) {
switch(errno) {
case ENOENT:
@@ -1375,97 +1596,174 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
case HTTP_METHOD_PUT: {
int fd;
chunkqueue *cq = con->request_content_queue;
+ chunk *c;
+ data_string *ds_range;
if (p->conf.is_readonly) {
con->http_status = 403;
return HANDLER_FINISHED;
}
+ /* is a exclusive lock set on the source */
+ if (!webdav_has_lock(srv, con, p, con->uri.path)) {
+ con->http_status = 423;
+ return HANDLER_FINISHED;
+ }
+
+
assert(chunkqueue_length(cq) == (off_t)con->request.content_length);
- /* taken what we have in the request-body and write it to a file */
- if (-1 == (fd = open(con->physical.path->ptr, O_WRONLY|O_CREAT|O_TRUNC, 0600))) {
- /* we can't open the file */
- con->http_status = 403;
+ /* RFC2616 Section 9.6 PUT requires us to send 501 on all Content-* we don't support
+ * - most important Content-Range
+ *
+ *
+ * Example: Content-Range: bytes 100-1037/1038 */
+
+ if (NULL != (ds_range = (data_string *)array_get_element(con->request.headers, "Content-Range"))) {
+ const char *num = ds_range->value->ptr;
+ off_t offset;
+ char *err = NULL;
+
+ if (0 != strncmp(num, "bytes ", 6)) {
+ con->http_status = 501; /* not implemented */
+
+ return HANDLER_FINISHED;
+ }
+
+ /* we only support <num>- ... */
+
+ num += 6;
+
+ /* skip WS */
+ while (*num == ' ' || *num == '\t') num++;
+
+ if (*num == '\0') {
+ con->http_status = 501; /* not implemented */
+
+ return HANDLER_FINISHED;
+ }
+
+ offset = strtoll(num, &err, 10);
+
+ if (*err != '-' || offset < 0) {
+ con->http_status = 501; /* not implemented */
+
+ return HANDLER_FINISHED;
+ }
+
+ if (-1 == (fd = open(con->physical.path->ptr, O_WRONLY, 0600))) {
+ switch (errno) {
+ case ENOENT:
+ con->http_status = 404; /* not found */
+ break;
+ default:
+ con->http_status = 403; /* not found */
+ break;
+ }
+ return HANDLER_FINISHED;
+ }
+
+ if (-1 == lseek(fd, offset, SEEK_SET)) {
+ con->http_status = 501; /* not implemented */
+
+ close(fd);
+
+ return HANDLER_FINISHED;
+ }
+ con->http_status = 200; /* modified */
} else {
- chunk *c;
+ /* take what we have in the request-body and write it to a file */
- con->http_status = 201; /* created */
- con->file_finished = 1;
+ /* if the file doesn't exist, create it */
+ if (-1 == (fd = open(con->physical.path->ptr, O_WRONLY|O_TRUNC, 0600))) {
+ if (errno == ENOENT &&
+ -1 == (fd = open(con->physical.path->ptr, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0600))) {
+ /* we can't open the file */
+ con->http_status = 403;
- for (c = cq->first; c; c = cq->first) {
- int r = 0;
+ return HANDLER_FINISHED;
+ } else {
+ con->http_status = 201; /* created */
+ }
+ } else {
+ con->http_status = 200; /* modified */
+ }
+ }
- /* copy all chunks */
- switch(c->type) {
- case FILE_CHUNK:
+ con->file_finished = 1;
- if (c->file.mmap.start == MAP_FAILED) {
- if (-1 == c->file.fd && /* open the file if not already open */
- -1 == (c->file.fd = open(c->file.name->ptr, O_RDONLY))) {
- log_error_write(srv, __FILE__, __LINE__, "ss", "open failed: ", strerror(errno));
-
- return -1;
- }
-
- if (MAP_FAILED == (c->file.mmap.start = mmap(0, c->file.length, PROT_READ, MAP_SHARED, c->file.fd, 0))) {
- log_error_write(srv, __FILE__, __LINE__, "ssbd", "mmap failed: ",
- strerror(errno), c->file.name, c->file.fd);
+ for (c = cq->first; c; c = cq->first) {
+ int r = 0;
- return -1;
- }
+ /* copy all chunks */
+ switch(c->type) {
+ case FILE_CHUNK:
- c->file.mmap.length = c->file.length;
+ if (c->file.mmap.start == MAP_FAILED) {
+ if (-1 == c->file.fd && /* open the file if not already open */
+ -1 == (c->file.fd = open(c->file.name->ptr, O_RDONLY))) {
+ log_error_write(srv, __FILE__, __LINE__, "ss", "open failed: ", strerror(errno));
- close(c->file.fd);
- c->file.fd = -1;
-
- /* chunk_reset() or chunk_free() will cleanup for us */
+ return -1;
}
- if ((r = write(fd, c->file.mmap.start + c->offset, c->file.length - c->offset)) < 0) {
- switch(errno) {
- case ENOSPC:
- con->http_status = 507;
-
- break;
- default:
- con->http_status = 403;
- break;
- }
+ if (MAP_FAILED == (c->file.mmap.start = mmap(0, c->file.length, PROT_READ, MAP_SHARED, c->file.fd, 0))) {
+ log_error_write(srv, __FILE__, __LINE__, "ssbd", "mmap failed: ",
+ strerror(errno), c->file.name, c->file.fd);
+
+ return -1;
}
- break;
- case MEM_CHUNK:
- if ((r = write(fd, c->mem->ptr + c->offset, c->mem->used - c->offset - 1)) < 0) {
- switch(errno) {
- case ENOSPC:
- con->http_status = 507;
-
- break;
- default:
- con->http_status = 403;
- break;
- }
+
+ c->file.mmap.length = c->file.length;
+
+ close(c->file.fd);
+ c->file.fd = -1;
+
+ /* chunk_reset() or chunk_free() will cleanup for us */
+ }
+
+ if ((r = write(fd, c->file.mmap.start + c->offset, c->file.length - c->offset)) < 0) {
+ switch(errno) {
+ case ENOSPC:
+ con->http_status = 507;
+
+ break;
+ default:
+ con->http_status = 403;
+ break;
}
- break;
- case UNUSED_CHUNK:
- break;
}
+ break;
+ case MEM_CHUNK:
+ if ((r = write(fd, c->mem->ptr + c->offset, c->mem->used - c->offset - 1)) < 0) {
+ switch(errno) {
+ case ENOSPC:
+ con->http_status = 507;
- if (r > 0) {
- c->offset += r;
- cq->bytes_out += r;
- } else {
- break;
+ break;
+ default:
+ con->http_status = 403;
+ break;
+ }
}
- chunkqueue_remove_finished_chunks(cq);
+ break;
+ case UNUSED_CHUNK:
+ break;
}
- close(fd);
+ if (r > 0) {
+ c->offset += r;
+ cq->bytes_out += r;
+ } else {
+ break;
+ }
+ chunkqueue_remove_finished_chunks(cq);
}
+ close(fd);
+
return HANDLER_FINISHED;
}
- case HTTP_METHOD_MOVE:
+ case HTTP_METHOD_MOVE:
case HTTP_METHOD_COPY: {
buffer *destination = NULL;
char *sep, *start;
@@ -1475,7 +1773,15 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
con->http_status = 403;
return HANDLER_FINISHED;
}
-
+
+ /* is a exclusive lock set on the source */
+ if (con->request.http_method == HTTP_METHOD_MOVE) {
+ if (!webdav_has_lock(srv, con, p, con->uri.path)) {
+ con->http_status = 423;
+ return HANDLER_FINISHED;
+ }
+ }
+
if (NULL != (ds = (data_string *)array_get_element(con->request.headers, "Destination"))) {
destination = ds->value;
} else {
@@ -1552,7 +1858,7 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
BUFFER_APPEND_SLASH(p->physical.path);
buffer_copy_string_buffer(p->physical.basedir, p->physical.path);
- /* don't add a second / */
+ /* don't add a second / */
if (p->physical.rel_path->ptr[0] == '/') {
buffer_append_string_len(p->physical.path, p->physical.rel_path->ptr + 1, p->physical.rel_path->used - 2);
} else {
@@ -1613,6 +1919,12 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
/* it is just a file, good */
int r;
+ /* does the client have a lock for this connection ? */
+ if (!webdav_has_lock(srv, con, p, p->uri.path)) {
+ con->http_status = 423;
+ return HANDLER_FINISHED;
+ }
+
/* destination exists */
if (0 == (r = stat(p->physical.path->ptr, &st))) {
if (S_ISDIR(st.st_mode)) {
@@ -1636,7 +1948,7 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
return HANDLER_FINISHED;
}
} else if (overwrite == 0) {
- /* destination exists, but overwrite is not set */
+ /* destination exists, but overwrite is not set */
con->http_status = 412;
return HANDLER_FINISHED;
} else {
@@ -1655,16 +1967,16 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
sqlite3_reset(stmt);
/* bind the values to the insert */
- sqlite3_bind_text(stmt, 1,
- p->uri.path->ptr,
+ sqlite3_bind_text(stmt, 1,
+ p->uri.path->ptr,
p->uri.path->used - 1,
SQLITE_TRANSIENT);
- sqlite3_bind_text(stmt, 2,
- con->uri.path->ptr,
+ sqlite3_bind_text(stmt, 2,
+ con->uri.path->ptr,
con->uri.path->used - 1,
SQLITE_TRANSIENT);
-
+
if (SQLITE_DONE != sqlite3_step(stmt)) {
log_error_write(srv, __FILE__, __LINE__, "ss", "sql-move failed:", sqlite3_errmsg(p->conf.sql));
}
@@ -1691,12 +2003,17 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
return HANDLER_FINISHED;
}
- case HTTP_METHOD_PROPPATCH: {
+ case HTTP_METHOD_PROPPATCH:
if (p->conf.is_readonly) {
con->http_status = 403;
return HANDLER_FINISHED;
}
+ if (!webdav_has_lock(srv, con, p, con->uri.path)) {
+ con->http_status = 423;
+ return HANDLER_FINISHED;
+ }
+
/* check if destination exists */
if (-1 == stat(con->physical.path->ptr, &st)) {
switch(errno) {
@@ -1737,7 +2054,7 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
sqlite3_stmt *stmt;
- stmt = (0 == xmlStrcmp(cmd->name, BAD_CAST "remove")) ?
+ stmt = (0 == xmlStrcmp(cmd->name, BAD_CAST "remove")) ?
p->conf.stmt_delete_prop : p->conf.stmt_update_prop;
for (props = cmd->children; props; props = props->next) {
@@ -1762,34 +2079,35 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
/* bind the values to the insert */
- sqlite3_bind_text(stmt, 1,
- con->uri.path->ptr,
+ sqlite3_bind_text(stmt, 1,
+ con->uri.path->ptr,
con->uri.path->used - 1,
SQLITE_TRANSIENT);
- sqlite3_bind_text(stmt, 2,
+ sqlite3_bind_text(stmt, 2,
(char *)prop->name,
strlen((char *)prop->name),
SQLITE_TRANSIENT);
if (prop->ns) {
- sqlite3_bind_text(stmt, 3,
+ sqlite3_bind_text(stmt, 3,
(char *)prop->ns->href,
strlen((char *)prop->ns->href),
SQLITE_TRANSIENT);
} else {
- sqlite3_bind_text(stmt, 3,
+ sqlite3_bind_text(stmt, 3,
"",
0,
SQLITE_TRANSIENT);
}
if (stmt == p->conf.stmt_update_prop) {
- sqlite3_bind_text(stmt, 4,
+ sqlite3_bind_text(stmt, 4,
(char *)xmlNodeGetContent(prop),
strlen((char *)xmlNodeGetContent(prop)),
SQLITE_TRANSIENT);
}
-
+
if (SQLITE_DONE != (r = sqlite3_step(stmt))) {
- log_error_write(srv, __FILE__, __LINE__, "ss", "sql-set failed:", sqlite3_errmsg(p->conf.sql));
+ log_error_write(srv, __FILE__, __LINE__, "ss",
+ "sql-set failed:", sqlite3_errmsg(p->conf.sql));
}
}
}
@@ -1804,7 +2122,7 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
goto propmatch_cleanup;
}
-
+
con->http_status = 400;
} else {
if (SQLITE_OK != sqlite3_exec(p->conf.sql, "COMMIT", NULL, NULL, &err)) {
@@ -1821,6 +2139,7 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
}
propmatch_cleanup:
+
xmlFreeDoc(xml);
} else {
con->http_status = 400;
@@ -1830,11 +2149,307 @@ propmatch_cleanup:
#endif
con->http_status = 501;
return HANDLER_FINISHED;
- }
+ case HTTP_METHOD_LOCK:
+ /**
+ * a mac wants to write
+ *
+ * LOCK /dav/expire.txt HTTP/1.1\r\n
+ * User-Agent: WebDAVFS/1.3 (01308000) Darwin/8.1.0 (Power Macintosh)\r\n
+ * Accept: * / *\r\n
+ * Depth: 0\r\n
+ * Timeout: Second-600\r\n
+ * Content-Type: text/xml; charset=\"utf-8\"\r\n
+ * Content-Length: 229\r\n
+ * Connection: keep-alive\r\n
+ * Host: 192.168.178.23:1025\r\n
+ * \r\n
+ * <?xml version=\"1.0\" encoding=\"utf-8\"?>\n
+ * <D:lockinfo xmlns:D=\"DAV:\">\n
+ * <D:lockscope><D:exclusive/></D:lockscope>\n
+ * <D:locktype><D:write/></D:locktype>\n
+ * <D:owner>\n
+ * <D:href>http://www.apple.com/webdav_fs/</D:href>\n
+ * </D:owner>\n
+ * </D:lockinfo>\n
+ */
+
+ if (depth != 0 && depth != -1) {
+ con->http_status = 400;
+
+ return HANDLER_FINISHED;
+ }
+
+#ifdef USE_LOCKS
+ if (con->request.content_length) {
+ xmlDocPtr xml;
+ buffer *hdr_if = NULL;
+
+ if (NULL != (ds = (data_string *)array_get_element(con->request.headers, "If"))) {
+ hdr_if = ds->value;
+ }
+
+ /* we don't support Depth: Infinity on locks */
+ if (hdr_if == NULL && depth == -1) {
+ con->http_status = 409; /* Conflict */
+
+ return HANDLER_FINISHED;
+ }
+
+ if (1 == webdav_parse_chunkqueue(srv, con, p, con->request_content_queue, &xml)) {
+ xmlNode *rootnode = xmlDocGetRootElement(xml);
+
+ assert(rootnode);
+
+ if (0 == xmlStrcmp(rootnode->name, BAD_CAST "lockinfo")) {
+ xmlNode *lockinfo;
+ const xmlChar *lockscope = NULL, *locktype = NULL, *owner = NULL;
+
+ for (lockinfo = rootnode->children; lockinfo; lockinfo = lockinfo->next) {
+ if (0 == xmlStrcmp(lockinfo->name, BAD_CAST "lockscope")) {
+ xmlNode *value;
+ for (value = lockinfo->children; value; value = value->next) {
+ if ((0 == xmlStrcmp(value->name, BAD_CAST "exclusive")) ||
+ (0 == xmlStrcmp(value->name, BAD_CAST "shared"))) {
+ lockscope = value->name;
+ } else {
+ con->http_status = 400;
+
+ xmlFreeDoc(xml);
+ return HANDLER_FINISHED;
+ }
+ }
+ } else if (0 == xmlStrcmp(lockinfo->name, BAD_CAST "locktype")) {
+ xmlNode *value;
+ for (value = lockinfo->children; value; value = value->next) {
+ if ((0 == xmlStrcmp(value->name, BAD_CAST "write"))) {
+ locktype = value->name;
+ } else {
+ con->http_status = 400;
+
+ xmlFreeDoc(xml);
+ return HANDLER_FINISHED;
+ }
+ }
+
+ } else if (0 == xmlStrcmp(lockinfo->name, BAD_CAST "owner")) {
+ }
+ }
+
+ if (lockscope && locktype) {
+ sqlite3_stmt *stmt = p->conf.stmt_read_lock_by_uri;
+
+ /* is this resourse already locked ? */
+
+ /* SELECT locktoken, resource, lockscope, locktype, owner, depth, timeout
+ * FROM locks
+ * WHERE resource = ? */
+
+ if (stmt) {
+
+ sqlite3_reset(stmt);
+
+ sqlite3_bind_text(stmt, 1,
+ p->uri.path->ptr,
+ p->uri.path->used - 1,
+ SQLITE_TRANSIENT);
+
+ /* it is the PK */
+ while (SQLITE_ROW == sqlite3_step(stmt)) {
+ /* we found a lock
+ * 1. is it compatible ?
+ * 2. is it ours */
+ char *sql_lockscope = (char *)sqlite3_column_text(stmt, 2);
+
+ if (strcmp(sql_lockscope, "exclusive")) {
+ con->http_status = 423;
+ } else if (0 == xmlStrcmp(lockscope, BAD_CAST "exclusive")) {
+ /* resourse is locked with a shared lock
+ * client wants exclusive */
+ con->http_status = 423;
+ }
+ }
+ if (con->http_status == 423) {
+ xmlFreeDoc(xml);
+ return HANDLER_FINISHED;
+ }
+ }
+
+ stmt = p->conf.stmt_create_lock;
+ if (stmt) {
+ /* create a lock-token */
+ uuid_t id;
+ char uuid[37] /* 36 + \0 */;
+
+ uuid_generate(id);
+ uuid_unparse(id, uuid);
+
+ buffer_copy_string(p->tmp_buf, "opaquelocktoken:");
+ buffer_append_string(p->tmp_buf, uuid);
+
+ /* "CREATE TABLE locks ("
+ * " locktoken TEXT NOT NULL,"
+ * " resource TEXT NOT NULL,"
+ * " lockscope TEXT NOT NULL,"
+ * " locktype TEXT NOT NULL,"
+ * " owner TEXT NOT NULL,"
+ * " depth INT NOT NULL,"
+ */
+
+ sqlite3_reset(stmt);
+
+ sqlite3_bind_text(stmt, 1,
+ CONST_BUF_LEN(p->tmp_buf),
+ SQLITE_TRANSIENT);
+
+ sqlite3_bind_text(stmt, 2,
+ CONST_BUF_LEN(con->uri.path),
+ SQLITE_TRANSIENT);
+
+ sqlite3_bind_text(stmt, 3,
+ lockscope,
+ xmlStrlen(lockscope),
+ SQLITE_TRANSIENT);
+
+ sqlite3_bind_text(stmt, 4,
+ locktype,
+ xmlStrlen(locktype),
+ SQLITE_TRANSIENT);
+
+ /* owner */
+ sqlite3_bind_text(stmt, 5,
+ "",
+ 0,
+ SQLITE_TRANSIENT);
+
+ /* depth */
+ sqlite3_bind_int(stmt, 6,
+ depth);
+
+
+ if (SQLITE_DONE != sqlite3_step(stmt)) {
+ log_error_write(srv, __FILE__, __LINE__, "ss",
+ "create lock:", sqlite3_errmsg(p->conf.sql));
+ }
+
+ /* looks like we survived */
+ webdav_lockdiscovery(srv, con, p->tmp_buf, lockscope, locktype, depth);
+
+ con->http_status = 201;
+ con->file_finished = 1;
+ }
+ }
+ }
+
+ xmlFreeDoc(xml);
+ return HANDLER_FINISHED;
+ } else {
+ con->http_status = 400;
+ return HANDLER_FINISHED;
+ }
+ } else {
+
+ if (NULL != (ds = (data_string *)array_get_element(con->request.headers, "If"))) {
+ buffer *locktoken = ds->value;
+ sqlite3_stmt *stmt = p->conf.stmt_refresh_lock;
+
+ /* remove the < > around the token */
+ if (locktoken->used < 6) {
+ con->http_status = 400;
+
+ return HANDLER_FINISHED;
+ }
+
+ buffer_copy_string_len(p->tmp_buf, locktoken->ptr + 2, locktoken->used - 5);
+
+ sqlite3_reset(stmt);
+
+ sqlite3_bind_text(stmt, 1,
+ CONST_BUF_LEN(p->tmp_buf),
+ SQLITE_TRANSIENT);
+
+ if (SQLITE_DONE != sqlite3_step(stmt)) {
+ log_error_write(srv, __FILE__, __LINE__, "ss",
+ "refresh lock:", sqlite3_errmsg(p->conf.sql));
+ }
+
+ webdav_lockdiscovery(srv, con, p->tmp_buf, "exclusive", "write", 0);
+
+ con->http_status = 200;
+ con->file_finished = 1;
+ return HANDLER_FINISHED;
+ } else {
+ /* we need a lock-token to refresh */
+ con->http_status = 400;
+
+ return HANDLER_FINISHED;
+ }
+ }
+ break;
+#else
+ con->http_status = 501;
+ return HANDLER_FINISHED;
+#endif
+ case HTTP_METHOD_UNLOCK:
+#ifdef USE_LOCKS
+ if (NULL != (ds = (data_string *)array_get_element(con->request.headers, "Lock-Token"))) {
+ buffer *locktoken = ds->value;
+ sqlite3_stmt *stmt = p->conf.stmt_remove_lock;
+
+ /* remove the < > around the token */
+ if (locktoken->used < 4) {
+ con->http_status = 400;
+
+ return HANDLER_FINISHED;
+ }
+
+ /**
+ * FIXME:
+ *
+ * if the resourse is locked:
+ * - by us: unlock
+ * - by someone else: 401
+ * if the resource is not locked:
+ * - 412
+ * */
+
+ buffer_copy_string_len(p->tmp_buf, locktoken->ptr + 1, locktoken->used - 3);
+
+ sqlite3_reset(stmt);
+
+ sqlite3_bind_text(stmt, 1,
+ CONST_BUF_LEN(p->tmp_buf),
+ SQLITE_TRANSIENT);
+
+ sqlite3_bind_text(stmt, 2,
+ CONST_BUF_LEN(con->uri.path),
+ SQLITE_TRANSIENT);
+
+ if (SQLITE_DONE != sqlite3_step(stmt)) {
+ log_error_write(srv, __FILE__, __LINE__, "ss",
+ "remove lock:", sqlite3_errmsg(p->conf.sql));
+ }
+
+ if (0 == sqlite3_changes(p->conf.sql)) {
+ con->http_status = 401;
+ } else {
+ con->http_status = 204;
+ }
+ return HANDLER_FINISHED;
+ } else {
+ /* we need a lock-token to unlock */
+ con->http_status = 400;
+
+ return HANDLER_FINISHED;
+ }
+ break;
+#else
+ con->http_status = 501;
+ return HANDLER_FINISHED;
+#endif
default:
break;
}
-
+
/* not found */
return HANDLER_GO_ON;
}
@@ -1845,14 +2460,14 @@ propmatch_cleanup:
int mod_webdav_plugin_init(plugin *p) {
p->version = LIGHTTPD_VERSION_ID;
p->name = buffer_init_string("webdav");
-
+
p->init = mod_webdav_init;
p->handle_uri_clean = mod_webdav_uri_handler;
p->handle_physical = mod_webdav_subrequest_handler;
p->set_defaults = mod_webdav_set_defaults;
p->cleanup = mod_webdav_free;
-
+
p->data = NULL;
-
+
return 0;
}
diff --git a/src/network.c b/src/network.c
index fe52bc2..c7abf90 100644
--- a/src/network.c
+++ b/src/network.c
@@ -362,6 +362,9 @@ int network_server_init(server *srv, buffer *host_token, specific_config *s) {
s->ssl_pemfile);
return -1;
}
+ SSL_CTX_set_default_read_ahead(s->ssl_ctx, 1);
+ SSL_CTX_set_mode(s->ssl_ctx, SSL_get_mode(s->ssl_ctx) | SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
+
srv_socket->ssl_ctx = s->ssl_ctx;
#else
diff --git a/src/network_openssl.c b/src/network_openssl.c
index b6a1b2f..e624739 100644
--- a/src/network_openssl.c
+++ b/src/network_openssl.c
@@ -67,7 +67,7 @@ int network_write_chunkqueue_openssl(server *srv, connection *con, SSL *ssl, chu
size_t toSend;
ssize_t r;
- if (c->mem->used == 0) {
+ if (c->mem->used == 0 || c->mem->used == 1) {
chunk_finished = 1;
break;
}
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 2827b2f..feea307 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -46,7 +46,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
am__fcgi_auth_SOURCES_DIST = fcgi-auth.c
@@ -177,6 +177,7 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
diff --git a/tests/docroot/123/Makefile.in b/tests/docroot/123/Makefile.in
index cabff31..b777dd1 100644
--- a/tests/docroot/123/Makefile.in
+++ b/tests/docroot/123/Makefile.in
@@ -42,7 +42,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
@@ -143,6 +143,7 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
diff --git a/tests/docroot/Makefile.in b/tests/docroot/Makefile.in
index 5d39cdf..de9347d 100644
--- a/tests/docroot/Makefile.in
+++ b/tests/docroot/Makefile.in
@@ -42,7 +42,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
@@ -152,6 +152,7 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
diff --git a/tests/docroot/www/Makefile.in b/tests/docroot/www/Makefile.in
index 55988be..4936786 100644
--- a/tests/docroot/www/Makefile.in
+++ b/tests/docroot/www/Makefile.in
@@ -42,7 +42,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
@@ -152,6 +152,7 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
diff --git a/tests/docroot/www/expire/Makefile.in b/tests/docroot/www/expire/Makefile.in
index 23e0c31..651ca63 100644
--- a/tests/docroot/www/expire/Makefile.in
+++ b/tests/docroot/www/expire/Makefile.in
@@ -42,7 +42,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
@@ -143,6 +143,7 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
diff --git a/tests/docroot/www/go/Makefile.in b/tests/docroot/www/go/Makefile.in
index de2af27..29dc6e3 100644
--- a/tests/docroot/www/go/Makefile.in
+++ b/tests/docroot/www/go/Makefile.in
@@ -42,7 +42,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
@@ -143,6 +143,7 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
diff --git a/tests/docroot/www/indexfile/Makefile.in b/tests/docroot/www/indexfile/Makefile.in
index 7812d5e..86181fa 100644
--- a/tests/docroot/www/indexfile/Makefile.in
+++ b/tests/docroot/www/indexfile/Makefile.in
@@ -42,7 +42,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
@@ -143,6 +143,7 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@