patches/htdig-01-debian.diff
author jurikm
Sun, 12 Feb 2012 14:04:10 +0000
changeset 8245 383896da4129
parent 851 5fd7ef1f3246
permissions -rw-r--r--
SFEsauerbraten.spec: add IPS package name

--- htdig-3.2.0b6.orig/config.sub
+++ htdig-3.2.0b6/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 Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
-timestamp='2004-03-12'
+timestamp='2006-02-23'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -21,14 +21,15 @@
 #
 # 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.
-
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, 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 <[email protected]>.  Submit a context
 # diff and a properly formatted ChangeLog entry.
 #
@@ -70,7 +71,7 @@
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -83,11 +84,11 @@
 while test $# -gt 0 ; do
   case $1 in
     --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit 0 ;;
+       echo "$timestamp" ; exit ;;
     --version | -v )
-       echo "$version" ; exit 0 ;;
+       echo "$version" ; exit ;;
     --help | --h* | -h )
-       echo "$usage"; exit 0 ;;
+       echo "$usage"; exit ;;
     -- )     # Stop option processing
        shift; break ;;
     - )	# Use stdin as input.
@@ -99,7 +100,7 @@
     *local*)
        # First pass through any local machine types.
        echo $1
-       exit 0;;
+       exit ;;
 
     * )
        break ;;
@@ -118,8 +119,9 @@
 # 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* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
@@ -145,7 +147,7 @@
 	-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)
+	-apple | -axis | -knuth | -cray)
 		os=
 		basic_machine=$1
 		;;
@@ -170,6 +172,10 @@
 	-hiux*)
 		os=-hiuxwe2
 		;;
+	-sco6)
+		os=-sco5v6
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
 	-sco5)
 		os=-sco3.2v5
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -186,6 +192,10 @@
 		# Don't forget version if it is 3.2v4 or newer.
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
+	-sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
 	-sco*)
 		os=-sco3.2v2
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -231,13 +241,14 @@
 	| 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 | mcore \
+	| m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \
 	| mips | mipsbe | mipseb | mipsel | mipsle \
 	| mips16 \
 	| mips64 | mips64el \
@@ -246,6 +257,7 @@
 	| mips64vr4100 | mips64vr4100el \
 	| mips64vr4300 | mips64vr4300el \
 	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
 	| mipsisa32 | mipsisa32el \
 	| mipsisa32r2 | mipsisa32r2el \
 	| mipsisa64 | mipsisa64el \
@@ -254,23 +266,29 @@
 	| mipsisa64sr71k | mipsisa64sr71kel \
 	| mipstx39 | mipstx39el \
 	| mn10200 | mn10300 \
+	| mt \
 	| msp430 \
+	| nios | nios2 \
 	| ns16k | ns32k \
-	| openrisc | or32 \
+	| or32 \
 	| pdp10 | pdp11 | pj | pjl \
 	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
 	| pyramid \
-	| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
-	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
+	| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
+	| sparcv8 | sparcv9 | sparcv9b \
 	| strongarm \
 	| tahoe | thumb | tic4x | tic80 | tron \
 	| v850 | v850e \
 	| we32k \
-	| x86 | xscale | xstormy16 | xtensa \
+	| x86 | xscale | xscalee[bl] | 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
@@ -278,6 +296,9 @@
 		;;
 	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
 		;;
+	ms1)
+		basic_machine=mt-unknown
+		;;
 
 	# We use `pc' rather than `unknown'
 	# because (1) that's what they normally are, and
@@ -298,9 +319,9 @@
 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 	| avr-* \
-	| bs2000-* \
+	| bfin-* | bs2000-* \
 	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-	| clipper-* | cydra-* \
+	| clipper-* | craynv-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
 	| elxsi-* \
 	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
@@ -310,7 +331,7 @@
 	| ip2k-* | iq2000-* \
 	| m32r-* | m32rle-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | mcore-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* \
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
 	| mips16-* \
 	| mips64-* | mips64el-* \
@@ -319,6 +340,7 @@
 	| mips64vr4100-* | mips64vr4100el-* \
 	| mips64vr4300-* | mips64vr4300el-* \
 	| mips64vr5000-* | mips64vr5000el-* \
+	| mips64vr5900-* | mips64vr5900el-* \
 	| mipsisa32-* | mipsisa32el-* \
 	| mipsisa32r2-* | mipsisa32r2el-* \
 	| mipsisa64-* | mipsisa64el-* \
@@ -326,27 +348,33 @@
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
 	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| mt-* \
 	| msp430-* \
-	| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
+	| nios-* | nios2-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
 	| pyramid-* \
 	| romp-* | rs6000-* \
-	| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+	| sparc-* | sparc64-* | sparc64b-* | 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-* | xstormy16-* \
-	| xtensa-* \
+	| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| 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)
@@ -445,6 +473,10 @@
 		basic_machine=j90-cray
 		os=-unicos
 		;;
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
+		;;
 	cr16c)
 		basic_machine=cr16c-unknown
 		os=-elf
@@ -452,6 +484,9 @@
 	crds | unos)
 		basic_machine=m68k-crds
 		;;
+	crisv32 | crisv32-* | etraxfs*)
+		basic_machine=crisv32-axis
+		;;
 	cris | cris-* | etrax*)
 		basic_machine=cris-axis
 		;;
@@ -481,6 +516,10 @@
 		basic_machine=m88k-motorola
 		os=-sysv3
 		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
 	dpx20 | dpx20-*)
 		basic_machine=rs6000-bull
 		os=-bosx
@@ -659,10 +698,6 @@
 	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
@@ -675,6 +710,9 @@
 		basic_machine=i386-pc
 		os=-msdos
 		;;
+	ms1-*)
+		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+		;;
 	mvs)
 		basic_machine=i370-ibm
 		os=-mvs
@@ -743,10 +781,6 @@
 	np1)
 		basic_machine=np1-gould
 		;;
-	nv1)
-		basic_machine=nv1-cray
-		os=-unicosmp
-		;;
 	nsr-tandem)
 		basic_machine=nsr-tandem
 		;;
@@ -754,9 +788,8 @@
 		basic_machine=hppa1.1-oki
 		os=-proelf
 		;;
-	or32 | or32-*)
+	openrisc | openrisc-*)
 		basic_machine=or32-unknown
-		os=-coff
 		;;
 	os400)
 		basic_machine=powerpc-ibm
@@ -787,6 +820,12 @@
 	pc532 | pc532-*)
 		basic_machine=ns32k-pc532
 		;;
+	pc98)
+		basic_machine=i386-pc
+		;;
+	pc98-*)
+		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	pentium | p5 | k5 | k6 | nexgen | viac3)
 		basic_machine=i586-pc
 		;;
@@ -843,6 +882,10 @@
 		basic_machine=i586-unknown
 		os=-pw32
 		;;
+	rdos)
+		basic_machine=i386-pc
+		os=-rdos
+		;;
 	rom68k)
 		basic_machine=m68k-rom68k
 		os=-coff
@@ -1029,6 +1072,10 @@
 		basic_machine=hppa1.1-winbond
 		os=-proelf
 		;;
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
 	xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
@@ -1059,6 +1106,9 @@
 	romp)
 		basic_machine=romp-ibm
 		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
 	rs6000)
 		basic_machine=rs6000-ibm
 		;;
@@ -1075,12 +1125,9 @@
 	we32k)
 		basic_machine=we32k-att
 		;;
-	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+	sh[1234] | sh[24]a | 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
 		;;
@@ -1154,20 +1201,23 @@
 	      | -aos* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+	      | -openbsd* | -solidbsd* \
 	      | -ekkobsd* | -kfreebsd* | -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* | -linux-newlib* | -linux-uclibc* \
+	      | -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*)
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+	      | -skyos* | -haiku* | -rdos*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1185,7 +1235,7 @@
 		os=`echo $os | sed -e 's|nto|nto-qnx|'`
 		;;
 	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
 	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
 		;;
 	-mac*)
@@ -1294,6 +1344,9 @@
 	-kaos*)
 		os=-kaos
 		;;
+	-zvmoe)
+		os=-zvmoe
+		;;
 	-none)
 		;;
 	*)
@@ -1371,9 +1424,15 @@
 	*-be)
 		os=-beos
 		;;
+	*-haiku)
+		os=-haiku
+		;;
 	*-ibm)
 		os=-aix
 		;;
+    	*-knuth)
+		os=-mmixware
+		;;
 	*-wec)
 		os=-proelf
 		;;
@@ -1539,7 +1598,7 @@
 esac
 
 echo $basic_machine$os
-exit 0
+exit
 
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)
--- htdig-3.2.0b6.orig/db/os_rw.c
+++ htdig-3.2.0b6/db/os_rw.c
@@ -5,6 +5,13 @@
  *	Sleepycat Software.  All rights reserved.
  */
 
+#define _XOPEN_SOURCE 500
+#include <sys/types.h>
+#include <unistd.h>
+#ifndef u_long
+typedef ulong_t u_long;
+#endif
+
 #include "db_config.h"
 
 #ifndef lint
--- htdig-3.2.0b6.orig/config.guess
+++ htdig-3.2.0b6/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 Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
-timestamp='2004-03-12'
+timestamp='2006-02-23'
 
 # 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,13 +17,15 @@
 #
 # 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.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, 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 <[email protected]>.
 # Please send patches to <[email protected]>.  Submit a context
 # diff and a properly formatted ChangeLog entry.
@@ -53,7 +55,7 @@
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -66,11 +68,11 @@
 while test $# -gt 0 ; do
   case $1 in
     --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit 0 ;;
+       echo "$timestamp" ; exit ;;
     --version | -v )
-       echo "$version" ; exit 0 ;;
+       echo "$version" ; exit ;;
     --help | --h* | -h )
-       echo "$usage"; exit 0 ;;
+       echo "$usage"; exit ;;
     -- )     # Stop option processing
        shift; break ;;
     - )	# Use stdin as input.
@@ -104,7 +106,7 @@
 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
 : ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
  { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
  { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
@@ -123,7 +125,7 @@
 	;;
  ,,*)   CC_FOR_BUILD=$CC ;;
  ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ;'
+esac ; set_cc_for_build= ;'
 
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
 # ([email protected] 1994-08-24)
@@ -196,64 +198,23 @@
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
 	echo "${machine}-${os}${release}"
-	exit 0 ;;
-    amd64:OpenBSD:*:*)
-	echo x86_64-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    amiga:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    arc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    cats:OpenBSD:*:*)
-	echo arm-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 ;;
-    pegasos: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 ;;
+	exit ;;
     *:OpenBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
+	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 0 ;;
+	exit ;;
+    *:SolidBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	exit ;;
     macppc:MirBSD:*:*)
 	echo powerppc-unknown-mirbsd${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:MirBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     alpha:OSF1:*:*)
 	case $UNAME_RELEASE in
 	*4.0)
@@ -306,40 +267,43 @@
 	# 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 0 ;;
-    Alpha*:OpenVMS:*:*)
-	echo alpha-hp-vms
-	exit 0 ;;
+	exit ;;
     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 0 ;;
+	exit ;;
     21064:Windows_NT:50:3)
 	echo alpha-dec-winnt3.5
-	exit 0 ;;
+	exit ;;
     Amiga*:UNIX_System_V:4.0:*)
 	echo m68k-unknown-sysv4
-	exit 0;;
+	exit ;;
     *:[Aa]miga[Oo][Ss]:*:*)
 	echo ${UNAME_MACHINE}-unknown-amigaos
-	exit 0 ;;
+	exit ;;
     *:[Mm]orph[Oo][Ss]:*:*)
 	echo ${UNAME_MACHINE}-unknown-morphos
-	exit 0 ;;
+	exit ;;
     *:OS/390:*:*)
 	echo i370-ibm-openedition
-	exit 0 ;;
+	exit ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit ;;
     *:OS400:*:*)
         echo powerpc-ibm-os400
-	exit 0 ;;
+	exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit 0;;
+	exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+	echo arm-unknown-riscos
+	exit ;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
 	echo hppa1.1-hitachi-hiuxmpp
-	exit 0;;
+	exit ;;
     Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
 	# [email protected] (Earle F. Ake) contributed MIS and NILE.
 	if test "`(/bin/universe) 2>/dev/null`" = att ; then
@@ -347,32 +311,32 @@
 	else
 		echo pyramid-pyramid-bsd
 	fi
-	exit 0 ;;
+	exit ;;
     NILE*:*:*:dcosx)
 	echo pyramid-pyramid-svr4
-	exit 0 ;;
+	exit ;;
     DRS?6000:unix:4.0:6*)
 	echo sparc-icl-nx6
-	exit 0 ;;
-    DRS?6000:UNIX_SV:4.2*:7*)
+	exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
 	case `/usr/bin/uname -p` in
-	    sparc) echo sparc-icl-nx7 && exit 0 ;;
+	    sparc) echo sparc-icl-nx7; exit ;;
 	esac ;;
     sun4H:SunOS:5.*:*)
 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     i86pc:SunOS:5.*:*)
 	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     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 0 ;;
+	exit ;;
     sun4*:SunOS:*:*)
 	case "`/usr/bin/arch -k`" in
 	    Series*|S4*)
@@ -381,10 +345,10 @@
 	esac
 	# Japanese Language versions have a version number like `4.1.3-JL'.
 	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit 0 ;;
+	exit ;;
     sun3*:SunOS:*:*)
 	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     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
@@ -396,10 +360,10 @@
 		echo sparc-sun-sunos${UNAME_RELEASE}
 		;;
 	esac
-	exit 0 ;;
+	exit ;;
     aushp:SunOS:*:*)
 	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     # 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
@@ -410,40 +374,40 @@
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
         echo m68k-atari-mint${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
 	echo m68k-atari-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
         echo m68k-atari-mint${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
         echo m68k-milan-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
         echo m68k-hades-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
         echo m68k-unknown-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
     m68k:machten:*:*)
 	echo m68k-apple-machten${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     powerpc:machten:*:*)
 	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     RISC*:Mach:*:*)
 	echo mips-dec-mach_bsd4.3
-	exit 0 ;;
+	exit ;;
     RISC*:ULTRIX:*:*)
 	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     VAX*:ULTRIX*:*:*)
 	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     2020:CLIX:*:* | 2430:CLIX:*:*)
 	echo clipper-intergraph-clix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
@@ -467,32 +431,33 @@
 	  exit (-1);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c \
-	  && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-	  && exit 0
+	$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; }
 	echo mips-mips-riscos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     Motorola:PowerMAX_OS:*:*)
 	echo powerpc-motorola-powermax
-	exit 0 ;;
+	exit ;;
     Motorola:*:4.3:PL8-*)
 	echo powerpc-harris-powermax
-	exit 0 ;;
+	exit ;;
     Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
 	echo powerpc-harris-powermax
-	exit 0 ;;
+	exit ;;
     Night_Hawk:Power_UNIX:*:*)
 	echo powerpc-harris-powerunix
-	exit 0 ;;
+	exit ;;
     m88k:CX/UX:7*:*)
 	echo m88k-harris-cxux7
-	exit 0 ;;
+	exit ;;
     m88k:*:4*:R4*)
 	echo m88k-motorola-sysv4
-	exit 0 ;;
+	exit ;;
     m88k:*:3*:R3*)
 	echo m88k-motorola-sysv3
-	exit 0 ;;
+	exit ;;
     AViiON:dgux:*:*)
         # DG/UX returns AViiON for all architectures
         UNAME_PROCESSOR=`/usr/bin/uname -p`
@@ -508,29 +473,29 @@
 	else
 	    echo i586-dg-dgux${UNAME_RELEASE}
 	fi
- 	exit 0 ;;
+ 	exit ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
 	echo m88k-dolphin-sysv3
-	exit 0 ;;
+	exit ;;
     M88*:*:R3*:*)
 	# Delta 88k system running SVR3
 	echo m88k-motorola-sysv3
-	exit 0 ;;
+	exit ;;
     XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
 	echo m88k-tektronix-sysv3
-	exit 0 ;;
+	exit ;;
     Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
 	echo m68k-tektronix-bsd
-	exit 0 ;;
+	exit ;;
     *:IRIX*:*:*)
 	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit 0 ;;
+	exit ;;
     ????????: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 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
     i*86:AIX:*:*)
 	echo i386-ibm-aix
-	exit 0 ;;
+	exit ;;
     ia64:AIX:*:*)
 	if [ -x /usr/bin/oslevel ] ; then
 		IBM_REV=`/usr/bin/oslevel`
@@ -538,7 +503,7 @@
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
 	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-	exit 0 ;;
+	exit ;;
     *:AIX:2:3)
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
 		eval $set_cc_for_build
@@ -553,14 +518,18 @@
 			exit(0);
 			}
 EOF
-		$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
-		echo rs6000-ibm-aix3.2.5
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		then
+			echo "$SYSTEM_NAME"
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
 	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 0 ;;
+	exit ;;
     *: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
@@ -574,28 +543,28 @@
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
 	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit 0 ;;
+	exit ;;
     *:AIX:*:*)
 	echo rs6000-ibm-aix
-	exit 0 ;;
+	exit ;;
     ibmrt:4.4BSD:*|romp-ibm:BSD:*)
 	echo romp-ibm-bsd4.4
-	exit 0 ;;
+	exit ;;
     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
 	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-	exit 0 ;;                           # report: romp-ibm BSD 4.3
+	exit ;;                             # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
 	echo rs6000-bull-bosx
-	exit 0 ;;
+	exit ;;
     DPX/2?00:B.O.S.:*:*)
 	echo m68k-bull-sysv3
-	exit 0 ;;
+	exit ;;
     9000/[34]??:4.3bsd:1.*:*)
 	echo m68k-hp-bsd
-	exit 0 ;;
+	exit ;;
     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
 	echo m68k-hp-bsd4.4
-	exit 0 ;;
+	exit ;;
     9000/[34678]??:HP-UX:*:*)
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 	case "${UNAME_MACHINE}" in
@@ -657,9 +626,19 @@
 	esac
 	if [ ${HP_ARCH} = "hppa2.0w" ]
 	then
-	    # 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
+	    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
 	    then
 		HP_ARCH="hppa2.0w"
 	    else
@@ -667,11 +646,11 @@
 	    fi
 	fi
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit 0 ;;
+	exit ;;
     ia64:HP-UX:*:*)
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 	echo ia64-hp-hpux${HPUX_REV}
-	exit 0 ;;
+	exit ;;
     3050*:HI-UX:*:*)
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
@@ -699,166 +678,177 @@
 	  exit (0);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+		{ echo "$SYSTEM_NAME"; exit; }
 	echo unknown-hitachi-hiuxwe2
-	exit 0 ;;
+	exit ;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
 	echo hppa1.1-hp-bsd
-	exit 0 ;;
+	exit ;;
     9000/8??:4.3bsd:*:*)
 	echo hppa1.0-hp-bsd
-	exit 0 ;;
+	exit ;;
     *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
 	echo hppa1.0-hp-mpeix
-	exit 0 ;;
+	exit ;;
     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
 	echo hppa1.1-hp-osf
-	exit 0 ;;
+	exit ;;
     hp8??:OSF1:*:*)
 	echo hppa1.0-hp-osf
-	exit 0 ;;
+	exit ;;
     i*86:OSF1:*:*)
 	if [ -x /usr/sbin/sysversion ] ; then
 	    echo ${UNAME_MACHINE}-unknown-osf1mk
 	else
 	    echo ${UNAME_MACHINE}-unknown-osf1
 	fi
-	exit 0 ;;
+	exit ;;
     parisc*:Lites*:*:*)
 	echo hppa1.1-hp-lites
-	exit 0 ;;
+	exit ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
 	echo c1-convex-bsd
-        exit 0 ;;
+        exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-        exit 0 ;;
+        exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
 	echo c34-convex-bsd
-        exit 0 ;;
+        exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
 	echo c38-convex-bsd
-        exit 0 ;;
+        exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
 	echo c4-convex-bsd
-        exit 0 ;;
+        exit ;;
     CRAY*Y-MP:*:*:*)
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     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 0 ;;
+	exit ;;
     CRAY*TS:*:*:*)
 	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*T3E:*:*:*)
 	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*SV1:*:*:*)
 	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     *:UNICOS/mp:*:*)
-	echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
     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 0 ;;
+        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 0 ;;
+	exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     sparc*:BSD/OS:*:*)
 	echo sparc-unknown-bsdi${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:BSD/OS:*:*)
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *: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=`
-	# GNU/KFreeBSD systems have a "k" prefix to indicate we are using
-	# FreeBSD's kernel, but not the complete OS.
-	case ${LIBC} in gnu) kernel_only='k' ;; esac
-	echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
-	exit 0 ;;
+	case ${UNAME_MACHINE} in
+	    pc98)
+		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    *)
+		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	esac
+	exit ;;
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
-	exit 0 ;;
+	exit ;;
     i*:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
-	exit 0 ;;
+	exit ;;
+    i*:MSYS_NT-*:*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit ;;
+    i*:windows32*:*)
+    	# uname -m includes "-pc" on this system.
+    	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
     i*:PW*:*)
 	echo ${UNAME_MACHINE}-pc-pw32
-	exit 0 ;;
-    x86:Interix*:[34]*)
-	echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
-	exit 0 ;;
+	exit ;;
+    x86:Interix*:[345]*)
+	echo i586-pc-interix${UNAME_RELEASE}
+	exit ;;
+    EM64T:Interix*:[345]*)
+	echo x86_64-unknown-interix${UNAME_RELEASE}
+	exit ;;
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
 	echo i${UNAME_MACHINE}-pc-mks
-	exit 0 ;;
+	exit ;;
     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 0 ;;
+	exit ;;
     i*:UWIN*:*)
 	echo ${UNAME_MACHINE}-pc-uwin
-	exit 0 ;;
+	exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	echo x86_64-unknown-cygwin
+	exit ;;
     p*:CYGWIN*:*)
 	echo powerpcle-unknown-cygwin
-	exit 0 ;;
+	exit ;;
     prep*:SunOS:5.*:*)
 	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     *:GNU:*:*)
 	# the GNU system
 	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit 0 ;;
+	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 0 ;;
+	exit ;;
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
-	exit 0 ;;
+	exit ;;
     arm*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     cris:Linux:*:*)
 	echo cris-axis-linux-gnu
-	exit 0 ;;
+	exit ;;
+    crisv32:Linux:*:*)
+	echo crisv32-axis-linux-gnu
+	exit ;;
+    frv:Linux:*:*)
+    	echo frv-unknown-linux-gnu
+	exit ;;
     ia64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     m32r*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     m68*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     mips:Linux:*:*)
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
@@ -875,8 +865,12 @@
 	#endif
 	#endif
 EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^CPU/{
+		s: ::g
+		p
+	    }'`"
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
 	;;
     mips64:Linux:*:*)
 	eval $set_cc_for_build
@@ -894,15 +888,22 @@
 	#endif
 	#endif
 EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^CPU/{
+		s: ::g
+		p
+	    }'`"
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
 	;;
+    or32:Linux:*:*)
+	echo or32-unknown-linux-gnu
+	exit ;;
     ppc:Linux:*:*)
 	echo powerpc-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     ppc64:Linux:*:*)
 	echo powerpc64-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     alpha:Linux:*:*)
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
 	  EV5)   UNAME_MACHINE=alphaev5 ;;
@@ -916,7 +917,7 @@
 	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 0 ;;
+	exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
 	# Look for CPU level
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -924,25 +925,28 @@
 	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
 	  *)    echo hppa-unknown-linux-gnu ;;
 	esac
-	exit 0 ;;
+	exit ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
 	echo hppa64-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
 	echo ${UNAME_MACHINE}-ibm-linux
-	exit 0 ;;
+	exit ;;
     sh64*:Linux:*:*)
     	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     sh*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
+    vax:Linux:*:*)
+	echo ${UNAME_MACHINE}-dec-linux-gnu
+	exit ;;
     x86_64:Linux:*:*)
 	echo x86_64-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     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
@@ -960,15 +964,15 @@
 		;;
 	  a.out-i386-linux)
 		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-		exit 0 ;;
+		exit ;;
 	  coff-i386)
 		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-		exit 0 ;;
+		exit ;;
 	  "")
 		# 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 0 ;;
+		exit ;;
 	esac
 	# Determine whether the default compiler is a.out or elf
 	eval $set_cc_for_build
@@ -985,7 +989,7 @@
 	LIBC=gnulibc1
 	# endif
 	#else
-	#ifdef __INTEL_COMPILER
+	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__sun)
 	LIBC=gnu
 	#else
 	LIBC=gnuaout
@@ -995,16 +999,23 @@
 	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 0
-	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^LIBC/{
+		s: ::g
+		p
+	    }'`"
+	test x"${LIBC}" != x && {
+		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+		exit
+	}
+	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
 	;;
     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 0 ;;
+	exit ;;
     i*86:UNIX_SV:4.2MP:2.*)
         # Unixware is an offshoot of SVR4, but it has its own version
         # number series starting with 2...
@@ -1012,27 +1023,27 @@
 	# I just have to hope.  -- rms.
         # Use sysv4.2uw... so that sysv4* matches it.
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-	exit 0 ;;
+	exit ;;
     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 0 ;;
+	exit ;;
     i*86:XTS-300:*:STOP)
 	echo ${UNAME_MACHINE}-unknown-stop
-	exit 0 ;;
+	exit ;;
     i*86:atheos:*:*)
 	echo ${UNAME_MACHINE}-unknown-atheos
-	exit 0 ;;
-	i*86:syllable:*:*)
+	exit ;;
+    i*86:syllable:*:*)
 	echo ${UNAME_MACHINE}-pc-syllable
-	exit 0 ;;
+	exit ;;
     i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
 	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     i*86:*DOS:*:*)
 	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit 0 ;;
+	exit ;;
     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
@@ -1040,15 +1051,16 @@
 	else
 		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
 	fi
-	exit 0 ;;
-    i*86:*:5:[78]*)
+	exit ;;
+    i*86:*:5:[678]*)
+    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
 	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 0 ;;
+	exit ;;
     i*86:*:3.2:*)
 	if test -f /usr/options/cb.name; then
 		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
@@ -1066,73 +1078,73 @@
 	else
 		echo ${UNAME_MACHINE}-pc-sysv32
 	fi
-	exit 0 ;;
+	exit ;;
     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 0 ;;
+        exit ;;
     Intel:Mach:3*:*)
 	echo i386-pc-mach3
-	exit 0 ;;
+	exit ;;
     paragon:*:*:*)
 	echo i860-intel-osf1
-	exit 0 ;;
+	exit ;;
     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 0 ;;
+	exit ;;
     mini*:CTIX:SYS*5:*)
 	# "miniframe"
 	echo m68010-convergent-sysv
-	exit 0 ;;
+	exit ;;
     mc68k:UNIX:SYSTEM5:3.51m)
 	echo m68k-convergent-sysv
-	exit 0 ;;
+	exit ;;
     M680?0:D-NIX:5.3:*)
 	echo m68k-diab-dnix
-	exit 0 ;;
-    M68*:*:R3V[567]*:*)
-	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    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)
+	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)
 	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 0
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && echo i486-ncr-sysv4 && exit 0 ;;
+          && { echo i486-ncr-sysv4; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
 	echo m68k-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     mc68030:UNIX_System_V:4.*:*)
 	echo m68k-atari-sysv4
-	exit 0 ;;
+	exit ;;
     TSUNAMI:LynxOS:2.*:*)
 	echo sparc-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     rs6000:LynxOS:2.*:*)
 	echo rs6000-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
 	echo powerpc-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     SM[BE]S:UNIX_SV:*:*)
 	echo mips-dde-sysv${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     RM*:ReliantUNIX-*:*:*)
 	echo mips-sni-sysv4
-	exit 0 ;;
+	exit ;;
     RM*:SINIX-*:*:*)
 	echo mips-sni-sysv4
-	exit 0 ;;
+	exit ;;
     *:SINIX-*:*:*)
 	if uname -p 2>/dev/null >/dev/null ; then
 		UNAME_MACHINE=`(uname -p) 2>/dev/null`
@@ -1140,68 +1152,72 @@
 	else
 		echo ns32k-sni-sysv
 	fi
-	exit 0 ;;
+	exit ;;
     PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
                       # says <[email protected]>
         echo i586-unisys-sysv4
-        exit 0 ;;
+        exit ;;
     *:UNIX_System_V:4*:FTX*)
 	# From Gerald Hewes <[email protected]>.
 	# How about differentiating between stratus architectures? -djm
 	echo hppa1.1-stratus-sysv4
-	exit 0 ;;
+	exit ;;
     *:*:*:FTX*)
 	# From [email protected].
 	echo i860-stratus-sysv4
-	exit 0 ;;
+	exit ;;
+    i*86:VOS:*:*)
+	# From [email protected].
+	echo ${UNAME_MACHINE}-stratus-vos
+	exit ;;
     *:VOS:*:*)
 	# From [email protected].
 	echo hppa1.1-stratus-vos
-	exit 0 ;;
+	exit ;;
     mc68*:A/UX:*:*)
 	echo m68k-apple-aux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     news*:NEWS-OS:6*:*)
 	echo mips-sony-newsos6
-	exit 0 ;;
+	exit ;;
     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 0 ;;
+        exit ;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
 	echo powerpc-be-beos
-	exit 0 ;;
+	exit ;;
     BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
 	echo powerpc-apple-beos
-	exit 0 ;;
+	exit ;;
     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
 	echo i586-pc-beos
-	exit 0 ;;
+	exit ;;
     SX-4:SUPER-UX:*:*)
 	echo sx4-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     SX-5:SUPER-UX:*:*)
 	echo sx5-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     SX-6:SUPER-UX:*:*)
 	echo sx6-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     Power*:Rhapsody:*:*)
 	echo powerpc-apple-rhapsody${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:Rhapsody:*:*)
 	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:Darwin:*:*)
-	case `uname -p` in
-	    *86) UNAME_PROCESSOR=i686 ;;
-	    powerpc) UNAME_PROCESSOR=powerpc ;;
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	case $UNAME_PROCESSOR in
+	    unknown) UNAME_PROCESSOR=powerpc ;;
 	esac
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
 	UNAME_PROCESSOR=`uname -p`
 	if test "$UNAME_PROCESSOR" = "x86"; then
@@ -1209,22 +1225,25 @@
 		UNAME_MACHINE=pc
 	fi
 	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:QNX:*:4*)
 	echo i386-pc-qnx
-	exit 0 ;;
+	exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
     NSR-?:NONSTOP_KERNEL:*:*)
 	echo nsr-tandem-nsk${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:NonStop-UX:*:*)
 	echo mips-compaq-nonstopux
-	exit 0 ;;
+	exit ;;
     BS2000:POSIX*:*:*)
 	echo bs2000-siemens-sysv
-	exit 0 ;;
+	exit ;;
     DS/*:UNIX_System_V:*:*)
 	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:Plan9:*:*)
 	# "uname -m" is not consistent, so use $cputype instead. 386
 	# is converted to i386 for consistency with other x86
@@ -1235,31 +1254,47 @@
 	    UNAME_MACHINE="$cputype"
 	fi
 	echo ${UNAME_MACHINE}-unknown-plan9
-	exit 0 ;;
+	exit ;;
     *:TOPS-10:*:*)
 	echo pdp10-unknown-tops10
-	exit 0 ;;
+	exit ;;
     *:TENEX:*:*)
 	echo pdp10-unknown-tenex
-	exit 0 ;;
+	exit ;;
     KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
 	echo pdp10-dec-tops20
-	exit 0 ;;
+	exit ;;
     XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
 	echo pdp10-xkl-tops20
-	exit 0 ;;
+	exit ;;
     *:TOPS-20:*:*)
 	echo pdp10-unknown-tops20
-	exit 0 ;;
+	exit ;;
     *:ITS:*:*)
 	echo pdp10-unknown-its
-	exit 0 ;;
+	exit ;;
     SEI:*:*:SEIUX)
         echo mips-sei-seiux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:DragonFly:*:*)
 	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-	exit 0 ;;
+	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 ;;
+    i*86:rdos:*:*)
+	echo ${UNAME_MACHINE}-pc-rdos
+	exit ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1291,7 +1326,7 @@
 #endif
 
 #if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix"); exit (0);
+  printf ("arm-acorn-riscix\n"); exit (0);
 #endif
 
 #if defined (hp300) && !defined (hpux)
@@ -1380,11 +1415,12 @@
 }
 EOF
 
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+	{ echo "$SYSTEM_NAME"; exit; }
 
 # Apollos put the system type in the environment.
 
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
 
 # Convex versions that predate uname can use getsysinfo(1)
 
@@ -1393,22 +1429,22 @@
     case `getsysinfo -f cpu_type` in
     c1*)
 	echo c1-convex-bsd
-	exit 0 ;;
+	exit ;;
     c2*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-	exit 0 ;;
+	exit ;;
     c34*)
 	echo c34-convex-bsd
-	exit 0 ;;
+	exit ;;
     c38*)
 	echo c38-convex-bsd
-	exit 0 ;;
+	exit ;;
     c4*)
 	echo c4-convex-bsd
-	exit 0 ;;
+	exit ;;
     esac
 fi
 
@@ -1419,7 +1455,9 @@
 the operating system you are using. It is advised that you
 download the most up to date version of the config scripts from
 
-    ftp://ftp.gnu.org/pub/gnu/config/
+  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
 
 If the version you run ($0) is already up to date, please
 send the following data and any information you think might be
--- htdig-3.2.0b6.orig/htword/WordDBPage.cc
+++ htdig-3.2.0b6/htword/WordDBPage.cc
@@ -82,7 +82,7 @@
   	if(debuglevel>2)printf("TOTAL SIZE: %6d %8f\n",size,size/8.0);
 	// argh! compare failed somthing went wrong
 	// display the compress/decompress sequence and fail
-	if(cmp || size>8*1024*1000000000)
+	if(cmp || size>8*1024)
 	{
 	    if(size>8*1024)
 	    {
--- htdig-3.2.0b6.orig/htsearch/htsearch.cc
+++ htdig-3.2.0b6/htsearch/htsearch.cc
@@ -211,8 +211,7 @@
 	}
 	if (access((char*)configFile, R_OK) < 0)
 	{
-	    reportError(form("Unable to read configuration file '%s'",
-			     configFile.get()));
+		reportError("Unable to read configuration file");
 	}
 	config->Read(configFile);
 
--- htdig-3.2.0b6.orig/htsearch/Collection.h
+++ htdig-3.2.0b6/htsearch/Collection.h
@@ -36,9 +36,9 @@
                const char *docExcerpt);
     ~Collection();
 
-    void Collection::Open();
+    void Open();
 
-    void Collection::Close(); 
+    void Close(); 
 
     char *getWordFile() { return wordFile.get(); }
     DocumentRef         *getDocumentRef(int id);
--- htdig-3.2.0b6.orig/htsearch/Display.cc
+++ htdig-3.2.0b6/htsearch/Display.cc
@@ -54,6 +54,7 @@
 
 #include <math.h>
 #include <float.h>
+#include <values.h>
 
 #if !defined(DBL_MAX)
 # if defined (MAXDOUBLE)
@@ -137,7 +138,7 @@
       // Must temporarily stash the message in a String, since
       // displaySyntaxError will overwrite the static temp used in form.
 
-      String s(form("No such sort method: `%s'", (const char*)config->Find("sort")));
+      String s("Invalid sort method.");
 
       displaySyntaxError(s);
       return;
--- htdig-3.2.0b6.orig/htsearch/qtest.cc
+++ htdig-3.2.0b6/htsearch/qtest.cc
@@ -132,8 +132,7 @@
 
     if (access((char*)configFile, R_OK) < 0)
     {
-	reportError(form("Unable to find configuration file '%s'",
-			 configFile.get()));
+    	reportError("Unable to find configuration file");
     }
 	
     config->Read(configFile);
--- htdig-3.2.0b6.orig/libhtdig/ResultFetch.cc
+++ htdig-3.2.0b6/libhtdig/ResultFetch.cc
@@ -142,7 +142,7 @@
         // Must temporarily stash the message in a String, since
         // displaySyntaxError will overwrite the static temp used in form.
 
-        String s(form("No such sort method: `%s'", (const char *) config->Find("sort")));
+	String s("Invalid search method.");
 
         displaySyntaxError(s);
         //return;
--- htdig-3.2.0b6.orig/debian/htdig-doc.dirs
+++ htdig-3.2.0b6/debian/htdig-doc.dirs
@@ -0,0 +1 @@
+usr/share/doc/htdig-doc
--- htdig-3.2.0b6.orig/debian/htdig.config
+++ htdig-3.2.0b6/debian/htdig.config
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+db_title "ht://Dig"
+
+if [ ! -d /etc/default ]; then
+	mkdir /etc/default
+fi
+
+if [ -r /etc/default/htdig ]; then
+	RUN=$(awk '/^run_rundig/ {print $3}' /etc/default/htdig)
+	if [ "$RUN"="true" ] || [ "$RUN"="false" ]; then
+		db_set htdig/run-rundig $RUN
+	fi
+fi
+
+# ask about rundig
+db_input medium htdig/run-rundig || true
+db_go
+
+# ask to generate ht://Dig databases now
+db_input medium htdig/generate-databases || true
+db_go
+
+db_get htdig/run-rundig
+RUN_NOTIFY=$RET
+
+if [ "$RUN_NOTIFY"="true" ] || [ "$RUN_NOTIFY"="false" ]; then
+	echo "# Whether to run the rundig script daily" > /etc/default/htdig
+	echo "run_rundig = $RUN_NOTIFY" >> /etc/default/htdig
+fi
+
+exit 0
--- htdig-3.2.0b6.orig/debian/htmerge.1
+++ htdig-3.2.0b6/debian/htmerge.1
@@ -0,0 +1,68 @@
+.TH htmerge 1 "21 July 1997"
+.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
+.\" other parms are allowed: see man(7), man(1)
+.SH NAME
+htmerge \- create document index and word database for the ht://Dig
+search engine
+.SH SYNOPSIS
+.B htmerge
+.I "[options]"
+.SH "DESCRIPTION"
+.I Htmerge
+is used to create a document index and word database
+from the files that were created by \fIhtdig\fR. These databases are
+then used by
+.I htsearch
+to perform the actual searched. 
+.SH OPTIONS
+.TP
+.B \-a
+Use alternate work files. Tells htdig to append
+.I .work
+to database files, causing a second copy of the database to be
+built. This allows the original files to be used by htsearch
+during the indexing run. 
+.TP
+.B \-c \fIconfigfile\fR
+Use the specified
+.I configfile
+instead of the default. 
+.TP
+.B \-d
+Prevent the document index from being created. 
+.TP
+.B \-s
+Print statistics about the document and word databases
+after htmerge has finished. 
+.TP
+.B \-v
+Run in verbose mode. This will provide some hints as to the
+progress of the merge. This can be useful when running
+htmerge interactively since some parts (especially the word
+database creation) can take a very long time. 
+.TP
+.B \-w
+Prevent the word database from being created. 
+.SH ENVIRONMENT
+.TP
+.B TMPDIR
+In addition to the command line options, the environment
+variable
+.I TMPDIR
+will be used to designate the directory where
+intermediate files are stored during the sorting process. 
+.SH "FILES"
+.TP
+.B /etc/htdig/htdig.conf
+The default configuration file.
+.SH "SEE ALSO"
+Please refer to the HTML pages (in the htdig-doc package)
+.B /usr/share/doc/htdig-doc/html/index.html
+and the manual pages
+.I htdig(1)
+and 
+.I htsearch(1)
+for a detailed description of ht://Dig and its commands.
+.SH AUTHOR
+This manual page was written by Christian Schwarz, modified
+by Stijn de Bekker, based on the HTML documentation of ht://Dig.
--- htdig-3.2.0b6.orig/debian/htdig-pdfparser
+++ htdig-3.2.0b6/debian/htdig-pdfparser
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+# Wrapper script for the ht://Dig PDF parser engine
+#
+# This script is called by the htdig binary to parse pdf documents
+# Set the debian_pdf_parsed in the htdig configuration
+# 
+# 
+# Written by Stijn de Bekker <[email protected]> for Debian GNU/Linux.
+
+
+#PARSER=`grep debian_pdf_parser /etc/htdig/htdig.conf | awk '{ print $2 }'
+# replaced with the following line, suggestion by pod, should fix #196916
+PARSER=`awk '/^debian_pdf_parser:/{ print $2 }' /etc/htdig/htdig.conf`
+PDFFILE=$1
+PSFILE=$2
+
+if [ "$PDFFILE" = "" -o "$PSFILE" = "" ]; then
+	# Missing .pdf or .ps file
+	exit 1
+fi
+
+case "$PARSER" in
+	acrobat|acroread)
+		if [ -x /usr/bin/acroread ]; then
+			/usr/bin/acroread -toPostscript $PDFFILE $PSFILE
+		fi
+		;;
+
+	xpdf|pdftotext)
+		if [ -x /usr/bin/pdftotext ]; then
+			/usr/bin/pdftotext $PDFFILE $PSFILE
+		fi
+		;;
+esac
+
+exit 0
--- htdig-3.2.0b6.orig/debian/compat
+++ htdig-3.2.0b6/debian/compat
@@ -0,0 +1 @@
+5
--- htdig-3.2.0b6.orig/debian/htdig-pdfparser.1
+++ htdig-3.2.0b6/debian/htdig-pdfparser.1
@@ -0,0 +1,33 @@
+.TH htdig-pdfparser 1 "17 February 2002"
+.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
+.\" other parms are allowed: see man(7), man(1)
+.SH NAME
+htdig-pdfparser \- parse a PDF document (wrapper script for htdig)
+.SH SYNOPSIS
+.B htdig-pdfparser
+.SH "DESCRIPTION"
+This script acts as a wrapper script for the htdig program. The exact
+program that htdig uses to search in pdf documents for
+index words, can be set in the htdig config file. Set the program by
+using the
+.I debian_pdf_parser
+directive.
+.SH "OPTIONS"
+.TP
+.B acrobat
+Use the acroread utility to parse PDF documents
+.TP
+.B xpdf
+Use the pstotext utility, part of the xpdf package, to parse PDF documents
+.SH "FILES"
+.TP
+.B /etc/htdig/htdig.conf
+The default configuration file.
+.SH "SEE ALSO"
+Please refer to the HTML pages (in the htdig-doc package)
+.B /usr/share/doc/htdig-doc/html/index.html
+and the manual pages
+.I htdig(1)
+for a detailed description of ht://Dig and its commands.
+.SH AUTHOR
+Stijn de Bekker <[email protected]>
--- htdig-3.2.0b6.orig/debian/htdig.manpages
+++ htdig-3.2.0b6/debian/htdig.manpages
@@ -0,0 +1,12 @@
+debian/htdig.1
+debian/htdump.1
+debian/htfuzzy.1
+debian/htload.1
+debian/htmerge.1
+debian/htnotify.1
+debian/rundig.1
+debian/htdig-pdfparser.1
+debian/htstat.1
+debian/htpurge.1
+debian/htsearch.1
+debian/htdigconfig.8
--- htdig-3.2.0b6.orig/debian/copyright
+++ htdig-3.2.0b6/debian/copyright
@@ -0,0 +1,13 @@
+This package was originally debianized by Christian Schwarz <[email protected]>.
+Now maintained by Stijn de Bekker <[email protected]>
+
+It was downloaded from: http://www.htdig.org
+
+----------------------------------------------------------------------------
+
+HTDig is Copyright (c) 1995-2004 the ht://Dig Group
+Contributions are from many; see htdoc/THANKS.html.
+
+HTDig is distributed under GPL, Version 2.
+Please refer to /usr/share/common-licenses/GPL-2 for license details.
+
--- htdig-3.2.0b6.orig/debian/htdigconfig
+++ htdig-3.2.0b6/debian/htdigconfig
@@ -0,0 +1,20 @@
+#!/bin/sh -e
+
+echo -n "Creating endings database for ht://Dig search engine..."
+
+# Only create the endings database if it doesn't already exist.
+# This database is static, so even if pages change, this database will not
+# need to be rebuilt.
+
+if [ ! -f /var/lib/htdig/word2root.db ]
+then
+    htfuzzy $verbose endings
+fi
+
+if [ ! -f /var/lib/htdig/synonyms.db ]
+then
+    htfuzzy $verbose synonyms
+fi
+
+echo "done."
+
--- htdig-3.2.0b6.orig/debian/htdig.prerm
+++ htdig-3.2.0b6/debian/htdig.prerm
@@ -0,0 +1,10 @@
+#!/bin/sh -e
+
+set -e
+
+# remove endings databases
+rm -f /etc/htdig/*.db
+
+#DEBHELPER#
+
+exit 0
--- htdig-3.2.0b6.orig/debian/po/POTFILES.in
+++ htdig-3.2.0b6/debian/po/POTFILES.in
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] templates
--- htdig-3.2.0b6.orig/debian/po/cs.po
+++ htdig-3.2.0b6/debian/po/cs.po
@@ -0,0 +1,71 @@
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: htdig\n"
+"Report-Msgid-Bugs-To: [email protected]\n"
+"POT-Creation-Date: 2006-07-12 15:48-0400\n"
+"PO-Revision-Date: 2007-01-27 18:36+0100\n"
+"Last-Translator: Jan Outrata <[email protected]>\n"
+"Language-Team: Czech <[email protected]>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Generate endings database now?"
+msgstr "Vygenerovat databázi koncovek nyní?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The ht://Dig search engine requires an endings database which has to be "
+"generated before the first start. Generating the database will take a short "
+"while. It can be done either now or later by calling the '/usr/sbin/"
+"htdigconfig' script. Should the database be generated now  rather than "
+"later on?"
+msgstr ""
+"Vyhledávací mechanizmy ht://Dig vyžadují databázi koncovek, která se musí "
+"vygenerovat před prvním spuštěním. Generování databáze chvíli potrvá. Může "
+"se to udělat teď nebo později voláním skriptu /usr/sbin/htdigconfig. Mají "
+"se databáze vygenerovat nyní?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Execute the rundig script daily?"
+msgstr "Spouštět denně skript rundig?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"rundig is a program that obtains on-line content and creates a searchable "
+"database for the ht://Dig search engine. It downloads and indexes HTML from "
+"the web, as defined in /etc/htdig/htdig.conf. Say Yes if you wish to run "
+"this program daily. Say No if you don't plan to use htdig in this way "
+"(perhaps htdig is being used by a third party, for instance KDE, to perform "
+"local indexing). If in doubt, say No. It is the safest choice unless you "
+"know what you're doing."
+msgstr ""
+"rundig je program, který získá on-line obsah a vytvoří prohledávatelnou "
+"databázi pro vyhledávací stroj ht://Dig. Stáhne a zaindexuje HTML z webu, "
+"jak je definováno v /etc/htdig/htdig.conf. Odpovězte Ano, pokud chcete "
+"tento program denně spouštět. Ne, pokud neplánujete používat htdig tímto "
+"způsobem (pravděpodobně je htdig používán třetí stranou, například KDE, pro "
+"lokální indexování). Pokud nevíte, odpovězte Ne. To je nejbezpečnější "
+"volba, pokud nevíte, co děláte."
--- htdig-3.2.0b6.orig/debian/po/ja.po
+++ htdig-3.2.0b6/debian/po/ja.po
@@ -0,0 +1,66 @@
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: htdig 1:3.2.0b6-2\n"
+"Report-Msgid-Bugs-To: [email protected]\n"
+"POT-Creation-Date: 2006-07-12 15:48-0400\n"
+"PO-Revision-Date: 2006-11-18 10:26+0900\n"
+"Last-Translator: Hideki Yamane (Debian-JP) <[email protected]>\n"
+"Language-Team: Japanese <[email protected]>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Generate endings database now?"
+msgstr "endings データベースをすぐに生成しますか?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The ht://Dig search engine requires an endings database which has to be "
+"generated before the first start. Generating the database will take a short "
+"while. It can be done either now or later by calling the '/usr/sbin/"
+"htdigconfig' script. Should the database be generated now  rather than later "
+"on?"
+msgstr ""
+"ht://Dig サーチエンジンは、初めての起動の前に endings データベースが生成され"
+"ている必要があります。データベースの生成には時間がかかります。すぐに作成を行"
+"うか、後ほど '/usr/sbin/htdigconfig' スクリプトを実行して行うかが可能です。"
+"データベースを後ほどではなく、すぐに作成しますか?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Execute the rundig script daily?"
+msgstr "rundig スクリプトを毎日実行しますか?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"rundig is a program that obtains on-line content and creates a searchable "
+"database for the ht://Dig search engine. It downloads and indexes HTML from "
+"the web, as defined in /etc/htdig/htdig.conf. Say Yes if you wish to run "
+"this program daily. Say No if you don't plan to use htdig in this way "
+"(perhaps htdig is being used by a third party, for instance KDE, to perform "
+"local indexing). If in doubt, say No. It is the safest choice unless you "
+"know what you're doing."
+msgstr ""
+"rundig はオンラインコンテンツを obtain し、ht://Dig サーチエンジン用のスケーラブルなデータベースを作成するプログラムです。/etc/htdig/htdig.conf で定義した通りに、web からダウンロードを行って HTML のインデックスを作成します。この様に htdig を使うつもりが無い場合 (おそらく htdig がサードパーティ製プログラム (例えば KDE) によってローカルのインデックス作成に利用される場合)は「いいえ」と答えてください。判らない場合は「いいえ」と答えてください。何を行っているかが判っていないのであれば、これがもっとも安全な選択です。"
--- htdig-3.2.0b6.orig/debian/po/nl.po
+++ htdig-3.2.0b6/debian/po/nl.po
@@ -0,0 +1,75 @@
+# translation of htdig_template.pot to debian-l10n-dutch
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+# Luk Claes <[email protected]>, 2004
+# Kurt De Bree <[email protected]>, 2006.
+# This is an unofficial translation
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: htdig_1:3.2.0b6-1_nl.po\n"
+"Report-Msgid-Bugs-To: [email protected]\n"
+"POT-Creation-Date: 2006-07-12 15:48-0400\n"
+"PO-Revision-Date: 2006-08-29 17:37+0200\n"
+"Last-Translator: Kurt De Bree <[email protected]>\n"
+"Language-Team: debian-l10n-dutch <[email protected]>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.2\n"
+"Plural-Forms:  nplurals=2; plural=(n != 1);\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Generate endings database now?"
+msgstr "Nu suffix-database aanmaken?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The ht://Dig search engine requires an endings database which has to be "
+"generated before the first start. Generating the database will take a short "
+"while. It can be done either now or later by calling the '/usr/sbin/"
+"htdigconfig' script. Should the database be generated now  rather than later "
+"on?"
+msgstr ""
+"De ht://Dig-zoekmachine vereist dat er voor het eerste gebruik een suffix-database aangemaakt wordt. Het aanmaken van deze database duurt enige tijd en kan nu gedaan worden, of later (door het '/usr/sbin/htdigconfig'-script uit te voeren). Wilt u dat de database nu aangemaakt wordt?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Execute the rundig script daily?"
+msgstr "Het 'rundig'-script dagelijks uitvoeren?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"rundig is a program that obtains on-line content and creates a searchable "
+"database for the ht://Dig search engine. It downloads and indexes HTML from "
+"the web, as defined in /etc/htdig/htdig.conf. Say Yes if you wish to run "
+"this program daily. Say No if you don't plan to use htdig in this way "
+"(perhaps htdig is being used by a third party, for instance KDE, to perform "
+"local indexing). If in doubt, say No. It is the safest choice unless you "
+"know what you're doing."
+msgstr ""
+"rundig is een programma dat 'online inhoud' verwerft en een zoekbare database "
+"aanmaakt voor de ht://Dig zoekmachine. Het download en indexeert HTML vanuit "
+"het web, zoals gedefinieerd in /etc/htdig/htdig.conf. Kies 'Ja' indien u wenst "
+"dit programma dagelijks uit te voeren. Kies 'Nee' indien u niet van plan "
+"bent om htdig op deze manier te gebruiken (misschien wordt htdig gebruikt "
+"door een derde, bijvoorbeeld KDE, om lokale indexering uit te voeren). Bij "
+"twijfel kiest u best 'Nee', daar dit de meest veilige keuze is tenzij u weet wat u doet."
--- htdig-3.2.0b6.orig/debian/po/fr.po
+++ htdig-3.2.0b6/debian/po/fr.po
@@ -0,0 +1,74 @@
+# 
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: htdig_1:3.2.0b6-1\n"
+"Report-Msgid-Bugs-To: [email protected]\n"
+"POT-Creation-Date: 2006-07-12 15:48-0400\n"
+"PO-Revision-Date: 2006-07-29 18:12+0100\n"
+"Last-Translator: Steve Petruzzello <[email protected]>\n"
+"Language-Team: French <[email protected]>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: French\n"
+"X-Poedit-Country: SWITZERLAND\n"
+"X-Poedit-SourceCharset: iso-8859-15\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Generate endings database now?"
+msgstr "Faut-il cr�er la base de donn�es des suffixes maintenant�?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The ht://Dig search engine requires an endings database which has to be "
+"generated before the first start. Generating the database will take a short "
+"while. It can be done either now or later by calling the '/usr/sbin/"
+"htdigconfig' script. Should the database be generated now  rather than later "
+"on?"
+msgstr ""
+"Le moteur de recherche ht://Dig n�cessite qu'une base de donn�es des "
+"suffixes soit cr��e avant sa premi�re ex�cution. Cr�er cette base prend du "
+"temps. Vous pouvez la cr�er maintenant ou le faire plus tard avec le script /"
+"usr/sbin/htdigconfig."
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Execute the rundig script daily?"
+msgstr "Faut-il ex�cuter le script rundig quotidiennement�?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"rundig is a program that obtains on-line content and creates a searchable "
+"database for the ht://Dig search engine. It downloads and indexes HTML from "
+"the web, as defined in /etc/htdig/htdig.conf. Say Yes if you wish to run "
+"this program daily. Say No if you don't plan to use htdig in this way "
+"(perhaps htdig is being used by a third party, for instance KDE, to perform "
+"local indexing). If in doubt, say No. It is the safest choice unless you "
+"know what you're doing."
+msgstr ""
+"Rundig est un programme qui r�cup�re du contenu mis en ligne et cr�e une "
+"base de donn�es consultable pour le moteur de recherche ht://Dig. Il "
+"t�l�charge des pages HTML et cr�e un index tel que d�fini dans le fichier /"
+"etc/htdig/htdig.conf. Veuillez accepter cette option si vous d�sirez "
+"ex�cuter ce programme quotidiennement. Refusez cette option si vous utilisez "
+"htdig diff�remment (par exemple comme outil d'indexation local pour KDE). "
+"Dans le doute, refusez-la car c'est le choix le plus s�r."
--- htdig-3.2.0b6.orig/debian/po/ru.po
+++ htdig-3.2.0b6/debian/po/ru.po
@@ -0,0 +1,76 @@
+# translation of htdig_1:3.2.0b6-2_ru.po to Russian
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans#
+#    Developers do not need to manually edit POT or PO files.
+#
+# Yuri Kozlov <[email protected]>, 2006.
+msgid ""
+msgstr ""
+"Project-Id-Version: htdig_1-3.2.0b6-2\n"
+"Report-Msgid-Bugs-To: [email protected]\n"
+"POT-Creation-Date: 2006-07-12 15:48-0400\n"
+"PO-Revision-Date: 2006-12-24 21:18+0300\n"
+"Last-Translator: Yuri Kozlov <[email protected]>\n"
+"Language-Team: Russian <[email protected]>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms:  nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Generate endings database now?"
+msgstr "Сгенерировать конечные базы данных сейчас?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The ht://Dig search engine requires an endings database which has to be "
+"generated before the first start. Generating the database will take a short "
+"while. It can be done either now or later by calling the '/usr/sbin/"
+"htdigconfig' script. Should the database be generated now  rather than later "
+"on?"
+msgstr ""
+"Поисковому движку ht://Dig требуются конечные базы данных, которые должны "
+"быть сгенерированы перед первым запуском. Генерация баз данных займёт время. "
+"Это может быть сделано сейчас или позже вызовом сценария '/usr/sbin/"
+"htdigconfig'. Сгенерировать базы данных прямо сейчас?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Execute the rundig script daily?"
+msgstr "Выполнять сценарий rundig ежедневно?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"rundig is a program that obtains on-line content and creates a searchable "
+"database for the ht://Dig search engine. It downloads and indexes HTML from "
+"the web, as defined in /etc/htdig/htdig.conf. Say Yes if you wish to run "
+"this program daily. Say No if you don't plan to use htdig in this way "
+"(perhaps htdig is being used by a third party, for instance KDE, to perform "
+"local indexing). If in doubt, say No. It is the safest choice unless you "
+"know what you're doing."
+msgstr ""
+"rundig -- это программа, которая принимает контент он-лайн и "
+"создаёт базу данных поиска для поискового движка ht://Dig. "
+"Она загружает и индексирует HTML из веб, как это задано в файле "
+"/etc/htdig/htdig.conf. Ответьте \"да\", если хотите запускать эту "
+"программу ежедневно. Ответьте \"нет\", если не планируете "
+"использовать htdig таким способом (возможно, htdig будет использован "
+"сторонней программой, например KDE, для выполнения локального "
+"индексирования). Если не будете, ответьте \"нет\". Это безопасный "
+"ответ, если не знаете, что делать."
+
--- htdig-3.2.0b6.orig/debian/po/es.po
+++ htdig-3.2.0b6/debian/po/es.po
@@ -0,0 +1,61 @@
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+# Developers do not need to manually edit POT or PO files.
+# 
+# 
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: [email protected]\n"
+"POT-Creation-Date: 2006-07-12 15:48-0400\n"
+"PO-Revision-Date: 2004-04-25 00:25+0200\n"
+"Last-Translator: catux <[email protected]>\n"
+"Language-Team: Spanish <[email protected]>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Generate endings database now?"
+msgstr "¿Generar las bases de datos finales ahora?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The ht://Dig search engine requires an endings database which has to be "
+"generated before the first start. Generating the database will take a short "
+"while. It can be done either now or later by calling the '/usr/sbin/"
+"htdigconfig' script. Should the database be generated now  rather than later "
+"on?"
+msgstr ""
+"El motor de búsqueda de ht://Dig pide unas bases de datos finales que se "
+"tienen que generar primero. Generar la base de datos tomará cierto tiempo. "
+"Se puede realizar ahora o más tarde llamandoal script /usr/sbin/htdigconfig ."
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Execute the rundig script daily?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"rundig is a program that obtains on-line content and creates a searchable "
+"database for the ht://Dig search engine. It downloads and indexes HTML from "
+"the web, as defined in /etc/htdig/htdig.conf. Say Yes if you wish to run "
+"this program daily. Say No if you don't plan to use htdig in this way "
+"(perhaps htdig is being used by a third party, for instance KDE, to perform "
+"local indexing). If in doubt, say No. It is the safest choice unless you "
+"know what you're doing."
+msgstr ""
--- htdig-3.2.0b6.orig/debian/po/templates.pot
+++ htdig-3.2.0b6/debian/po/templates.pot
@@ -0,0 +1,52 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: [email protected]\n"
+"POT-Creation-Date: 2006-07-12 16:21-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <[email protected]>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Generate endings database now?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The ht://Dig search engine requires an endings database which has to be "
+"generated before the first start. Generating the database will take a short "
+"while. It can be done either now or later by calling the '/usr/sbin/"
+"htdigconfig' script. Should the database be generated now  rather than later "
+"on?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Execute the rundig script daily?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"rundig is a program that obtains on-line content and creates a searchable "
+"database for the ht://Dig search engine. It downloads and indexes HTML from "
+"the web, as defined in /etc/htdig/htdig.conf. Say Yes if you wish to run "
+"this program daily. Say No if you don't plan to use htdig in this way "
+"(perhaps htdig is being used by a third party, for instance KDE, to perform "
+"local indexing). If in doubt, say No. It is the safest choice unless you "
+"know what you're doing."
+msgstr ""
--- htdig-3.2.0b6.orig/debian/po/vi.po
+++ htdig-3.2.0b6/debian/po/vi.po
@@ -0,0 +1,57 @@
+# Vietnamese Translation for htdig.
+# Copyright © 2005 Free Software Foundation, Inc.
+# Clytie Siddall <[email protected]>, 2005.
+# 
+msgid ""
+msgstr ""
+"Project-Id-Version: htdig 1/3.1.6-11\n"
+"Report-Msgid-Bugs-To: [email protected]\n"
+"POT-Creation-Date: 2006-07-12 15:48-0400\n"
+"PO-Revision-Date: 2005-06-04 16:29+0930\n"
+"Last-Translator: Clytie Siddall <[email protected]>\n"
+"Language-Team: Vietnamese <[email protected]>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Generate endings database now?"
+msgstr "Tạo ra cơ sở dữ liệu các điều cuối vào lúc này không?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The ht://Dig search engine requires an endings database which has to be "
+"generated before the first start. Generating the database will take a short "
+"while. It can be done either now or later by calling the '/usr/sbin/"
+"htdigconfig' script. Should the database be generated now  rather than later "
+"on?"
+msgstr ""
+"Cơ chế tìm kiếm «ht://Dig» cần đến một cơ sở dữ liệu các điều cuối mà phải "
+"được tạo ra trước khởi chạy ban đầu. Tạo ra cơ sở dữ liệu này có thể hơi "
+"lâu. Có thể làm như thế hoặc ngay bây giờ hoặc lần sau bằng cách gọi tập "
+"lệnh «/usr/sbin/htdigconfig». Nên tạo ra những cơ sở dữ liệu ấy ngay bây giờ "
+"hơn là lần sau không?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Execute the rundig script daily?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"rundig is a program that obtains on-line content and creates a searchable "
+"database for the ht://Dig search engine. It downloads and indexes HTML from "
+"the web, as defined in /etc/htdig/htdig.conf. Say Yes if you wish to run "
+"this program daily. Say No if you don't plan to use htdig in this way "
+"(perhaps htdig is being used by a third party, for instance KDE, to perform "
+"local indexing). If in doubt, say No. It is the safest choice unless you "
+"know what you're doing."
+msgstr ""
--- htdig-3.2.0b6.orig/debian/po/it.po
+++ htdig-3.2.0b6/debian/po/it.po
@@ -0,0 +1,61 @@
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: htdig-3.1.6-7\n"
+"Report-Msgid-Bugs-To: [email protected]\n"
+"POT-Creation-Date: 2006-07-12 15:48-0400\n"
+"PO-Revision-Date: 2004-04-12 23:39+0200\n"
+"Last-Translator: Alessandro Rimoldi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Generate endings database now?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The ht://Dig search engine requires an endings database which has to be "
+"generated before the first start. Generating the database will take a short "
+"while. It can be done either now or later by calling the '/usr/sbin/"
+"htdigconfig' script. Should the database be generated now  rather than later "
+"on?"
+msgstr ""
+"Il motore di ricerca ht://Dig necessita di una banca dati di desinenze e "
+"questa dev'essere generata prima del primo utilizzo. La generazione della "
+"banca dati pu� durare a lungo e pu� essere eseguita adesso o ulteriormente "
+"lanciando lo script /usr/sbin/htdigconfig. "
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Execute the rundig script daily?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"rundig is a program that obtains on-line content and creates a searchable "
+"database for the ht://Dig search engine. It downloads and indexes HTML from "
+"the web, as defined in /etc/htdig/htdig.conf. Say Yes if you wish to run "
+"this program daily. Say No if you don't plan to use htdig in this way "
+"(perhaps htdig is being used by a third party, for instance KDE, to perform "
+"local indexing). If in doubt, say No. It is the safest choice unless you "
+"know what you're doing."
+msgstr ""
--- htdig-3.2.0b6.orig/debian/po/da.po
+++ htdig-3.2.0b6/debian/po/da.po
@@ -0,0 +1,64 @@
+# 
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+# 
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+# 
+#    Developers do not need to manually edit POT or PO files.
+# 
+msgid ""
+msgstr ""
+"Project-Id-Version: htdig 3.1.6-8\n"
+"Report-Msgid-Bugs-To: [email protected]\n"
+"POT-Creation-Date: 2006-07-12 15:48-0400\n"
+"PO-Revision-Date: 2004-08-05 22:20+0200\n"
+"Last-Translator: Morten Brix Pedersen <[email protected]>\n"
+"Language-Team: Danish <[email protected]>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Generate endings database now?"
+msgstr "Opret \"endings\" database nu?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The ht://Dig search engine requires an endings database which has to be "
+"generated before the first start. Generating the database will take a short "
+"while. It can be done either now or later by calling the '/usr/sbin/"
+"htdigconfig' script. Should the database be generated now  rather than later "
+"on?"
+msgstr ""
+"ht://Dig søgemaskinen kræver en \"endings\" database som skal oprettes før "
+"første start. Det vil tage et stykke tid, og kan gøres enten nu eller senere "
+"ved at køre /usr/sbin/htdigconfig skriptet. Skal databasen blive oprettet nu "
+"eller først senere?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Execute the rundig script daily?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"rundig is a program that obtains on-line content and creates a searchable "
+"database for the ht://Dig search engine. It downloads and indexes HTML from "
+"the web, as defined in /etc/htdig/htdig.conf. Say Yes if you wish to run "
+"this program daily. Say No if you don't plan to use htdig in this way "
+"(perhaps htdig is being used by a third party, for instance KDE, to perform "
+"local indexing). If in doubt, say No. It is the safest choice unless you "
+"know what you're doing."
+msgstr ""
--- htdig-3.2.0b6.orig/debian/po/de.po
+++ htdig-3.2.0b6/debian/po/de.po
@@ -0,0 +1,65 @@
+# Translation of htdig debconf templates to German
+# Copyright (C) Alexander List <[email protected]>, 2004.
+# Copyright (C) Helge Kreutzmann <[email protected]>, 2007.
+# This file is distributed under the same license as the xsp package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: htdig 1:3.2.0b6-3\n"
+"Report-Msgid-Bugs-To: [email protected]\n"
+"POT-Creation-Date: 2006-07-12 16:21-0400\n"
+"PO-Revision-Date: 2007-01-16 18:22+0100\n"
+"Last-Translator: Helge Kreutzmann <[email protected]>\n"
+"Language-Team: German <[email protected]>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Generate endings database now?"
+msgstr "�Endings�-Datenbank jetzt erzeugen?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The ht://Dig search engine requires an endings database which has to be "
+"generated before the first start. Generating the database will take a short "
+"while. It can be done either now or later by calling the '/usr/sbin/"
+"htdigconfig' script. Should the database be generated now  rather than later "
+"on?"
+msgstr ""
+"Die ht://Dig-Suchmaschine ben�tigt eine �Endings�-Datenbank, die vor dem "
+"ersten Start erzeugt werden muss. Das Erzeugen der Datenbank wird etwas Zeit "
+"in Anspruch nehmen. Sie k�nnen das jetzt erledigen, oder sp�ter das Skript /"
+"usr/sbin/htdigconfig aufrufen. Soll die Datenbank jetzt statt sp�ter "
+"erstellt werden?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Execute the rundig script daily?"
+msgstr "Das rundig-Skript t�glich ausf�hren?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"rundig is a program that obtains on-line content and creates a searchable "
+"database for the ht://Dig search engine. It downloads and indexes HTML from "
+"the web, as defined in /etc/htdig/htdig.conf. Say Yes if you wish to run "
+"this program daily. Say No if you don't plan to use htdig in this way "
+"(perhaps htdig is being used by a third party, for instance KDE, to perform "
+"local indexing). If in doubt, say No. It is the safest choice unless you "
+"know what you're doing."
+msgstr ""
+"rundig ist ein Programm, das Online-Inhalte erlangt und eine durchsuchbare "
+"Datenbank f�r die ht://Dig-Suchmaschine erstellt. Es l�dt HTML vom Netz "
+"herunter und indiziert es, wie in /etc/htdig/htdig.conf eingestellt. Stimmen "
+"Sie zu, falls Sie das Programm t�glich ausf�hren m�chten. Lehnen Sie dies "
+"ab, falls Sie Htdig nicht auf diese Art nutzen wollen (vielleicht wird Htdig "
+"von einer dritten Partei verwendet, beispielsweise KDE, um lokale "
+"Indizierung durchzuf�hren). Lehnen Sie im Zweifelsfall ab. Dies ist die "
+"sicherste Wahl es sei denn, Sie wissen, was Sie tun."
--- htdig-3.2.0b6.orig/debian/htdig.dirs
+++ htdig-3.2.0b6/debian/htdig.dirs
@@ -0,0 +1,10 @@
+usr/share/doc/htdig
+usr/lib/cgi-bin
+etc
+etc/cron.daily
+etc/htdig
+usr/bin
+usr/lib/htdig
+usr/share/htdig
+usr/sbin
+var/lib/htdig
--- htdig-3.2.0b6.orig/debian/htdig.preinst
+++ htdig-3.2.0b6/debian/htdig.preinst
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+set -e
+
+case "$1" in
+    upgrade)
+        rm -f /etc/cron.weekly/htdig
+    ;;
+
+    install)
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
--- htdig-3.2.0b6.orig/debian/htdig.cron.daily
+++ htdig-3.2.0b6/debian/htdig.cron.daily
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+if ! lockfile-create /var/run/htdig.cron; then
+    # Another htdig indexing cronjob is already running
+    exit 0
+fi
+
+lockfile-touch /var/run/htdig.cron &
+# Save the PID of the lockfile-touch process
+BADGER="$!"
+
+if [ -r /etc/default/htdig ]; then
+	if [ -f /usr/bin/rundig ]; then
+		RUN=$(awk '/^run_rundig/ {print $3}' /etc/default/htdig)
+		if [ "$RUN" = "true" ]; then
+			/usr/bin/rundig -a -s
+		fi
+	fi
+fi
+
+kill "${BADGER}"
+lockfile-remove /var/run/htdig.cron
--- htdig-3.2.0b6.orig/debian/htload.1
+++ htdig-3.2.0b6/debian/htload.1
@@ -0,0 +1,150 @@
+.TH htload 1 "15 October 2001"
+.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
+.\" other parms are allowed: see man(7), man(1)
+.SH NAME
+htload \- reads in an ASCII-text version of the document database
+.SH SYNOPSIS
+.B htload
+.I "[options]"
+.SH "DESCRIPTION"
+Htload  reads in an ASCII-text version of the document database in the same form as
+the  -t  option  of  htdig  and  htdump. Note that this will overwrite data in your
+databases, so this should be used with great care.
+.SH OPTIONS
+.TP
+.B \-a
+Use alternate work files. Tells htload to append 
+.I .work
+to database files, allowing it to
+operate on a second set of databases.
+.TP
+.B \-c \fIconfigfile\fR
+Use the specified
+.I configfile
+instead of the default.
+.TP
+.B \-i
+Initial.  Do  not use any old databases. This is accomplished by first erasing
+the databases.
+.TP
+.B \-v
+Verbose mode. This doesn't have much effect.
+.SH File Formats
+.TP
+.B Document Database
+Each line in the file starts with the document id 
+followed by a list of
+.I fieldname
+:
+.I value
+separated by tabs. The fields always appear in the
+order listed below:
+.TP
+.B u
+URL
+.TP
+.B t
+Title
+.TP
+.B a
+State (0 = normal, 1 = not found, 2 = not indexed, 3 = obsolete)
+.TP
+.B m
+Last modification time as reported by the server
+.TP
+.B s
+Size in bytes
+.TP
+.B H
+Excerpt
+.TP
+.B h
+Meta description
+.TP
+.B l
+Time of last retrieval
+.TP
+.B L
+Count of the links in the document (outgoing links)
+.TP
+.B b
+Count of the links to the document (incoming links or backlinks)
+.TP
+.B c
+HopCount of this document
+.TP
+.B g
+Signature of the document used for duplicate-detection
+.TP
+.B e
+E-mail address to use for a notification message from htnotify
+.TP
+.B n
+Date to send out a notification e-mail message
+.TP
+.B S
+Subject for a notification e-mail message
+.TP
+.B d
+The text of links pointing to this document. (e.g. <a href="docURL">description</a>)
+.TP
+.B A
+Anchors in the document (i.e. <A NAME=...)
+.TP
+.B Word Database
+While htdump and htload don't deal with the word database
+directly, it's worth mentioning it here because you need to
+deal with it when copying the ASCII databases from one system
+to another. The initial word database produced by htdig is
+already in ASCII format, and a binary version of it is
+produced by htmerge, for use by htsearch. So, when you copy
+over the ASCII version of the document database produced by
+htdump, you need to copy over the wordlist as well, then
+run htload to make the binary document database on the target
+system, followed by running htmerge to make the word index.
+.TP
+Each line in the word list file starts with the word
+followed by a list of
+.I fieldname
+:
+.I value
+separated by tabs. The fields always appear in the
+order listed below, with the last two being optional:
+.TP
+.B i
+Document ID
+.TP
+.B l
+Location of word in document (1 to 1000)
+.TP
+.B w
+Weight of word based on scoring factors
+.TP
+.B c
+Count of word's appearances in document, if more than 1
+.TP
+.B a
+Anchor number if word occurred after a named anchor
+.SH "FILES"
+.TP
+.B /etc/htdig/htdig.conf
+The default configuration file.
+.TP
+.B /var/lib/htdig/db.docs
+The default ASCII document database file.
+.TP
+.B /var/lib/htdig/db.wordlist
+The default ASCII word database file.
+.SH "SEE ALSO"
+Please refer to the HTML pages (in the htdig-doc package)
+.B /usr/share/doc/htdig-doc/html/index.html
+and the manual pages
+.I htdig(1)
+,
+.I htmerge(1)
+and
+.I htdump(1)
+for a detailed description of ht://Dig and its commands.
+.SH AUTHOR
+This manual page was written by Stijn de Bekker, based on the HTML
+documentation of ht://Dig.
--- htdig-3.2.0b6.orig/debian/htnotify.1
+++ htdig-3.2.0b6/debian/htnotify.1
@@ -0,0 +1,45 @@
+.TH htnotify 1 "21 July 1997"
+.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
+.\" other parms are allowed: see man(7), man(1)
+.SH NAME
+htnotify \- sends email notifications about out-dated web pages discovered by htmerge
+.SH SYNOPSIS
+.B htnotify
+.I "[options]"
+.SH "DESCRIPTION"
+.I Htnotify
+scans the document database created by
+.I htmerge
+and sends an email message for every page that is out of date. Please
+have a look at the ht://Dig notification manual for instructions on how to
+set up this service. 
+.SH OPTIONS
+.TP
+.B \-b \fIdatabase\fR
+Specifies an alternative database than what is specified in
+the configuration file. 
+.TP
+.B \-c \fIconfigfile\fR
+Use the specified
+.I configfile
+instead of the default. 
+.B \-v
+Verbose mode. This increases the verbosity of the program.
+Used once will display a log of what email messages were
+sent. Used more than once will display information about
+each document that has email notification set.
+.SH "FILES"
+.TP
+.B /etc/htdig/htdig.conf
+The default configuration file.
+.SH "SEE ALSO"
+Please refer to the HTML pages (in the htdig-doc package)
+.B /usr/share/doc/htdig-doc/html/index.html
+and the manual pages
+.I htdig(1)
+and 
+.I htmerge(1)
+for a detailed description of ht://Dig and its commands.
+.SH AUTHOR
+This manual page was written by Christian Schwarz, modified by
+Stijn de Bekker, based on the HTML documentation of ht://Dig.
--- htdig-3.2.0b6.orig/debian/rundig.1
+++ htdig-3.2.0b6/debian/rundig.1
@@ -0,0 +1,41 @@
+.TH rundig 1 "23 April 1999"
+.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
+.\" other parms are allowed: see man(7), man(1)
+.SH NAME
+rundig \- sample script to create a search database for ht://Dig
+.SH SYNOPSIS
+.B rundig
+.I "[options]"
+.SH "DESCRIPTION"
+.I rundig
+is a sample script to create a search database for the ht://Dig
+search engine.
+.SH OPTIONS
+.TP
+.B \-v
+Verbose mode. This increases the verbosity of the program.
+.TP
+.B \-a
+Use alternate work files.
+.TP
+.B \-s
+Print statistics about the dig after completion
+.TP
+.B \-c configfile
+Use alternate config file.
+.SH "SEE ALSO"
+Please refer to the HTML pages (in the htdig-doc package)
+.B /usr/share/doc/htdig-doc/html/index.html
+and the manual pages
+.I htdig(1)
+,
+.I htmerge(1)
+,
+.I htnotify(1)
+,
+.I htfuzzy(1)
+for a detailed description of ht://Dig and its commands.
+.SH AUTHOR
+This manual page was written by Christian Schwarz, modified by 
+Gergely Madarasz and Stijn de Bekker, based on the HTML documentation of
+ht://Dig.
--- htdig-3.2.0b6.orig/debian/htdig.install
+++ htdig-3.2.0b6/debian/htdig.install
@@ -0,0 +1,204 @@
+debian/tmp/etc/htdig/cookies.txt
+debian/tmp/etc/htdig/long.html
+debian/tmp/etc/htdig/nomatch.html
+debian/tmp/etc/htdig/syntax.html
+debian/tmp/etc/htdig/footer.html
+debian/tmp/etc/htdig/wrapper.html
+debian/tmp/etc/htdig/synonyms
+debian/tmp/etc/htdig/english.aff
+debian/tmp/etc/htdig/header.html
+debian/tmp/etc/htdig/bad_words
+debian/tmp/etc/htdig/english.0
+debian/tmp/etc/htdig/short.html
+debian/tmp/etc/htdig/htdig.conf
+debian/tmp/etc/htdig/HtFileType-magic.mime
+debian/tmp/etc/htdig/mime.types
+debian/tmp/var/www/htdig/button1.gif
+debian/tmp/var/www/htdig/button1.png
+debian/tmp/var/www/htdig/button2.gif
+debian/tmp/var/www/htdig/button2.png
+debian/tmp/var/www/htdig/button3.gif
+debian/tmp/var/www/htdig/button3.png
+debian/tmp/var/www/htdig/button4.gif
+debian/tmp/var/www/htdig/button4.png
+debian/tmp/var/www/htdig/button5.gif
+debian/tmp/var/www/htdig/button5.png
+debian/tmp/var/www/htdig/button6.gif
+debian/tmp/var/www/htdig/button6.png
+debian/tmp/var/www/htdig/button7.gif
+debian/tmp/var/www/htdig/button7.png
+debian/tmp/var/www/htdig/button8.gif
+debian/tmp/var/www/htdig/button8.png
+debian/tmp/var/www/htdig/button9.gif
+debian/tmp/var/www/htdig/button9.png
+debian/tmp/var/www/htdig/buttonl.gif
+debian/tmp/var/www/htdig/buttonl.png
+debian/tmp/var/www/htdig/buttonr.gif
+debian/tmp/var/www/htdig/buttonr.png
+debian/tmp/var/www/htdig/star.gif
+debian/tmp/var/www/htdig/star.png
+debian/tmp/var/www/htdig/button10.gif
+debian/tmp/var/www/htdig/button10.png
+debian/tmp/var/www/htdig/htdig.gif
+debian/tmp/var/www/htdig/htdig.png
+debian/tmp/var/www/htdig/star_blank.gif
+debian/tmp/var/www/htdig/star_blank.png
+debian/tmp/usr/bin/htdig
+debian/tmp/usr/bin/htnotify
+debian/tmp/usr/bin/htdump
+debian/tmp/usr/bin/htload
+debian/tmp/usr/bin/htstat
+debian/tmp/usr/bin/htdb_dump
+debian/tmp/usr/bin/htdb_load
+debian/tmp/usr/bin/htdb_stat
+debian/tmp/usr/bin/rundig
+debian/tmp/usr/bin/htfuzzy
+debian/tmp/usr/bin/htmerge
+debian/tmp/usr/bin/htpurge
+debian/tmp/usr/bin/HtFileType
+debian/tmp/usr/bin/htdig-pdfparser
+debian/tmp/usr/lib/htdig_db/libhtdb.a
+debian/tmp/usr/lib/htdig_db/libhtdb.la
+debian/tmp/usr/lib/htdig_db/libhtdb.so
+debian/tmp/usr/lib/htdig_db/libhtdb-3.2.0.so
+debian/tmp/usr/lib/htdig/libfuzzy.la
+debian/tmp/usr/lib/htdig/libfuzzy.so
+debian/tmp/usr/lib/htdig/libhtnet-3.2.0.so
+debian/tmp/usr/lib/htdig/libcommon.a
+debian/tmp/usr/lib/htdig/libfuzzy-3.2.0.so
+debian/tmp/usr/lib/htdig/libht.a
+debian/tmp/usr/lib/htdig/libfuzzy.a
+debian/tmp/usr/lib/htdig/libcommon-3.2.0.so
+debian/tmp/usr/lib/htdig/libht-3.2.0.so
+debian/tmp/usr/lib/htdig/libhtnet.a
+debian/tmp/usr/lib/htdig/libcommon.la
+debian/tmp/usr/lib/htdig/libcommon.so
+debian/tmp/usr/lib/htdig/libhtword-3.2.0.so
+debian/tmp/usr/lib/htdig/libht.la
+debian/tmp/usr/lib/htdig/libht.so
+debian/tmp/usr/lib/htdig/libhtnet.la
+debian/tmp/usr/lib/htdig/libhtnet.so
+debian/tmp/usr/lib/htdig/libhtword.la
+debian/tmp/usr/lib/htdig/libhtword.so
+debian/tmp/usr/lib/htdig/libhtword.a
+debian/tmp/usr/lib/cgi-bin/qtest
+debian/tmp/usr/lib/cgi-bin/htsearch
+debian/tmp/usr/sbin/htdigconfig
+debian/tmp/usr/share/doc/htdig/examples/search.html
+debian/tmp/usr/share/htdig/parse_doc.pl
+debian/tmp/usr/include/htdig_db/db.h
+debian/tmp/usr/include/htdig_db/mp.h
+debian/tmp/usr/include/htdig_db/os.h
+debian/tmp/usr/include/htdig_db/xa.h
+debian/tmp/usr/include/htdig_db/db_swap.h
+debian/tmp/usr/include/htdig_db/os_ext.h
+debian/tmp/usr/include/htdig_db/debug.h
+debian/tmp/usr/include/htdig_db/db_shash.h
+debian/tmp/usr/include/htdig_db/log.h
+debian/tmp/usr/include/htdig_db/qam.h
+debian/tmp/usr/include/htdig_db/db_dispatch.h
+debian/tmp/usr/include/htdig_db/txn.h
+debian/tmp/usr/include/htdig_db/queue.h
+debian/tmp/usr/include/htdig_db/log_ext.h
+debian/tmp/usr/include/htdig_db/btree_ext.h
+debian/tmp/usr/include/htdig_db/qam_auto.h
+debian/tmp/usr/include/htdig_db/common_ext.h
+debian/tmp/usr/include/htdig_db/txn_ext.h
+debian/tmp/usr/include/htdig_db/log_auto.h
+debian/tmp/usr/include/htdig_db/mp_ext.h
+debian/tmp/usr/include/htdig_db/os_jump.h
+debian/tmp/usr/include/htdig_db/btree_auto.h
+debian/tmp/usr/include/htdig_db/hash_auto.h
+debian/tmp/usr/include/htdig_db/hash.h
+debian/tmp/usr/include/htdig_db/lock.h
+debian/tmp/usr/include/htdig_db/mutex.h
+debian/tmp/usr/include/htdig_db/mutex_ext.h
+debian/tmp/usr/include/htdig_db/qam_ext.h
+debian/tmp/usr/include/htdig_db/lock_ext.h
+debian/tmp/usr/include/htdig_db/crdel_auto.h
+debian/tmp/usr/include/htdig_db/db_config.h
+debian/tmp/usr/include/htdig_db/db_auto.h
+debian/tmp/usr/include/htdig_db/txn_auto.h
+debian/tmp/usr/include/htdig_db/env_ext.h
+debian/tmp/usr/include/htdig_db/shqueue.h
+debian/tmp/usr/include/htdig_db/xa_ext.h
+debian/tmp/usr/include/htdig_db/db_join.h
+debian/tmp/usr/include/htdig_db/hash_ext.h
+debian/tmp/usr/include/htdig_db/db_page.h
+debian/tmp/usr/include/htdig_db/btree.h
+debian/tmp/usr/include/htdig_db/db_ext.h
+debian/tmp/usr/include/htdig_db/db_int.h
+debian/tmp/usr/include/htdig_db/region.h
+debian/tmp/usr/include/htdig_db/db_am.h
+debian/tmp/usr/include/htdig/HtCookie.h
+debian/tmp/usr/include/htdig/HtRandom.h
+debian/tmp/usr/include/htdig/WordCaseIsAStatements.h
+debian/tmp/usr/include/htdig/HtMaxMin.h
+debian/tmp/usr/include/htdig/good_strtok.h
+debian/tmp/usr/include/htdig/QuotedStringList.h
+debian/tmp/usr/include/htdig/HtRegexReplaceList.h
+debian/tmp/usr/include/htdig/WordRecord.h
+debian/tmp/usr/include/htdig/IntObject.h
+debian/tmp/usr/include/htdig/WordDBCompress.h
+debian/tmp/usr/include/htdig/HtCookieMemJar.h
+debian/tmp/usr/include/htdig/HtFTP.h
+debian/tmp/usr/include/htdig/ber.h
+debian/tmp/usr/include/htdig/lib.h
+debian/tmp/usr/include/htdig/md5.h
+debian/tmp/usr/include/htdig/List.h
+debian/tmp/usr/include/htdig/HtHTTPBasic.h
+debian/tmp/usr/include/htdig/WordDBInfo.h
+debian/tmp/usr/include/htdig/WordList.h
+debian/tmp/usr/include/htdig/gregex.h
+debian/tmp/usr/include/htdig/WordDBPage.h
+debian/tmp/usr/include/htdig/WordDB.h
+debian/tmp/usr/include/htdig/HtRegexReplace.h
+debian/tmp/usr/include/htdig/WordStat.h
+debian/tmp/usr/include/htdig/Configuration.h
+debian/tmp/usr/include/htdig/WordType.h
+debian/tmp/usr/include/htdig/Connection.h
+debian/tmp/usr/include/htdig/ParsedString.h
+debian/tmp/usr/include/htdig/HtHTTP.h
+debian/tmp/usr/include/htdig/HtFile.h
+debian/tmp/usr/include/htdig/HtHeap.h
+debian/tmp/usr/include/htdig/HtDateTime.h
+debian/tmp/usr/include/htdig/WordReference.h
+debian/tmp/usr/include/htdig/Object.h
+debian/tmp/usr/include/htdig/htconfig.h
+debian/tmp/usr/include/htdig/DB2_db.h
+debian/tmp/usr/include/htdig/HtHTTPSecure.h
+debian/tmp/usr/include/htdig/HtNNTP.h
+debian/tmp/usr/include/htdig/WordMonitor.h
+debian/tmp/usr/include/htdig/SSLConnection.h
+debian/tmp/usr/include/htdig/clib.h
+debian/tmp/usr/include/htdig/Database.h
+debian/tmp/usr/include/htdig/HtWordCodec.h
+debian/tmp/usr/include/htdig/HtPack.h
+debian/tmp/usr/include/htdig/Queue.h
+debian/tmp/usr/include/htdig/WordKeyInfo.h
+debian/tmp/usr/include/htdig/mhash_md5.h
+debian/tmp/usr/include/htdig/Transport.h
+debian/tmp/usr/include/htdig/htString.h
+debian/tmp/usr/include/htdig/HtTime.h
+debian/tmp/usr/include/htdig/WordCursor.h
+debian/tmp/usr/include/htdig/WordRecordInfo.h
+debian/tmp/usr/include/htdig/myqsort.h
+debian/tmp/usr/include/htdig/HtCookieJar.h
+debian/tmp/usr/include/htdig/HtCodec.h
+debian/tmp/usr/include/htdig/HtVectorGenericCode.h
+debian/tmp/usr/include/htdig/WordBitCompress.h
+debian/tmp/usr/include/htdig/HtRegex.h
+debian/tmp/usr/include/htdig/Stack.h
+debian/tmp/usr/include/htdig/StringList.h
+debian/tmp/usr/include/htdig/HtVector_String.h
+debian/tmp/usr/include/htdig/HtRegexList.h
+debian/tmp/usr/include/htdig/HtWordType.h
+debian/tmp/usr/include/htdig/WordKey.h
+debian/tmp/usr/include/htdig/Dictionary.h
+debian/tmp/usr/include/htdig/HtVector.h
+debian/tmp/usr/include/htdig/HtVectorGeneric.h
+debian/tmp/usr/include/htdig/WordContext.h
+debian/tmp/usr/include/htdig/HtCookieInFileJar.h
+debian/tmp/usr/include/htdig/StringMatch.h
+debian/tmp/usr/include/htdig/HtVector_int.h
+debian/tmp/usr/include/htdig/libdefs.h
--- htdig-3.2.0b6.orig/debian/htload.html
+++ htdig-3.2.0b6/debian/htload.html
@@ -0,0 +1,210 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+  <head>
+	<title>
+	  ht://Dig: htload
+	</title>
+  </head>
+  <body bgcolor="#eef7ff">
+	<h1>
+	  htload
+	</h1>
+	<p>
+	  ht://Dig Copyright &copy; 1995-2001 <a href="THANKS.html">The ht://Dig Group</a><br>
+	  Please see the file <a href="COPYING">COPYING</a> for
+	  license information.
+	</p>
+	<hr size="4" noshade>
+	<dl>
+	  <dd>
+		<h2>
+		  Synopsis
+		</h2>
+	  </dd>
+	  <dd>
+		htload [<em>options</em>]
+	  </dd>
+	</dl>
+	<dl>
+	  <dd>
+		<h2>
+		  Description
+		</h2>
+	  </dd>
+	  <dd>
+		Htload reads in an ASCII-text version of the document
+		database in the same form as the -t option of htdig
+		and htdump. Note that this will overwrite data in your
+		databases, so this should be used with great care.
+	  </dd>
+	</dl>
+	<dl>
+	  <dd>
+		<h2>
+		  Options
+		</h2>
+	  </dd>
+	  <dd>
+		<dl compact>
+		  <dt>
+			-a
+		  </dt>
+		  <dd>
+			Use alternate work files. Tells htload to append <em>
+			.work</em> to database files, allowing it to
+			operate on a second set of databases.
+		  </dd>
+		  <dt>
+			-c <em>configfile</em>
+		  </dt>
+		  <dd>
+			Use the specified <em>configfile</em> file instead of the
+			default.
+		  </dd>
+		  <dt>
+			-i
+		  </dt>
+		  <dd>
+			Initial. Do not use any old databases. This is
+			accomplished by first erasing the databases.
+		  </dd>
+		  <dt>
+			-v
+		  </dt>
+		  <dd>
+			Verbose mode. This doesn't have much effect.
+		  </dd>
+
+		</dl>
+	  </dd>
+	</dl>
+
+	<dl>
+	  <dd>
+		<h2>
+		  File Formats
+		</h2>
+	  </dd>
+	  <dl>
+	  <dt>
+	       <h3>Document Database</h3>
+          </dt>
+	  <dd>
+		<p>Each line in the file starts with the document id 
+		followed by a list of
+		<strong><em>fieldname</em>:<em>value</em></strong>
+		separated by tabs. The fields always appear in the
+		order listed below:
+		</p>
+		<table border=0>
+		<tr> <th>fieldname</th> <th align="left">value</th></tr>
+		<tr> <td>u</td><td>URL</td></tr>
+		<tr> <td>t</td><td>Title</td></tr>
+		<tr> <td>a</td><td>State (0 = normal, 1 = not found, 2
+		= not indexed, 3 = obsolete)</td></tr>
+		<tr> <td>m</td><td>Last modification time as reported
+		by the server</td></tr> 
+		<tr> <td>s</td><td>Size in bytes</td></tr>
+		<tr> <td>H</td><td>Excerpt</td></tr>
+		<tr> <td>h</td><td>Meta description</td></tr>
+		<tr> <td>l</td><td>Time of last retrieval</td></tr>
+		<tr> <td>L</td><td>Count of the links in the document
+		(outgoing links)</td></tr>
+		<tr> <td>b</td><td>Count of the links to the document
+		(incoming links or backlinks)</td></tr>
+		<tr> <td>c</td><td>HopCount of this document</td></tr>
+		<tr> <td>g</td><td>Signature of the document used for
+		duplicate-detection</td></tr>
+		<tr> <td>e</td><td>E-mail address to use for a
+		notification message from htnotify</td></tr>
+		<tr> <td>n</td><td>Date to send out a notification
+		e-mail message</td></tr>
+		<tr> <td>S</td><td>Subject for a notification e-mail
+		message</td></tr>
+		<tr> <td>d</td><td>The text of links pointing to this
+		document. (e.g. &lt;a
+		href=&quot;docURL&quot;&gt;description&lt;/a&gt;)</td></tr>
+		<tr> <td>A</td><td>Anchors in the document (i.e. &lt;A
+		NAME=...)</td></tr>
+		</table>
+	  </dd>
+	  <dt>
+	       <h3>Word Database</h3>
+	  </dt>
+	  <dd>
+		<p>While htdump and htload don't deal with the word database
+		directly, it's worth mentioning it here because you need to
+		deal with it when copying the ASCII databases from one system
+		to another. The initial word database produced by htdig is
+		already in ASCII format, and a binary version of it is
+		produced by htmerge, for use by htsearch. So, when you copy
+		over the ASCII version of the document database produced by
+		htdump, you need to copy over the wordlist as well, then
+		run htload to make the binary document database on the target
+		system, followed by running htmerge to make the word index.
+		</p>
+		<p>Each line in the word list file starts with the word
+		followed by a list of
+		<strong><em>fieldname</em>:<em>value</em></strong>
+		separated by tabs. The fields always appear in the
+		order listed below, with the last two being optional:
+		</p>
+		<table border=0>
+		<tr> <th>fieldname</th> <th align="left">value</th></tr>
+		<tr> <td>i</td><td>Document ID</td></tr>
+		<tr> <td>l</td><td>Location of word in document (1 to 1000)</td></tr>
+		<tr> <td>w</td><td>Weight of word based on scoring factors</td></tr>
+		<tr> <td>c</td><td>Count of word's appearances in document, if more than 1</td></tr>
+		<tr> <td>a</td><td>Anchor number if word occurred after a named anchor</td></tr>
+		</table>
+	  </dd>
+	  </dl>
+	</dl>
+	<dl>
+	  <dd>
+		<h2>
+		  Files
+		</h2>
+	  </dd>
+	  <dd>
+		<dl>
+		  <dt>
+			CONFIG_DIR/htdig.conf
+		  </dt>
+		  <dd>
+			The default configuration file.
+		  </dd>
+		  <dt>
+		       DATABASE_DIR/db.docs
+		  </dt>
+		  <dd>
+		       The default ASCII document database file.
+		  </dd>
+		  <dt>
+		       DATABASE_DIR/db.wordlist
+		  </dt>
+		  <dd>
+		       The default ASCII word database file.
+		  </dd>
+		</dl>
+	  </dd>
+	</dl>
+	<dl>
+	  <dd>
+		<h2>
+		  See Also
+		</h2>
+	  </dd>
+	  <dd>
+		<a href="htdig.html">htdig</a>,
+		<a href="htmerge.html">htmerge</a>,
+		<a href="htdump.html">htdump</a> and
+		<a href="attrs.html">Configuration file format</a>
+	  </dd>
+	</dl>
+	<hr size="4" noshade>
+
+	Last modified: $Date: 2001/10/15 02:20:24 $
+
+  </body>
+</html>
--- htdig-3.2.0b6.orig/debian/README.Debian
+++ htdig-3.2.0b6/debian/README.Debian
@@ -0,0 +1,15 @@
+Avoiding htnotify
+-----------------
+
+When rundig is run, the htnotify script is also run. htnotify informs the
+administrator of outdated HTML pages. If you want to run rundig without
+running htnotify, you can modify /etc/cron.daily/htdig by adding the
+"--no-htnotify" option to the line which runs rundig.
+
+
+Supressing mail from cron
+-------------------------
+
+If you have rundig run every day, you may find the system mail it generates
+to be a nuissance. If so, you can modify /etc/cron.daily/htdig by adding
+" > /dev/null" to the end of the line which runs rundig.
--- htdig-3.2.0b6.orig/debian/htdump.1
+++ htdig-3.2.0b6/debian/htdump.1
@@ -0,0 +1,144 @@
+.TH htdump 1 "15 October 2001"
+.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
+.\" other parms are allowed: see man(7), man(1)
+.SH NAME
+htdump \- write out an ASCII-text version of the document database
+.SH SYNOPSIS
+.B htdump
+.I "[options]"
+.SH "DESCRIPTION"
+Htdump writes out an ASCII-text version of the document
+database in the same form as the -t option of htdig.
+.SH OPTIONS
+.TP
+.B \-a
+Use alternate work files. Tells htdump to append 
+.I .work
+to database files, allowing it to
+operate on a second set of databases.
+.TP
+.B \-c \fIconfigfile\fR
+Use the specified
+.I configfile
+instead of the default.
+.TP
+.B \-v
+Verbose mode. This doesn't have much effect.
+.SH File Formats
+.TP
+.B Document Database
+Each line in the file starts with the document id 
+followed by a list of
+.I fieldname
+:
+.I value
+separated by tabs. The fields always appear in the
+order listed below:
+.TP
+.B u
+URL
+.TP
+.B t
+Title
+.TP
+.B a
+State (0 = normal, 1 = not found, 2 = not indexed, 3 = obsolete)
+.TP
+.B m
+Last modification time as reported by the server
+.TP
+.B s
+Size in bytes
+.TP
+.B H
+Excerpt
+.TP
+.B h
+Meta description
+.TP
+.B l
+Time of last retrieval
+.TP
+.B L
+Count of the links in the document (outgoing links)
+.TP
+.B b
+Count of the links to the document (incoming links or backlinks)
+.TP
+.B c
+HopCount of this document
+.TP
+.B g
+Signature of the document used for duplicate-detection
+.TP
+.B e
+E-mail address to use for a notification message from htnotify
+.TP
+.B n
+Date to send out a notification e-mail message
+.TP
+.B S
+Subject for a notification e-mail message
+.TP
+.B d
+The text of links pointing to this document. (e.g. <a href="docURL">description</a>)
+.TP
+.B A
+Anchors in the document (i.e. <A NAME=...)
+.TP
+.B Word Database
+While htdump and htload don't deal with the word database
+directly, it's worth mentioning it here because you need to
+deal with it when copying the ASCII databases from one system
+to another. The initial word database produced by htdig is
+already in ASCII format, and a binary version of it is
+produced by htmerge, for use by htsearch. So, when you copy
+over the ASCII version of the document database produced by
+htdump, you need to copy over the wordlist as well, then
+run htload to make the binary document database on the target
+system, followed by running htmerge to make the word index.
+.TP
+Each line in the word list file starts with the word
+followed by a list of
+.I fieldname
+:
+.I value
+separated by tabs. The fields always appear in the
+order listed below, with the last two being optional:
+.TP
+.B i
+Document ID
+.TP
+.B l
+Location of word in document (1 to 1000)
+.TP
+.B w
+Weight of word based on scoring factors
+.TP
+.B c
+Count of word's appearances in document, if more than 1
+.TP
+.B a
+Anchor number if word occurred after a named anchor
+.SH "FILES"
+.TP
+.B /etc/htdig/htdig.conf
+The default configuration file.
+.TP
+.B /var/lib/htdig/db.docs
+The default ASCII document database file.
+.TP
+.B /var/lib/htdig/db.wordlist
+The default ASCII word database file.
+.SH "SEE ALSO"
+Please refer to the HTML pages (in the htdig-doc package)
+.B /usr/share/doc/htdig-doc/html/index.html
+and the manual pages
+.I htdig(1)
+,
+and
+.I htload(1)
+for a detailed description of ht://Dig and its commands.
+.SH AUTHOR
+This manual page was written by Stijn de Bekker, based on the HTML
+documentation of ht://Dig.
--- htdig-3.2.0b6.orig/debian/control
+++ htdig-3.2.0b6/debian/control
@@ -0,0 +1,64 @@
+Source: htdig
+Section: web
+Priority: optional
+Maintainer: Debian QA Group <[email protected]>
+Build-Depends: debhelper (>= 5), zlib1g-dev, flex, bison
+Standards-Version: 3.7.2
+
+Package: htdig
+Architecture: any
+Depends: ${shlibs:Depends}, perl, lockfile-progs, debconf (>= 1.2.9) | debconf-2.0
+Suggests: htdig-doc, wwwoffle | httpd
+Conflicts: libmifluz0
+Description: WWW search system for an intranet or small internet
+ The ht://Dig system is a complete World Wide Web indexing and searching
+ system for a small domain or intranet. This system is not meant to
+ replace the need for powerful internet-wide search systems like Lycos,
+ Google, or Yahoo!. Instead it is meant to cover the search needs of a
+ single company, campus, or even a particular subsection of a website.
+ .
+ As opposed to some WAIS-based or web-server based search engines,
+ ht://Dig can span several web servers at a site. The type of these
+ different web servers doesn't matter as long as they understand the
+ HTTP 1.0 protocol.
+ .
+ Features:
+    * Intranet searching
+    * It is free
+    * Robot exclusion is supported
+    * Boolean expression searching
+    * Configurable search results
+    * Fuzzy searching (different algorithms supported)
+    * Searching of HTML and text files
+    * Keywords can be added to HTML documents
+    * Email notification of expired documents
+    * A Protected server can be indexed
+    * Searches on subsections of the database
+    * Full source code included
+    * The depth of the search can be limited
+    * Full support for the ISO-Latin-1 character set
+ .
+ Please note that ht://Dig is a resource-hog, with respect to processor usage,
+ when indexing.
+ .
+ Disk space requirements:
+ .
+ 13.000 documents indexed:      150MB disk space with a 'wordlist database'
+                                93MB disk space without a 'wordlist'
+ .
+ Multiplying the number of documents to index by 12.000 comes pretty close
+ to the real disk space used.
+
+Package: htdig-doc
+Architecture: all
+Depends: perl5
+Suggests: htdig
+Section: doc
+Description: Documentation for the htdig package
+ The ht://Dig system is a complete World Wide Web indexing and searching
+ system for a small domain or intranet. This system is not meant to
+ replace the need for powerful internet-wide search systems like Lycos,
+ Google, or Yahoo!. Instead it is meant to cover the search needs of a
+ single company, campus, or even a particular subsection of a website. 
+ .
+ This package contains HTML documentation and examples.
--- htdig-3.2.0b6.orig/debian/changelog
+++ htdig-3.2.0b6/debian/changelog
@@ -0,0 +1,659 @@
+htdig (1:3.2.0b6-3.1etch1) stable-security; urgency=high
+
+  * Non-maintainer upload by the security team
+  * Fix XSS in htsearch by not displaying the sort type in
+    htsearch/Display.cc and libhtdig/ResultFetch.cc anymore, if it is
+    unrecognised, thanks to William Grant
+    Fixes: CVE-2007-6110
+
+ -- Steffen Joeris <[email protected]>  Tue, 11 Dec 2007 08:45:46 +0000
+
+htdig (1:3.2.0b6-3.1) unstable; urgency=low
+
+  * Non-maintainer upload to fix pending l10n issues.
+  * Debconf translations:
+    - German. Closes: #407180
+    - Czech. Closes: #408723
+
+ -- Christian Perrier <[email protected]>  Mon, 26 Feb 2007 18:25:25 +0100
+
+htdig (1:3.2.0b6-3) unstable; urgency=low
+
+  * QA upload.
+  * Fix formatting typo in htdig.1 (Closes: #401589)
+  * Add updated japanese po file (Closes: #400009)
+  * Add russian po file (Closes: #404428)
+  * Adjust priority to match override file (disparities)
+
+ -- Michael Ablassmeier <[email protected]>  Mon,  8 Jan 2007 10:18:50 +0100
+
+htdig (1:3.2.0b6-2) unstable; urgency=low
+
+  * QA upload.
+  * Update French debconf translation (Closes: #384009).
+  * Update Dutch debconf translation (Closes: #387657).
+
+ -- Luk Claes <[email protected]>  Sun,  1 Oct 2006 17:11:53 +0200
+
+htdig (1:3.2.0b6-1) unstable; urgency=medium
+
+  * QA upload.
+  * Set maintainer to the QA Group.
+  * New upstream release.
+  * Urgency medium, since this resolves RC bugs.
+  * Upload to unstable a package based on a never-uploaded package available
+    at http://users.linuxbourg.ch/ribnitz/debian, created by the original
+    htdig maintainer Robert Ribnitz.
+  * Revert renaming of the never-uploaded package to htdig3.2. The htdig 3.1
+    series is hopelessly uninstallable, so there is no need to maintain
+    separate branches.
+  * Apply various patches (including security fixes) borrowed from the Fedora
+    htdig package.
+  * Revamp and simplify debconf and packaging scripts. Also remove much
+    pre-Sarge upgrade cruft.
+  * Don't use debconf as a registry; keep using /etc/default/htdig instead.
+  * This upload should resolve the follwing issues:
+    + htdig no longer depends on libdb2.
+      (Closes: #357642, #361578, #308447, #360475)
+    + htdig now depends on lockfile-progs. (Closes: #364022)
+    + rundig doesn't break when using an alt config file. (Closes: #284467)
+    + The manpages now point to the right HTML directory. (Closes: #171243)
+    + Fix debconf template typos. (Closes: #311905)
+    + Don't recommend a webserver. (Closes: #122698)
+    + Update Russian translation, add Vietnamese translation.
+      (Closes: #311904, #361651)
+    + Don't install search.html to /var/www in postinst anymore. Since this
+      file has a generic name, users of older packages will have to clean it
+      up themselves. (Closes: #348445)
+    + Rewrite debconf template to make clear that the question is not whether
+      or not to run htnotify, but whether or not to run rundig. htnotify is
+      automatically run from rundig. However, I've patched rundig so that this
+      behaviour can be changed. See the README.Debian.
+      (Closes: #289661, #295963, #299648)
+    + Document how to prevent rundig from sending the admin mail every day.
+      (Closes: #51979)
+  * Close bugs fixed in past NMUs:
+    (Closes: #242807, #340994, #231534, #235779)
+
+ -- Christopher Martin <[email protected]>  Sun, 23 Jul 2006 20:41:45 -0400
+
+htdig (1:3.2.0b6-1) UNRELEASED; urgency=low
+
+  * New upstream relese
+
+  * Package renamed to htdig3.2 in a move to provide a stable, reliable
+    package for debian Sarge (Which will again be called 'htdig', and be a
+    package of the 3.1.6 release).
+  * Problem of robots.txt compliance has been solved by upstream
+   (Closes: #242807)
+  * Added check whether user wants to run htnotify in the cron script. Not the
+    best solution, but should work till a better one is found.
+    (Closes: #230214)
+  * Applied the htmerge patch for htdig 3.2.0b6, supplied by D. van der Vliet.
+    This should result in much better memory usage on merging databases with
+    htmerge (4% compared to 90% before the patch)
+  * Thanks to Jan Outrata we now have an up to date Czech translation
+    (Closes: #260380)
+  * Removed the unnecessary dependency on the newt libraries.
+  * Fixed a condition allowing the removal of htdig databases in the
+    /etc/htdig directory (in postrm) when the script is called with the
+    'purge' option.
+  * Corrected french debconf localisation (.po) file. shuhaitez->souhaitez.
+    Thanks to Benoit Sibaud for discovering the typo.
+  * Added Russian and Japanese Debconf translations from the stable version.
+  * Renamed Spanish po-file to es.po
+
+ -- Robert Ribnitz <[email protected]>  Mon, 14 Feb 2005 23:46:28 +0100
+
+htdig (1:3.2.0b5-6) UNRELEASED; urgency=low
+
+  * Fixed a typo in the manual page for htsearch (Closes: #139926)
+
+  * Added Spanish debconf translation (Thanks to Francesc Gordillo i Cortinez
+    and Eduard Hawlitschek)
+
+  * Added Italian debconf translation (Thanks to Alessandro Rimoldi)
+
+  * Added Czech debconf translation (Thanks to Martin Kerbert)
+  
+  * Patched Debconf Script to check for the existence of the database files
+    before issuing a warning about their changed location ( Thanks to James
+    Cameron, closes #248460) 
+
+ -- Robert Ribnitz <[email protected]>  Mon, 24 May 2004 12:47:28 +0200
+
+htdig (1:3.2.0b5-5) UNRELEASED; urgency=low
+
+  * Enabled support for GNU LD
+
+  * Added Danish debconf translation (Thanks to Morten Brix Petersen) 
+    (Closes: #234228)
+
+  * Added German debconf translation (Thanks to Alexander List)
+    (Closes: #243701)
+  
+  * Added Russian debconf translation (Thanks to Denis Barbier) 
+    (Closes: #137658)
+  
+  * Updated French debconf translation (Thanks to Christian Perrier and the
+    French Internationalisation Mailinglist) (Closes: #244057)
+
+ -- Robert Ribnitz <[email protected]>  Tue, 20 Apr 2004 12:11:34 +0200
+
+htdig (1:3.2.0b5-4) UNRELEASED; urgency=low
+
+  * Fixed CPPFLAGS in rules (now CXXFLAGS), should get rid of a few warnings
+  
+ -- Robert Ribnitz <[email protected]>  Sat, 27 Mar 2004 18:42:04 +0100
+
+htdig (1:3.2.0b5-3) UNRELEASED; urgency=low
+
+  * Removed unneded depends on libstc++
+
+  * Added build depends for flex and bison
+
+  * Added Conflicts on libmifluz0 (Closes: #232076). Since htdig convers the
+    same focus of interest than mifluz, no one should be using both at the
+    same time.
+
+  * Cleanup of lintian problems (.cvsignore in documentation)
+
+  * Adapted cron scripts (removed now illegal rundig option -i and added option
+    to generate statistics -s) (Closes: #233466)
+
+  * Corrected a typo in a manpage
+  
+  * Enabled PIC mode to try to get rid of some notorious RC bugs (and bulid
+    problems for some architectures)
+
+ -- Robert Ribnitz <[email protected]>  Wed, 24 Mar 2004 23:40:53 +0100
+
+htdig (1:3.2.0b5-2) UNRELEASED; urgency=medium
+
+  * Added  build-dependecy on zlib1g-dev and dependency on zlib1g. Their absence
+    caused build errors. (Closes: #231985)
+
+  * Major overhaul of manpages. Rewrote htdig, and htfuzzy, added htstat.
+  
+
+ -- Robert Ribnitz <[email protected]>  Wed, 11 Feb 2004 19:30:57 +0100
+
+htdig (1:3.2.0b5-1) UNRELEASED; urgency=low
+
+  * New upstream relase (beta, but should me better than the current 'stable')
+
+  * Adaptations and french translation of the debconf templates (Thanks to
+    Philippe Batailler for translating) (Closes: #226970)
+
+  * Race condition / memory leak from 3.1.6-7 seems to no longer be present.
+    Indexing of a 'large' (150k documents) collection did not show unusual
+    memory consuption or core dumping. (Closes: #200876, #200734)
+
+  * Removed build-dependecy on libdb2-dev, since htdig comes with its own
+    version of the db libraries.
+  
+  * Added proper build dependecies to libtool, autoconf and automake 
+
+ -- Robert Ribnitz <[email protected]>  Tue, 20 Jan 2004 14:04:50 +0100
+
+htdig (1:3.1.6-11.1) unstable; urgency=low
+
+  * Non-Maintainer Upload.
+  * Fixed "FTBFS: new, more restrictive coreutils cp", closes: #340994.
+    Patch by Roland Stigge <[email protected]>.
+
+ -- Anibal Monsalve Salazar <[email protected]>  Wed, 11 Jan 2006 20:16:04 +1100
+
+htdig (1:3.1.6-11) unstable; urgency=high
+
+  * Applied patch by Phil Knirsch to fix cross-site scripting
+    vulnerability [htsearch/htsearch.cc, htfuzzy/htfuzzy.cc,
+    htmerge/htmerge.cc, CAN-2005-0085]. Patch supplied by the
+    Debian Security Team.
+  * Added dependecy on sed (Closes: #276398). Thanks to
+    Matus Uhlar <[email protected]>.
+  * Updated Debian Standards Version to 3.6.1 
+
+ -- Robert Ribnitz <[email protected]>  Thu, 10 Feb 2005 23:58:28 +0100
+
+htdig (1:3.1.6-10.2) unstable; urgency=low
+
+  * Non-Maintainer Upload.
+  * Fixed "cron scripts are broken"
+    Closes: #268870, #269080, #271971, #278315, #281822, #290840
+    Patches by:
+    Robert Grimm <[email protected]>,
+    C.Y.M. <[email protected]>,
+    Carsten Luedtke <[email protected]>,
+    Michael Schnyder <[email protected]>,
+    John Summerfield <[email protected]> and
+    Sanjoy Mahajan <[email protected]>
+  * Fixed "FTBFS (amd64/gcc-4.0): cast from 'Object*' to 'int' loses
+    precision" (Closes: #286418).
+    Patch by Andreas Jochens <[email protected]>
+  * Fixed "Spanish debconf translation should be named es.po"
+    (Closes: #275290).
+  * Czech translation of htdig debconf messages.
+    Closes: #260380, #266577, #271461
+    Patches by Jan Outrata <[email protected]>
+  * Japanese po-debconf template translation (Closes: #281152).
+    Patch by Hideki Yamane <[email protected]>
+
+ -- Anibal Monsalve Salazar <[email protected]>  Sat, 05 Feb 2005 19:43:11 +1100
+
+htdig (1:3.1.6-10.1) unstable; urgency=low
+
+  * Non-Maintainer Upload by Gunnar Wolf <[email protected]>
+  * Substituted tabs by sets of spaces in description (Closes: #269330)
+  * Re-wrapped the extended description so it would fit in 80-column
+    terminals
+  * Updated db/dist/config.{guess,sub} with the current version
+
+ -- Gunnar Wolf <[email protected]>  Wed,  1 Sep 2004 01:14:22 -0500
+
+htdig (1:3.1.6-10) unstable; urgency=low
+
+  * Updated Danish debconf translation, in time for Sarge inclusion.
+    Thanks go to Morten Brix Pedersen for translating. (Closes: #263834)
+  * Updated the pdf-parser script to find the correct parser (now using awk,
+    instead of grep). Also updated the call syntax for those people who want
+    to use Adobe Acrobat, instead of XPdf. Checks have also been integrated,
+    so the script now checks for the existence of the parser specified in the
+    config file.(Thanks go to Anders Eriksson, Gabriele Gallacci, and Ben
+    Finney, closes: #158431, #158431, #149664)
+  * Finetuning of postrm script, now checks for the existence of /etc/default
+    when purging the installation.
+  * Philippe Batailler provided an updated French debconf translation.
+    Thanks for translating (Closes: #265438)
+  * Minor adaptations of debconf config script so that changed values in the
+    file '/etc/default/htdig' get fed back to debconf. This should bring the
+    package more in line with policy requirements.
+  * Token location for indicating the need of a full refresh changed. The
+    token is set by cron.weekly, and if it is present, the first cron.daily
+    run will do a full refresh instead of an incremental one. Previously,
+    the token file was located in '/etc' where it did not really belong. Thanks
+    to Brian McGroarty for drawing attention to this problem.(Closes: #199276)
+  * Since version 1:3.1.6-8, htdig again links against the debian-provided
+    libdb2(-dev) libraries. (cf. changelog entry for 1:3.1.6-8). Upgrading to
+    a more recent version of the Berkeley DB libraries is impossible, since it
+    would imply re-testing and re-optimising by upstream. (Closes: #215240)
+  * Rewrote the blurb as to include approxoximate disk space requirements.
+    Thanks to Ben Darnel for the tip. (Closes: #77283)
+  * Cron scripts have been adapted to no longer notify the postmaster every
+    day of their running. (Closes: #52760)
+  * htdig now recommends its documentation rather than suggesting it. This was
+    changed because the html documentation is often more up to date than the
+    manpages.
+  * Added dependency on GNU awk since awk is used at various places in the
+    package. (thanks to Morten Brix Pedersen for noticing, closes: #267640) 
+
+ -- Robert Ribnitz <[email protected]>  Mon, 23 Aug 2004 21:23:12 +0200
+
+htdig (1:3.1.6-9) unstable; urgency=low
+
+  * Cleaned up Depends, removed 'debconf' as this is now handled by
+    ${misc:Depends}.
+  * Appended zlib1g-dev to the list of build depends. This fixes
+    a warning with the automatic package bulider.
+  * Fixed time-skew issues in the buildscript. Hopefully it will allow a
+    build on m68k architecture now.
+  * Debconf compatibilty level 4, since 3.1.6-8.
+  * Fixed error in rundig manpage.
+  * Fixed an error in cron.daily and cron.weekly scripts. (Closes: #263389)
+  * Modifications in the cron scripts starting with 1:3.1.6-8 make the problem
+    described in bug #60633 no longer apply. If htdig is removed (but not
+    purged), the file /etc/default/htdig will no longer be present on the
+    system, so the cronscripts will drop out early on. (Thanks to Andrew Gray,
+    Closes: #60633)
+  * Adapted postrm to remove cronjobs if they were left over. (Thanks to Mark
+    Sysmonds, closes: #79270)
+  * Fun with man pages. Brought the htsearch man page up to date. (Closes:
+    #139926)
+  * Running htnotify can now be disabled. Since 3.1.6-8 the results of the
+    question are used and queried by the cron jobs. Thanks to Johannes Rohr
+    for reporting (Closes: #230214)
+  * Included Dutch debconf translation provided by Luk Claes and the Dutch
+    l10n Team. Thank them for the translation. (Closes: #263723)
+  * Minor adaptations to cronjobs and postrm.
+
+ -- Robert Ribnitz <[email protected]>  Fri,  6 Aug 2004 11:46:16 +0200
+
+
+htdig (1:3.1.6-8) unstable; urgency=low
+
+  * The htdig package has been split into a stable release featuring htdig
+    3.1.6 (this package), which should be fit for production use, and an
+    unstable release based on the 3.2.0 beta code ('htdig3.2'). This was done
+    as it became apparent that htdig 3.2.0 would probably not be ready for
+    Sarge release, and even then it was doubtful it would be as fast as the
+    old stable release. (Closes: #244867)
+  * Patched htfuzzy so that it does not die on words of non-alpha characters
+    only when searching for numbers is enabled and a soundex search is
+    performed. Thanks to Alex Kiesel for this patch. This is a patch provided
+    by the Ht://Dig developer team.
+  * Patched htnotify race condition. Htnotify would sit there eating up
+    memory, appending newlines to an empty string. As Martin Kraemer
+    discovered, an additional check fixes the problem. This patch is also
+    provided by the Ht://Dig developer team.
+  * Added a patch that allows the correct skipping of JavaScript code. Work
+    attributed to Gilles Detillieux. Patch provided by upstream.
+  * Have external parsers check for the maximal Document size (max_doc_size).
+    Work attributed to Gilles Detillieux. Patch provided by upstream.
+  * Fixed the rating of percent values. For some unknown reason, including a
+    percent value would rate the document higher than it should. Patch
+    provided by upstream (and not attributable to a person).
+  * A set of patches brings the HTML documentation up to date, fixing errors
+    and clearing ambinguities. Thanks to Gilles Detillieux for these patches.
+    Also provided by the upstream developers.
+  * Updated the scripts to honor the decision whether htnotify should be run.
+  * Removed unnecessary dependency on the newt libraries.
+  * Took the debconf translations from the unstable package (they have not
+    changed much), and debugged the italian translation so that it no longer
+    produced errors.
+  * Fixed 'rundig' so that the '-i' option is only passed to htdig, and no
+    longer to 'htpurge' and 'htnotify' where it would produce an error.
+  * More fun with 'rundig', adapted it to the suggestion of Emmanuel Decaen so
+    it would only recognise database_dir at the start of a line, preventing it
+    from erroneously using a commented out setting. (Closes: #139922)
+  * Brought the rundig manpage up to date to reflect the '-i' option, as it
+    works now. Thanks to Francesco Potorti and Ludovic Drolez for reporting.
+    (Closes: #162397, #138304)
+  * Fixed a condition whereby the databases in /etc/htdig would not be
+    removed when the package was uninstalled. (Closes: #244774)
+  * Corrected a typo in the french debconf localisation (.po) file. Thanks to
+    Benoit Sibaud for discovering the misspelled word. (Closes: #249919)
+  * Added a check for file existence in the config script. Thanks to Frank
+    Pavageau and James Cameron for their effort (Closes: #248460)
+  * Fixed recommends to get more lintian-clean: 'wwwoffle, apache | httpd'
+    instead of 'wwwoffle | httpd', esp. since wwwoffle does not provide httpd.
+  * Removed 'debian/conffiles', as scripts and files in /etc are automatically
+    treated as configuration files.
+  * Adapted the copyright file to reflect the current licensing situation.
+  * Externally linked against the Berkeley DB libraries, rather than using the
+    old libraries ht://Dig came with (2.6.4). This resolves some licensing
+    worries. It adds a build dependency of the package against 'libdb2-dev',
+    and a runtime dependency against 'libdb2', however.
+  * Cleaned up the templates file, removing unused  entries.
+  * Adapted cron scripts to no longer use the debconf-gathered values
+    directly. Instead, an interim file is used (/etc/default/htdig).
+
+ -- Robert Ribnitz <[email protected]>  Mon,  2 Aug 2004 01:55:28 +0200
+
+htdig (3.1.6-7) unstable; urgency=low
+
+  * A patch provided by Christian Perrier fixes some dependency issues and
+    improves on gettext support. Christian Perrier also proofread the French
+    Translation (Closes: #202725)
+  
+  * The package no longer suggests word2x, since catdoc can handle the
+    functionality, and that word2x is a candidate for removal from debian.
+    (Closes: #214204)
+
+ -- Robert Ribnitz <[email protected]>  Sat, 18 Oct 2003 17:25:15 +0200
+
+htdig (3.1.6-6) unstable; urgency=low
+
+  * A patch supplied by Adam Heath now allows for filenames to contain spaces
+    (Closes: #188256)
+  
+  * Changed dependency from 'libnewt0.51' to 'libnewt0.51 | libnewt0' to ease
+    problems for 'woody' users.
+  
+  * Integrated French translation for debconf. Credits for the translation go to
+    Phillippe Batailler. Had it not been for the help of Denis Barbier who
+    submitted it to the BTS, we would not have the French translation now, so
+    thanks go to him as well. (Closes: #151726)
+  
+  * Proofread control file, to get rid of 'optinal', which I didn't find. So I
+    guess it must have been fixed, and the bug not yet closed.
+    (Closes: #155964)
+
+ -- Robert Ribnitz <[email protected]>  Fri, 11 Jul 2003 16:36:26 +0200
+
+htdig (3.1.6-5) unstable; urgency=low
+
+  * Amended the htdig-pdfparser script as outlined in pod's idea, eliminating an
+    (unnecessary) 'grep' in the script (Closes: #196916) 
+
+  * renamed dependency from libnewt0 to libnewt 0.51 to fix packaging errors
+    (libnewt0 no longer in sarge/sid, as this is named libnewt0.51)
+
+ -- Robert Ribnitz <[email protected]>  Wed, 25 Jun 2003 08:29:40 +0200
+
+htdig (3.1.6-4) unstable; urgency=low
+
+  * New maintainer
+  * Patch provided by Norman Jordan fixes local indexing problem
+    (Closes: #113857)
+  * Dependency on libnewt0 added (Closes: #196202)
+ 
+ -- Robert Ribnitz <[email protected]>  Tue, 24 Jun 2003 21:54:56 +0200
+
+htdig (3.1.6-3) unstable; urgency=low
+
+  * Fixed typo in postrm, quick-and-dirty fix for debconf 
+    problem (Closes: #135663)
+  * Updated database location in htdigconfig script (Closes: #135259)
+  * Updated rundig script for DBDIR and TMPDIR locations
+    (Closes: #81039, #117887)
+
+ -- Stijn de Bekker <[email protected]>  Mon, 25 Feb 2002 19:56:03 +0100
+
+htdig (3.1.6-2) unstable; urgency=low
+
+  * Added debconf support for interaction (Closes: #55212)
+  * Added a debconf warning for the change in database path when
+    upgrading from version <3.1.5-3  (Closes: #133867)
+  * Marked /etc/htdig/long.shtml, /etc/htdig/short.shtml and
+    /etc/htdig/wrapper.html as conffiles (Closes: #110574, #132132)
+  * Fixed /usr/local/acroread problems with a special htdig pdf 
+    script (Closes: #64385, #67341, #107504, #123398, #124345)
+
+ -- Stijn de Bekker <[email protected]>  Sat, 16 Feb 2002 12:11:28 +0100
+
+htdig (3.1.6-1) unstable; urgency=low
+
+  * New upstream release (fixes Debian version, closes: #125387)
+  * Fixed spelling errors (except RPM fixes, closes: #126964)
+
+ -- Stijn de Bekker <[email protected]>  Wed,  6 Feb 2002 21:27:21 +0100
+
+htdig (3.1.6-0.snapshot011118) unstable; urgency=low
+
+  * New upstream release (Closes: #52945, #70700, #105045)
+  * Changed location of index files from /var/spool to /var/lib to
+    reflect the FHS (Closes: #119111)
+  * Added .bz2 to list of bad_extensions (Closes: #118552)
+  * Changed location of htdig images to /var/www/htdig
+  * Changed behaviour to a create a full index weekly and an 
+    incremental index daily (Closes: #114979)
+  * Package now recommends httpd or wwwoffle (Closes: #85204)
+
+ -- Stijn de Bekker <[email protected]>  Sun, 25 Nov 2001 16:47:17 +0100
+
+htdig (3.1.5-3) unstable; urgency=high
+
+  * New maintainer
+  * Updated Standards-Version: 3.5.2
+  * Fixes security bug; disable -c config option for cgi usage
+    (Closes: #113682)
+  * Changed the location of htdig documents and config files in manpages
+    (Closes: #95991, #67388, #71133)
+
+ -- Stijn de Bekker <[email protected]>  Sat,  6 Oct 2001 13:45:11 +0200
+
+htdig (3.1.5-2.1) frozen unstable; urgency=low
+
+  * debian/control: s/perl5/perl/
+  * debian/cron.daily: use locking strategy proposed by Ingo Saitz (closes:
+    bug#70700)
+  * debian/control: added dependency on lockfile-progs
+
+ -- Marcelo E. Magallon <[email protected]>  Sat, 17 Mar 2001 20:07:24 +0100
+
+htdig (3.1.5-2) frozen unstable; urgency=low
+
+  * Comment out the external_parsers line in the default htdig.conf
+    (Closes: #59228)
+
+ -- Gergely Madarasz <[email protected]>  Tue, 29 Feb 2000 18:31:32 +0100
+
+htdig (3.1.5-1) frozen unstable; urgency=high
+
+  * New upstream security bugfix release (Closes: #59047, #59056)
+
+ -- Gergely Madarasz <[email protected]>  Mon, 28 Feb 2000 01:41:58 +0100
+
+htdig (3.1.4-2) frozen unstable; urgency=medium
+
+  * Test for the existence of /var/www before copying files there in the
+    postinst. In certain cases htdig could install a /var/www _file_
+
+ -- Gergely Madarasz <[email protected]>  Wed, 23 Feb 2000 01:24:38 +0100
+
+htdig (3.1.4-1) unstable; urgency=low
+
+  * New upstream version
+
+ -- Gergely Madarasz <[email protected]>  Fri, 10 Dec 1999 16:52:52 +0100
+
+htdig (3.1.3-1) unstable; urgency=low
+
+  * New upstream version
+  * Split htdig-doc package (Closes: #45684)
+  * Install search.html when first installing the package to
+    /var/www (Closes: #45897)
+
+ -- Gergely Madarasz <[email protected]>  Tue,  7 Dec 1999 16:04:22 +0100
+
+htdig (3.1.2-9) unstable; urgency=low
+
+  * Small bugfix (Closes: #45680)
+
+ -- Gergely Madarasz <[email protected]>  Tue, 21 Sep 1999 18:48:38 +0200
+
+htdig (3.1.2-8) unstable; urgency=low
+
+  * Fix postinst script (debhelper part was not included)
+
+ -- Gergely Madarasz <[email protected]>  Tue,  7 Sep 1999 21:20:34 +0200
+
+htdig (3.1.2-7) unstable; urgency=low
+
+  * FHS compliance
+  * Standards: 3.0.1
+
+ -- Gergely Madarasz <[email protected]>  Tue,  7 Sep 1999 20:44:48 +0200
+
+htdig (3.1.2-6) unstable; urgency=low
+
+  * Change maintainer address
+  * Build with libstdc++2.10
+  * Remove -s from cron.daily run (Closes: #43075)
+  * Fix inclusion of correct db.h header
+
+ -- Gergely Madarasz <[email protected]>  Sat, 28 Aug 1999 17:38:35 +0200
+
+htdig (3.1.2-5) unstable; urgency=low
+
+  * No changes, just build with tar 1.12-7
+
+ -- Gergely Madarasz <[email protected]>  Tue,  3 Aug 1999 18:08:47 +0200
+
+htdig (3.1.2-4) unstable; urgency=low
+
+  * /etc/cron.daily/htdig should be a conffile
+
+ -- Gergely Madarasz <[email protected]>  Tue,  3 Aug 1999 12:16:54 +0200
+
+htdig (3.1.2-3) unstable; urgency=low
+
+  * Add perl5 dependency for parse_doc.pl
+
+ -- Gergely Madarasz <[email protected]>  Mon,  2 Aug 1999 19:27:30 +0200
+
+htdig (3.1.2-2) unstable; urgency=low
+
+  * Fix build for glibc 2.0, modified patch from Roman Hodek (Closes: #41409)
+  * Add a cron.daily file (Closes: #37205)
+  * Add support for .doc, .ps and .pdf files, patch from Ray Dassen
+    (Closes: #37206)
+
+ -- Gergely Madarasz <[email protected]>  Mon,  2 Aug 1999 18:24:12 +0200
+
+htdig (3.1.2-1) unstable; urgency=low
+
+  * New upstream release
+  * Compile with glibc2.1, link against libdb.so.3 instead of libdb.so.2
+  * Fix the location of the word2root and synonyms databases in the
+    default htdig.conf (#34827, #34244)
+  * Move the configuration file to /etc/htdig (#33316)
+  * Fix for wishlist bug #31804
+  * Some manpage updates
+
+ -- Gergely Madarasz <[email protected]>  Fri, 23 Apr 1999 18:56:49 +0200
+
+htdig (3.1.1-1) unstable; urgency=low
+
+  * Suggest acroread for pdf parsing support
+  * htlib/DB2_db.cc: patch back to db2 2.4.6 API
+  * New upstream release
+
+ -- Gergely Madarasz <[email protected]>  Wed, 24 Feb 1999 21:51:47 +0100
+
+htdig (3.1.0b4-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Gergely Madarasz <[email protected]>  Tue,  5 Jan 1999 03:54:09 +0100
+
+htdig (3.1.0b1-1) unstable; urgency=low
+
+  * Moved /usr/lib/htdig to /etc/htdig since those should be conffiles
+    (adresses #25412)
+  * Fixed hardcoded path to sort (#24159, #26704)
+  * Fixed README (#26807)
+  * Converted debian/rules to debhelper
+  * Link against libdb2 instead of libgdbm
+  * New upstream version
+
+ -- Gergely Madarasz <[email protected]>  Thu,  1 Oct 1998 23:40:45 +0200
+
+htdig (3.0.8b2-3) unstable; urgency=low
+
+  * no longer refers to gzipped GPL
+  * remove shlibs.local
+  * recompile with librx1g instead of rx1g
+
+ -- Gergely Madarasz <[email protected]>  Thu,  5 Mar 1998 18:35:04 +0100
+
+htdig (3.0.8b2-2) unstable; urgency=low
+
+  * added shlibs.local because of (possibly) rx1g bug
+  * Link against rx1g (fixes #16615)
+  * New maintainer
+
+ -- Gergely Madarasz <[email protected]>  Mon,  5 Jan 1998 21:21:53 +0100
+
+htdig (3.0.8b2-1) unstable; urgency=low
+
+  * New upstream version
+  * Don't generate word db's when package is upgraded
+  * Check for arguments to postinst (fixes #12613)
+  * Pristine source
+  * Upgraded to standards version 2.3.0.0
+
+ -- Christian Schwarz <[email protected]>  Fri, 12 Sep 1997 01:51:35 +0200
+
+htdig (3.0.8b1-2) unstable; urgency=low
+
+  * Link dynamically against libgdbm and librx (fixes bug#12152).
+
+ -- Christian Schwarz <[email protected]>  Mon, 18 Aug 1997 19:45:09 +0200
+
+htdig (3.0.8b1-1) unstable; urgency=low
+
+  * Initial Release.
+  * Wrote manual pages for ht* commands.
+
+ -- Christian Schwarz <[email protected]>  Mon, 21 Jul 1997 10:16:13 +0200
--- htdig-3.2.0b6.orig/debian/htstat.1
+++ htdig-3.2.0b6/debian/htstat.1
@@ -0,0 +1,53 @@
+.TH htdig 1 "January 2004"
+.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
+.\" other parms are allowed: see man(7), man(1)
+.SH NAME
+htstat \-  returns statistics on the document and word databases, much like the -s option to htdig or htmerge.
+.SH SYNOPSIS
+.B htstat
+.I "[-v][-a][-c configfile][-u]"
+.SH "DESCRIPTION"
+Htdig retrieves HTML documents using the HTTP protocol and
+gathers information from these documents which can later be
+used to search these documents. This program can be referred to
+as the search robot. 
+.SH OPTIONS
+.TP
+.B \-a
+Use alternate work files. Tells htstat to append
+.I .work
+to database files, causing a second copy of the database to be
+built. This allows the original files to be used by htsearch
+during the run. 
+.TP
+.B \-c \fIconfigfile\fR
+Use the specified
+.I configfile
+instead of the default. 
+.TP
+.B \-u
+Give a list of URLs in the document database.
+.TP
+.B \-v
+Verbose mode. This increases the verbosity of the program.
+Using more than 2 is probably only useful for debugging
+purposes. The default verbose mode (using only one \fI\-v\fR) gives
+a nice progress report while digging. 
+.SH "FILES"
+.TP
+.B /etc/htdig/htdig.conf
+The default configuration file.
+.SH "SEE ALSO"
+Please refer to the HTML pages (in the htdig-doc package)
+.B /usr/share/doc/htdig-doc/html/index.html
+and the manual pages
+.I htdigconfig(8)
+,
+.I htdig(1)
+and
+.I htmerge(1)
+for a detailed description of ht://Dig and its commands.
+
+.SH AUTHOR
+This manual page was written by Robert Ribnitz, 
+based on the HTML documentation of ht://Dig.
--- htdig-3.2.0b6.orig/debian/rules
+++ htdig-3.2.0b6/debian/rules
@@ -0,0 +1,90 @@
+#!/usr/bin/make -f
+
+DEB_HOST_GNU_TYPE       ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE      ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+build:
+	dh_testdir
+	export PDF_PARSER=/usr/bin/htdig-pdfparser && \
+	CXXFLAGS=-Wno-deprecated ./configure \
+		--host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
+		--with-pic \
+		--with-gnu-ld \
+		--prefix=/usr \
+		--with-cgi-bin-dir=/usr/lib/cgi-bin \
+		--with-search-dir=/usr/share/doc/htdig/examples \
+		--with-image-dir=/var/www/htdig \
+		--with-config-dir=/etc/htdig \
+		--with-common-dir=/etc/htdig \
+		--with-database-dir=/var/lib/htdig
+	make
+	touch build
+
+clean:
+	dh_testdir
+	dh_testroot
+	dh_clean
+
+	-rm -f build
+	-make distclean
+	-rm -f `find . -name "*~"`
+	-rm -rf debian/tmp debian/files* core debian/substvars
+
+binary-indep: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k -i
+	dh_installdirs -i
+
+	mkdir debian/htdig-doc/usr/share/doc/htdig-doc/examples
+	cp -r contrib/* debian/htdig-doc/usr/share/doc/htdig-doc/examples
+	mkdir debian/htdig-doc/usr/share/doc/htdig-doc/html
+	cp -r htdoc/* debian/htdig-doc/usr/share/doc/htdig-doc/html
+	rm -f debian/htdig-doc/usr/share/doc/htdig-doc/html/COPYING
+	rm -f debian/htdig-doc/usr/share/doc/htdig-doc/examples/rtf2html/COPYING
+	find debian/htdig-doc/usr/share/doc -type f | xargs chmod -x
+	
+	dh_installdocs -i README
+	dh_installchangelogs -i ChangeLog
+	dh_strip -i
+	dh_compress -i -Xhtml/C
+	dh_fixperms -i
+	dh_installdeb -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
+
+binary-arch:	build
+	dh_testdir
+	dh_testroot
+	dh_clean -k -a
+	dh_installdirs -a
+
+	make install DESTDIR=`pwd`/debian/tmp
+	mkdir debian/tmp/usr/sbin
+	install -m 755 debian/htdigconfig debian/tmp/usr/sbin
+	mkdir debian/tmp/usr/share/htdig
+	install -m 755 debian/parse_doc.pl debian/tmp/usr/share/htdig
+	install -m 755 debian/htdig-pdfparser debian/tmp/usr/bin
+	chmod -x debian/tmp/etc/htdig/*
+	find debian/tmp/usr/share/doc -type f | xargs chmod -x
+
+	dh_installdebconf
+	dh_installdocs -a README
+	dh_installchangelogs -a ChangeLog
+	dh_installman -a
+	dh_installcron -a
+	dh_install -phtdig
+	dh_strip -a
+	dh_compress -a
+	dh_fixperms -a
+	dh_installdeb -a
+	dh_makeshlibs -a
+	dh_shlibdeps -a
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+binary:	binary-indep binary-arch
+
+.PHONY: binary binary-arch binary-indep clean
--- htdig-3.2.0b6.orig/debian/htdig.1
+++ htdig-3.2.0b6/debian/htdig.1
@@ -0,0 +1,119 @@
+.TH htdig 1 "21 July 1997"
+.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
+.\" other parms are allowed: see man(7), man(1)
+.SH NAME
+htdig \- retrieve HTML documents for ht://Dig search engine
+.SH SYNOPSIS
+.B htdig
+.I "[options]"
+.SH "DESCRIPTION"
+Htdig retrieves HTML documents using the HTTP protocol and
+gathers information from these documents which can later be
+used to search these documents. This program can be referred to
+as the search robot. 
+.SH OPTIONS
+.TP
+.B \-
+Get the list of URLs to start indexing from standard input. This will override the default parameter \fIstart_url\fR specified in the config file  and the file supplied to the \fI-m\fR option.
+.TP
+.B \-a
+Use alternate work files. Tells htdig to append
+.I .work
+to database files, causing a second copy of the database to be
+built. This allows the original files to be used by htsearch
+during the indexing run. 
+.TP
+.B \-c \fIconfigfile\fR
+Use the specified
+.I configfile
+instead of the default. 
+.TP
+.B \-h \fImaxhops\fR
+Restrict the dig to documents that are at most
+.I maxhops
+links away from the starting document. This only works if option \fI\-i\fR
+is also given. 
+.TP
+.B \-i
+Initial. Do not use any old databases. Old databases will be erased before runing the program.
+.TP
+.B \-m \fIfilename\fR
+Minimal run. Only index the URLs given in the file \fIfilename\fR, ignoring all others. URLs in the file should be formatted one URL per line. 
+.TP
+.B \-s
+Print statistics about the dig after completion. 
+.TP
+.B \-t
+Create an ASCII version of the document database. This
+database is easy to parse with other programs so that
+information can be extracted from it for purposes other
+than searching. One could gather some interesting statistics
+from this database. 
+.TS
+cB cB 
+c l .
+Fieldname	Value
+u	URL
+t	Title
+a	State 
+	(0 normal, 1 not found, 2 not indexed, 3 obsolete)
+m	Time of last modification reported by the server
+s	Document Size in bytes
+H	Excerpt of the document
+h	Meta Description
+l	Time of last rerievial
+L	Count of links in the document or  of \fIoutgoing links\fR
+b	Number of links to the document, also called 
+	\fIincoming\fR links or \fIbacklinks\fR
+c	Hop count of this document
+g	Signature of this document 
+	(used to detect duplicates)
+e	E-Mail address to use for a notification from \fIhtnotify\fR
+n	Date on which such notification is sent
+S	Subject of the notfication message 
+d	The text of Incoming links pointing to this document 
+	(e.g. <a href="docURL">description</a>)
+A	Anchors in the document (i.e. <A NAME=...)
+.TE
+.TP
+.B \-u \fIusername:password\fR
+Tells htdig to send the supplied username and password with
+each HTTP request. The credentials will be encoded using the
+\fI\'Basic\'\fR authentication method. There \fBHAS\fR to be a colon (:)
+between the username and password. 
+.TP
+.B \-v
+Verbose mode. This increases the verbosity of the program. Using more than 2 is probably only useful for debugging purposes. The default verbose mode (using only one -v) gives a nice progress report while digging. Please consult the section below on the exact format of the progress report.
+.TP
+.SH "FORMAT OF THE PROGRESS REPORT GIVEN IN VERBOSE MODE"
+A line is shown for each URL, with 3 numbers before the URL and some symbols after the URL. The first number is the number of documents parsed so far, the second is the DocID for this document, and the third is the hop count of the document (number of hops from one of the start_url documents). Signification of the sybols printed after the url:
+.IP 
+\fI"*"\fR is printed for a link already visited
+.IP 
+\fI"+"\fR is printed for a new link just queued
+.IP
+\fI"-"\fR is output for a link rejected for any of a number of reasons. To find out what those reasons are, you need to run htdig with at least 3 \fI-v\fR options, i.e. \fI-vvv\fR. 
+.TP
+If there are no "*", "+" or "-" symbols after the URL, it doesn't mean the document was not parsed or was empty, but only that no links to other documents were found within it. With more verbose output, these symbols will get interspersed in several lines of debugging output. 
+.TP
+.SH "FILES"
+.TP
+.B /etc/htdig/htdig.conf
+The default configuration file.
+.SH "SEE ALSO"
+Please refer to the HTML pages (in the htdig-doc package)
+.B /usr/share/doc/htdig-doc/html/index.html
+and the manual pages
+.I htdigconfig(8)
+,
+.I htmerge(1)
+,
+.I htnotify(1)
+,
+.I htsearch(1)
+and
+.I rundig(1)
+for a detailed description of ht://Dig and its commands.
+.SH AUTHOR
+This manual page was written by Christian Schwarz, modified by Stijn de Bekker. It is updated and maintained by Robert Ribnitz 
+and based on the HTML documentation of ht://Dig.
--- htdig-3.2.0b6.orig/debian/htdig.postinst
+++ htdig-3.2.0b6/debian/htdig.postinst
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+set -e
+
+# debconf
+. /usr/share/debconf/confmodule
+
+case "$1" in
+    configure)
+        # continue below
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+        exit 0
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# generate ht://Dig databases now
+db_get htdig/generate-databases
+if [ "$RET" = "true" ]; then
+	/usr/sbin/htdigconfig
+fi
+
+#DEBHELPER#
+
+exit 0
--- htdig-3.2.0b6.orig/debian/parse_doc.pl
+++ htdig-3.2.0b6/debian/parse_doc.pl
@@ -0,0 +1,204 @@
+#!/usr/bin/perl -w
+
+# 1998/12/10
+# Added:        push @allwords, $fields[$x];   <[email protected]>
+# Replaced:     matching patterns. they match words starting or ending with ()[]'`;:?.,! now, not when in between!
+# Gone:         the variable $line is gone (using $_ now)
+#
+# 1998/12/11
+# Added:        catdoc test (is catdoc runnable?)    <[email protected]>
+# Changed:      push line semi-colomn wrong.         <[email protected]>
+# Changed:      matching works for end of lines now  <[email protected]>
+# Added:        option to rigorously delete all punctuation <[email protected]>
+#
+# 1999/02/09
+# Added:        option to delete all hyphens         <[email protected]>
+# Added:        uses ps2ascii to handle PS files     <[email protected]>
+# 1999/02/15
+# Added:        check for some file formats          <[email protected]>
+# 1999/02/25
+# Added:        uses pdftotext to handle PDF files   <[email protected]>
+# Changed:      generates a head record with punct.  <[email protected]>
+# 1999/03/01
+# Added:        extra checks for file "wrappers"     <[email protected]>
+#               & check for MS Word signature (no longer defaults to catdoc)
+# 1999/03/05
+# Changed:      rejoin hyphenated words across lines <[email protected]>
+#               (in PDFs) & remove multiple punct. chars. between words (all)
+# 1999/03/10
+# Changed:      fix handling of minimum word length  <[email protected]>
+#
+# 1999/05/05
+# Changed:	Adapted for Debian.		<[email protected]>
+#               Fixed C-ism.
+#               Check if converter is actually available.
+#               Try multiple converter candidates.
+#########################################
+
+#
+# MS Word to text converter
+#
+$CATDOC = "/usr/bin/catdoc";				# Package "catdoc"
+if (! -x $CATDOC) { $CATDOC = "/usr/bin/word2x"; }	# Package "word2x"
+if (! -x $CATDOC) { $CATDOC = "/bin/true"; }
+
+#
+# set this to your WordPerfect to text converter, or /bin/true if none
+# available this nabs WP documents with .doc suffix, so catdoc doesn't see
+# them
+#
+$CATWP = "/bin/true";	# No Debian package for this conversion.
+if (! -x $CATDOC) { $CATWP = "/bin/true"; }
+
+#
+# set this to your RTF to text converter, or /bin/true if none available
+# this nabs RTF documents with .doc suffix, so catdoc doesn't see them
+#
+$CATRTF = "/bin/true";	# No Debian package for this conversion.
+if (! -x $CATRTF) { $CATRTF = "/bin/true"; }
+
+#
+# set this to your PostScript to text converter
+#
+# pstotext usually performs better than ps2ascii, and it supports Latin1.
+$CATPS = "/usr/bin/pstotext";				# Package: pstotext
+if (! -x $CATPS) { $CATPS = "/usr/bin/ps2ascii"; }	# From a ghostscript
+if (! -x $CATPS) { $CATPS = "/bin/true"; }
+
+#
+# set this to your PDF to text converter
+#
+$CATPDF = "/usr/bin/pstotext";				# From "pstotext"
+if (! -x $CATPDF) { $CATPDF = "/usr/bin/pdftotext"; }	# From "xpdf"/"xpdf-i"
+if (! -x $CATPDF) { $CATPDF = "/usr/bin/ps2ascii"; }	# From a ghostscript
+if (! -x $CATPDF) { $CATPDF = "/bin/true"; }
+
+# need some var's
+$minimum_word_length = 3;
+$head = "";
+@allwords = ();
+@temp = ();
+$x = 0;
+@fields = ();
+$calc = 0;
+$dehyphenate = 0;
+#
+# okay. my programming style isn't that nice, but it works...
+
+#for ($x=0; $x<@ARGV; $x++) {           # print out the args
+#       print STDERR "$ARGV[$x]\n";
+#}
+
+# Read first bytes of file to check for file type (like file(1) does)
+open(FILE, "< $ARGV[0]") || die "Oops. Can't open file $ARGV[0]: $!\n";
+read FILE,$magic,8;
+close FILE;
+
+if ($magic =~ /^\0\n/) {                # possible MacBinary header
+        open(FILE, "< $ARGV[0]") || die "Oops. Can't open file $ARGV[0]: $!\n";
+        read FILE,$magic,136;           # let's hope parsers can handle them!
+        close FILE;
+}
+
+if ($magic =~ /%!|^\033%-12345/) {      # it's PostScript (or HP print job)
+        $parser = $CATPS;               # gs 3.33 leaves _temp_.??? files in .
+        $parsecmd = "(cd /tmp; $parser; rm -f _temp_.???) < \"$ARGV[0]\" |";
+# keep quiet even if PS gives errors...
+#       $parsecmd = "(cd /tmp; $parser; rm -f _temp_.???) < \"$ARGV[0]\" 2>/dev/null |";
+        $type = "PostScript";
+        $dehyphenate = 0;               # ps2ascii already does this
+        if ($magic =~ /^\033%-12345/) { # HP print job
+                open(FILE, "< $ARGV[0]") || die "Oops. Can't open file $ARGV[0]: $!\n";
+                read FILE,$magic,256;
+                close FILE;
+                exit unless $magic =~ /^\033%-12345X\@PJL.*\n*.*\n*.*ENTER LANGUAGE = POSTSCRIPT.*\n*.*\n*.*\n%!/
+        }
+} elsif ($magic =~ /%PDF-/) {           # it's PDF (Acrobat)
+        $parser = $CATPDF;
+        $parsecmd = "$parser \"$ARGV[0]\" - |";
+# kludge to handle multi-column PDFs...  (needs patched pdftotext)
+#       $parsecmd = "$parser -rawdump $ARGV[0] - |";
+        $type = "PDF";
+        $dehyphenate = 1;               # PDFs often have hyphenated lines
+} elsif ($magic =~ /WPC/) {             # it's WordPerfect
+        $parser = $CATWP;
+        $parsecmd = "$parser \"$ARGV[0]\" |";
+        $type = "WordPerfect";
+        $dehyphenate = 0;               # WP documents not likely hyphenated
+} elsif ($magic =~ /^{\\rtf/) {         # it's Richtext
+        $parser = $CATRTF;
+        $parsecmd = "$parser \"$ARGV[0]\" |";
+        $type = "RTF";
+        $dehyphenate = 0;               # RTF documents not likely hyphenated
+} elsif ($magic =~ /\320\317\021\340/) {    # it's MS Word
+        $parser = $CATDOC;
+        $parsecmd = "$parser -a -w \"$ARGV[0]\" |";
+        $type = "Word";
+        $dehyphenate = 0;               # Word documents not likely hyphenated
+} else {
+        die "Can't determine type of file $ARGV[0]; content-type: $ARGV[1]; URL: $ARGV[2]\n";
+}
+# print STDERR "$ARGV[0]: $type $parsecmd\n";
+die "Hmm. $parser is absent or unwilling to execute.\n" unless -x $parser;
+
+
+# open it
+open(CAT, "$parsecmd") || die "Hmmm. $parser doesn't want to be opened using pipe.\n";
+while (<CAT>) {
+        while (/[A-Za-z\300-\377]-\s*$/ && $dehyphenate) {
+                $_ .= <CAT> || last;
+                s/([A-Za-z\300-\377])-\s*\n\s*([A-Za-z\300-\377])/$1$2/
+        }
+        $head .= " " . $_;
+        s/\s+[\(\)\[\]\\\/\^\;\:\"\'\`\.\,\?!\*]+|[\(\)\[\]\\\/\^\;\:\"\'\`\.\,\?!\*]+\s+|^[\(\)\[\]\\\/\^\;\:\"\'\`\.\,\?!\*]+|[\(\)\[\]\\\/\^\;\:\"\'\`\.\,\?!\*]+$/ /g;    # replace reading-chars with space (only at end or begin of word, but allow multiple characters)
+#       s/\s[\(\)\[\]\\\/\^\;\:\"\'\`\.\,\?!\*]|[\(\)\[\]\\\/\^\;\:\"\'\`\.\,\?!\*]\s|^[\(\)\[\]\\\/\^\;\:\"\'\`\.\,\?!\*]|[\(\)\[\]\\\/\^\;\:\"\'\`\.\,\?!\*]$/ /g;    # replace reading-chars with space (only at end or begin of word)
+#       s/[\(\)\[\]\\\/\^\;\:\"\'\`\.\,\?!\*]/ /g;      # rigorously replace all by <[email protected]>
+        s/[\-\255]/ /g;                                 # replace hyphens with space
+        @fields = split;                                # split up line
+        next if (@fields == 0);                         # skip if no fields (does it speed up?)
+        for ($x=0; $x<@fields; $x++) {                  # check each field if string length >= 3
+                if (length($fields[$x]) >= $minimum_word_length) {
+                        push @allwords, $fields[$x];    # add to list
+                }
+        }
+}
+
+close CAT;
+
+exit unless @allwords > 0;              # nothing to output
+
+#############################################
+# print out the title
+@temp = split(/\//, $ARGV[2]);          # get the filename, get rid of basename
+print "t\t$type Document $temp[-1]\n";  # print it
+
+
+#############################################
+# print out the head
+$head =~ s/^\s+//g;
+$head =~ s/\s+$//g;
+$head =~ s/\s+/ /g;
+$head =~ s/&/\&amp\;/g;
+$head =~ s/</\&lt\;/g;
+$head =~ s/>/\&gt\;/g;
+print "h\t$head\n";
+#$calc = @allwords;
+#print "h\t";
+##if ($calc >100) {                      # but not more than 100 words
+##       $calc = 100;
+##}
+#for ($x=0; $x<$calc; $x++) {            # print out the words for the exerpt
+#        print "$allwords[$x] ";
+#}
+#print "\n";
+
+
+#############################################
+# now the words
+for ($x=0; $x<@allwords; $x++) {
+        $calc=int(1000*$x/@allwords);           # calculate rel. position (0-1000)
+        print "w\t$allwords[$x]\t$calc\t0\n";   # print out word, rel. pos. and text type (0)
+}
+
+$calc=@allwords;
+# print STDERR "# of words indexed: $calc\n";
--- htdig-3.2.0b6.orig/debian/htdig.postrm
+++ htdig-3.2.0b6/debian/htdig.postrm
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "purge" ]
+then
+	rm -f /etc/default/htdig
+	rm -rf /var/spool/htdig
+	rm -rf /var/lib/htdig
+fi
+
+#DEBHELPER#
--- htdig-3.2.0b6.orig/debian/htpurge.1
+++ htdig-3.2.0b6/debian/htpurge.1
@@ -0,0 +1,56 @@
+.TH htdig 1 "January 2004"
+.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
+.\" other parms are allowed: see man(7), man(1)
+.SH NAME
+htpurge \-  remove unused odocuments from the database (general maintenance script)
+.SH SYNOPSIS
+.B htpurge
+.I "[-][-a][-c configfile][-u][-v]"
+.SH "DESCRIPTION"
+Htpurge functions to remove specified URLs from the databases as well as bad URLs, 
+unretrieved URLs, obsolete documents, etc. It is recommended that htpurge be run 
+after htdig to clean out any documents of this sort. 
+.TP
+.SH OPTIONS
+.TP
+.B \-
+Take \fIURL\fR list from standard input (rather than specified with \fI-u\fR). Format of input file is one URL per line.
+.B \-a
+Use alternate work files. Tells htpurge to append
+.I .work
+to database files, causing a second copy of the database to be
+built. This allows the original files to be used by htsearch
+during the run. 
+.TP
+.B \-c \fIconfigfile\fR
+Use the specified
+.I configfile
+instead of the default. 
+.TP
+.B \-u \fIURL\fR
+Add this \fIURL\fR to the list of documents to remove. Must be specified multiple times if
+more than one \fIURL\fR are to be removed. Should nor be used together with \fI-\fR.
+.TP
+.B \-v
+Verbose mode. This increases the verbosity of the program.
+Using more than 2 is probably only useful for debugging
+purposes. The default verbose mode (using only one \fI\-v\fR) gives
+a nice progress report while digging. 
+.SH "FILES"
+.TP
+.B /etc/htdig/htdig.conf
+The default configuration file.
+.SH "SEE ALSO"
+Please refer to the HTML pages (in the htdig-doc package)
+.B /usr/share/doc/htdig-doc/html/index.html
+and the manual pages
+.I htdigconfig(8)
+,
+.I htdig(1)
+and
+.I htmerge(1)
+for a detailed description of ht://Dig and its commands.
+
+.SH AUTHOR
+This manual page was written by Robert Ribnitz, 
+based on the HTML documentation of ht://Dig.
--- htdig-3.2.0b6.orig/debian/templates
+++ htdig-3.2.0b6/debian/templates
@@ -0,0 +1,22 @@
+Template: htdig/generate-databases
+Type: boolean
+Default: true
+_Description: Generate endings database now?
+ The ht://Dig search engine requires an endings database which has to be
+ generated before the first start. Generating the database will take a
+ short while. It can be done either now or later by calling the
+ '/usr/sbin/htdigconfig' script. Should the database be generated now 
+ rather than later on?
+
+
+Template: htdig/run-rundig
+Type: boolean
+Default: false
+_Description: Execute the rundig script daily?
+ rundig is a program that obtains on-line content and creates a searchable
+ database for the ht://Dig search engine. It downloads and indexes HTML
+ from the web, as defined in /etc/htdig/htdig.conf. Say Yes if you wish to
+ run this program daily. Say No if you don't plan to use htdig in this
+ way (perhaps htdig is being used by a third party, for instance KDE, to
+ perform local indexing). If in doubt, say No. It is the safest choice
+ unless you know what you're doing.
--- htdig-3.2.0b6.orig/debian/htsearch.1
+++ htdig-3.2.0b6/debian/htsearch.1
@@ -0,0 +1,63 @@
+.TH htsearch 1 "6 October 2001"
+.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
+.\" other parms are allowed: see man(7), man(1)
+.SH NAME
+htsearch \- create document index and word database for the ht://Dig
+search engine
+.SH SYNOPSIS
+.B htsearch
+.I "[options]" "[query_string]"
+.SH "DESCRIPTION"
+.I Htsearch
+is used to sift through the  databases created by \fIhtdig\fR for content.
+It is the actual search engine of the \fIhtdig\fR search system. It is a CGI
+program that is expected to be invoked by an HTML form. It will accept both the
+GET and POST methods of passing data to the CGI program. 
+.SH OPTIONS
+.TP
+.B query_string
+A CGI-style query string can be given as a single
+argument, and is only used if the REQUEST_METHOD environment
+variable is not set.  If no query_string is given, and
+REQUEST_METHOD is not set, htsearch will prompt for the query.
+.TP
+.B \-c \fIconfigfile\fR
+Use the specified
+.I configfile
+instead of the default (for security reasons this option is only
+available when htsearch is used on the commandline).
+.TP
+.B \-v \-d
+Run in verbose mode.  This increases the verbosity of the
+program.  Using more than 2 is probably only useful
+for debugging purposes.  The default verbose mode
+gives a progress on what it is doing and where it is.
+.SH "FILES"
+.TP
+.B /etc/htdig/htdig.conf
+The default configuration file.
+.TP
+.B /etc/htdig/header.html
+The default search results header file
+.TP
+.B /etc/htdig/footer.html
+The default search results footer file
+.TP
+.B /etc/htdig/wrapper.html
+The default search results wrapper file, that contains the header and footer together in one file
+.TP
+.B /etc/htdig/nomatch.html
+The default 'no matches found' HTML file
+.TP
+.B /etc/htdig/syntax.html
+The default file that explains boolean expression syntax errors 
+.SH "SEE ALSO"
+Please refer to the HTML pages (in the htdig-doc package)
+.B /usr/share/doc/htdig-doc/html/index.html
+and the manual pages
+.I htdig(1)
+and
+.I htmerge(1)
+for a detailed description of ht://Dig and its commands.
+.SH AUTHOR
+This manual page was written by Stijn de Bekker and updated by Robert Ribnitz. It is based on the HTML documentation of ht://Dig.
--- htdig-3.2.0b6.orig/debian/htfuzzy.1
+++ htdig-3.2.0b6/debian/htfuzzy.1
@@ -0,0 +1,77 @@
+.TH htdig 1 "21 July 1997"
+.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
+.\" other parms are allowed: see man(7), man(1)
+.SH NAME
+htfuzzy \- fuzzy command-line search utility for the ht://Dig search engine
+.SH SYNOPSIS
+.B htfuzzy [-c configfile] [-v] algorithm
+.I "[options]"
+.SH "DESCRIPTION"
+Description to follow here
+.SH OPTIONS
+.TP
+.B \-c \fIconfigfile\fR
+Use the specified
+.I configfile
+instead of the default. 
+.TP
+.B \-v 
+.I Verbose mode
+. Use this to get more verbose output while running htfuzzy. More than one \fIv\fR can be specified (ie. 
+.\fI-vv\fR
+,
+\fI-vvv\fR
+ etc
+). Specifying more than two v's is probably only useful for debugging purposes.
+.SH "Supported Algorithms"
+.TP
+Different algoritms are supported for searching:
+\fIsoundex\fR
+Creates  a slightly modified soundex key database. Differences with the standard soundex algorithm are: 
+Keys are 6 digits and the first letter is also encoded.
+	      
+\fImetaphone\fR
+Creates a metaphone key database. This algorithm is more specific to English, but  will  get  fewer  "weird"
+matches than the soundex algorithm.
+
+\fIaccents\fR
+(No description of the algorithm at the moment)
+
+\fIendings\fR
+Creates  two  databases  which  can  be  used  to match common word endings. The creation of these databases
+requires a list of affix rules and a dictionary which uses those affix rules. The format of the affix  rules
+and  dictionary  files are the ones used by the ispell program. Included with the distribution are the affix
+rules for English and a fairly small English dictionary.  Other languages can be supported  by  getting  the
+appropriate affix rules and dictionaries. These are available for many languages; check the ispell distribu-
+tion for more details.
+
+\fIsynonyms\fR
+Creates a database of synonyms for words. It reads a text database of synonyms and creates a  database  that
+htsearch  can  then use. Each line of the text database consists of words where the first word will have the
+other words on that line as synonyms.
+
+.SH "Notes on searching"
+.TP
+Please consult specialised literature to find out how the different algorithms work or simply try another 
+search stragegy you do not get the intended search results.
+
+.SH "FILES"
+.TP
+.B /etc/htdig/htdig.conf
+The default configuration file.
+.SH "SEE ALSO"
+Please refer to the HTML pages (in the htdig-doc package)
+.B /usr/share/doc/htdig-doc/html/index.html
+and the manual pages
+.I htdigconfig(8)
+,
+.I htmerge(1)
+,
+.I htnotify(1)
+,
+.I htsearch(1)
+and
+.I rundig(1)
+for a detailed description of ht://Dig and its commands.
+.SH AUTHOR
+This manual page was written by Robert Ribnitz. It is based on documentation of ht://Dig, and on earlier manpages provided by Christian Schwarz and Stijn de Bekker.
--- htdig-3.2.0b6.orig/debian/htdigconfig.8
+++ htdig-3.2.0b6/debian/htdigconfig.8
@@ -0,0 +1,17 @@
+.TH htdigconfig 8 "23 April 1999"
+.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
+.\" other parms are allowed: see man(7), man(1)
+.SH NAME
+htdigconfig \- script to create fuzzy databases for ht://Dig
+.SH SYNOPSIS
+.B htdigconfig
+.SH "DESCRIPTION"
+.I htdigconfig
+is a script to create fuzzy databases such as word2root, root2word and 
+synonyms databases for the ht://Dig search engine.
+.SH "SEE ALSO"
+Please refer to the HTML pages (in the htdig-doc package)
+.B /usr/share/doc/htdig-doc/html/index.html
+for a detailed description of ht://Dig and its commands.
+.SH AUTHOR
+This manual page was written by Gergely Madarasz, modified by Stijn de Bekker.
--- htdig-3.2.0b6.orig/libhtdigphp/config.sub
+++ htdig-3.2.0b6/libhtdigphp/config.sub
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-#   Free Software Foundation, Inc.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
-timestamp='2001-04-20'
+timestamp='2006-02-23'
 
 # 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,17 @@
 #
 # 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.
-
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, 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 <[email protected]>.
+
+# Please send patches to <[email protected]>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
@@ -69,7 +71,7 @@
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -82,11 +84,11 @@
 while test $# -gt 0 ; do
   case $1 in
     --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit 0 ;;
+       echo "$timestamp" ; exit ;;
     --version | -v )
-       echo "$version" ; exit 0 ;;
+       echo "$version" ; exit ;;
     --help | --h* | -h )
-       echo "$usage"; exit 0 ;;
+       echo "$usage"; exit ;;
     -- )     # Stop option processing
        shift; break ;;
     - )	# Use stdin as input.
@@ -98,7 +100,7 @@
     *local*)
        # First pass through any local machine types.
        echo $1
-       exit 0;;
+       exit ;;
 
     * )
        break ;;
@@ -117,7 +119,9 @@
 # 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* | storm-chaos* | os2-emx*)
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
@@ -143,7 +147,7 @@
 	-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)
+	-apple | -axis | -knuth | -cray)
 		os=
 		basic_machine=$1
 		;;
@@ -157,9 +161,21 @@
 		os=-vxworks
 		basic_machine=$1
 		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+ 	-chorusrdb)
+ 		os=-chorusrdb
+		basic_machine=$1
+ 		;;
 	-hiux*)
 		os=-hiuxwe2
 		;;
+	-sco6)
+		os=-sco5v6
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
 	-sco5)
 		os=-sco3.2v5
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -176,6 +192,10 @@
 		# Don't forget version if it is 3.2v4 or newer.
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
+	-sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
 	-sco*)
 		os=-sco3.2v2
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -215,26 +235,58 @@
 case $basic_machine in
 	# Recognize the basic CPU types without company name.
 	# Some are omitted here because they have special meanings below.
-	tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
-	        | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
-		| pyramid | mn10200 | mn10300 | tron | a29k \
-		| 580 | i960 | h8300 \
-		| x86 | ppcbe | mipsbe | mipsle | shbe | shle \
-		| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
-		| hppa64 \
-		| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
-		| alphaev6[78] \
-		| we32k | ns16k | clipper | i370 | sh | sh[34] \
-		| powerpc | powerpcle \
-		| 1750a | dsp16xx | pdp10 | pdp11 \
-		| mips16 | mips64 | mipsel | mips64el \
-		| mips64orion | mips64orionel | mipstx39 | mipstx39el \
-		| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
-		| mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \
-		| sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \
-		| v850 | c4x \
-		| thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \
-		| pj | pjl | h8500)
+	1750a | 580 \
+	| 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 | mb | microblaze | mcore \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64vr | mips64vrel \
+	| mips64orion | mips64orionel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| mt \
+	| msp430 \
+	| nios | nios2 \
+	| ns16k | ns32k \
+	| 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 \
+	| sh64 | sh64le \
+	| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
+	| sparcv8 | sparcv9 | sparcv9b \
+	| strongarm \
+	| tahoe | thumb | tic4x | tic80 | tron \
+	| v850 | v850e \
+	| we32k \
+	| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
+	| z8k)
+		basic_machine=$basic_machine-unknown
+		;;
+	m32c)
 		basic_machine=$basic_machine-unknown
 		;;
 	m6811 | m68hc11 | m6812 | m68hc12)
@@ -242,7 +294,10 @@
 		basic_machine=$basic_machine-unknown
 		os=-none
 		;;
-	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | w65)
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+	ms1)
+		basic_machine=mt-unknown
 		;;
 
 	# We use `pc' rather than `unknown'
@@ -257,31 +312,68 @@
 		exit 1
 		;;
 	# Recognize the basic CPU types with company name.
-	# FIXME: clean up the formatting here.
-	vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
-	      | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
-	      | arm-*  | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
-	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
-	      | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
-	      | xmp-* | ymp-* \
-	      | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
-	      | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
-	      | hppa2.0n-* | hppa64-* \
-	      | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
-	      | alphaev6[78]-* \
-	      | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
-	      | clipper-* | orion-* \
-	      | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
-	      | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \
-	      | mips16-* | mips64-* | mipsel-* \
-	      | mips64el-* | mips64orion-* | mips64orionel-* \
-	      | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
-	      | mipstx39-* | mipstx39el-* | mcore-* \
-	      | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \
-	      | [cjt]90-* \
-	      | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
-	      | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \
-	      | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*)
+	580-* \
+	| a29k-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+	| avr-* \
+	| bfin-* | bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| clipper-* | craynv-* | 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-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mips64vr5900-* | mips64vr5900el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64r2-* | mipsisa64r2el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| mt-* \
+	| msp430-* \
+	| nios-* | nios2-* \
+	| none-* | np1-* | 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-* \
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+	| sparc-* | sparc64-* | sparc64b-* | 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-* \
+	| ymp-* \
+	| z8k-*)
+		;;
+	m32c-*)
 		;;
 	# Recognize the various machine names and aliases which stand
 	# for a CPU type and a company and sometimes even an OS.
@@ -299,6 +391,9 @@
 		basic_machine=a29k-amd
 		os=-udi
 		;;
+    	abacus)
+		basic_machine=abacus-unknown
+		;;
 	adobe68k)
 		basic_machine=m68010-adobe
 		os=-scout
@@ -313,6 +408,12 @@
 		basic_machine=a29k-none
 		os=-bsd
 		;;
+	amd64)
+		basic_machine=x86_64-pc
+		;;
+	amd64-*)
+		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	amdahl)
 		basic_machine=580-amdahl
 		os=-sysv
@@ -344,6 +445,10 @@
 		basic_machine=ns32k-sequent
 		os=-dynix
 		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
 	convex-c1)
 		basic_machine=c1-convex
 		os=-bsd
@@ -364,30 +469,45 @@
 		basic_machine=c38-convex
 		os=-bsd
 		;;
-	cray | ymp)
-		basic_machine=ymp-cray
+	cray | j90)
+		basic_machine=j90-cray
 		os=-unicos
 		;;
-	cray2)
-		basic_machine=cray2-cray
-		os=-unicos
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
 		;;
-	[cjt]90)
-		basic_machine=${basic_machine}-cray
-		os=-unicos
+	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
 		;;
 	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
 		basic_machine=mips-dec
 		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
 	delta | 3300 | motorola-3300 | motorola-delta \
 	      | 3300-motorola | delta-motorola)
 		basic_machine=m68k-motorola
@@ -396,6 +516,10 @@
 		basic_machine=m88k-motorola
 		os=-sysv3
 		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
 	dpx20 | dpx20-*)
 		basic_machine=rs6000-bull
 		os=-bosx
@@ -568,32 +692,27 @@
 		basic_machine=m68k-atari
 		os=-mint
 		;;
-	mipsel*-linux*)
-		basic_machine=mipsel-unknown
-		os=-linux-gnu
-		;;
-	mips*-linux*)
-		basic_machine=mips-unknown
-		os=-linux-gnu
-		;;
 	mips3*-*)
 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
 		;;
 	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
 		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
 	msdos)
 		basic_machine=i386-pc
 		os=-msdos
 		;;
+	ms1-*)
+		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+		;;
 	mvs)
 		basic_machine=i370-ibm
 		os=-mvs
@@ -669,6 +788,13 @@
 		basic_machine=hppa1.1-oki
 		os=-proelf
 		;;
+	openrisc | openrisc-*)
+		basic_machine=or32-unknown
+		;;
+	os400)
+		basic_machine=powerpc-ibm
+		os=-os400
+		;;
 	OSE68000 | ose68000)
 		basic_machine=m68000-ericsson
 		os=-ose
@@ -691,42 +817,64 @@
 	pbb)
 		basic_machine=m68k-tti
 		;;
-        pc532 | pc532-*)
+	pc532 | pc532-*)
 		basic_machine=ns32k-pc532
 		;;
-	pentium | p5 | k5 | k6 | nexgen)
+	pc98)
+		basic_machine=i386-pc
+		;;
+	pc98-*)
+		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium | p5 | k5 | k6 | nexgen | viac3)
 		basic_machine=i586-pc
 		;;
-	pentiumpro | p6 | 6x86 | athlon)
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
 		basic_machine=i686-pc
 		;;
-	pentiumii | pentium2)
+	pentiumii | pentium2 | pentiumiii | pentium3)
 		basic_machine=i686-pc
 		;;
-	pentium-* | p5-* | k5-* | k6-* | nexgen-*)
+	pentium4)
+		basic_machine=i786-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
 		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	pentiumpro-* | p6-* | 6x86-* | athlon-*)
 		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
-	pentiumii-* | pentium2-*)
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
 		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
+	pentium4-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	pn)
 		basic_machine=pn-gould
 		;;
 	power)	basic_machine=power-ibm
 		;;
 	ppc)	basic_machine=powerpc-unknown
-	        ;;
+		;;
 	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	ppcle | powerpclittle | ppc-le | powerpc-little)
 		basic_machine=powerpcle-unknown
-	        ;;
+		;;
 	ppcle-* | powerpclittle-*)
 		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+		;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	ps2)
 		basic_machine=i386-ibm
 		;;
@@ -734,6 +882,10 @@
 		basic_machine=i586-unknown
 		os=-pw32
 		;;
+	rdos)
+		basic_machine=i386-pc
+		os=-rdos
+		;;
 	rom68k)
 		basic_machine=m68k-rom68k
 		os=-coff
@@ -744,10 +896,26 @@
 	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
 		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
 	sequent)
 		basic_machine=i386-sequent
 		;;
@@ -755,7 +923,10 @@
 		basic_machine=sh-hitachi
 		os=-hms
 		;;
-	sparclite-wrs)
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparclite-wrs | simso-wrs)
 		basic_machine=sparclite-wrs
 		os=-vxworks
 		;;
@@ -822,22 +993,42 @@
 		os=-dynix
 		;;
 	t3e)
-		basic_machine=t3e-cray
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
 		os=-unicos
 		;;
 	tic54x | c54x*)
 		basic_machine=tic54x-unknown
 		os=-coff
 		;;
+	tic55x | c55x*)
+		basic_machine=tic55x-unknown
+		os=-coff
+		;;
+	tic6x | c6x*)
+		basic_machine=tic6x-unknown
+		os=-coff
+		;;
 	tx39)
 		basic_machine=mipstx39-unknown
 		;;
 	tx39el)
 		basic_machine=mipstx39el-unknown
 		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
 	tower | tower-32)
 		basic_machine=m68k-ncr
 		;;
+	tpf)
+		basic_machine=s390x-ibm
+		os=-tpf
+		;;
 	udi29k)
 		basic_machine=a29k-amd
 		os=-udi
@@ -859,8 +1050,8 @@
 		os=-vms
 		;;
 	vpp*|vx|vx-*)
-               basic_machine=f301-fujitsu
-               ;;
+		basic_machine=f301-fujitsu
+		;;
 	vxworks960)
 		basic_machine=i960-wrs
 		os=-vxworks
@@ -881,13 +1072,17 @@
 		basic_machine=hppa1.1-winbond
 		os=-proelf
 		;;
-	xmp)
-		basic_machine=xmp-cray
-		os=-unicos
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
 		;;
-        xps | xps100)
+	xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
 	z8k-*-coff)
 		basic_machine=z8k-unknown
 		os=-sim
@@ -908,16 +1103,12 @@
 	op60c)
 		basic_machine=hppa1.1-oki
 		;;
-	mips)
-		if [ x$os = x-linux-gnu ]; then
-			basic_machine=mips-unknown
-		else
-			basic_machine=mips-mips
-		fi
-		;;
 	romp)
 		basic_machine=romp-ibm
 		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
 	rs6000)
 		basic_machine=rs6000-ibm
 		;;
@@ -934,13 +1125,13 @@
 	we32k)
 		basic_machine=we32k-att
 		;;
-	sh3 | sh4)
+	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
 		basic_machine=sh-unknown
 		;;
-	sparc | sparcv9 | sparcv9b)
+	sparc | sparcv8 | sparcv9 | sparcv9b)
 		basic_machine=sparc-sun
 		;;
-        cydra)
+	cydra)
 		basic_machine=cydra-cydrome
 		;;
 	orion)
@@ -955,10 +1146,6 @@
 	pmac | pmac-mpw)
 		basic_machine=powerpc-apple
 		;;
-	c4x*)
-		basic_machine=c4x-none
-		os=-coff
-		;;
 	*-unknown)
 		# Make sure to match an already-canonicalized machine name.
 		;;
@@ -1014,15 +1201,23 @@
 	      | -aos* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
-	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+	      | -openbsd* | -solidbsd* \
+	      | -ekkobsd* | -kfreebsd* | -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* | -uxpv* | -beos* | -mpeix* | -udk* \
-	      | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
+	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+	      | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
+	      | -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* | -rdos*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1034,16 +1229,21 @@
 			;;
 		esac
 		;;
+	-nto-qnx*)
+		;;
 	-nto*)
-		os=-nto-qnx
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
 		;;
 	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
 	      | -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|'`
 		;;
@@ -1056,6 +1256,9 @@
 	-opened*)
 		os=-openedition
 		;;
+        -os400*)
+		os=-os400
+		;;
 	-wince*)
 		os=-wince
 		;;
@@ -1074,14 +1277,23 @@
 	-acis*)
 		os=-aos
 		;;
+	-atheos*)
+		os=-atheos
+		;;
+	-syllable*)
+		os=-syllable
+		;;
 	-386bsd)
 		os=-bsd
 		;;
 	-ctix* | -uts*)
 		os=-sysv
 		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
 	-ns2 )
-	        os=-nextstep2
+		os=-nextstep2
 		;;
 	-nsk*)
 		os=-nsk
@@ -1093,6 +1305,9 @@
 	-sinix*)
 		os=-sysv4
 		;;
+        -tpf*)
+		os=-tpf
+		;;
 	-triton*)
 		os=-sysv3
 		;;
@@ -1120,8 +1335,17 @@
 	-xenix)
 		os=-xenix
 		;;
-        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-	        os=-mint
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
+		;;
+	-aros*)
+		os=-aros
+		;;
+	-kaos*)
+		os=-kaos
+		;;
+	-zvmoe)
+		os=-zvmoe
 		;;
 	-none)
 		;;
@@ -1154,10 +1378,14 @@
 	arm*-semi)
 		os=-aout
 		;;
+    c4x-* | tic4x-*)
+        os=-coff
+        ;;
+	# This must come before the *-dec entry.
 	pdp10-*)
 		os=-tops20
 		;;
-        pdp11-*)
+	pdp11-*)
 		os=-none
 		;;
 	*-dec | vax-*)
@@ -1184,6 +1412,9 @@
 	mips*-*)
 		os=-elf
 		;;
+	or32-*)
+		os=-coff
+		;;
 	*-tti)	# must be before sparc entry or we get the wrong os.
 		os=-sysv3
 		;;
@@ -1193,9 +1424,15 @@
 	*-be)
 		os=-beos
 		;;
+	*-haiku)
+		os=-haiku
+		;;
 	*-ibm)
 		os=-aix
 		;;
+    	*-knuth)
+		os=-mmixware
+		;;
 	*-wec)
 		os=-proelf
 		;;
@@ -1247,19 +1484,19 @@
 	*-next)
 		os=-nextstep3
 		;;
-        *-gould)
+	*-gould)
 		os=-sysv
 		;;
-        *-highlevel)
+	*-highlevel)
 		os=-bsd
 		;;
 	*-encore)
 		os=-bsd
 		;;
-        *-sgi)
+	*-sgi)
 		os=-irix
 		;;
-        *-siemens)
+	*-siemens)
 		os=-sysv4
 		;;
 	*-masscomp)
@@ -1328,10 +1565,16 @@
 			-mvs* | -opened*)
 				vendor=ibm
 				;;
+			-os400*)
+				vendor=ibm
+				;;
 			-ptx*)
 				vendor=sequent
 				;;
-			-vxsim* | -vxworks*)
+			-tpf*)
+				vendor=ibm
+				;;
+			-vxsim* | -vxworks* | -windiss*)
 				vendor=wrs
 				;;
 			-aux*)
@@ -1346,13 +1589,16 @@
 			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
 				vendor=atari
 				;;
+			-vos*)
+				vendor=stratus
+				;;
 		esac
 		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
 		;;
 esac
 
 echo $basic_machine$os
-exit 0
+exit
 
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)
--- htdig-3.2.0b6.orig/libhtdigphp/config.guess
+++ htdig-3.2.0b6/libhtdigphp/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
-#   Free Software Foundation, Inc.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
-timestamp='2001-04-20'
+timestamp='2006-02-23'
 
 # 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,18 @@
 #
 # 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.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, 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.
 
-# Written by Per Bothner <[email protected]>.
-# Please send patches to <[email protected]>.
+
+# Originally written by Per Bothner <[email protected]>.
+# Please send patches to <[email protected]>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
 #
 # This script attempts to guess a canonical system name similar to
 # config.sub.  If it succeeds, it prints the system name on stdout, and
@@ -52,7 +55,7 @@
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -65,11 +68,11 @@
 while test $# -gt 0 ; do
   case $1 in
     --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit 0 ;;
+       echo "$timestamp" ; exit ;;
     --version | -v )
-       echo "$version" ; exit 0 ;;
+       echo "$version" ; exit ;;
     --help | --h* | -h )
-       echo "$usage"; exit 0 ;;
+       echo "$usage"; exit ;;
     -- )     # Stop option processing
        shift; break ;;
     - )	# Use stdin as input.
@@ -87,33 +90,45 @@
   exit 1
 fi
 
+trap 'exit 1' 1 2 15
 
-dummy=dummy-$$
-trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
 
-# CC_FOR_BUILD -- compiler used by this script.
 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
 # use `HOST_CC' if defined, but it is deprecated.
 
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
 case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int dummy(){}" > $dummy.c
-	for c in cc gcc c89 ; do
-	  ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1
-	  if test $? = 0 ; then
-	     CC_FOR_BUILD="$c"; break
-	  fi
-	done
-	rm -f $dummy.c $dummy.o $dummy.rel
+ ,,)    echo "int x;" > $dummy.c ;
+	for c in cc gcc c89 c99 ; do
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
 	if test x"$CC_FOR_BUILD" = x ; then
-	  CC_FOR_BUILD=no_compiler_found
+	  CC_FOR_BUILD=no_compiler_found ;
 	fi
 	;;
  ,,*)   CC_FOR_BUILD=$CC ;;
  ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac
+esac ; set_cc_for_build= ;'
 
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# ([email protected] 8/24/94.)
+# ([email protected] 1994-08-24)
 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
 	PATH=$PATH:/.attbin ; export PATH
 fi
@@ -127,29 +142,31 @@
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:NetBSD:*:*)
-	# Netbsd (nbsd) targets should (where applicable) match one or
+	# NetBSD (nbsd) targets should (where applicable) match one or
 	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
 	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
 	# switched to ELF, *-*-netbsd* would select the old
 	# object file format.  This provides both forward
 	# compatibility and a consistent mechanism for selecting the
 	# object file format.
-	# Determine the machine/vendor (is the vendor relevant).
-	case "${UNAME_MACHINE}" in
-	    amiga) machine=m68k-unknown ;;
-	    arm32) machine=arm-unknown ;;
-	    atari*) machine=m68k-atari ;;
-	    sun3*) machine=m68k-sun ;;
-	    mac68k) machine=m68k-apple ;;
-	    macppc) machine=powerpc-apple ;;
-	    hp3[0-9][05]) machine=m68k-hp ;;
-	    ibmrt|romp-ibm) machine=romp-ibm ;;
-	    *) machine=${UNAME_MACHINE}-unknown ;;
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
 	esac
 	# The Operating System including object format, if it has switched
 	# to ELF recently, or will in the future.
-	case "${UNAME_MACHINE}" in
-	    i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		eval $set_cc_for_build
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
 			| grep __ELF__ >/dev/null
 		then
@@ -165,116 +182,128 @@
 		;;
 	esac
 	# The OS release
-	release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case "${UNAME_VERSION}" in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		;;
+	esac
 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
 	echo "${machine}-${os}${release}"
-	exit 0 ;;
+	exit ;;
+    *: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 ;;
+    *:SolidBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	exit ;;
+    macppc:MirBSD:*:*)
+	echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
     alpha:OSF1:*:*)
-	if test $UNAME_RELEASE = "V4.0"; then
+	case $UNAME_RELEASE in
+	*4.0)
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-	fi
+		;;
+	*5.*)
+	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
+	# 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
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case "$ALPHA_CPU_TYPE" in
+	    "EV4 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE="alphaev5" ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE="alphaev56" ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE="alphapca56" ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE="alphapca57" ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE="alphaev6" ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE="alphaev67" ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE="alphaev69" ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE="alphaev7" ;;
+	    "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.
-	cat <<EOF >$dummy.s
-	.data
-\$Lformat:
-	.byte 37,100,45,37,120,10,0	# "%d-%x\n"
-
-	.text
-	.globl main
-	.align 4
-	.ent main
-main:
-	.frame \$30,16,\$26,0
-	ldgp \$29,0(\$27)
-	.prologue 1
-	.long 0x47e03d80 # implver \$0
-	lda \$2,-1
-	.long 0x47e20c21 # amask \$2,\$1
-	lda \$16,\$Lformat
-	mov \$0,\$17
-	not \$1,\$18
-	jsr \$26,printf
-	ldgp \$29,0(\$26)
-	mov 0,\$16
-	jsr \$26,exit
-	.end main
-EOF
-	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
-	if test "$?" = 0 ; then
-		case `./$dummy` in
-			0-0)
-				UNAME_MACHINE="alpha"
-				;;
-			1-0)
-				UNAME_MACHINE="alphaev5"
-				;;
-			1-1)
-				UNAME_MACHINE="alphaev56"
-				;;
-			1-101)
-				UNAME_MACHINE="alphapca56"
-				;;
-			2-303)
-				UNAME_MACHINE="alphaev6"
-				;;
-			2-307)
-				UNAME_MACHINE="alphaev67"
-				;;
-		esac
-	fi
-	rm -f $dummy.s $dummy
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit 0 ;;
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	exit ;;
     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 0 ;;
+	exit ;;
     21064:Windows_NT:50:3)
 	echo alpha-dec-winnt3.5
-	exit 0 ;;
+	exit ;;
     Amiga*:UNIX_System_V:4.0:*)
 	echo m68k-unknown-sysv4
-	exit 0;;
-    amiga:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:[Aa]miga[Oo][Ss]:*:*)
 	echo ${UNAME_MACHINE}-unknown-amigaos
-	exit 0 ;;
-    arc64:OpenBSD:*:*)
-	echo mips64el-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    arc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    hkmips:OpenBSD:*:*)
-	echo mips-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    pmax:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sgi:OpenBSD:*:*)
-	echo mips-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    wgrisc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit ;;
     *:OS/390:*:*)
 	echo i370-ibm-openedition
-	exit 0 ;;
+	exit ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+	exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit 0;;
+	exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+	echo arm-unknown-riscos
+	exit ;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
 	echo hppa1.1-hitachi-hiuxmpp
-	exit 0;;
+	exit ;;
     Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
 	# [email protected] (Earle F. Ake) contributed MIS and NILE.
 	if test "`(/bin/universe) 2>/dev/null`" = att ; then
@@ -282,25 +311,32 @@
 	else
 		echo pyramid-pyramid-bsd
 	fi
-	exit 0 ;;
+	exit ;;
     NILE*:*:*:dcosx)
 	echo pyramid-pyramid-svr4
-	exit 0 ;;
+	exit ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7; exit ;;
+	esac ;;
     sun4H:SunOS:5.*:*)
 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     i86pc:SunOS:5.*:*)
 	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     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 0 ;;
+	exit ;;
     sun4*:SunOS:*:*)
 	case "`/usr/bin/arch -k`" in
 	    Series*|S4*)
@@ -309,12 +345,12 @@
 	esac
 	# Japanese Language versions have a version number like `4.1.3-JL'.
 	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit 0 ;;
+	exit ;;
     sun3*:SunOS:*:*)
 	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     sun*:*:4.2BSD:*)
-	UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
 	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
 	case "`/bin/arch`" in
 	    sun3)
@@ -324,13 +360,10 @@
 		echo sparc-sun-sunos${UNAME_RELEASE}
 		;;
 	esac
-	exit 0 ;;
+	exit ;;
     aushp:SunOS:*:*)
 	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit 0 ;;
-    atari*:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     # 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
@@ -341,50 +374,42 @@
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
         echo m68k-atari-mint${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
 	echo m68k-atari-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
         echo m68k-atari-mint${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
         echo m68k-milan-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
         echo m68k-hades-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
         echo m68k-unknown-mint${UNAME_RELEASE}
-        exit 0 ;;
-    sun3*:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mac68k:OpenBSD:*:*)
-	echo m68k-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 ;;
+        exit ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit ;;
     powerpc:machten:*:*)
 	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     RISC*:Mach:*:*)
 	echo mips-dec-mach_bsd4.3
-	exit 0 ;;
+	exit ;;
     RISC*:ULTRIX:*:*)
 	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     VAX*:ULTRIX*:*:*)
 	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     2020:CLIX:*:* | 2430:CLIX:*:*)
 	echo clipper-intergraph-clix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
 #ifdef __cplusplus
 #include <stdio.h>  /* for printf() prototype */
@@ -406,27 +431,33 @@
 	  exit (-1);
 	}
 EOF
-	$CC_FOR_BUILD $dummy.c -o $dummy \
-	  && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-	  && rm -f $dummy.c $dummy && exit 0
-	rm -f $dummy.c $dummy
+	$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; }
 	echo mips-mips-riscos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     Motorola:PowerMAX_OS:*:*)
 	echo powerpc-motorola-powermax
-	exit 0 ;;
+	exit ;;
+    Motorola:*:4.3:PL8-*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	echo powerpc-harris-powermax
+	exit ;;
     Night_Hawk:Power_UNIX:*:*)
 	echo powerpc-harris-powerunix
-	exit 0 ;;
+	exit ;;
     m88k:CX/UX:7*:*)
 	echo m88k-harris-cxux7
-	exit 0 ;;
+	exit ;;
     m88k:*:4*:R4*)
 	echo m88k-motorola-sysv4
-	exit 0 ;;
+	exit ;;
     m88k:*:3*:R3*)
 	echo m88k-motorola-sysv3
-	exit 0 ;;
+	exit ;;
     AViiON:dgux:*:*)
         # DG/UX returns AViiON for all architectures
         UNAME_PROCESSOR=`/usr/bin/uname -p`
@@ -442,29 +473,29 @@
 	else
 	    echo i586-dg-dgux${UNAME_RELEASE}
 	fi
- 	exit 0 ;;
+ 	exit ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
 	echo m88k-dolphin-sysv3
-	exit 0 ;;
+	exit ;;
     M88*:*:R3*:*)
 	# Delta 88k system running SVR3
 	echo m88k-motorola-sysv3
-	exit 0 ;;
+	exit ;;
     XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
 	echo m88k-tektronix-sysv3
-	exit 0 ;;
+	exit ;;
     Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
 	echo m68k-tektronix-bsd
-	exit 0 ;;
+	exit ;;
     *:IRIX*:*:*)
 	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit 0 ;;
+	exit ;;
     ????????: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 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
     i*86:AIX:*:*)
 	echo i386-ibm-aix
-	exit 0 ;;
+	exit ;;
     ia64:AIX:*:*)
 	if [ -x /usr/bin/oslevel ] ; then
 		IBM_REV=`/usr/bin/oslevel`
@@ -472,9 +503,10 @@
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
 	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-	exit 0 ;;
+	exit ;;
     *:AIX:2:3)
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
 		sed 's/^		//' << EOF >$dummy.c
 		#include <sys/systemcfg.h>
 
@@ -486,17 +518,20 @@
 			exit(0);
 			}
 EOF
-		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
-		rm -f $dummy.c $dummy
-		echo rs6000-ibm-aix3.2.5
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		then
+			echo "$SYSTEM_NAME"
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
 	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 0 ;;
+	exit ;;
     *:AIX:*:[45])
-	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
+	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
 		IBM_ARCH=rs6000
 	else
@@ -508,38 +543,36 @@
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
 	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit 0 ;;
+	exit ;;
     *:AIX:*:*)
 	echo rs6000-ibm-aix
-	exit 0 ;;
+	exit ;;
     ibmrt:4.4BSD:*|romp-ibm:BSD:*)
 	echo romp-ibm-bsd4.4
-	exit 0 ;;
+	exit ;;
     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
 	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-	exit 0 ;;                           # report: romp-ibm BSD 4.3
+	exit ;;                             # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
 	echo rs6000-bull-bosx
-	exit 0 ;;
+	exit ;;
     DPX/2?00:B.O.S.:*:*)
 	echo m68k-bull-sysv3
-	exit 0 ;;
+	exit ;;
     9000/[34]??:4.3bsd:1.*:*)
 	echo m68k-hp-bsd
-	exit 0 ;;
+	exit ;;
     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
 	echo m68k-hp-bsd4.4
-	exit 0 ;;
+	exit ;;
     9000/[34678]??:HP-UX:*:*)
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 	case "${UNAME_MACHINE}" in
 	    9000/31? )            HP_ARCH=m68000 ;;
 	    9000/[34]?? )         HP_ARCH=m68k ;;
 	    9000/[678][0-9][0-9])
-              case "${HPUX_REV}" in
-                11.[0-9][0-9])
-                  if [ -x /usr/bin/getconf ]; then
-                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+		if [ -x /usr/bin/getconf ]; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
                     sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
                     case "${sc_cpu_version}" in
                       523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
@@ -548,12 +581,13 @@
                         case "${sc_kernel_bits}" in
                           32) HP_ARCH="hppa2.0n" ;;
                           64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
                         esac ;;
                     esac
-                  fi ;;
-              esac
-              if [ "${HP_ARCH}" = "" ]; then
-              sed 's/^              //' << EOF >$dummy.c
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^              //' << EOF >$dummy.c
 
               #define _HPUX_SOURCE
               #include <stdlib.h>
@@ -586,18 +620,39 @@
                   exit (0);
               }
 EOF
-	(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
-	if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
-	rm -f $dummy.c $dummy
-	fi ;;
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
 	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
+	    then
+		HP_ARCH="hppa2.0w"
+	    else
+		HP_ARCH="hppa64"
+	    fi
+	fi
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit 0 ;;
+	exit ;;
     ia64:HP-UX:*:*)
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 	echo ia64-hp-hpux${HPUX_REV}
-	exit 0 ;;
+	exit ;;
     3050*:HI-UX:*:*)
+	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
 	#include <unistd.h>
 	int
@@ -623,239 +678,246 @@
 	  exit (0);
 	}
 EOF
-	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
-	rm -f $dummy.c $dummy
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+		{ echo "$SYSTEM_NAME"; exit; }
 	echo unknown-hitachi-hiuxwe2
-	exit 0 ;;
+	exit ;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
 	echo hppa1.1-hp-bsd
-	exit 0 ;;
+	exit ;;
     9000/8??:4.3bsd:*:*)
 	echo hppa1.0-hp-bsd
-	exit 0 ;;
-    *9??*:MPE/iX:*:*)
+	exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
 	echo hppa1.0-hp-mpeix
-	exit 0 ;;
+	exit ;;
     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
 	echo hppa1.1-hp-osf
-	exit 0 ;;
+	exit ;;
     hp8??:OSF1:*:*)
 	echo hppa1.0-hp-osf
-	exit 0 ;;
+	exit ;;
     i*86:OSF1:*:*)
 	if [ -x /usr/sbin/sysversion ] ; then
 	    echo ${UNAME_MACHINE}-unknown-osf1mk
 	else
 	    echo ${UNAME_MACHINE}-unknown-osf1
 	fi
-	exit 0 ;;
+	exit ;;
     parisc*:Lites*:*:*)
 	echo hppa1.1-hp-lites
-	exit 0 ;;
-    hppa*:OpenBSD:*:*)
-	echo hppa-unknown-openbsd
-	exit 0 ;;
+	exit ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
 	echo c1-convex-bsd
-        exit 0 ;;
+        exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-        exit 0 ;;
+        exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
 	echo c34-convex-bsd
-        exit 0 ;;
+        exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
 	echo c38-convex-bsd
-        exit 0 ;;
+        exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
 	echo c4-convex-bsd
-        exit 0 ;;
-    CRAY*X-MP:*:*:*)
-	echo xmp-cray-unicos
-        exit 0 ;;
+        exit ;;
     CRAY*Y-MP:*:*:*)
-	echo ymp-cray-unicos${UNAME_RELEASE}
-	exit 0 ;;
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
     CRAY*[A-Z]90:*:*:*)
 	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
 	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
-	exit 0 ;;
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit ;;
     CRAY*TS:*:*:*)
 	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
-    CRAY*T3D:*:*:*)
-	echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*T3E:*:*:*)
 	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*SV1:*:*:*)
 	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
-    CRAY-2:*:*:*)
-	echo cray2-cray-unicos
-        exit 0 ;;
+	exit ;;
+    *:UNICOS/mp:*:*)
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
     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 0 ;;
-    hp300:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
+        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 ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     sparc*:BSD/OS:*:*)
 	echo sparc-unknown-bsdi${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:BSD/OS:*:*)
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:FreeBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-	exit 0 ;;
-    *:OpenBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-	exit 0 ;;
+	case ${UNAME_MACHINE} in
+	    pc98)
+		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    *)
+		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	esac
+	exit ;;
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
-	exit 0 ;;
+	exit ;;
     i*:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
-	exit 0 ;;
+	exit ;;
+    i*:MSYS_NT-*:*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit ;;
+    i*:windows32*:*)
+    	# uname -m includes "-pc" on this system.
+    	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
     i*:PW*:*)
 	echo ${UNAME_MACHINE}-pc-pw32
-	exit 0 ;;
+	exit ;;
+    x86:Interix*:[345]*)
+	echo i586-pc-interix${UNAME_RELEASE}
+	exit ;;
+    EM64T:Interix*:[345]*)
+	echo x86_64-unknown-interix${UNAME_RELEASE}
+	exit ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	exit ;;
     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 i386-pc-interix
-	exit 0 ;;
+	echo i586-pc-interix
+	exit ;;
     i*:UWIN*:*)
 	echo ${UNAME_MACHINE}-pc-uwin
-	exit 0 ;;
+	exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	echo x86_64-unknown-cygwin
+	exit ;;
     p*:CYGWIN*:*)
 	echo powerpcle-unknown-cygwin
-	exit 0 ;;
+	exit ;;
     prep*:SunOS:5.*:*)
 	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     *:GNU:*:*)
+	# the GNU system
 	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit 0 ;;
+	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 ;;
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
-	exit 0 ;;
+	exit ;;
     arm*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
+    cris:Linux:*:*)
+	echo cris-axis-linux-gnu
+	exit ;;
+    crisv32:Linux:*:*)
+	echo crisv32-axis-linux-gnu
+	exit ;;
+    frv:Linux:*:*)
+    	echo frv-unknown-linux-gnu
+	exit ;;
     ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux
-	exit 0 ;;
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
     m68*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     mips:Linux:*:*)
-	cat >$dummy.c <<EOF
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-int main (int argc, char *argv[]) {
-#else
-int main (argc, argv) int argc; char *argv[]; {
-#endif
-#ifdef __MIPSEB__
-  printf ("%s-unknown-linux-gnu\n", argv[1]);
-#endif
-#ifdef __MIPSEL__
-  printf ("%sel-unknown-linux-gnu\n", argv[1]);
-#endif
-  return 0;
-}
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips
+	#undef mipsel
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mipsel
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips
+	#else
+	CPU=
+	#endif
+	#endif
 EOF
-	$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
-	rm -f $dummy.c $dummy
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^CPU/{
+		s: ::g
+		p
+	    }'`"
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
 	;;
-    ppc:Linux:*:*)
-	# Determine Lib Version
-	cat >$dummy.c <<EOF
-#include <features.h>
-#if defined(__GLIBC__)
-extern char __libc_version[];
-extern char __libc_release[];
-#endif
-main(argc, argv)
-     int argc;
-     char *argv[];
-{
-#if defined(__GLIBC__)
-  printf("%s %s\n", __libc_version, __libc_release);
-#else
-  printf("unknown\n");
-#endif
-  return 0;
-}
+    mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips64
+	#undef mips64el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mips64el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips64
+	#else
+	CPU=
+	#endif
+	#endif
 EOF
-	LIBC=""
-	$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
-	if test "$?" = 0 ; then
-		./$dummy | grep 1\.99 > /dev/null
-		if test "$?" = 0 ; then LIBC="libc1" ; fi
-	fi
-	rm -f $dummy.c $dummy
-	echo powerpc-unknown-linux-gnu${LIBC}
-	exit 0 ;;
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^CPU/{
+		s: ::g
+		p
+	    }'`"
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	;;
+    or32:Linux:*:*)
+	echo or32-unknown-linux-gnu
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
+	exit ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
+	exit ;;
     alpha:Linux:*:*)
-	cat <<EOF >$dummy.s
-	  .data
-	  \$Lformat:
-		.byte 37,100,45,37,120,10,0	# "%d-%x\n"
-	   .text
-		.globl main
-		.align 4
-		.ent main
-	    main:
-		.frame \$30,16,\$26,0
-		ldgp \$29,0(\$27)
-		.prologue 1
-		.long 0x47e03d80 # implver \$0
-		lda \$2,-1
-		.long 0x47e20c21 # amask \$2,\$1
-		lda \$16,\$Lformat
-		mov \$0,\$17
-		not \$1,\$18
-		jsr \$26,printf
-		ldgp \$29,0(\$26)
-		mov 0,\$16
-		jsr \$26,exit
-		.end main
-EOF
-	LIBC=""
-	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
-	if test "$?" = 0 ; then
-		case `./$dummy` in
-		0-0)	UNAME_MACHINE="alpha" ;;
-		1-0)	UNAME_MACHINE="alphaev5" ;;
-		1-1)    UNAME_MACHINE="alphaev56" ;;
-		1-101)	UNAME_MACHINE="alphapca56" ;;
-		2-303)	UNAME_MACHINE="alphaev6" ;;
-		2-307)	UNAME_MACHINE="alphaev67" ;;
-		esac
-		objdump --private-headers $dummy | \
-		  grep ld.so.1 > /dev/null
-		if test "$?" = 0 ; then
-			LIBC="libc1"
-		fi
-	fi
-	rm -f $dummy.s $dummy
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+	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 0 ;;
+	exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
 	# Look for CPU level
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -863,93 +925,97 @@
 	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
 	  *)    echo hppa-unknown-linux-gnu ;;
 	esac
-	exit 0 ;;
+	exit ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
 	echo hppa64-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
 	echo ${UNAME_MACHINE}-ibm-linux
-	exit 0 ;;
+	exit ;;
+    sh64*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
     sh*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
+    vax:Linux:*:*)
+	echo ${UNAME_MACHINE}-dec-linux-gnu
+	exit ;;
     x86_64:Linux:*:*)
 	echo x86_64-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     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
 	# problems with other programs or directories called `ld' in the path.
-	ld_supported_emulations=`cd /; ld --help 2>&1 \
-			 | sed -ne '/supported emulations:/!d
+	# Set LC_ALL=C to ensure ld outputs messages in English.
+	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+			 | sed -ne '/supported targets:/!d
 				    s/[ 	][ 	]*/ /g
-				    s/.*supported emulations: *//
+				    s/.*supported targets: *//
 				    s/ .*//
 				    p'`
-        case "$ld_supported_emulations" in
-	  i*86linux)
-		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-		exit 0
-		;;
-	  elf_i*86)
+        case "$ld_supported_targets" in
+	  elf32-i386)
 		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
 		;;
-	  i*86coff)
+	  a.out-i386-linux)
+		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+		exit ;;
+	  coff-i386)
 		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-		exit 0
-		;;
-	esac
-	# Either a pre-BFD a.out linker (linux-gnuoldld)
-	# or one that does not give us useful --help.
-	# GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
-	# If ld does not provide *any* "supported emulations:"
-	# that means it is gnuoldld.
-	test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
-	case "${UNAME_MACHINE}" in
-	i*86)
-	  VENDOR=pc;
-	  ;;
-	*)
-	  VENDOR=unknown;
-	  ;;
+		exit ;;
+	  "")
+		# 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 ;;
 	esac
 	# Determine whether the default compiler is a.out or elf
-	cat >$dummy.c <<EOF
-#include <features.h>
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-	int main (int argc, char *argv[]) {
-#else
-	int main (argc, argv) int argc; char *argv[]; {
-#endif
-#ifdef __ELF__
-# ifdef __GLIBC__
-#  if __GLIBC__ >= 2
-    printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
-#  else
-    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
-#  endif
-# else
-   printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
-# endif
-#else
-  printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
-#endif
-  return 0;
-}
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <features.h>
+	#ifdef __ELF__
+	# ifdef __GLIBC__
+	#  if __GLIBC__ >= 2
+	LIBC=gnu
+	#  else
+	LIBC=gnulibc1
+	#  endif
+	# else
+	LIBC=gnulibc1
+	# endif
+	#else
+	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__sun)
+	LIBC=gnu
+	#else
+	LIBC=gnuaout
+	#endif
+	#endif
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
 EOF
-	$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
-	rm -f $dummy.c $dummy
-	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^LIBC/{
+		s: ::g
+		p
+	    }'`"
+	test x"${LIBC}" != x && {
+		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+		exit
+	}
+	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
 	;;
-# 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.
     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 0 ;;
+	exit ;;
     i*86:UNIX_SV:4.2MP:2.*)
         # Unixware is an offshoot of SVR4, but it has its own version
         # number series starting with 2...
@@ -957,7 +1023,27 @@
 	# I just have to hope.  -- rms.
         # Use sysv4.2uw... so that sysv4* matches it.
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-	exit 0 ;;
+	exit ;;
+    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 ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit ;;
+    i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit ;;
     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
@@ -965,100 +1051,100 @@
 	else
 		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
 	fi
-	exit 0 ;;
-    i*86:*:5:7*)
-        # Fixed at (any) Pentium or better
-        UNAME_MACHINE=i586
-        if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
-	    echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
-	else
-	    echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
-	fi
-	exit 0 ;;
+	exit ;;
+    i*86:*:5:[678]*)
+    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	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 ;;
     i*86:*:3.2:*)
 	if test -f /usr/options/cb.name; then
 		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
 		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
 	elif /bin/uname -X 2>/dev/null >/dev/null ; then
-		UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
-		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
-		(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
 			&& UNAME_MACHINE=i586
-		(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
 			&& UNAME_MACHINE=i686
-		(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
 			&& UNAME_MACHINE=i686
 		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
 	else
 		echo ${UNAME_MACHINE}-pc-sysv32
 	fi
-	exit 0 ;;
-    i*86:*DOS:*:*)
-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit 0 ;;
+	exit ;;
     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 0 ;;
+        exit ;;
     Intel:Mach:3*:*)
 	echo i386-pc-mach3
-	exit 0 ;;
+	exit ;;
     paragon:*:*:*)
 	echo i860-intel-osf1
-	exit 0 ;;
+	exit ;;
     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 0 ;;
+	exit ;;
     mini*:CTIX:SYS*5:*)
 	# "miniframe"
 	echo m68010-convergent-sysv
-	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 | 4850:*:4.0:3.0)
+	exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit ;;
+    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)
 	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 0
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && echo i486-ncr-sysv4 && exit 0 ;;
+          && { echo i486-ncr-sysv4; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
 	echo m68k-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     mc68030:UNIX_System_V:4.*:*)
 	echo m68k-atari-sysv4
-	exit 0 ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
-	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     TSUNAMI:LynxOS:2.*:*)
 	echo sparc-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     rs6000:LynxOS:2.*:*)
 	echo rs6000-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
 	echo powerpc-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     SM[BE]S:UNIX_SV:*:*)
 	echo mips-dde-sysv${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     RM*:ReliantUNIX-*:*:*)
 	echo mips-sni-sysv4
-	exit 0 ;;
+	exit ;;
     RM*:SINIX-*:*:*)
 	echo mips-sni-sysv4
-	exit 0 ;;
+	exit ;;
     *:SINIX-*:*:*)
 	if uname -p 2>/dev/null >/dev/null ; then
 		UNAME_MACHINE=`(uname -p) 2>/dev/null`
@@ -1066,78 +1152,98 @@
 	else
 		echo ns32k-sni-sysv
 	fi
-	exit 0 ;;
-    PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                           # says <[email protected]>
+	exit ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <[email protected]>
         echo i586-unisys-sysv4
-        exit 0 ;;
+        exit ;;
     *:UNIX_System_V:4*:FTX*)
 	# From Gerald Hewes <[email protected]>.
 	# How about differentiating between stratus architectures? -djm
 	echo hppa1.1-stratus-sysv4
-	exit 0 ;;
+	exit ;;
     *:*:*:FTX*)
 	# From [email protected].
 	echo i860-stratus-sysv4
-	exit 0 ;;
+	exit ;;
+    i*86:VOS:*:*)
+	# From [email protected].
+	echo ${UNAME_MACHINE}-stratus-vos
+	exit ;;
+    *:VOS:*:*)
+	# From [email protected].
+	echo hppa1.1-stratus-vos
+	exit ;;
     mc68*:A/UX:*:*)
 	echo m68k-apple-aux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     news*:NEWS-OS:6*:*)
 	echo mips-sony-newsos6
-	exit 0 ;;
+	exit ;;
     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 0 ;;
+        exit ;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
 	echo powerpc-be-beos
-	exit 0 ;;
+	exit ;;
     BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
 	echo powerpc-apple-beos
-	exit 0 ;;
+	exit ;;
     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
 	echo i586-pc-beos
-	exit 0 ;;
+	exit ;;
     SX-4:SUPER-UX:*:*)
 	echo sx4-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     SX-5:SUPER-UX:*:*)
 	echo sx5-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit ;;
     Power*:Rhapsody:*:*)
 	echo powerpc-apple-rhapsody${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:Rhapsody:*:*)
 	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:Darwin:*:*)
-	echo `uname -p`-apple-darwin${UNAME_RELEASE}
-	exit 0 ;;
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	case $UNAME_PROCESSOR in
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
-	if test "${UNAME_MACHINE}" = "x86pc"; then
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
 		UNAME_MACHINE=pc
 	fi
-	echo `uname -p`-${UNAME_MACHINE}-nto-qnx
-	exit 0 ;;
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit ;;
     *:QNX:*:4*)
 	echo i386-pc-qnx
-	exit 0 ;;
-    NSR-[KW]:NONSTOP_KERNEL:*:*)
+	exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
 	echo nsr-tandem-nsk${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:NonStop-UX:*:*)
 	echo mips-compaq-nonstopux
-	exit 0 ;;
+	exit ;;
     BS2000:POSIX*:*:*)
 	echo bs2000-siemens-sysv
-	exit 0 ;;
+	exit ;;
     DS/*:UNIX_System_V:*:*)
 	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:Plan9:*:*)
 	# "uname -m" is not consistent, so use $cputype instead. 386
 	# is converted to i386 for consistency with other x86
@@ -1148,35 +1254,53 @@
 	    UNAME_MACHINE="$cputype"
 	fi
 	echo ${UNAME_MACHINE}-unknown-plan9
-	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 0 ;;
+	exit ;;
     *:TOPS-10:*:*)
 	echo pdp10-unknown-tops10
-	exit 0 ;;
+	exit ;;
     *:TENEX:*:*)
 	echo pdp10-unknown-tenex
-	exit 0 ;;
+	exit ;;
     KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
 	echo pdp10-dec-tops20
-	exit 0 ;;
+	exit ;;
     XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
 	echo pdp10-xkl-tops20
-	exit 0 ;;
+	exit ;;
     *:TOPS-20:*:*)
 	echo pdp10-unknown-tops20
-	exit 0 ;;
+	exit ;;
     *:ITS:*:*)
 	echo pdp10-unknown-its
-	exit 0 ;;
+	exit ;;
+    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 ;;
+    i*86:rdos:*:*)
+	echo ${UNAME_MACHINE}-pc-rdos
+	exit ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
 
+eval $set_cc_for_build
 cat >$dummy.c <<EOF
 #ifdef _SEQUENT_
 # include <sys/types.h>
@@ -1202,7 +1326,7 @@
 #endif
 
 #if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix"); exit (0);
+  printf ("arm-acorn-riscix\n"); exit (0);
 #endif
 
 #if defined (hp300) && !defined (hpux)
@@ -1291,12 +1415,12 @@
 }
 EOF
 
-$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
-rm -f $dummy.c $dummy
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+	{ echo "$SYSTEM_NAME"; exit; }
 
 # Apollos put the system type in the environment.
 
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
 
 # Convex versions that predate uname can use getsysinfo(1)
 
@@ -1305,22 +1429,22 @@
     case `getsysinfo -f cpu_type` in
     c1*)
 	echo c1-convex-bsd
-	exit 0 ;;
+	exit ;;
     c2*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-	exit 0 ;;
+	exit ;;
     c34*)
 	echo c34-convex-bsd
-	exit 0 ;;
+	exit ;;
     c38*)
 	echo c38-convex-bsd
-	exit 0 ;;
+	exit ;;
     c4*)
 	echo c4-convex-bsd
-	exit 0 ;;
+	exit ;;
     esac
 fi
 
@@ -1331,7 +1455,9 @@
 the operating system you are using. It is advised that you
 download the most up to date version of the config scripts from
 
-    ftp://ftp.gnu.org/pub/gnu/config/
+  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
 
 If the version you run ($0) is already up to date, please
 send the following data and any information you think might be
--- htdig-3.2.0b6.orig/htdig/Server.cc
+++ htdig-3.2.0b6/htdig/Server.cc
@@ -341,6 +341,8 @@
     {
 	String	fullpatt = "^[^:]*://[^/]*(";
 	fullpatt << pattern << ')';
+	if (pattern.length() == 0)
+		fullpatt = "";
 	_disallow.set(fullpatt, config->Boolean("case_sensitive"));
     }
 }
--- htdig-3.2.0b6.orig/installdir/rundig
+++ htdig-3.2.0b6/installdir/rundig
@@ -7,17 +7,18 @@
 #
 # This is a sample script to create a search database for ht://Dig.
 #
-DBDIR=@DATABASE_DIR@
-COMMONDIR=@COMMON_DIR@
-BINDIR=@BIN_DIR@
-conffile=@DEFAULT_CONFIG_FILE@
+DBDIR=/var/lib/htdig
+COMMONDIR=/etc/htdig
+BINDIR=/usr/bin
+conffile=/etc/htdig/htdig.conf
 
 # To help debug problems, try running rundig -vvv
 # This will add lots of debugging output to all of the programs
-stats= opts= alt=
+stats= opts= alt= nohtnotify=
 while [ "$#" -gt 0 ]
 do
     case "$1" in
+    --no-htnotify) nohtnotify="true" ;;
     -a)  alt="$1" ;;
     -s)  stats="$1" ;;
     -c)  shift
@@ -65,7 +66,11 @@
     test -f db.words.db.work_weakcmpr &&
 	mv -f db.words.db.work_weakcmpr db.words.db_weakcmpr) ;;
 esac
-$BINDIR/htnotify $opts
+if [ "$nohtnotify" = "true" ]; then
+	echo "Skipping htnotify."
+else
+	$BINDIR/htnotify $opts
+fi
 # If you want to use the soundex and (or) metaphone fuzzy matchings,
 # Uncomment the following line
 # $BINDIR/htfuzzy $opts soundex metaphone
--- htdig-3.2.0b6.orig/ltmain.sh
+++ htdig-3.2.0b6/ltmain.sh
@@ -1,7 +1,7 @@
 # ltmain.sh - Provide generalized library-building support services.
 # NOTE: Changing this file will not affect anything until you rerun configure.
 #
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
 # Free Software Foundation, Inc.
 # Originally by Gordon Matzigkeit <[email protected]>, 1996
 #
@@ -17,7 +17,7 @@
 #
 # 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.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -43,9 +43,14 @@
 
 PROGRAM=ltmain.sh
 PACKAGE=libtool
-VERSION=1.5.6
-TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42) Debian$Rev: 203 $"
+VERSION="1.5.22 Debian 1.5.22-4"
+TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
 
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes.
+if test -n "${ZSH_VERSION+set}" ; then
+  setopt NO_GLOB_SUBST
+fi
 
 # Check that we have a working $echo.
 if test "X$1" = X--no-reexec; then
@@ -83,14 +88,15 @@
 Xsed="${SED}"' -e 1s/^X//'
 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
 # test EBCDIC or ASCII
-case `echo A|tr A '\301'` in
- A) # EBCDIC based system
-  SP2NL="tr '\100' '\n'"
-  NL2SP="tr '\r\n' '\100\100'"
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+  SP2NL='tr \040 \012'
+  NL2SP='tr \015\012 \040\040'
   ;;
- *) # Assume ASCII based system
-  SP2NL="tr '\040' '\012'"
-  NL2SP="tr '\015\012' '\040\040'"
+ *) # EBCDIC based system
+  SP2NL='tr \100 \n'
+  NL2SP='tr \r\n \100\100'
   ;;
 esac
 
@@ -107,8 +113,9 @@
 fi
 
 # Make sure IFS has a sensible default
-: ${IFS=" 	
-"}
+lt_nl='
+'
+IFS=" 	$lt_nl"
 
 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
   $echo "$modename: not configured to build any kind of library" 1>&2
@@ -125,6 +132,8 @@
 show="$echo"
 show_help=
 execute_dlfiles=
+duplicate_deps=no
+preserve_args=
 lo2o="s/\\.lo\$/.${objext}/"
 o2lo="s/\\.${objext}\$/.lo/"
 
@@ -132,13 +141,51 @@
 # Shell function definitions:
 # This seems to be the best place for them
 
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible.  If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+    my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+    if test "$run" = ":"; then
+      # Return a directory name, but don't create it in dry-run mode
+      my_tmpdir="${my_template}-$$"
+    else
+
+      # If mktemp works, use that first and foremost
+      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+      if test ! -d "$my_tmpdir"; then
+	# Failing that, at least try and use $RANDOM to avoid a race
+	my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+	save_mktempdir_umask=`umask`
+	umask 0077
+	$mkdir "$my_tmpdir"
+	umask $save_mktempdir_umask
+      fi
+
+      # If we're not in dry-run mode, bomb out on failure
+      test -d "$my_tmpdir" || {
+        $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
+	exit $EXIT_FAILURE
+      }
+    fi
+
+    $echo "X$my_tmpdir" | $Xsed
+}
+
+
 # func_win32_libid arg
 # return the library type of file 'arg'
 #
 # Need a lot of goo to handle *both* DLLs and import libs
 # Has to be a shell function in order to 'eat' the argument
 # that is supplied when $file_magic_command is called.
-func_win32_libid () {
+func_win32_libid ()
+{
   win32_libid_type="unknown"
   win32_fileres=`file -L $1 2>/dev/null`
   case $win32_fileres in
@@ -149,12 +196,11 @@
     if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
       $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
       win32_nmres=`eval $NM -f posix -A $1 | \
-	sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
-      if test "X$win32_nmres" = "Ximport" ; then
-        win32_libid_type="x86 archive import"
-      else
-        win32_libid_type="x86 archive static"
-      fi
+	$SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
+      case $win32_nmres in
+      import*)  win32_libid_type="x86 archive import";;
+      *)        win32_libid_type="x86 archive static";;
+      esac
     fi
     ;;
   *DLL*)
@@ -178,7 +224,8 @@
 # Only attempt this if the compiler in the base compile
 # command doesn't match the default compiler.
 # arg is usually of the form 'gcc ...'
-func_infer_tag () {
+func_infer_tag ()
+{
     if test -n "$available_tags" && test -z "$tagname"; then
       CC_quoted=
       for arg in $CC; do
@@ -235,12 +282,116 @@
       esac
     fi
 }
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+    f_ex_an_ar_dir="$1"; shift
+    f_ex_an_ar_oldlib="$1"
+
+    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
+    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
+    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+     :
+    else
+      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
+      exit $EXIT_FAILURE
+    fi
+}
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+    my_gentop="$1"; shift
+    my_oldlibs=${1+"$@"}
+    my_oldobjs=""
+    my_xlib=""
+    my_xabs=""
+    my_xdir=""
+    my_status=""
+
+    $show "${rm}r $my_gentop"
+    $run ${rm}r "$my_gentop"
+    $show "$mkdir $my_gentop"
+    $run $mkdir "$my_gentop"
+    my_status=$?
+    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
+      exit $my_status
+    fi
+
+    for my_xlib in $my_oldlibs; do
+      # Extract the objects.
+      case $my_xlib in
+	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+	*) my_xabs=`pwd`"/$my_xlib" ;;
+      esac
+      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
+      my_xdir="$my_gentop/$my_xlib"
+
+      $show "${rm}r $my_xdir"
+      $run ${rm}r "$my_xdir"
+      $show "$mkdir $my_xdir"
+      $run $mkdir "$my_xdir"
+      exit_status=$?
+      if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
+	exit $exit_status
+      fi
+      case $host in
+      *-darwin*)
+	$show "Extracting $my_xabs"
+	# Do not bother doing anything if just a dry run
+	if test -z "$run"; then
+	  darwin_orig_dir=`pwd`
+	  cd $my_xdir || exit $?
+	  darwin_archive=$my_xabs
+	  darwin_curdir=`pwd`
+	  darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
+	  darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
+	  if test -n "$darwin_arches"; then 
+	    darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
+	    darwin_arch=
+	    $show "$darwin_base_archive has multiple architectures $darwin_arches"
+	    for darwin_arch in  $darwin_arches ; do
+	      mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+	      cd "$darwin_curdir"
+	      $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+	    done # $darwin_arches
+      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
+	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
+	    darwin_file=
+	    darwin_files=
+	    for darwin_file in $darwin_filelist; do
+	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+	      lipo -create -output "$darwin_file" $darwin_files
+	    done # $darwin_filelist
+	    ${rm}r unfat-$$
+	    cd "$darwin_orig_dir"
+	  else
+	    cd "$darwin_orig_dir"
+ 	    func_extract_an_archive "$my_xdir" "$my_xabs"
+	  fi # $darwin_arches
+	fi # $run
+	;;
+      *)
+        func_extract_an_archive "$my_xdir" "$my_xabs"
+        ;;
+      esac
+      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+    done
+    func_extract_archives_result="$my_oldobjs"
+}
 # End of Shell function definitions
 #####################################
 
 # Darwin sucks
 eval std_shrext=\"$shrext_cmds\"
 
+disable_libs=no
+
 # Parse our command line options once, thoroughly.
 while test "$#" -gt 0
 do
@@ -305,10 +456,10 @@
   --version)
     $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
     $echo
-    $echo "Copyright (C) 2003  Free Software Foundation, Inc."
+    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
     $echo "This is free software; see the source for copying conditions.  There is NO"
     $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-    exit $EXIT_SUCCESS
+    exit $?
     ;;
 
   --config)
@@ -317,7 +468,7 @@
     for tagname in $taglist; do
       ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
     done
-    exit $EXIT_SUCCESS
+    exit $?
     ;;
 
   --debug)
@@ -342,7 +493,7 @@
     else
       $echo "disable static libraries"
     fi
-    exit $EXIT_SUCCESS
+    exit $?
     ;;
 
   --finish) mode="finish" ;;
@@ -357,7 +508,11 @@
     preserve_args="$preserve_args $arg"
     ;;
 
-  --tag) prevopt="--tag" prev=tag ;;
+  --tag)
+    prevopt="--tag"
+    prev=tag
+    preserve_args="$preserve_args --tag"
+    ;;
   --tag=*)
     set tag "$optarg" ${1+"$@"}
     shift
@@ -389,6 +544,18 @@
   exit $EXIT_FAILURE
 fi
 
+case $disable_libs in
+no) 
+  ;;
+shared)
+  build_libtool_libs=no
+  build_old_libs=yes
+  ;;
+static)
+  build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+  ;;
+esac
+
 # If this variable is set in any of the actions, the command in it
 # will be execed at the end.  This prevents here-documents from being
 # left over by shells.
@@ -399,7 +566,7 @@
   # Infer the operation mode.
   if test -z "$mode"; then
     $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
-    $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
+    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
     case $nonopt in
     *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
       mode=link
@@ -465,7 +632,7 @@
 
     for arg
     do
-      case "$arg_mode" in
+      case $arg_mode in
       arg  )
 	# do not "continue".  Instead, add this to base_compile
 	lastarg="$arg"
@@ -547,7 +714,10 @@
       case $lastarg in
       # Double-quote args containing other shell metacharacters.
       # Many Bourne shells cannot handle close brackets correctly
-      # in scan sets, so we specify it separately.
+      # in scan sets, and some SunOS ksh mistreat backslash-escaping
+      # in scan sets (worked around with variable expansion),
+      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
+      # at all, so we specify them separately.
       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
 	lastarg="\"$lastarg\""
 	;;
@@ -621,6 +791,14 @@
       esac
     done
 
+    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
+    case $qlibobj in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	qlibobj="\"$qlibobj\"" ;;
+    esac
+    test "X$libobj" != "X$qlibobj" \
+	&& $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' 	&()|`$[]' \
+	&& $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
     objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
     xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
     if test "X$xdir" = "X$obj"; then
@@ -693,12 +871,17 @@
 	$run $rm $removelist
 	exit $EXIT_FAILURE
       fi
-      $echo $srcfile > "$lockfile"
+      $echo "$srcfile" > "$lockfile"
     fi
 
     if test -n "$fix_srcfile_path"; then
       eval srcfile=\"$fix_srcfile_path\"
     fi
+    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
+    case $qsrcfile in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+      qsrcfile="\"$qsrcfile\"" ;;
+    esac
 
     $run $rm "$libobj" "${libobj}T"
 
@@ -720,18 +903,18 @@
       fbsd_hideous_sh_bug=$base_compile
 
       if test "$pic_mode" != no; then
-	command="$base_compile $srcfile $pic_flag"
+	command="$base_compile $qsrcfile $pic_flag"
       else
 	# Don't build PIC code
-	command="$base_compile $srcfile"
+	command="$base_compile $qsrcfile"
       fi
 
       if test ! -d "${xdir}$objdir"; then
 	$show "$mkdir ${xdir}$objdir"
 	$run $mkdir ${xdir}$objdir
-	status=$?
-	if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
-	  exit $status
+	exit_status=$?
+	if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
+	  exit $exit_status
 	fi
       fi
 
@@ -803,9 +986,9 @@
     if test "$build_old_libs" = yes; then
       if test "$pic_mode" != yes; then
 	# Don't build PIC code
-	command="$base_compile $srcfile"
+	command="$base_compile $qsrcfile"
       else
-	command="$base_compile $srcfile $pic_flag"
+	command="$base_compile $qsrcfile $pic_flag"
       fi
       if test "$compiler_c_o" = yes; then
 	command="$command -o $obj"
@@ -934,6 +1117,7 @@
     no_install=no
     objs=
     non_pic_objects=
+    notinst_path= # paths that contain not-installed libtool libraries
     precious_files_regex=
     prefer_static_libs=no
     preload=no
@@ -962,14 +1146,15 @@
 	  if test -n "$link_static_flag"; then
 	    dlopen_self=$dlopen_self_static
 	  fi
+	  prefer_static_libs=yes
 	else
 	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
 	    dlopen_self=$dlopen_self_static
 	  fi
+	  prefer_static_libs=built
 	fi
 	build_libtool_libs=no
 	build_old_libs=yes
-	prefer_static_libs=yes
 	break
 	;;
       esac
@@ -1144,6 +1329,11 @@
 		  if test -z "$pic_object" || test "$pic_object" = none ; then
 		    arg="$non_pic_object"
 		  fi
+		else
+		  # If the PIC object exists, use it instead.
+		  # $xdir was prepended to $pic_object above.
+		  non_pic_object="$pic_object"
+		  non_pic_objects="$non_pic_objects $non_pic_object"
 		fi
 	      else
 		# Only an error if not doing a dry-run.
@@ -1227,6 +1417,13 @@
 	  prev=
 	  continue
 	  ;;
+	darwin_framework|darwin_framework_skip)
+	  test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
+	  compile_command="$compile_command $arg"
+	  finalize_command="$finalize_command $arg"
+	  prev=
+	  continue
+	  ;;
 	*)
 	  eval "$prev=\"\$arg\""
 	  prev=
@@ -1285,6 +1482,18 @@
 	continue
 	;;
 
+      -framework|-arch|-isysroot)
+	case " $CC " in
+	  *" ${arg} ${1} "* | *" ${arg}	${1} "*) 
+		prev=darwin_framework_skip ;;
+	  *) compiler_flags="$compiler_flags $arg"
+	     prev=darwin_framework ;;
+	esac
+	compile_command="$compile_command $arg"
+	finalize_command="$finalize_command $arg"
+	continue
+	;;
+
       -inst-prefix-dir)
 	prev=inst_prefix
 	continue
@@ -1311,7 +1520,8 @@
 	  absdir=`cd "$dir" && pwd`
 	  if test -z "$absdir"; then
 	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
-	    exit $EXIT_FAILURE
+	    absdir="$dir"
+	    notinst_path="$notinst_path $dir"
 	  fi
 	  dir="$absdir"
 	  ;;
@@ -1325,10 +1535,15 @@
 	esac
 	case $host in
 	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
 	  case :$dllsearchpath: in
 	  *":$dir:"*) ;;
 	  *) dllsearchpath="$dllsearchpath:$dir";;
 	  esac
+	  case :$dllsearchpath: in
+	  *":$testbindir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$testbindir";;
+	  esac
 	  ;;
 	esac
 	continue
@@ -1337,15 +1552,15 @@
       -l*)
 	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
 	  case $host in
-	  *-*-cygwin* | *-*-pw32* | *-*-beos*)
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
 	    # These systems don't actually have a C or math library (as such)
 	    continue
 	    ;;
-	  *-*-mingw* | *-*-os2*)
+	  *-*-os2*)
 	    # These systems don't actually have a C library (as such)
 	    test "X$arg" = "X-lc" && continue
 	    ;;
-	  *-*-openbsd* | *-*-freebsd*)
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	    # Do not include libc due to us having libc/libc_r.
 	    test "X$arg" = "X-lc" && continue
 	    ;;
@@ -1353,10 +1568,19 @@
 	    # Rhapsody C and math libraries are in the System framework
 	    deplibs="$deplibs -framework System"
 	    continue
+	    ;;
+	  *-*-sco3.2v5* | *-*-sco5v6*)
+	    # Causes problems with __ctype
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+	    # Compiler inserts libc in the correct place for threads to work
+	    test "X$arg" = "X-lc" && continue
+	    ;;
 	  esac
 	elif test "X$arg" = "X-lc_r"; then
 	 case $host in
-	 *-*-openbsd* | *-*-freebsd*)
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	   # Do not include libc_r directly, use -pthread flag.
 	   continue
 	   ;;
@@ -1366,8 +1590,20 @@
 	continue
 	;;
 
+      # Tru64 UNIX uses -model [arg] to determine the layout of C++
+      # classes, name mangling, and exception handling.
+      -model)
+	compile_command="$compile_command $arg"
+	compiler_flags="$compiler_flags $arg"
+	finalize_command="$finalize_command $arg"
+	prev=xcompiler
+	continue
+	;;
+
      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
-	deplibs="$deplibs $arg"
+	compiler_flags="$compiler_flags $arg"
+	compile_command="$compile_command $arg"
+	finalize_command="$finalize_command $arg"
 	continue
 	;;
 
@@ -1376,13 +1612,19 @@
 	continue
 	;;
 
-      # gcc -m* arguments should be passed to the linker via $compiler_flags
-      # in order to pass architecture information to the linker
-      # (e.g. 32 vs 64-bit).  This may also be accomplished via -Wl,-mfoo
-      # but this is not reliable with gcc because gcc may use -mfoo to
-      # select a different linker, different libraries, etc, while
-      # -Wl,-mfoo simply passes -mfoo to the linker.
-      -m*)
+      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+      # -r[0-9][0-9]* specifies the processor on the SGI compiler
+      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+      # +DA*, +DD* enable 64-bit mode on the HP compiler
+      # -q* pass through compiler args for the IBM compiler
+      # -m* pass through architecture-specific compiler args for GCC
+      # -m*, -t[45]*, -txscale* pass through architecture-specific
+      # compiler args for GCC
+      # -pg pass through profiling flag for GCC
+      # @file GCC response files
+      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
+      -t[45]*|-txscale*|@*)
+
 	# Unknown arguments in both finalize_command and compile_command need
 	# to be aesthetically quoted because they are evaled later.
 	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
@@ -1393,9 +1635,7 @@
 	esac
         compile_command="$compile_command $arg"
         finalize_command="$finalize_command $arg"
-        if test "$with_gcc" = "yes" ; then
-          compiler_flags="$compiler_flags $arg"
-        fi
+        compiler_flags="$compiler_flags $arg"
         continue
         ;;
 
@@ -1633,6 +1873,11 @@
 	    if test -z "$pic_object" || test "$pic_object" = none ; then
 	      arg="$non_pic_object"
 	    fi
+	  else
+	    # If the PIC object exists, use it instead.
+	    # $xdir was prepended to $pic_object above.
+	    non_pic_object="$pic_object"
+	    non_pic_objects="$non_pic_objects $non_pic_object"
 	  fi
 	else
 	  # Only an error if not doing a dry-run.
@@ -1738,9 +1983,9 @@
     if test ! -d "$output_objdir"; then
       $show "$mkdir $output_objdir"
       $run $mkdir $output_objdir
-      status=$?
-      if test "$status" -ne 0 && test ! -d "$output_objdir"; then
-	exit $status
+      exit_status=$?
+      if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
+	exit $exit_status
       fi
     fi
 
@@ -1803,7 +2048,6 @@
     newlib_search_path=
     need_relink=no # whether we're linking any uninstalled libtool libraries
     notinst_deplibs= # not-installed libtool libraries
-    notinst_path= # paths that contain not-installed libtool libraries
     case $linkmode in
     lib)
 	passes="conv link"
@@ -1858,7 +2102,7 @@
 	    compile_deplibs="$deplib $compile_deplibs"
 	    finalize_deplibs="$deplib $finalize_deplibs"
 	  else
-	    deplibs="$deplib $deplibs"
+	    compiler_flags="$compiler_flags $deplib"
 	  fi
 	  continue
 	  ;;
@@ -1867,10 +2111,6 @@
 	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
 	    continue
 	  fi
-	  if test "$pass" = conv; then
-	    deplibs="$deplib $deplibs"
-	    continue
-	  fi
 	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
 	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
 	    for search_ext in .la $std_shrext .so .a; do
@@ -1981,7 +2221,22 @@
 	  fi
 	  case $linkmode in
 	  lib)
-	    if test "$deplibs_check_method" != pass_all; then
+	    valid_a_lib=no
+	    case $deplibs_check_method in
+	      match_pattern*)
+		set dummy $deplibs_check_method
+	        match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+		if eval $echo \"$deplib\" 2>/dev/null \
+		    | $SED 10q \
+		    | $EGREP "$match_pattern_regex" > /dev/null; then
+		  valid_a_lib=yes
+		fi
+		;;
+	      pass_all)
+		valid_a_lib=yes
+		;;
+            esac
+	    if test "$valid_a_lib" != yes; then
 	      $echo
 	      $echo "*** Warning: Trying to link with static lib archive $deplib."
 	      $echo "*** I have the capability to make that library automatically link in when"
@@ -2031,7 +2286,7 @@
 	esac # case $deplib
 	if test "$found" = yes || test -f "$lib"; then :
 	else
-	  $echo "$modename: cannot find the library \`$lib'" 1>&2
+	  $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
 	  exit $EXIT_FAILURE
 	fi
 
@@ -2055,6 +2310,8 @@
 	# it will not redefine variables installed, or shouldnotlink
 	installed=yes
 	shouldnotlink=no
+	avoidtemprpath=
+
 
 	# Read the .la file
 	case $lib in
@@ -2153,11 +2410,19 @@
 	    dir="$libdir"
 	    absdir="$libdir"
 	  fi
+	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
 	else
-	  dir="$ladir/$objdir"
-	  absdir="$abs_ladir/$objdir"
-	  # Remove this search path later
-	  notinst_path="$notinst_path $abs_ladir"
+	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    # Remove this search path later
+	    notinst_path="$notinst_path $abs_ladir"
+	  else
+	    dir="$ladir/$objdir"
+	    absdir="$abs_ladir/$objdir"
+	    # Remove this search path later
+	    notinst_path="$notinst_path $abs_ladir"
+	  fi
 	fi # $installed = yes
 	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
 
@@ -2230,12 +2495,12 @@
 	  if test -n "$library_names" &&
 	     { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
 	    # We need to hardcode the library path
-	    if test -n "$shlibpath_var"; then
+	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
 	      # Make sure the rpath contains only unique directories.
 	      case "$temp_rpath " in
 	      *" $dir "*) ;;
 	      *" $absdir "*) ;;
-	      *) temp_rpath="$temp_rpath $dir" ;;
+	      *) temp_rpath="$temp_rpath $absdir" ;;
 	      esac
 	    fi
 
@@ -2272,8 +2537,12 @@
 	fi
 
 	link_static=no # Whether the deplib will be linked statically
+	use_static_libs=$prefer_static_libs
+	if test "$use_static_libs" = built && test "$installed" = yes ; then
+	  use_static_libs=no
+	fi
 	if test -n "$library_names" &&
-	   { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
 	  if test "$installed" = no; then
 	    notinst_deplibs="$notinst_deplibs $lib"
 	    need_relink=yes
@@ -2386,11 +2655,15 @@
 	      if test "$hardcode_direct" = no; then
 		add="$dir/$linklib"
 		case $host in
-		  *-*-sco3.2v5* ) add_dir="-L$dir" ;;
+		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+		    *-*-unixware7*) add_dir="-L$dir" ;;
 		  *-*-darwin* )
 		    # if the lib is a module then we can not link against
 		    # it, someone is ignoring the new warnings I added
-		    if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
+		    if /usr/bin/file -L $add 2> /dev/null |
+                      $EGREP ": [^:]* bundle" >/dev/null ; then
 		      $echo "** Warning, lib $linklib is a module, not a shared library"
 		      if test -z "$old_library" ; then
 		        $echo
@@ -2421,7 +2694,7 @@
 		add_dir="-L$dir"
 		# Try looking first in the location we're being installed to.
 		if test -n "$inst_prefix_dir"; then
-		  case "$libdir" in
+		  case $libdir in
 		    [\\/]*)
 		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
 		      ;;
@@ -2494,7 +2767,7 @@
 	      add_dir="-L$libdir"
 	      # Try looking first in the location we're being installed to.
 	      if test -n "$inst_prefix_dir"; then
-		case "$libdir" in
+		case $libdir in
 		  [\\/]*)
 		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
 		    ;;
@@ -2555,8 +2828,6 @@
 	      fi
 	    fi
 	  else
-	    convenience="$convenience $dir/$old_library"
-	    old_convenience="$old_convenience $dir/$old_library"
 	    deplibs="$dir/$old_library $deplibs"
 	    link_static=yes
 	  fi
@@ -2674,12 +2945,12 @@
 	      *) continue ;;
 	      esac
 	      case " $deplibs " in
-	      *" $depdepl "*) ;;
-	      *) deplibs="$depdepl $deplibs" ;;
+	      *" $path "*) ;;
+	      *) deplibs="$path $deplibs" ;;
 	      esac
 	      case " $deplibs " in
-	      *" $path "*) ;;
-	      *) deplibs="$deplibs $path" ;;
+	      *" $depdepl "*) ;;
+	      *) deplibs="$depdepl $deplibs" ;;
 	      esac
 	    done
 	  fi # link_all_deplibs != no
@@ -2933,6 +3204,11 @@
 	    age="$number_minor"
 	    revision="$number_minor"
 	    ;;
+	  *)
+	    $echo "$modename: unknown library version type \`$version_type'" 1>&2
+	    $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+	    exit $EXIT_FAILURE
+	    ;;
 	  esac
 	  ;;
 	no)
@@ -2944,27 +3220,27 @@
 
 	# Check that each of the things are valid numbers.
 	case $current in
-	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
 	*)
-	  $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
+	  $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
 	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
 	  exit $EXIT_FAILURE
 	  ;;
 	esac
 
 	case $revision in
-	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
 	*)
-	  $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
+	  $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
 	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
 	  exit $EXIT_FAILURE
 	  ;;
 	esac
 
 	case $age in
-	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
 	*)
-	  $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
+	  $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
 	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
 	  exit $EXIT_FAILURE
 	  ;;
@@ -2990,7 +3266,7 @@
 	  versuffix="$major.$age.$revision"
 	  # Darwin ld doesn't like 0 for these options...
 	  minor_current=`expr $current + 1`
-	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+	  verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
 	  ;;
 
 	freebsd-aout)
@@ -3143,9 +3419,9 @@
 
       # Eliminate all temporary directories.
       for path in $notinst_path; do
-	lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
-	deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
-	dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
+	lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
+	deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
+	dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
       done
 
       if test -n "$xrpath"; then
@@ -3196,9 +3472,14 @@
 	  *-*-netbsd*)
 	    # Don't link with libc until the a.out ld.so is fixed.
 	    ;;
-	  *-*-openbsd* | *-*-freebsd*)
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	    # Do not include libc due to us having libc/libc_r.
-	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-sco3.2v5* | *-*-sco5v6*)
+	    # Causes problems with __ctype
+	    ;;
+	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+	    # Compiler inserts libc in the correct place for threads to work
 	    ;;
  	  *)
 	    # Add libc to deplibs on all other systems if necessary.
@@ -3242,11 +3523,11 @@
 	  int main() { return 0; }
 EOF
 	  $rm conftest
-	  $LTCC -o conftest conftest.c $deplibs
+	  $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
 	  if test "$?" -eq 0 ; then
 	    ldd_output=`ldd conftest`
 	    for i in $deplibs; do
-	      name="`expr $i : '-l\(.*\)'`"
+	      name=`expr $i : '-l\(.*\)'`
 	      # If $name is empty we are operating on a -L argument.
               if test "$name" != "" && test "$name" -ne "0"; then
 		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
@@ -3283,11 +3564,11 @@
 	    # Error occurred in the first compile.  Let's try to salvage
 	    # the situation: Compile a separate program for each library.
 	    for i in $deplibs; do
-	      name="`expr $i : '-l\(.*\)'`"
+	      name=`expr $i : '-l\(.*\)'`
 	      # If $name is empty we are operating on a -L argument.
               if test "$name" != "" && test "$name" != "0"; then
 		$rm conftest
-		$LTCC -o conftest conftest.c $i
+		$LTCC $LTCFLAGS -o conftest conftest.c $i
 		# Did it work?
 		if test "$?" -eq 0 ; then
 		  ldd_output=`ldd conftest`
@@ -3335,7 +3616,7 @@
 	  set dummy $deplibs_check_method
 	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
 	  for a_deplib in $deplibs; do
-	    name="`expr $a_deplib : '-l\(.*\)'`"
+	    name=`expr $a_deplib : '-l\(.*\)'`
 	    # If $name is empty we are operating on a -L argument.
             if test "$name" != "" && test  "$name" != "0"; then
 	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
@@ -3404,7 +3685,7 @@
 	  set dummy $deplibs_check_method
 	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
 	  for a_deplib in $deplibs; do
-	    name="`expr $a_deplib : '-l\(.*\)'`"
+	    name=`expr $a_deplib : '-l\(.*\)'`
 	    # If $name is empty we are operating on a -L argument.
 	    if test -n "$name" && test "$name" != "0"; then
 	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
@@ -3534,6 +3815,35 @@
 	deplibs=$newdeplibs
       fi
 
+
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+	case " $new_libs " in
+	*" -L$path/$objdir "*) ;;
+	*)
+	  case " $deplibs " in
+	  *" -L$path/$objdir "*)
+	    new_libs="$new_libs -L$path/$objdir" ;;
+	  esac
+	  ;;
+	esac
+      done
+      for deplib in $deplibs; do
+	case $deplib in
+	-L*)
+	  case " $new_libs " in
+	  *" $deplib "*) ;;
+	  *) new_libs="$new_libs $deplib" ;;
+	  esac
+	  ;;
+	*) new_libs="$new_libs $deplib" ;;
+	esac
+      done
+      deplibs="$new_libs"
+
+
       # All the library-specific variables (install_libdir is set above).
       library_names=
       old_library=
@@ -3617,6 +3927,7 @@
 	fi
 
 	lib="$output_objdir/$realname"
+	linknames=
 	for link
 	do
 	  linknames="$linknames $link"
@@ -3645,6 +3956,9 @@
 	        # The command line is too long to execute in one step.
 	        $show "using reloadable object file for export list..."
 	        skipped_export=:
+		# Break out early, otherwise skipped_export may be
+		# set to false by a later but shorter cmd.
+		break
 	      fi
 	    done
 	    IFS="$save_ifs"
@@ -3678,67 +3992,13 @@
 	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
 	  else
 	    gentop="$output_objdir/${outputname}x"
-	    $show "${rm}r $gentop"
-	    $run ${rm}r "$gentop"
-	    $show "$mkdir $gentop"
-	    $run $mkdir "$gentop"
-	    status=$?
-	    if test "$status" -ne 0 && test ! -d "$gentop"; then
-	      exit $status
-	    fi
 	    generated="$generated $gentop"
 
-	    for xlib in $convenience; do
-	      # Extract the objects.
-	      case $xlib in
-	      [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
-	      *) xabs=`pwd`"/$xlib" ;;
-	      esac
-	      xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
-	      xdir="$gentop/$xlib"
-
-	      $show "${rm}r $xdir"
-	      $run ${rm}r "$xdir"
-	      $show "$mkdir $xdir"
-	      $run $mkdir "$xdir"
-	      status=$?
-	      if test "$status" -ne 0 && test ! -d "$xdir"; then
-		exit $status
-	      fi
-	      # We will extract separately just the conflicting names and we will no
-	      # longer touch any unique names. It is faster to leave these extract
-	      # automatically by $AR in one run.
-	      $show "(cd $xdir && $AR x $xabs)"
-	      $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-	      if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
-		:
-	      else
-		$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
-		$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
-		$AR t "$xabs" | sort | uniq -cd | while read -r count name
-		do
-		  i=1
-		  while test "$i" -le "$count"
-		  do
-		   # Put our $i before any first dot (extension)
-		   # Never overwrite any file
-		   name_to="$name"
-		   while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
-		   do
-		     name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
-		   done
-		   $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
-		   $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
-		   i=`expr $i + 1`
-		  done
-		done
-	      fi
-
-	      libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
-	    done
+	    func_extract_archives $gentop $convenience
+	    libobjs="$libobjs $func_extract_archives_result"
 	  fi
 	fi
-
+	
 	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
 	  eval flag=\"$thread_safe_flag_spec\"
 	  linker_flags="$linker_flags $flag"
@@ -3768,7 +4028,8 @@
 	  fi
 	fi
 
-	if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
+	if test "X$skipped_export" != "X:" &&
+	   len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
 	   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
 	  :
 	else
@@ -3787,6 +4048,7 @@
 	    save_libobjs=$libobjs
 	  fi
 	  save_output=$output
+	  output_la=`$echo "X$output" | $Xsed -e "$basename"`
 
 	  # Clear the reloadable object creation command queue and
 	  # initialize k to one.
@@ -3796,13 +4058,13 @@
 	  delfiles=
 	  last_robj=
 	  k=1
-	  output=$output_objdir/$save_output-${k}.$objext
+	  output=$output_objdir/$output_la-${k}.$objext
 	  # Loop over the list of objects to be linked.
 	  for obj in $save_libobjs
 	  do
 	    eval test_cmds=\"$reload_cmds $objlist $last_robj\"
 	    if test "X$objlist" = X ||
-	       { len=`expr "X$test_cmds" : ".*"` &&
+	       { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
 		 test "$len" -le "$max_cmd_len"; }; then
 	      objlist="$objlist $obj"
 	    else
@@ -3816,9 +4078,9 @@
 		# the last one created.
 		eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
 	      fi
-	      last_robj=$output_objdir/$save_output-${k}.$objext
+	      last_robj=$output_objdir/$output_la-${k}.$objext
 	      k=`expr $k + 1`
-	      output=$output_objdir/$save_output-${k}.$objext
+	      output=$output_objdir/$output_la-${k}.$objext
 	      objlist=$obj
 	      len=1
 	    fi
@@ -3838,13 +4100,13 @@
 	    eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
           fi
 
-	  # Set up a command to remove the reloadale object files
+	  # Set up a command to remove the reloadable object files
 	  # after they are used.
 	  i=0
 	  while test "$i" -lt "$k"
 	  do
 	    i=`expr $i + 1`
-	    delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
+	    delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
 	  done
 
 	  $echo "creating a temporary reloadable object file: $output"
@@ -3892,13 +4154,30 @@
 	  IFS="$save_ifs"
 	  eval cmd=\"$cmd\"
 	  $show "$cmd"
-	  $run eval "$cmd" || exit $?
+	  $run eval "$cmd" || {
+	    lt_exit=$?
+
+	    # Restore the uninstalled library and exit
+	    if test "$mode" = relink; then
+	      $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
+	    fi
+
+	    exit $lt_exit
+	  }
 	done
 	IFS="$save_ifs"
 
 	# Restore the uninstalled library and exit
 	if test "$mode" = relink; then
 	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
+
+	  if test -n "$convenience"; then
+	    if test -z "$whole_archive_flag_spec"; then
+	      $show "${rm}r $gentop"
+	      $run ${rm}r "$gentop"
+	    fi
+	  fi
+
 	  exit $EXIT_SUCCESS
 	fi
 
@@ -3976,64 +4255,10 @@
 	  eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
 	else
 	  gentop="$output_objdir/${obj}x"
-	  $show "${rm}r $gentop"
-	  $run ${rm}r "$gentop"
-	  $show "$mkdir $gentop"
-	  $run $mkdir "$gentop"
-	  status=$?
-	  if test "$status" -ne 0 && test ! -d "$gentop"; then
-	    exit $status
-	  fi
 	  generated="$generated $gentop"
 
-	  for xlib in $convenience; do
-	    # Extract the objects.
-	    case $xlib in
-	    [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
-	    *) xabs=`pwd`"/$xlib" ;;
-	    esac
-	    xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
-	    xdir="$gentop/$xlib"
-
-	    $show "${rm}r $xdir"
-	    $run ${rm}r "$xdir"
-	    $show "$mkdir $xdir"
-	    $run $mkdir "$xdir"
-	    status=$?
-	    if test "$status" -ne 0 && test ! -d "$xdir"; then
-	      exit $status
-	    fi
-	    # We will extract separately just the conflicting names and we will no
-	    # longer touch any unique names. It is faster to leave these extract
-	    # automatically by $AR in one run.
-	    $show "(cd $xdir && $AR x $xabs)"
-	    $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-	    if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
-	      :
-	    else
-	      $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
-	      $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
-	      $AR t "$xabs" | sort | uniq -cd | while read -r count name
-	      do
-		i=1
-		while test "$i" -le "$count"
-		do
-		 # Put our $i before any first dot (extension)
-		 # Never overwrite any file
-		 name_to="$name"
-		 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
-		 do
-		   name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
-		 done
-		 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
-		 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
-		 i=`expr $i + 1`
-		done
-	      done
-	    fi
-
-	    reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
-	  done
+	  func_extract_archives $gentop $convenience
+	  reload_conv_objs="$reload_objs $func_extract_archives_result"
 	fi
       fi
 
@@ -4134,6 +4359,35 @@
         ;;
       esac
 
+
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+	case " $new_libs " in
+	*" -L$path/$objdir "*) ;;
+	*)
+	  case " $compile_deplibs " in
+	  *" -L$path/$objdir "*)
+	    new_libs="$new_libs -L$path/$objdir" ;;
+	  esac
+	  ;;
+	esac
+      done
+      for deplib in $compile_deplibs; do
+	case $deplib in
+	-L*)
+	  case " $new_libs " in
+	  *" $deplib "*) ;;
+	  *) new_libs="$new_libs $deplib" ;;
+	  esac
+	  ;;
+	*) new_libs="$new_libs $deplib" ;;
+	esac
+      done
+      compile_deplibs="$new_libs"
+
+
       compile_command="$compile_command $compile_deplibs"
       finalize_command="$finalize_command $finalize_deplibs"
 
@@ -4178,10 +4432,15 @@
 	fi
 	case $host in
 	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
 	  case :$dllsearchpath: in
 	  *":$libdir:"*) ;;
 	  *) dllsearchpath="$dllsearchpath:$libdir";;
 	  esac
+	  case :$dllsearchpath: in
+	  *":$testbindir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$testbindir";;
+	  esac
 	  ;;
 	esac
       done
@@ -4295,13 +4554,25 @@
 
 	    # Prepare the list of exported symbols
 	    if test -z "$export_symbols"; then
-	      export_symbols="$output_objdir/$output.exp"
+	      export_symbols="$output_objdir/$outputname.exp"
 	      $run $rm $export_symbols
-	      $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+	      $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+              case $host in
+              *cygwin* | *mingw* )
+	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+		$run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+                ;;
+              esac
 	    else
-	      $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
-	      $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
+	      $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+	      $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
 	      $run eval 'mv "$nlist"T "$nlist"'
+              case $host in
+              *cygwin* | *mingw* )
+	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+		$run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+                ;;
+              esac
 	    fi
 	  fi
 
@@ -4352,7 +4623,26 @@
 #endif
 
 /* The mapping between symbol names and symbols. */
+"
+
+	    case $host in
+	    *cygwin* | *mingw* )
+	  $echo >> "$output_objdir/$dlsyms" "\
+/* DATA imports from DLLs on WIN32 can't be const, because
+   runtime relocations are performed -- see ld's documentation
+   on pseudo-relocs */
+struct {
+"
+	      ;;
+	    * )
+	  $echo >> "$output_objdir/$dlsyms" "\
 const struct {
+"
+	      ;;
+	    esac
+
+
+	  $echo >> "$output_objdir/$dlsyms" "\
   const char *name;
   lt_ptr address;
 }
@@ -4399,16 +4689,29 @@
 	  esac
 
 	  # Now compile the dynamic symbol file.
-	  $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
-	  $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+	  $show "(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+	  $run eval '(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
 
 	  # Clean up the generated files.
 	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
 	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
 
 	  # Transform the symbol file into the correct name.
-	  compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
-	  finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+          case $host in
+          *cygwin* | *mingw* )
+            if test -f "$output_objdir/${outputname}.def" ; then
+              compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
+              finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
+            else
+              compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+              finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+             fi
+            ;;
+          * )
+            compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+            finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+            ;;
+          esac
 	  ;;
 	*)
 	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
@@ -4433,7 +4736,7 @@
 	# We have no uninstalled library dependencies, so finalize right now.
 	$show "$link_command"
 	$run eval "$link_command"
-	status=$?
+	exit_status=$?
 
 	# Delete the generated files.
 	if test -n "$dlsyms"; then
@@ -4441,7 +4744,7 @@
 	  $run $rm "$output_objdir/${outputname}S.${objext}"
 	fi
 
-	exit $status
+	exit $exit_status
       fi
 
       if test -n "$shlibpath_var"; then
@@ -4581,10 +4884,12 @@
 	esac
 	case $host in
 	  *cygwin* | *mingw* )
-	    cwrappersource=`$echo ${objdir}/lt-${output}.c`
-	    cwrapper=`$echo ${output}.exe`
-	    $rm $cwrappersource $cwrapper
-	    trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+            output_name=`basename $output`
+            output_path=`dirname $output`
+            cwrappersource="$output_path/$objdir/lt-$output_name.c"
+            cwrapper="$output_path/$output_name.exe"
+            $rm $cwrappersource $cwrapper
+            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
 
 	    cat > $cwrappersource <<EOF
 
@@ -4609,6 +4914,9 @@
 #include <malloc.h>
 #include <stdarg.h>
 #include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <sys/stat.h>
 
 #if defined(PATH_MAX)
 # define LT_PATHMAX PATH_MAX
@@ -4619,15 +4927,19 @@
 #endif
 
 #ifndef DIR_SEPARATOR
-#define DIR_SEPARATOR '/'
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
 #endif
 
 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
   defined (__OS2__)
-#define HAVE_DOS_BASED_FILE_SYSTEM
-#ifndef DIR_SEPARATOR_2
-#define DIR_SEPARATOR_2 '\\'
-#endif
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# ifndef DIR_SEPARATOR_2
+#  define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+#  define PATH_SEPARATOR_2 ';'
+# endif
 #endif
 
 #ifndef DIR_SEPARATOR_2
@@ -4637,17 +4949,32 @@
         (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
 #endif /* DIR_SEPARATOR_2 */
 
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
 #define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
 #define XFREE(stale) do { \
   if (stale) { free ((void *) stale); stale = 0; } \
 } while (0)
 
+/* -DDEBUG is fairly common in CFLAGS.  */
+#undef DEBUG
+#if defined DEBUGWRAPPER
+# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
+#else
+# define DEBUG(format, ...)
+#endif
+
 const char *program_name = NULL;
 
 void * xmalloc (size_t num);
 char * xstrdup (const char *string);
-char * basename (const char *name);
-char * fnqualify(const char *path);
+const char * base_name (const char *name);
+char * find_executable(const char *wrapper);
+int    check_executable(const char *path);
 char * strendzap(char *str, const char *pat);
 void lt_fatal (const char *message, ...);
 
@@ -4657,29 +4984,51 @@
   char **newargz;
   int i;
 
-  program_name = (char *) xstrdup ((char *) basename (argv[0]));
+  program_name = (char *) xstrdup (base_name (argv[0]));
+  DEBUG("(main) argv[0]      : %s\n",argv[0]);
+  DEBUG("(main) program_name : %s\n",program_name);
   newargz = XMALLOC(char *, argc+2);
 EOF
 
-	    cat >> $cwrappersource <<EOF
-  newargz[0] = "$SHELL";
+            cat >> $cwrappersource <<EOF
+  newargz[0] = (char *) xstrdup("$SHELL");
 EOF
 
-	    cat >> $cwrappersource <<"EOF"
-  newargz[1] = fnqualify(argv[0]);
+            cat >> $cwrappersource <<"EOF"
+  newargz[1] = find_executable(argv[0]);
+  if (newargz[1] == NULL)
+    lt_fatal("Couldn't find %s", argv[0]);
+  DEBUG("(main) found exe at : %s\n",newargz[1]);
   /* we know the script has the same name, without the .exe */
   /* so make sure newargz[1] doesn't end in .exe */
   strendzap(newargz[1],".exe");
   for (i = 1; i < argc; i++)
     newargz[i+1] = xstrdup(argv[i]);
   newargz[argc+1] = NULL;
+
+  for (i=0; i<argc+1; i++)
+  {
+    DEBUG("(main) newargz[%d]   : %s\n",i,newargz[i]);
+    ;
+  }
+
 EOF
 
-	    cat >> $cwrappersource <<EOF
+            case $host_os in
+              mingw*)
+                cat >> $cwrappersource <<EOF
+  execv("$SHELL",(char const **)newargz);
+EOF
+              ;;
+              *)
+                cat >> $cwrappersource <<EOF
   execv("$SHELL",newargz);
 EOF
+              ;;
+            esac
 
-	    cat >> $cwrappersource <<"EOF"
+            cat >> $cwrappersource <<"EOF"
+  return 127;
 }
 
 void *
@@ -4699,48 +5048,148 @@
 ;
 }
 
-char *
-basename (const char *name)
+const char *
+base_name (const char *name)
 {
   const char *base;
 
 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
   /* Skip over the disk name in MSDOS pathnames. */
-  if (isalpha (name[0]) && name[1] == ':')
+  if (isalpha ((unsigned char)name[0]) && name[1] == ':')
     name += 2;
 #endif
 
   for (base = name; *name; name++)
     if (IS_DIR_SEPARATOR (*name))
       base = name + 1;
-  return (char *) base;
+  return base;
+}
+
+int
+check_executable(const char * path)
+{
+  struct stat st;
+
+  DEBUG("(check_executable)  : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
+  if ((!path) || (!*path))
+    return 0;
+
+  if ((stat (path, &st) >= 0) &&
+      (
+        /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
+#if defined (S_IXOTH)
+       ((st.st_mode & S_IXOTH) == S_IXOTH) ||
+#endif
+#if defined (S_IXGRP)
+       ((st.st_mode & S_IXGRP) == S_IXGRP) ||
+#endif
+       ((st.st_mode & S_IXUSR) == S_IXUSR))
+      )
+    return 1;
+  else
+    return 0;
 }
 
+/* Searches for the full path of the wrapper.  Returns
+   newly allocated full path name if found, NULL otherwise */
 char *
-fnqualify(const char *path)
+find_executable (const char* wrapper)
 {
-  size_t size;
-  char *p;
+  int has_slash = 0;
+  const char* p;
+  const char* p_next;
+  /* static buffer for getcwd */
   char tmp[LT_PATHMAX + 1];
+  int tmp_len;
+  char* concat_name;
+
+  DEBUG("(find_executable)  : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
 
-  assert(path != NULL);
+  if ((wrapper == NULL) || (*wrapper == '\0'))
+    return NULL;
 
-  /* Is it qualified already? */
+  /* Absolute path? */
 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-  if (isalpha (path[0]) && path[1] == ':')
-    return xstrdup (path);
+  if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
+  {
+    concat_name = xstrdup (wrapper);
+    if (check_executable(concat_name))
+      return concat_name;
+    XFREE(concat_name);
+  }
+  else
+  {
+#endif
+    if (IS_DIR_SEPARATOR (wrapper[0]))
+    {
+      concat_name = xstrdup (wrapper);
+      if (check_executable(concat_name))
+        return concat_name;
+      XFREE(concat_name);
+    }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  }
 #endif
-  if (IS_DIR_SEPARATOR (path[0]))
-    return xstrdup (path);
 
-  /* prepend the current directory */
-  /* doesn't handle '~' */
+  for (p = wrapper; *p; p++)
+    if (*p == '/')
+    {
+      has_slash = 1;
+      break;
+    }
+  if (!has_slash)
+  {
+    /* no slashes; search PATH */
+    const char* path = getenv ("PATH");
+    if (path != NULL)
+    {
+      for (p = path; *p; p = p_next)
+      {
+        const char* q;
+        size_t p_len;
+        for (q = p; *q; q++)
+          if (IS_PATH_SEPARATOR(*q))
+            break;
+        p_len = q - p;
+        p_next = (*q == '\0' ? q : q + 1);
+        if (p_len == 0)
+        {
+          /* empty path: current directory */
+          if (getcwd (tmp, LT_PATHMAX) == NULL)
+            lt_fatal ("getcwd failed");
+          tmp_len = strlen(tmp);
+          concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
+          memcpy (concat_name, tmp, tmp_len);
+          concat_name[tmp_len] = '/';
+          strcpy (concat_name + tmp_len + 1, wrapper);
+        }
+        else
+        {
+          concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
+          memcpy (concat_name, p, p_len);
+          concat_name[p_len] = '/';
+          strcpy (concat_name + p_len + 1, wrapper);
+        }
+        if (check_executable(concat_name))
+          return concat_name;
+        XFREE(concat_name);
+      }
+    }
+    /* not found in PATH; assume curdir */
+  }
+  /* Relative path | not found in path: prepend cwd */
   if (getcwd (tmp, LT_PATHMAX) == NULL)
     lt_fatal ("getcwd failed");
-  size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
-  p = XMALLOC(char, size);
-  sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
-  return p;
+  tmp_len = strlen(tmp);
+  concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
+  memcpy (concat_name, tmp, tmp_len);
+  concat_name[tmp_len] = '/';
+  strcpy (concat_name + tmp_len + 1, wrapper);
+
+  if (check_executable(concat_name))
+    return concat_name;
+  XFREE(concat_name);
+  return NULL;
 }
 
 char *
@@ -4784,16 +5233,16 @@
   va_end (ap);
 }
 EOF
-	  # we should really use a build-platform specific compiler
-	  # here, but OTOH, the wrappers (shell script and this C one)
-	  # are only useful if you want to execute the "real" binary.
-	  # Since the "real" binary is built for $host, then this
-	  # wrapper might as well be built for $host, too.
-	  $run $LTCC -s -o $cwrapper $cwrappersource
-	  ;;
-	esac
-	$rm $output
-	trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
+          # we should really use a build-platform specific compiler
+          # here, but OTOH, the wrappers (shell script and this C one)
+          # are only useful if you want to execute the "real" binary.
+          # Since the "real" binary is built for $host, then this
+          # wrapper might as well be built for $host, too.
+          $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
+          ;;
+        esac
+        $rm $output
+        trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
 
 	$echo > $output "\
 #! $SHELL
@@ -4814,7 +5263,7 @@
 
 # The HP-UX ksh and POSIX shell print the target directory to stdout
 # if CDPATH is set.
-if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 relink_command=\"$relink_command\"
 
@@ -4943,13 +5392,13 @@
 	# Backslashes separate directories on plain windows
 	*-*-mingw | *-*-os2*)
 	  $echo >> $output "\
-      exec \$progdir\\\\\$program \${1+\"\$@\"}
+      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
 "
 	  ;;
 
 	*)
 	  $echo >> $output "\
-      exec \$progdir/\$program \${1+\"\$@\"}
+      exec \"\$progdir/\$program\" \${1+\"\$@\"}
 "
 	  ;;
 	esac
@@ -4959,7 +5408,7 @@
     fi
   else
     # The program doesn't exist.
-    \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
+    \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
     \$echo \"This script is just a wrapper for \$program.\" 1>&2
     $echo \"See the $PACKAGE documentation for more information.\" 1>&2
     exit $EXIT_FAILURE
@@ -4991,71 +5440,73 @@
 
       if test -n "$addlibs"; then
 	gentop="$output_objdir/${outputname}x"
-	$show "${rm}r $gentop"
-	$run ${rm}r "$gentop"
-	$show "$mkdir $gentop"
-	$run $mkdir "$gentop"
-	status=$?
-	if test "$status" -ne 0 && test ! -d "$gentop"; then
-	  exit $status
-	fi
 	generated="$generated $gentop"
 
-	# Add in members from convenience archives.
-	for xlib in $addlibs; do
-	  # Extract the objects.
-	  case $xlib in
-	  [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
-	  *) xabs=`pwd`"/$xlib" ;;
-	  esac
-	  xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
-	  xdir="$gentop/$xlib"
-
-	  $show "${rm}r $xdir"
-	  $run ${rm}r "$xdir"
-	  $show "$mkdir $xdir"
-	  $run $mkdir "$xdir"
-	  status=$?
-	  if test "$status" -ne 0 && test ! -d "$xdir"; then
-	    exit $status
-	  fi
-	  # We will extract separately just the conflicting names and we will no
-	  # longer touch any unique names. It is faster to leave these extract
-	  # automatically by $AR in one run.
-	  $show "(cd $xdir && $AR x $xabs)"
-	  $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-	  if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
-	    :
-	  else
-	    $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
-	    $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
-	    $AR t "$xabs" | sort | uniq -cd | while read -r count name
-	    do
-	      i=1
-	      while test "$i" -le "$count"
-	      do
-	       # Put our $i before any first dot (extension)
-	       # Never overwrite any file
-	       name_to="$name"
-	       while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
-	       do
-		 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
-	       done
-	       $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
-	       $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
-	       i=`expr $i + 1`
-	      done
-	    done
-	  fi
-
-	  oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
-	done
+	func_extract_archives $gentop $addlibs
+	oldobjs="$oldobjs $func_extract_archives_result"
       fi
 
       # Do each command in the archive commands.
       if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
        cmds=$old_archive_from_new_cmds
       else
+	# POSIX demands no paths to be encoded in archives.  We have
+	# to avoid creating archives with duplicate basenames if we
+	# might have to extract them afterwards, e.g., when creating a
+	# static archive out of a convenience library, or when linking
+	# the entirety of a libtool archive into another (currently
+	# not supported by libtool).
+	if (for obj in $oldobjs
+	    do
+	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
+	    done | sort | sort -uc >/dev/null 2>&1); then
+	  :
+	else
+	  $echo "copying selected object files to avoid basename conflicts..."
+
+	  if test -z "$gentop"; then
+	    gentop="$output_objdir/${outputname}x"
+	    generated="$generated $gentop"
+
+	    $show "${rm}r $gentop"
+	    $run ${rm}r "$gentop"
+	    $show "$mkdir $gentop"
+	    $run $mkdir "$gentop"
+	    exit_status=$?
+	    if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
+	      exit $exit_status
+	    fi
+	  fi
+
+	  save_oldobjs=$oldobjs
+	  oldobjs=
+	  counter=1
+	  for obj in $save_oldobjs
+	  do
+	    objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+	    case " $oldobjs " in
+	    " ") oldobjs=$obj ;;
+	    *[\ /]"$objbase "*)
+	      while :; do
+		# Make sure we don't pick an alternate name that also
+		# overlaps.
+		newobj=lt$counter-$objbase
+		counter=`expr $counter + 1`
+		case " $oldobjs " in
+		*[\ /]"$newobj "*) ;;
+		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
+		esac
+	      done
+	      $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+	      $run ln "$obj" "$gentop/$newobj" ||
+	      $run cp "$obj" "$gentop/$newobj"
+	      oldobjs="$oldobjs $gentop/$newobj"
+	      ;;
+	    *) oldobjs="$oldobjs $obj" ;;
+	    esac
+	  done
+	fi
+
 	eval cmds=\"$old_archive_cmds\"
 
 	if len=`expr "X$cmds" : ".*"` &&
@@ -5069,20 +5520,7 @@
 	  objlist=
 	  concat_cmds=
 	  save_oldobjs=$oldobjs
-	  # GNU ar 2.10+ was changed to match POSIX; thus no paths are
-	  # encoded into archives.  This makes 'ar r' malfunction in
-	  # this piecewise linking case whenever conflicting object
-	  # names appear in distinct ar calls; check, warn and compensate.
-	    if (for obj in $save_oldobjs
-	    do
-	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
-	    done | sort | sort -uc >/dev/null 2>&1); then
-	    :
-	  else
-	    $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
-	    $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
-	    AR_FLAGS=cq
-	  fi
+
 	  # Is there a better way of finding the last object in the list?
 	  for obj in $save_oldobjs
 	  do
@@ -5093,7 +5531,7 @@
 	    oldobjs="$objlist $obj"
 	    objlist="$objlist $obj"
 	    eval test_cmds=\"$old_archive_cmds\"
-	    if len=`expr "X$test_cmds" : ".*"` &&
+	    if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
 	       test "$len" -le "$max_cmd_len"; then
 	      :
 	    else
@@ -5290,11 +5728,11 @@
     # install_prog (especially on Windows NT).
     if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
        # Allow the use of GNU shtool's install command.
-       $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
+       $echo "X$nonopt" | grep shtool > /dev/null; then
       # Aesthetically quote it.
       arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
       case $arg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
 	arg="\"$arg\""
 	;;
       esac
@@ -5303,14 +5741,14 @@
       shift
     else
       install_prog=
-      arg="$nonopt"
+      arg=$nonopt
     fi
 
     # The real first argument should be the name of the installation program.
     # Aesthetically quote it.
     arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
     case $arg in
-    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
       arg="\"$arg\""
       ;;
     esac
@@ -5328,28 +5766,31 @@
     do
       if test -n "$dest"; then
 	files="$files $dest"
-	dest="$arg"
+	dest=$arg
 	continue
       fi
 
       case $arg in
       -d) isdir=yes ;;
-      -f) prev="-f" ;;
-      -g) prev="-g" ;;
-      -m) prev="-m" ;;
-      -o) prev="-o" ;;
+      -f) 
+      	case " $install_prog " in
+	*[\\\ /]cp\ *) ;;
+	*) prev=$arg ;;
+	esac
+	;;
+      -g | -m | -o) prev=$arg ;;
       -s)
 	stripme=" -s"
 	continue
 	;;
-      -*) ;;
-
+      -*)
+	;;
       *)
 	# If the previous option needed an argument, then skip it.
 	if test -n "$prev"; then
 	  prev=
 	else
-	  dest="$arg"
+	  dest=$arg
 	  continue
 	fi
 	;;
@@ -5358,7 +5799,7 @@
       # Aesthetically quote the argument.
       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
       case $arg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
 	arg="\"$arg\""
 	;;
       esac
@@ -5527,11 +5968,14 @@
 
 	  if test "$#" -gt 0; then
 	    # Delete the old symlinks, and create new ones.
+	    # Try `ln -sf' first, because the `ln' binary might depend on
+	    # the symlink we replace!  Solaris /bin/ln does not understand -f,
+	    # so we also need to try rm && ln -s.
 	    for linkname
 	    do
 	      if test "$linkname" != "$realname"; then
-		$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
-		$run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+                $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
+                $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
 	      fi
 	    done
 	  fi
@@ -5544,7 +5988,16 @@
 	    IFS="$save_ifs"
 	    eval cmd=\"$cmd\"
 	    $show "$cmd"
-	    $run eval "$cmd" || exit $?
+	    $run eval "$cmd" || {
+	      lt_exit=$?
+
+	      # Restore the uninstalled library and exit
+	      if test "$mode" = relink; then
+		$run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
+	      fi
+
+	      exit $lt_exit
+	    }
 	  done
 	  IFS="$save_ifs"
 	fi
@@ -5638,17 +6091,15 @@
 	  notinst_deplibs=
 	  relink_command=
 
-	  # To insure that "foo" is sourced, and not "foo.exe",
-	  # finese the cygwin/MSYS system by explicitly sourcing "foo."
-	  # which disallows the automatic-append-.exe behavior.
-	  case $build in
-	  *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
-	  *) wrapperdot=${wrapper} ;;
-	  esac
+	  # Note that it is not necessary on cygwin/mingw to append a dot to
+	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
+	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
+	  # `FILE.' does not work on cygwin managed mounts.
+	  #
 	  # If there is no directory component, then add one.
-	  case $file in
-	  */* | *\\*) . ${wrapperdot} ;;
-	  *) . ./${wrapperdot} ;;
+	  case $wrapper in
+	  */* | *\\*) . ${wrapper} ;;
+	  *) . ./${wrapper} ;;
 	  esac
 
 	  # Check the variables that should have been set.
@@ -5676,34 +6127,21 @@
 	  done
 
 	  relink_command=
-	  # To insure that "foo" is sourced, and not "foo.exe",
-	  # finese the cygwin/MSYS system by explicitly sourcing "foo."
-	  # which disallows the automatic-append-.exe behavior.
-	  case $build in
-	  *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
-	  *) wrapperdot=${wrapper} ;;
-	  esac
+	  # Note that it is not necessary on cygwin/mingw to append a dot to
+	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
+	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
+	  # `FILE.' does not work on cygwin managed mounts.
+	  #
 	  # If there is no directory component, then add one.
-	  case $file in
-	  */* | *\\*) . ${wrapperdot} ;;
-	  *) . ./${wrapperdot} ;;
+	  case $wrapper in
+	  */* | *\\*) . ${wrapper} ;;
+	  *) . ./${wrapper} ;;
 	  esac
 
 	  outputname=
 	  if test "$fast_install" = no && test -n "$relink_command"; then
 	    if test "$finalize" = yes && test -z "$run"; then
-	      tmpdir="/tmp"
-	      test -n "$TMPDIR" && tmpdir="$TMPDIR"
-	      tmpdir="$tmpdir/libtool-$$"
-	      save_umask=`umask`
-	      umask 0077
-	      if $mkdir "$tmpdir"; then
-	        umask $save_umask
-	      else
-	        umask $save_umask
-		$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
-		continue
-	      fi
+	      tmpdir=`func_mktempdir`
 	      file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
 	      outputname="$tmpdir/$file"
 	      # Replace the output file specification.
@@ -5727,7 +6165,7 @@
 	fi
 
 	# remove .exe since cygwin /usr/bin/install will append another
-	# one anyways
+	# one anyway 
 	case $install_prog,$host in
 	*/usr/bin/install*,*cygwin*)
 	  case $file:$destfile in
@@ -5827,7 +6265,7 @@
     # Exit here if they wanted silent mode.
     test "$show" = : && exit $EXIT_SUCCESS
 
-    $echo "----------------------------------------------------------------------"
+    $echo "X----------------------------------------------------------------------" | $Xsed
     $echo "Libraries have been installed in:"
     for libdir in $libdirs; do
       $echo "   $libdir"
@@ -5860,7 +6298,7 @@
     $echo
     $echo "See any operating system documentation about shared libraries for"
     $echo "more information, such as the ld(1) and ld.so(8) manual pages."
-    $echo "----------------------------------------------------------------------"
+    $echo "X----------------------------------------------------------------------" | $Xsed
     exit $EXIT_SUCCESS
     ;;
 
@@ -6077,9 +6515,17 @@
 	    rmfiles="$rmfiles $objdir/$n"
 	  done
 	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
-	  test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
 
-	  if test "$mode" = uninstall; then
+	  case "$mode" in
+	  clean)
+	    case "  $library_names " in
+	    # "  " in the beginning catches empty $dlname
+	    *" $dlname "*) ;;
+	    *) rmfiles="$rmfiles $objdir/$dlname" ;;
+	    esac
+	     test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+	    ;;
+	  uninstall)
 	    if test -n "$library_names"; then
 	      # Do each command in the postuninstall commands.
 	      cmds=$postuninstall_cmds
@@ -6112,7 +6558,8 @@
 	      IFS="$save_ifs"
 	    fi
 	    # FIXME: should reinstall the best remaining shared library.
-	  fi
+	    ;;
+	  esac
 	fi
 	;;
 
@@ -6397,7 +6844,7 @@
 $echo
 $echo "Try \`$modename --help' for more information about other modes."
 
-exit $EXIT_SUCCESS
+exit $?
 
 # The TAGs below are defined such that we never get into a situation
 # in which we disable both kinds of libraries.  Given conflicting
@@ -6411,12 +6858,11 @@
 # configuration.  But we'll never go from static-only to shared-only.
 
 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
-build_libtool_libs=no
-build_old_libs=yes
+disable_libs=shared
 # ### END LIBTOOL TAG CONFIG: disable-shared
 
 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
-build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
+disable_libs=static
 # ### END LIBTOOL TAG CONFIG: disable-static
 
 # Local Variables:
--- htdig-3.2.0b6/htlib/Makefile.in.orig	2008-01-31 22:10:59.055828478 +0530
+++ htdig-3.2.0b6/htlib/Makefile.in	2008-01-31 22:12:16.198675971 +0530
@@ -215,7 +215,7 @@
 libht_la_LIBADD = @LTLIBOBJS@
 
 # this includes regex.c
-libht_la_LDFLAGS = -release $(HTDIG_MAJOR_VERSION).$(HTDIG_MINOR_VERSION).$(HTDIG_MICRO_VERSION) ${extra_ldflags}
+libht_la_LDFLAGS = -release $(HTDIG_MAJOR_VERSION).$(HTDIG_MINOR_VERSION).$(HTDIG_MICRO_VERSION) ${extra_ldflags} $(top_builddir)/db/libhtdb.la
 
 pkginclude_HEADERS = \
 	clib.h \
--- htdig-3.2.0b6/htcommon/Makefile.in.orig	2008-01-31 22:18:54.195608755 +0530
+++ htdig-3.2.0b6/htcommon/Makefile.in	2008-01-31 22:19:14.593368983 +0530
@@ -214,7 +214,7 @@
 	conf_lexer.lxx conf_parser.yxx 
 
 
-libcommon_la_LDFLAGS = -release $(HTDIG_MAJOR_VERSION).$(HTDIG_MINOR_VERSION).$(HTDIG_MICRO_VERSION) ${extra_ldflags}
+libcommon_la_LDFLAGS = -release $(HTDIG_MAJOR_VERSION).$(HTDIG_MINOR_VERSION).$(HTDIG_MICRO_VERSION) ${extra_ldflags} $(top_builddir)/htword/libhtword.la
 
 noinst_HEADERS = DocumentDB.h \
 	DocumentRef.h \