llvm (2.6-9.1) debian-dir only changes

Summary

 debian/changelog                                                               |  509 +
 debian/compat                                                                  |    1 
 debian/control                                                                 |  157 
 debian/control.in/clang                                                        |   40 
 debian/control.in/libllvm-ocaml-dev                                            |   20 
 debian/control.in/llvm                                                         |   28 
 debian/control.in/llvm-dev                                                     |   21 
 debian/control.in/llvm-doc                                                     |   18 
 debian/control.in/llvm-examples                                                |   19 
 debian/control.in/llvm-gcc                                                     |   22 
 debian/control.in/llvm-runtime                                                 |   20 
 debian/control.in/llvm-snapshot                                                |   19 
 debian/control.in/llvm-source                                                  |   17 
 debian/control.in/source                                                       |   14 
 debian/copyright                                                               |   89 
 debian/debhelper.in/clang.install                                              |    5 
 debian/debhelper.in/clang.links                                                |    2 
 debian/debhelper.in/libllvm-ocaml-dev.META                                     |   63 
 debian/debhelper.in/libllvm-ocaml-dev.dirs                                     |    1 
 debian/debhelper.in/libllvm-ocaml-dev.doc-base                                 |    8 
 debian/debhelper.in/libllvm-ocaml-dev.install                                  |    2 
 debian/debhelper.in/llvm-dev.dirs                                              |    4 
 debian/debhelper.in/llvm-dev.install                                           |   17 
 debian/debhelper.in/llvm-doc.dirs                                              |    1 
 debian/debhelper.in/llvm-doc.install                                           |    2 
 debian/debhelper.in/llvm-examples.dirs                                         |    1 
 debian/debhelper.in/llvm-examples.examples                                     |    1 
 debian/debhelper.in/llvm-examples.links                                        |    3 
 debian/debhelper.in/llvm-gcc-4.2.install                                       |    1 
 debian/debhelper.in/llvm-runtime.install                                       |    2 
 debian/debhelper.in/llvm-runtime.links                                         |    1 
 debian/debhelper.in/llvm-runtime.manpages                                      |    1 
 debian/debhelper.in/llvm-runtime.postinst                                      |   11 
 debian/debhelper.in/llvm-runtime.prerm                                         |   13 
 debian/debhelper.in/llvm-snapshot.install                                      |   13 
 debian/debhelper.in/llvm.dirs                                                  |    6 
 debian/debhelper.in/llvm.install                                               |    1 
 debian/debhelper.in/llvm.links                                                 |    1 
 debian/debhelper.in/llvm.manpages                                              |    1 
 debian/llvm-dev.README.Debian                                                  |    7 
 debian/llvm.binfmt                                                             |    3 
 debian/logwatch.sh                                                             |  104 
 debian/packages.d/llvm-gcc-4.2.mk                                              |   31 
 debian/packages.d/llvm-snapshot.mk                                             |   48 
 debian/packages.d/llvm.mk                                                      |   87 
 debian/packages.d/tools.mk                                                     |   32 
 debian/patches/0001-Update-configure-script-for-kfreebsd-gnu-and-hurd.patch    |   25 
 debian/patches/0002-Fix-llvm-config-script.patch                               |   27 
 debian/patches/0003-Debian-version-info-and-bugreport.patch                    |   36 
 debian/patches/0004-Fix-TOOLDIR-path-for-gccas-and-gccld.patch                 |   54 
 debian/patches/0005-Disable-llvm-stub.patch                                    |   14 
 debian/patches/0006-Update-autotools-for-avr32.patch                           | 4223 ++++++++++
 debian/patches/0007-Triple.h-Avoid-identifier-conflicts-on-mips-and-spar.patch |   16 
 debian/patches/0008-path-eraseFromDisk.patch                                   |   36 
 debian/patches/0009-Fix-doclinks.patch                                         |   57 
 debian/patches/0010-ARM-BX_to_BLX.patch                                        |   13 
 debian/patches/0011-Hurd-fixes.patch                                           |   36 
 debian/patches/0012-RUNTESTFLAGS.patch                                         |   15 
 debian/rules                                                                   |   44 
 debian/rules.d/binary.mk                                                       |   68 
 debian/rules.d/build.mk                                                        |   65 
 debian/rules.d/control.mk                                                      |   32 
 debian/rules.d/unpack.mk                                                       |   52 
 debian/rules.d/vars.mk                                                         |   41 
 debian/source/format                                                           |    1 
 65 files changed, 6322 insertions(+)

    
download this patch

Patch contents

--- llvm-2.6.orig/debian/logwatch.sh
+++ llvm-2.6/debian/logwatch.sh
@@ -0,0 +1,104 @@
+#! /bin/sh
+
+# script to trick the build daemons and output something, if there is
+# still test/build activity
+
+# $1: primary file to watch. if there is activity on this file, we do nothing
+# $2+: files to watch to look for activity despite no output in $1
+#      if the files are modified or are newly created, then the message
+#      is printed on stdout.
+#      if nothing is modified, don't output anything (so the buildd timeout
+#      hits).
+
+pidfile=logwatch.pid
+timeout=3600
+message='\nlogwatch still running\n'
+
+usage()
+{
+    echo >&2 "usage: `basename $0` [-p <pidfile>] [-t <timeout>] [-m <message>]"
+    echo >&2 "           <logfile> [<logfile> ...]"
+    exit 1
+}
+
+while [ $# -gt 0 ]; do
+    case $1 in
+    -p)
+	pidfile=$2
+	shift
+	shift
+	;;
+    -t)
+	timeout=$2
+	shift
+	shift
+	;;
+    -m)
+	message="$2"
+	shift
+	shift
+	;;
+    -*)
+	usage
+	;;
+    *)
+	break
+    esac
+done
+
+[ $# -gt 0 ] || usage
+
+logfile="$1"
+shift
+otherlogs="$@"
+
+cleanup()
+{
+    rm -f $pidfile
+    exit 0
+}
+
+#trap cleanup 0 1 3 15
+
+echo $$ > $pidfile
+
+update()
+{
+    _logvar=$1
+    _othervar=$2
+
+    # logfile may not exist yet
+    if [ -r $logfile ]; then
+	_logtail="`tail -10 $logfile | md5sum` $f"
+    else
+	_logtail="does not exist: $logfile"
+    fi
+    eval $_logvar="'$_logtail'"
+
+    _othertails=''
+    for f in $otherlogs; do
+	if [ -r $f ]; then
+	    _othertails="$_othertails `tail -10 $f | md5sum` $f"
+	else
+	    _othertails="$_othertails does not exist: $f"
+	fi
+    done
+    eval $_othervar="'$_othertails'"
+}
+
+update logtail othertails
+while true; do
+    sleep $timeout
+    update newlogtail newothertails
+    if [ "$logtail" != "$newlogtail" ]; then
+	# there is still action in the primary logfile. do nothing.
+	logtail="$newlogtail"
+    elif [ "$othertails" != "$newothertails" ]; then
+	# there is still action in the other log files, so print the message
+	/bin/echo -e $message
+	othertails="$newothertails"
+    else
+	# nothing changed in the other log files. maybe a timeout ...
+	:
+    fi
+done
--- llvm-2.6.orig/debian/llvm-dev.README.Debian
+++ llvm-2.6/debian/llvm-dev.README.Debian
@@ -0,0 +1,7 @@
+llvm-dev Debian package
+-----------------------
+
+ - To enable syntax highlighting for llvm, just execute 'vim-addons
+   install llvm'.
+
+ -- Stéphane Glondu <glondu@debian.org>, Thu, 19 Aug 2010 17:27:36 +0200
--- llvm-2.6.orig/debian/changelog
+++ llvm-2.6/debian/changelog
@@ -0,0 +1,509 @@
+llvm (2.6-9.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * llvm-runtime:
+    - replace Conflicts with previous version by Breaks
+    - add explicit "set -e" in maintainer scripts
+    - properly remove llvm.binfmt in prerm script
+  * llvm-dev:
+    - install vim files in /usr/share/vim/addons, add README.Debian
+      (Closes: #593190)
+    - add dependency to libffi-dev (Closes: #573368)
+  * libllvm-ocaml-dev:
+    - apply Sylvain Le Gall's patch to fix META filename (Closes: #583475)
+    - add suggestion to ocaml-findlib
+  * Add debian/source/format
+
+ -- Stéphane Glondu <glondu@debian.org>  Thu, 19 Aug 2010 18:53:44 +0200
+
+llvm (2.6-9) unstable; urgency=low
+
+  * Fix testsuite:
+    - debian/packages.d/*.mk: Don't pass DebianOpts to MAKECHECKFLAGS.
+    - debian/patches/0012-RUNTESTFLAGS.patch: Add, don't pass VERBOSE
+      to RUNTESTFLAGS.
+  * debian/rules.d/vars.mk (dev_version): Bump to 2.6-9.
+  * debian/rules.d/control.mk: Update diffstats on clean.
+  * debian/control.in/llvm-snapshot (Priority): set to extra.
+  * Merge changes from clang 2.6-3:
+    - debian/debhelper.in/clang.install: Install sorttable.js and
+      scanview.css in /usr/lib/clang/1.0/utils/.
+  * Merge changes from Ubuntu (on the way for llvm 2.7):
+    - debian/rules: Unsed environment variables set by dpkg.
+    - debian/rules.d/vars.mk: Fix UVERSION for experimental uploads.
+
+ -- Arthur Loiret <aloiret@debian.org>  Sat, 03 Apr 2010 22:54:26 +0000
+
+llvm (2.6-8) unstable; urgency=low
+
+  * debian/rules.d/build.mk: Ignore testsuite failures.
+
+ -- Arthur Loiret <aloiret@debian.org>  Wed, 10 Mar 2010 19:21:22 +0000
+
+llvm (2.6-7) unstable; urgency=low
+
+  [ Arthur Loiret ]
+  * Split out the lli bytecode interpreter from llvm to llvm-runtime:
+    - debian/packages.d/llvm.mk (llvm_packages): Add llvm-runtime.
+    - debian/debhelper.in/llvm-runtime.{install,links,postinst,prerm}: Add.
+    - debian/debhelper.in/llvm.{postinst,prerm}: Rename to llvm-runtime.
+  * debian/packages.d/{llvm,tools}.mk: Configure with --disable-assertions.
+  * Improve build system:
+    - debian/{packages.d/llvm.mk,rules.d/build.mk}: Build llvm in a single
+      target instead of separating tools and core builds.
+    - debian/{rules.d/binary.mk,packages.d/*.mk}: Make binary stamps depend
+      only on the truly required install stamps.
+    - debian/packages.d/*.mk, debian/rules.d/build.mk: Support one check
+      stamp per build. Install testsuite summary in /usr/share/doc.
+    - debian/packages.d/*.mk: Use $(RM) instead of "rm".
+  * debian/control.in/llvm-dev: Depends on the same version of llvm.
+  * debian/control.in/source: Build-Conflicts on oprofile.
+
+  [ Sylvain Le Gall ]
+  * Build a libllvm-ocaml-dev package, which contains the OCaml binding:
+    Closes: #568556.
+    - debian/debhelper.in/libllvm-ocaml-dev.{dirs,doc-base,install,META}: Add.
+    - debian/control.in/source: Build-Depends on ocaml-nox (>= 3.11.2),
+      ocaml-best-compilers | ocaml-nox, dh-ocaml (>= 0.9.1).
+    - debian/packages.d/llvm.mk:
+      + (llvm_packages): Add libllvm-ocaml-dev.
+      + (libllvm-ocaml-dev_extra_binary): Define, install META file.
+    - debian/rules.d/binary.mk: Add dh_installdirs and dh_ocaml.
+    - debian/rules.d/vars.mk:
+      + include /usr/share/ocaml/ocamlvars.mk.
+      + Configure with --with-ocaml-libdir=$(OCAML_STDLIB_DIR)/llvm.
+  * debian/rules.d/build.mk: Fix symlinks pointing to the $DESTDIR.
+
+ -- Arthur Loiret <aloiret@debian.org>  Wed, 10 Mar 2010 13:29:06 +0000
+
+llvm (2.6-6) unstable; urgency=low
+
+  * Install vim and emacs syntax files.  Closes: #489980.
+    - debian/debhelper.in/llvm-dev.{dirs,install}: Install .vim and .el files.
+    - debian/packages.d/llvm.mk (llvm-dev_extra_binary): Install README files.
+  * Build system fixes:
+    - debian/rules.d/unpack.mk:
+      + Add missing "touch $@" in $(patch-stamp) target.  Closes: #571577.
+      + Robustify more.
+    - debian/rules.d/binary.mk: Make binary stamps depend on $(install-stamp).
+    - debian/rules.d/vars.mk (dev_version): New variable, required llvm-dev
+      version for llvm-gcc and tools. Bump to 2.6-6.
+  * Patches work:
+    - debian/patches/0008-path-eraseFromDisk.patch: Refresh.
+    - debian/patches/0011-Hurd-fixes.patch: Add, dirtily fix build on Hurd.
+  * debian/debhelper.in/clang.install: Ship scan-build and ccc-analyzer.
+  * debian/control.in/source: Bump Standards-Version to 3.8.4.
+
+ -- Arthur Loiret <aloiret@debian.org>  Fri, 26 Feb 2010 10:20:31 +0000
+
+llvm (2.6-5) unstable; urgency=low
+
+  * debian/control.in/source: Build-Depends on libffi-dev and lsb-release.
+  * debian/rules.d/vars.mk:
+    - Configure with --enable-optimized and --enable-libffi.
+    - New variable $(OS), for portability with Ubuntu.
+  * debian/rules.d/unpack.mk: Robustify patch system.
+  * debian/packages.d/llvm-gcc-4.2.mk: Run testsuite on i386 and amd64.
+  * Backport changes from Ubuntu:
+    - debian/packages.d/*.mk: Use $(OS) instead of Debian in version strings.
+    - 0008-path-eraseFromDisk.patch: Add, use fork/exec instead of system to
+      avoid quoting problems.
+    - 0009-Fix-doclinks.patch: Add, fix broken links in index.html.
+      Closes: #469529.
+    - 0010-ARM-BX_to_BLX.patch: Add, fix to allow shark work on ARM
+      (Xerxes Ranby).
+
+ -- Arthur Loiret <aloiret@debian.org>  Wed, 24 Feb 2010 12:00:08 +0000
+
+llvm (2.6-4) unstable; urgency=low
+
+  * Stop building on unsupported ia64, mips{,el} processors.
+  * Merge clang 2.6-1 and llvm-gcc-4.2 2.6-3.
+
+ -- Arthur Loiret <aloiret@debian.org>  Sun, 06 Dec 2009 18:32:04 +0000
+
+llvm (2.6-3) unstable; urgency=low
+
+  * Build a llvm-source package.
+  * Merge from llvm-gcc-4.2 2.6-2:
+    - debian/packages.d/llvm-gcc-4.2.mk: Define llvm-gcc-4.2_extra_binary,
+      Adds symlinks for binaries.
+
+ -- Arthur Loiret <aloiret@debian.org>  Mon, 16 Nov 2009 21:34:12 +0000
+
+llvm (2.6-2) unstable; urgency=low
+
+  * 0007-Triple.h-Avoid-identifier-conflicts-on-mips-and-spar.patch: Add,
+    maybe fix the build on sparc and mips{,el}.
+  * Various fixes in the build system.
+
+ -- Arthur Loiret <aloiret@debian.org>  Mon, 16 Nov 2009 19:32:58 +0000
+
+llvm (2.6-1) unstable; urgency=low
+
+  * New upstream release.
+    - 0007-Move-IA64-asmprinter-to-separate-library.patch,
+      0008-Move-MIPS-asmprinter-to-separate-library.patch: Remove.
+  * 0006-Build-LLVM-with-O2.patch: Remove, pass OPTIMIZE_OPTION to make
+    instead.
+  * Improve build system, add build infrastructure for tools.
+  * Remove RPATHS from all binaries and libraries.
+
+ -- Arthur Loiret <aloiret@debian.org>  Sun, 15 Nov 2009 20:24:40 +0000
+
+llvm (2.5-3) unstable; urgency=low
+
+  * Backport from mainline:
+    - 0007-Move-IA64-asmprinter-to-separate-library.patch.
+    - 0008-Move-MIPS-asmprinter-to-separate-library.patch.
+  * This hopefuly fixes the FTBFS on mips.  Closes: #518592.
+  * Fix $LLVM_SRC_ROOT and $LLVM_OBJ_ROOT for real.
+  * Also fix dependency_libs and libdir.
+  * Support AVR32:
+    - Build-Depends on autotools-dev (>= 20060702.1).
+    - Update config.sub and config.guess.  Closes: #535729.
+  * Bump Standards-Version to 3.8.3.
+
+ -- Arthur Loiret <aloiret@debian.org>  Fri, 06 Nov 2009 15:30:40 +0000
+
+llvm (2.5-2) unstable; urgency=low
+
+  * Configure all components with PIC enabled, this includes llvm-gcc-4.2.
+  * Set $LLVM_SRC_ROOT and $LLVM_OBJ_ROOT to $(PF)/build in binary target.
+  * Build-Conclicts on ocaml to prevent ocaml bindings to be built. This
+    should be kept until we build an llvm-ocaml binding package.
+  * Disable parallel build by default.
+
+ -- Arthur Loiret <aloiret@debian.org>  Fri, 13 Mar 2009 12:31:49 +0000
+
+llvm (2.5-1) unstable; urgency=low
+
+  * New upstream release.  Closes: #518406.
+  * Update patches:
+    - 0007-Separate-alpha-asmprinter.-This-should-unbreak-nativ.patch,
+      0008-Separate-sparc-asmprinter.-This-should-unbreak-the-n.patch: Remove.
+    - Refresh all others.
+  * Configure with --with-pic --enable-pic.  Closes: #518476.
+  * Remove dangling symlinks.  Closes: #509669.
+    - Now autogenerate debian/llvm.links in debian/rules.d/binary.mk.
+  * Update build infrastructure for llvm-snapshot and llvm-gcc.
+
+ -- Arthur Loiret <aloiret@debian.org>  Fri, 06 Mar 2009 19:19:06 +0000
+
+llvm (2.4-1~exp1) experimental; urgency=low
+
+  * Backport from mainline:
+    - 0007-Separate-alpha-asmprinter.-This-should-unbreak-nativ.patch.
+    - 0008-Separate-sparc-asmprinter.-This-should-unbreak-the-n.patch.
+  * debian/debhelper.in/llvm-dev.install: Also install configure,
+    config.status and autoconf/ in /usr/lib/llvm/build, will be required
+    to build clang.
+  * debian/debhelper.in/llvm.postinst, debian/debhelper.in/llvm.prerm:
+    Remove full path for update-binfmts.
+
+ -- Arthur Loiret <arthur.loiret@gmail.com>  Mon, 24 Nov 2008 20:39:24 +0000
+
+llvm (2.4-1~exp0) experimental; urgency=low
+
+  * New upstream release. Closes: #505394
+    - Update patches.
+  * debian/rules:
+    - Support DEB_BUILD_OPTIONS=parallel=n.
+    - Depect cpu number and run parallel build by default.
+  * debian/rules.d/binary.mk: Remove extra license file.
+  * debian/rules.d/unpack.mk: Really unpatch sources on clean.
+  * debian/control: Bump Standards-Version to 3.8.0.
+  * Merge changes between versions 2.2-9 and 2.2-12.
+
+ -- Arthur Loiret <arthur.loiret@gmail.com>  Sat, 22 Nov 2008 10:43:59 +0000
+
+llvm (2.3-1~exp0) experimental; urgency=low
+
+  * New upstream release. Closes: #489255
+    - Update patches.
+  * debian/debhelper.in/llvm.install: No more config files.
+
+ -- Arthur Loiret <arthur.loiret@gmail.com>  Tue, 08 Jul 2008 18:42:51 +0000
+
+llvm (2.2-12) unstable; urgency=low
+
+  * 4 revisions to fix debian/control, how lame am I…
+    Properly update debian/control.in/llvm-examples.
+
+ -- Pierre Habouzit <madcoder@debian.org>  Mon, 13 Oct 2008 10:02:55 +0200
+
+llvm (2.2-11) unstable; urgency=low
+
+  * +~ sorts before +bX which defeats its purpose. Use +c~ to be sorted
+    _after_ binNMUs.
+
+ -- Pierre Habouzit <madcoder@debian.org>  Sun, 12 Oct 2008 18:49:45 +0200
+
+llvm (2.2-10) unstable; urgency=high
+
+  * New upload to fix previous borked one.
+
+ -- Pierre Habouzit <madcoder@debian.org>  Sun, 05 Oct 2008 16:19:21 +0200
+
+llvm (2.2-9) unstable; urgency=high
+
+  * Make llvm bin-NMU friendly (Closes: #499469).
+
+ -- Pierre Habouzit <madcoder@debian.org>  Sun, 05 Oct 2008 09:37:52 +0200
+
+llvm (2.2-8) unstable; urgency=high
+
+  * Run testsuite on kfreebsd-i386 and kfreebsd-amd64 as well.
+  * Don't append LLVM_DEBIAN_INFO to llvm-config.  Closes: #481967
+
+ -- Arthur Loiret <arthur.loiret@gmail.com>  Sat, 28 Jun 2008 16:11:48 +0000
+
+llvm (2.2-7) unstable; urgency=high
+
+  * Fix i386-only FTBFS due to missing #include (Closes: 474863).
+
+ -- Pierre Habouzit <madcoder@debian.org>  Sun, 20 Apr 2008 21:40:59 +0200
+
+llvm (2.2-6) unstable; urgency=low
+
+  [ Arthur Loiret ]
+  * Don't build llvm-stub:  Closes: #468339
+    - patches/0007-Disable-llvm-stub.patch: Add.
+    - debhelper.in/llvm.links: Update.
+  * Run the testsuite on amd64 i386 ia64 powerpc s390 sparc only.
+
+  [ Pierre Habouzit ]
+  * Update patches/0006-Build-with-g-4.3.patch with missing hunk.
+    (Closes: 417382).
+
+ -- Pierre Habouzit <madcoder@debian.org>  Sun, 06 Apr 2008 00:33:49 +0200
+
+llvm (2.2-5) unstable; urgency=low
+
+  * brown paper bag bug, fix llvm-examples.links reordering arguments 
+    (Closes: 470409).
+
+ -- Pierre Habouzit <madcoder@debian.org>  Tue, 11 Mar 2008 10:03:09 +0100
+
+llvm (2.2-4) unstable; urgency=low
+
+  [ Pierre Habouzit ]
+  * debian/control:
+    + Missing Provides: llvm-libs in llvm-dev Package.
+  * patches/0005-Build-LLVM-with-O2.patch: build llvm with -O2 to ease
+    buildd's life.
+  * Install Makefile.{common,config,rules} in /usr/lib/llvm/build.
+  * Add links to the Makefiles from llvm-examples (Closes: 469531).
+  * Rework dependency chains:
+    + llvm-example depends llvm-dev.
+    + llvm-dev depends llvm.
+    + llvm depends nothing, but recommends llvm-dev.
+  * patches/0006-Build-with-g-4.3.patch: add patch to build with g++-4.3
+    (Closes: 417382).
+
+  [ Arthur Loiret ]
+  * Use logwatch script from gcc to prevent testsuite timeouts.
+
+ -- Pierre Habouzit <madcoder@debian.org>  Mon, 10 Mar 2008 13:22:45 +0100
+
+llvm (2.2-3) unstable; urgency=low
+
+  [ Arthur Loiret ]
+  * 0004-Fix-TOOLDIR-path-for-gccas-and-gccld.patch: Add.  Closes: #468341
+  * debian/debhelper.in/llvm-doc.install: don't install html.tar.gz, already
+    in untared html dir.  Closes: #468338
+  * Rename llvm-libs to llvm-dev and include headers in it.  Closes: #468344
+
+  [ Pierre Habouzit ]
+  * Fix postinst/prerm binfmts registration for chroots.
+
+ -- Pierre Habouzit <madcoder@debian.org>  Mon, 03 Mar 2008 01:21:00 +0100
+
+llvm (2.2-2) unstable; urgency=low
+
+  [ Arthur Loiret ]
+  * Don't Build-Depends on graphviz, not needed.
+  * Run testsuite by default.
+  * 0001-Update-configure-script-for-kfreebsd-gnu-and-hurd.patch: New,
+    fix FTBFS on kfreebsd-gnu and hurd.
+  * 0002-Fix-llvm-config-script.patch: New, fix lib and include paths.
+  * 0003-Debian-version-info-and-bugreport.patch: New, mention Debian revision
+    in --version, update bugreport contact (set to pkg-llvm mailling list).
+
+ -- Pierre Habouzit <madcoder@debian.org>  Fri, 22 Feb 2008 14:04:39 +0100
+
+llvm (2.2-1) unstable; urgency=low
+
+  [ Pierre Habouzit ]
+  * New upstream release.
+  * debian/debhelper.in/llvm-examples.examples: add missing file so that
+    llvm-examples isn't empty.
+  * debian/debhelper.in/llvm.{preinst,postinst}: use binfmt-support to
+    register llvm.binfmts properly.
+
+  [ Arthur Loiret ]
+  * debian/debhelper.in/llvm.install: Remove libs,
+  * debian/rules.d/build.mk: Remove extra-license-file.
+
+ -- Pierre Habouzit <madcoder@debian.org>  Tue, 12 Feb 2008 11:11:34 +0100
+
+llvm (2.1.99-20080209-2) experimental; urgency=low
+
+  * Reinstate lost crhpath to remove unsafe rpath.
+
+ -- Pierre Habouzit <madcoder@debian.org>  Sun, 10 Feb 2008 02:35:19 +0100
+
+llvm (2.1.99-20080209-1) experimental; urgency=low
+
+  [ Arthur Loiret ]
+  * New Maintainers. Closes: #451106, #451384, #449355
+  * New upstream release, new build system (again).
+  * debian/control.in/llvm-gcc:
+    + Update llvm-gcc description. Closes: #441382
+  * debian/copyright: Update.
+
+  [ Pierre Habouzit ]
+  * debian/control.in/source, debian/control:
+    + add Vcs-* headers.
+  * Bump compat to 6.
+
+ -- Arthur Loiret <arthur.loiret@gmail.com>  Thu, 07 Feb 2008 15:22:43 +0100
+
+llvm (2.1-0~exp1) experimental; urgency=low
+
+  [ Arthur Loiret ]
+  * Initial llvm2 upload, the packaging is not over yet and we need to test a
+    few things before uploading it to unstable. Closes will be added then.
+  * Remove dpatch from build-depends, not used anymore.
+  * New build system.
+
+  [ Pierre Habouzit ]
+  * debian/control:
+     + Remove version for doxygen build-depends as it's not even in oldstable.
+     + Bump Standards-Version to 3.7.3.
+     + Add Homepage field.
+
+ -- Pierre Habouzit <madcoder@debian.org>  Mon, 07 Jan 2008 15:09:16 +0100
+
+llvm (1.8b-1) unstable; urgency=low
+
+  * Closes: bug#356095: missing llvmc from package (over-zealous cleanup
+    was removing it)
+  * Replace entire C front-end (CFE)with latest from CVS (as recommended by
+    upstream); this will get re-synced with the 1.9 release.
+  * Re-enable amd64 build.
+  * Closes: bug#380151 --  FTBFS on ia64 and amd64; new CFE fixes ia64,
+    but amd64 is hacked back in and not officially supported upstream.
+  * Closes: bug#389300 -- ia64/unstable FTBFS: compile errors (duplicate)
+  * Closes: bug#394883 -- ia64/unstable FTBFS: compile errors (duplicate)
+
+ -- Al Stone <ahs3@debian.org>  Mon, 23 Oct 2006 12:53:33 -0600
+
+llvm (1.8a-1) unstable; urgency=low
+
+  * Upgrade to latest upstream.
+  * Closes: bug#385767 -- New upstream release
+  * Closes: bug#382897 -- Please stop Build-Depending on automake (patch
+    was wrong, dependency is actually on 1.9, not 1.4)
+  * Makefile used 'tar xvzf' which was far too noisy; using 'tar xzf' now.
+  * Closes: bug#380150 -- claims front-end is based on GCC 3.4 but it's 4.0.1
+    now; fixed the control file to reflect the proper version.
+  * Closes: bug#390289 -- problem with update-binfmts when purging packagei
+    llvm; update-binfmts was being invoked with the wrong arguments
+
+ -- Al Stone <ahs3@debian.org>  Sat, 21 Oct 2006 12:27:09 -0600
+
+llvm (1.7-3) unstable; urgency=low
+
+  * Closes: bug#376138 -- llvm: postinst failure in update-binfmts
+  * Closes: bug#373655 -- amd64 FTBS; this is _not_ a fully supported
+    architecture; the C backend is the only backend available, iff one
+    uses an older gcc frontend.  Waiting for upstream or helping them
+    are the best options.
+
+ -- Al Stone <ahs3@debian.org>  Tue,  11 Jul 2006 08:33:48 -0600
+
+llvm (1.7-2) unstable; urgency=low
+
+  * Closes: bug#374615: llvm-doc: do not ship doxygen.tar.gz and html.tar.gz
+  * Closes: bug#373655: amd64/unstable FTBFS -- Unsuported LLVM Target 
+    x86_64-unknown-linux-gnu; this is not yet a supported architecture
+    for this package and should not have been included.
+
+ -- Al Stone <ahs3@debian.org>  Mon, 26 Jun 2006 08:43:40 -0600
+
+llvm (1.7-1) unstable; urgency=low
+
+  * New upstream source (1.7)
+  * Add alpha architecture, be nicer to sparc
+  * Closes: bug#370161 -- FTBS due to doxygen bug in older versions (patch
+    from NMU was not used in order to keep dependencies straightforward) --
+    bug #345952 closed from doxygen NMU.
+  * Closes: bug#357015 -- bashism in /etc/init.d/llvm, by removing the use
+    is the /etc/init.d script and instead using update-binfmts(8). 
+  * Closes: bug#357016 -- please consider replacing /etc/init.d/llvm with
+    update-binfmts(8)
+
+ -- Al Stone <ahs3@fcahs3.fc.hp.com>  Tue, 13 Jun 2006 18:11:22 -0600
+
+llvm (1.6-1.1) unstable; urgency=high
+
+  * Non-maintainer upload.
+  * Build-depend on fixed doxygen (>= 1.4.6-2.1); fixes FTBFS.
+    (Closes: #357722)
+
+ -- Steinar H. Gunderson <sesse@debian.org>  Sat,  3 Jun 2006 13:52:35 +0200
+
+llvm (1.6-1) unstable; urgency=low
+
+  * Closes: bug#339768 -- new upstream version
+  * Closes: bug#332517 -- FTBS on s390 (it's not a supported architecture)
+
+ -- Al Stone <ahs3@debian.org>  Sun,  1 Jan 2006 15:23:30 -0700
+
+llvm (1.5-1) unstable; urgency=low
+
+  * Updated to latest upstream (1.5)
+  * Removed restriction requiring gcc 3.3 on i386 (no longer needed).
+  * Updated to latest standards version
+  * Removed dependency on pax (no longer needed)
+  * NB: this version was not released into the wild due to my inability to
+    get it done in a reasonable amount of time
+
+ -- Al Stone <ahs3@debian.org>  Sat, 10 Sep 2005 17:30:42 -0600
+
+llvm (1.5-0b) unstable; urgency=low
+
+  * Forced dependency on GCC 3.4; LLVM really does prefer it.
+  * Updated 1.5cvs bits.
+
+ -- Al Stone <ahs3@debian.org>  Wed,  25 May 2005 14:01:21 -0700
+
+llvm (1.5-0a) unstable; urgency=low
+
+  * Start preparing for the 1.5 release.
+
+ -- Al Stone <ahs3@debian.org>  Fri, 20 May 2005 17:39:53 -0700
+
+llvm (1.4-3) unstable; urgency=low
+
+  * Closes: bug#304035 -- upstream renamed 'extract' to 'llvm-extract' to
+    remove conflict with /usr/bin/extract from package extract.
+  * Closes: bug#308694 -- missing depends for texinfo and graphviz
+
+ -- Al Stone <ahs3@debian.org>  Thu, 19 May 2005 16:47:33 -0600
+
+llvm (1.4-2) unstable; urgency=low
+
+  * An older version of llvmc was inadvertently used; now fixed. 
+
+ -- Al Stone <ahs3@debian.org>  Fri, 11 Mar 2005 17:04:30 -0700
+
+llvm (1.4-1) unstable; urgency=low
+
+  * Initial Release.
+  * Closes: bug#239415 -- ITP for LLVM (Low-Level Virtual Machine) compiler
+    for C/C++
+
+ -- Al Stone <ahs3@debian.org>  Thu, 10 Mar 2005 07:31:10 -0700
+
--- llvm-2.6.orig/debian/copyright
+++ llvm-2.6/debian/copyright
@@ -0,0 +1,89 @@
+This package was debianized by Arthur Loiret <arthur.loiret@u-psud.fr> on
+Sun,  10 Nov 2007 12:32:05 +0200.
+
+It was downloaded from http://llvm.org/releases/download.html
+
+
+            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+                    Version 2, December 2004
+
+ Copyright (C) 2004 Sam Hocevar
+  14 rue de Plaisance, 75014 Paris, France
+ Everyone is permitted to copy and distribute verbatim or modified
+ copies of this license document, and changing it is allowed as long
+ as the name is changed.
+
+            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. You just DO WHAT THE FUCK YOU WANT TO.
+
+==============================================================================
+LLVM Release License
+==============================================================================
+University of Illinois/NCSA
+Open Source License
+
+Copyright (c) 2003-2007 University of Illinois at Urbana-Champaign.
+All rights reserved.
+
+Developed by:
+
+    LLVM Team
+
+    University of Illinois at Urbana-Champaign
+
+    http://llvm.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal with
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimers.
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimers in the
+      documentation and/or other materials provided with the distribution.
+
+    * Neither the names of the LLVM Team, University of Illinois at
+      Urbana-Champaign, nor the names of its contributors may be used to
+      endorse or promote products derived from this Software without specific
+      prior written permission.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
+SOFTWARE.
+
+==============================================================================
+Copyrights and Licenses for Third Party Software Distributed with LLVM:
+==============================================================================
+The LLVM software contains code written by third parties.  Such software will
+have its own individual LICENSE.TXT file in the directory in which it appears.
+This file will describe the copyrights, license, and restrictions which apply
+to that code.
+
+The disclaimer of warranty in the University of Illinois Open Source License
+applies to all code in the LLVM Distribution, and nothing in any of the
+other licenses gives permission to use the names of the LLVM Team or the
+University of Illinois to endorse or promote products derived from this
+Software.
+
+The following pieces of software have additional or alternate copyrights,
+licenses, and/or restrictions:
+
+Program             Directory
+-------             ---------
+System Library      llvm/lib/System
+Compiler Driver     llvm/tools/llvmc
+Autoconf            llvm/autoconf
+                    llvm/projects/ModuleMaker/autoconf
+                    llvm/projects/sample/autoconf
+
--- llvm-2.6.orig/debian/control
+++ llvm-2.6/debian/control
@@ -0,0 +1,157 @@
+Source: llvm
+Section: devel
+Priority: optional
+Maintainer: LLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
+Uploaders: Arthur Loiret <aloiret@debian.org>, Pierre Habouzit <madcoder@debian.org>
+Build-Depends: debhelper (>= 6.0.0), flex, bison, dejagnu, tcl8.4, expect,
+    autoconf, automake1.9, perl, libtool, doxygen, chrpath, texinfo,
+    sharutils, autotools-dev (>= 20060702.1), libffi-dev (>= 3.0.9),
+    ocaml-nox (>= 3.11.2), ocaml-best-compilers | ocaml-nox, dh-ocaml (>= 0.9.1),
+    lsb-release
+Build-Conflicts: oprofile
+Standards-Version: 3.8.4
+Homepage: http://www.llvm.org/
+
+Package: llvm
+Architecture: any
+Suggests: llvm-doc
+Depends: llvm-runtime (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Recommends: llvm-dev
+Description: Low-Level Virtual Machine (LLVM)
+ The Low-Level Virtual Machine (LLVM) is a collection of libraries and
+ tools that make it easy to build compilers, optimizers, Just-In-Time
+ code generators, and many other compiler-related programs. LLVM
+ uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ The strengths of the LLVM infrastructure are its extremely
+ simple design (which makes it easy to understand and use),
+ source-language independence, powerful mid-level optimizer, automated
+ compiler debugging support, extensibility, and its stability and
+ reliability. LLVM is currently being used to host a wide variety of
+ academic research projects and commercial projects. LLVM includes C
+ and C++ front-ends (based on GCC 4.0.1), a front-end for a Forth-like
+ language (Stacker), a young scheme front-end, and Java support is
+ in development. LLVM can generate code for X86, SparcV9, PowerPC,
+ or it can emit C code.
+
+Package: llvm-runtime
+Architecture: any
+Depends: binfmt-support, ${shlibs:Depends}, ${misc:Depends}
+Breaks: llvm (<< 2.6-7)
+Replaces: llvm (<< 2.6-7)
+Description: Low-Level Virtual Machine (LLVM), bytecode interpreter
+ The Low-Level Virtual Machine (LLVM) is a collection of libraries and
+ tools that make it easy to build compilers, optimizers, Just-In-Time
+ code generators, and many other compiler-related programs. LLVM
+ uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ This package provides the minimal required to execute programs in LLVM
+ format.
+
+Package: llvm-dev
+Architecture: any
+Depends: libffi-dev, ${shlibs:Depends}, ${misc:Depends}, llvm (= ${binary:Version})
+Provides: llvm-libs
+Conflicts: llvm-libs
+Replaces: llvm-libs, llvm (<< 2.2-3)
+Description: Low-Level Virtual Machine (LLVM), libraries and headers
+ The Low-Level Virtual Machine (LLVM) is a collection of libraries and
+ tools that make it easy to build compilers, optimizers, Just-In-Time
+ code generators, and many other compiler-related programs. LLVM
+ uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ This package provides the libraries and headers to develop applications
+ using llvm.
+
+Package: libllvm-ocaml-dev
+Section: ocaml
+Architecture: any
+Suggests: llvm-doc, ocaml-findlib
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${ocaml:Depends}, llvm-dev (= ${binary:Version})
+Provides: ${ocaml:Provides}
+Description: Low-Level Virtual Machine (LLVM) bindings for OCaml
+ The Low-Level Virtual Machine (LLVM) is a collection of libraries and
+ tools that make it easy to build compilers, optimizers, Just-In-Time
+ code generators, and many other compiler-related programs. LLVM
+ uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ This package provides the OCaml bindings to develop applications using llvm.
+
+Package: llvm-doc
+Section: doc
+Architecture: all
+Depends: ${misc:Depends}
+Description: Low-Level Virtual Machine (LLVM), documentation
+ The Low-Level Virtual Machine (LLVM) is a collection of libraries and
+ tools that make it easy to build compilers, optimizers, Just-In-Time
+ code generators, and many other compiler-related programs. LLVM
+ uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ This package contains all documentation (extensive).
+
+Package: llvm-examples
+Section: doc
+Architecture: all
+Depends: ${misc:Depends}, llvm-dev (>= ${source:Version}), llvm-dev (<< ${source:Version}+c~)
+Description: Low-Level Virtual Machine (LLVM), examples
+ The Low-Level Virtual Machine (LLVM) is a collection of libraries and
+ tools that make it easy to build compilers, optimizers, Just-In-Time
+ code generators, and many other compiler-related programs. LLVM
+ uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ This package contains examples for using LLVM, both in developing
+ extensions to LLVM and in using it to compile code.
+
+Package: llvm-source
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Low-Level Virtual Machine (LLVM), source code
+ The Low-Level Virtual Machine (LLVM) is a collection of libraries and
+ tools that make it easy to build compilers, optimizers, Just-In-Time
+ code generators, and many other compiler-related programs. LLVM
+ uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ This package contains the llvm source code.
+
--- llvm-2.6.orig/debian/rules
+++ llvm-2.6/debian/rules
@@ -0,0 +1,44 @@
+#!/usr/bin/make -f
+
+# build not yet prepared to take variables from the environment
+define unsetenv
+  unexport $(1)
+  $(1) =
+endef
+$(foreach v, CPPFLAGS CFLAGS CXXFLAGS FFLAGS LDFLAGS, $(if $(filter environment,$(origin $(v))),$(eval $(call unsetenv, $(v)))))
+
+include debian/rules.d/vars.mk
+
+ifneq (,$(findstring llvm,$(PKGSOURCE)))
+  ifneq (,$(findstring llvm-gcc-,$(PKGSOURCE)))
+    gcc_version := $(shell echo $(PKGSOURCE) | cut -d'-' -f3)
+  endif
+  include debian/packages.d/$(PKGSOURCE).mk
+else
+  tools := clang #vmkit
+  include debian/packages.d/tools.mk
+endif
+
+patchdirs	+= $(D)/debian/patches
+$(foreach build,$(builds),$(eval \
+  $(build)_builddir ?= build-$(build)))
+ifeq (,$(strip $(tarball)))
+  srcdir	:= .
+else
+  ifeq (,$(strip $(srcdir)))
+    $(error undefined srcdir)
+  endif
+endif
+
+include debian/rules.d/control.mk
+include debian/rules.d/unpack.mk
+include debian/rules.d/build.mk
+include debian/rules.d/binary.mk
+
+clean:
+	$(RM) -r $(stampdir) $(foreach build,$(builds),$($(build)_builddir))
+ifneq (,$(strip $(tarball)))
+	$(RM) -r $(srcdir)
+endif
+
+.PHONY: clean
--- llvm-2.6.orig/debian/compat
+++ llvm-2.6/debian/compat
@@ -0,0 +1 @@
+6
--- llvm-2.6.orig/debian/llvm.binfmt
+++ llvm-2.6/debian/llvm.binfmt
@@ -0,0 +1,3 @@
+package llvm
+interpreter /usr/bin/lli
+magic llvc
--- llvm-2.6.orig/debian/packages.d/llvm.mk
+++ llvm-2.6/debian/packages.d/llvm.mk
@@ -0,0 +1,87 @@
+builds := llvm
+
+# packages which don't need the builds
+extra_packages := llvm-source
+
+ifneq (,$(findstring $(DEB_HOST_GNU_CPU),ia64 mips mipsel))
+  $(error unsupported processor)
+endif
+
+llvm_packages := llvm llvm-runtime llvm-dev \
+	libllvm-ocaml-dev llvm-doc llvm-examples
+
+llvm_confargs := $(confargs) \
+	--prefix=$(PF) --disable-assertions
+
+llvm_MAKEOPTS := $(MAKEOPTS) \
+	VERBOSE=1 OPTIMIZE_OPTION=" -O2" \
+	DebianOpts="-DLLVM_DEBIAN_INFO='\" ($(OS) $(VERSION))\"'"
+
+# run testsuite
+llvm_check := yes
+
+llvm_MAKECHECKOPTS := $(MAKEOPTS) \
+	VERBOSE=1 OPTIMIZE_OPTION=" -O2" \
+	PATH="$(D)/build-llvm/Release-Asserts/bin:$(srcdir)/test/Scripts:/usr/bin:/bin"
+
+define llvm_extra_binary
+	if test "x$*" = "xllvm" ; then \
+		find $(D)/debian/$* -type f -name "lli*" | xargs $(RM) ; \
+		$(RM) $(D)/debian/$*.links ; \
+		for i in $$(ls $(D)/debian/$*/$(PF)/bin); do \
+			echo "$(PF)/bin/$$i usr/bin/$$i" >> $(D)/debian/$*.links ; \
+		done ; \
+		sed -r 's/^(my\s+\$$LLVM_SRC_ROOT\s+=\s+q)\{(.*)\}\;$$/\1\{$(subst /,\/,$(PF))\/build\}\;/' \
+			-i $(D)/debian/$*/$(PF)/bin/llvm-config ; \
+		sed -r 's/^(my\s+\$$LLVM_OBJ_ROOT\s+=\s+q)\{(.*)\}\;$$/\1\{$(subst /,\/,$(PF))\/build\}\;/' \
+			-i $(D)/debian/$*/$(PF)/bin/llvm-config ; \
+		if test "x$(llvm_check)" = "xyes" ; then \
+			install -m 0644 $(D)/build-llvm/test/testrun.sum \
+			$(D)/debian/$*/usr/share/doc/$*/ ; \
+			echo >> $(D)/debian/$*/usr/share/doc/$*/testrun.sum ; \
+			echo "Compiler version: $(shell $(DEB_HOST_GNU_TYPE)-gcc -dumpversion) (GCC)" \
+			  >> $(D)/debian/$*/usr/share/doc/$*/testrun.sum ; \
+			echo "Platform: $(DEB_HOST_GNU_TYPE)" \
+			  >> $(D)/debian/$*/usr/share/doc/$*/testrun.sum ; \
+			echo "configure flags: $(llvm_confargs)" \
+			  >> $(D)/debian/$*/usr/share/doc/$*/testrun.sum ; \
+			gzip -9nf $(D)/debian/$*/usr/share/doc/$*/testrun.sum ; \
+		fi ; \
+	fi
+endef
+
+define llvm-dev_extra_binary
+	if test "x$*" = "xllvm-dev" ; then\
+		sed -r 's/^(LLVM_SRC_ROOT\s+\:\=\s+\$$\(shell cd).*\; \$$\(PWD\)\)$$/\1 $(subst /,\/,$(PF))\/build \; \$$\(PWD\)\)/' \
+			-i $(D)/debian/$*/$(PF)/build/Makefile.config ; \
+		sed -r 's/^(LLVM_OBJ_ROOT\s+\:\=\s+\$$\(shell cd).*\; \$$\(PWD\)\)$$/\1 $(subst /,\/,$(PF))\/build \; \$$\(PWD\)\)/' \
+			-i $(D)/debian/$*/$(PF)/build/Makefile.config ; \
+		sed -r "s/^(ac_pwd\=)'.*'$$/\1'$(subst /,\/,$(PF))\/build'/" \
+			-i $(D)/debian/$*/$(PF)/build/config.status ; \
+		chmod 644 $(D)/debian/$*/$(PF)/build/Makefile* ; \
+		find $(D)/debian/$* -type f -name "LICENSE.TXT" | xargs $(RM) ; \
+		cp $(D)/utils/vim/README $(D)/debian/$*/usr/share/doc/$*/README.vim ; \
+		cp $(D)/utils/emacs/README $(D)/debian/$*/usr/share/doc/$*/README.emacs ; \
+		sed -r 's/path-to-llvm\/utils\/emacs/\/usr\/share\/emacs\/site-lisp\/llvm/' \
+			-i $(D)/debian/$*/usr/share/doc/$*/README.emacs ; \
+	fi
+endef
+
+define llvm-source_extra_binary
+	if test "x$*" = "xllvm-source" ; then \
+		$(RM) -r $(D)/debian/$*/usr/src/llvm ; \
+		mkdir -p $(D)/debian/$*/usr/src/llvm ; \
+		cp -f ../$(PKGSOURCE)_$(UVERSION).orig.tar.gz \
+			$(D)/debian/$*/usr/src/llvm/$(PKGSOURCE)-$(UVERSION).tar.gz ; \
+		gunzip $(D)/debian/$*/usr/src/llvm/$(PKGSOURCE)-$(UVERSION).tar.gz ; \
+		lzma $(D)/debian/$*/usr/src/llvm/$(PKGSOURCE)-$(UVERSION).tar ; \
+		cp -r $(D)/debian/patches $(D)/debian/$*/usr/src/llvm/ ; \
+	fi
+endef
+
+define libllvm-ocaml-dev_extra_binary
+	if test "x$*" = "xlibllvm-ocaml-dev" ; then \
+	  cp $(D)/debian/$*.META $(D)/debian/$*/$(OCAML_STDLIB_DIR)/METAS/META.llvm ; \
+	fi
+endef
+
--- llvm-2.6.orig/debian/packages.d/llvm-snapshot.mk
+++ llvm-2.6/debian/packages.d/llvm-snapshot.mk
@@ -0,0 +1,48 @@
+builds := llvm
+
+PF		:= /usr/lib/llvm-snapshot
+
+llvm_packages := llvm-snapshot
+
+llvm_confargs := $(confargs) \
+	--prefix=$(PF)
+
+llvm_MAKEOPTS := $(MAKEOPTS) \
+	VERBOSE=1 OPTIMIZE_OPTION=" -O2" \
+	DebianOpts="-DLLVM_DEBIAN_INFO='\" ($(OS) $(VERSION))\"'"
+
+# run testsuite
+llvm_check := yes
+
+llvm_MAKECHECKOPTS := $(MAKEOPTS) \
+	VERBOSE=1 OPTIMIZE_OPTION=" -O2" \
+	PATH="$(D)/build-llvm/Release/bin:$(srcdir)/test/Scripts:/usr/bin:/bin"
+
+define llvm-snapshot_extra_binary
+	if test "x$*" = "xllvm-snapshot" ; then \
+		sed -r 's/^(my\s+\$$LLVM_SRC_ROOT\s+=\s+q)\{(.*)\}\;$$/\1\{$(subst /,\/,$(PF))\/build\}\;/' \
+			-i $(D)/debian/$*/$(PF)/bin/llvm-config ; \
+		sed -r 's/^(my\s+\$$LLVM_OBJ_ROOT\s+=\s+q)\{(.*)\}\;$$/\1\{$(subst /,\/,$(PF))\/build\}\;/' \
+			-i $(D)/debian/$*/$(PF)/bin/llvm-config ; \
+		sed -r 's/^(LLVM_SRC_ROOT\s+\:\=\s+\$$\(shell cd).*\; \$$\(PWD\)\)$$/\1 $(subst /,\/,$(PF))\/build \; \$$\(PWD\)\)/' \
+			-i $(D)/debian/$*/$(PF)/build/Makefile.config ; \
+		sed -r 's/^(LLVM_OBJ_ROOT\s+\:\=\s+\$$\(shell cd).*\; \$$\(PWD\)\)$$/\1 $(subst /,\/,$(PF))\/build \; \$$\(PWD\)\)/' \
+			-i $(D)/debian/$*/$(PF)/build/Makefile.config ; \
+		sed -r "s/^(ac_pwd\=)'.*'$$/\1'$(subst /,\/,$(PF))\/build'/" \
+			-i $(D)/debian/$*/$(PF)/build/config.status ; \
+		find $(D)/debian/$* -type f -name "LICENSE.TXT" | xargs $(RM) ; \
+		if test "x$(llvm_check)" = "xyes" ; then \
+			install -m 0644 $(D)/build-llvm/test/testrun.sum \
+			$(D)/debian/$*/usr/share/doc/$*/ ; \
+			echo >> $(D)/debian/$*/usr/share/doc/$*/testrun.sum ; \
+			echo "Compiler version: $(shell $(DEB_HOST_GNU_TYPE)-gcc -dumpversion) (GCC)" \
+			  >> $(D)/debian/$*/usr/share/doc/$*/testrun.sum ; \
+			echo "Platform: $(DEB_HOST_GNU_TYPE)" \
+			  >> $(D)/debian/$*/usr/share/doc/$*/testrun.sum ; \
+			echo "configure flags: $(llvm_confargs)" \
+			  >> $(D)/debian/$*/usr/share/doc/$*/testrun.sum ; \
+			gzip -9nf $(D)/debian/$*/usr/share/doc/$*/testrun.sum ; \
+		fi ; \
+	fi
+endef
+
--- llvm-2.6.orig/debian/packages.d/llvm-gcc-4.2.mk
+++ llvm-2.6/debian/packages.d/llvm-gcc-4.2.mk
@@ -0,0 +1,31 @@
+builds := llvm-gcc
+
+BUILDDEPS := llvm-dev (>= $(dev_version))
+
+llvm-gcc_packages := llvm-gcc
+
+llvm-gcc_confargs := $(confargs) \
+	--prefix=$(PF)/gcc-$(gcc_version) --enable-llvm=$(PF) \
+	--enable-languages=c,c++ --program-prefix=llvm- \
+	--enable-threads --disable-nls --disable-shared \
+	--disable-multilib
+
+check_archs := amd64 i386
+ifneq (,$(filter $(DEB_HOST_ARCH),$(check_archs)))
+  llvm-gcc_check := yes
+endif
+
+tarpath		:= $(firstword $(wildcard $(D)/llvm-gcc-$(gcc_version)-$(UVERSION)*.tar.* \
+				/usr/src/llvm/llvm-gcc-$(gcc_version)-$(UVERSION)*.tar.*))
+tarball		:= $(notdir $(tarpath))
+srcdir		:= $(subst -dfsg,,$(subst .tar$(suffix $(tarball)),,$(tarball)))
+
+define llvm-gcc-4.2_extra_binary
+	if test "x$*" = "xllvm-gcc-4.2" ; then \
+		$(RM) $(D)/debian/$*.links ; \
+		for i in $$(ls $(D)/debian/tmp-llvm-gcc/$(PF)/gcc-$(gcc_version)/bin); do \
+			echo "$(PF)/gcc-$(gcc_version)/bin/$$i usr/bin/$$i" >> $(D)/debian/$*.links ; \
+		done ; \
+	fi
+endef
+
--- llvm-2.6.orig/debian/packages.d/tools.mk
+++ llvm-2.6/debian/packages.d/tools.mk
@@ -0,0 +1,32 @@
+builds := $(PKGSOURCE)
+
+ifeq (,$(filter $(PKGSOURCE),$(tools)))
+  $(error unsupported tool)
+endif
+
+BUILDDEPS	:= llvm-dev (>= $(dev_version)), llvm-source (>= $(dev_version))
+PF		:= /usr
+
+patchdirs	:= /usr/src/llvm/patches
+
+$(PKGSOURCE)_packages := $(PKGSOURCE)
+
+$(PKGSOURCE)_confargs := $(confargs) \
+	--prefix=$(PF) --disable-assertions
+
+$(PKGSOURCE)_MAKEOPTS := $(MAKEOPTS) \
+	VERBOSE=1 OPTIMIZE_OPTION=" -O2" \
+	DebianOpts="-DLLVM_DEBIAN_INFO='\" ($(OS) $(VERSION))\"'" \
+	ONLY_TOOLS="$(PKGSOURCE)"
+
+tarpath		:= $(firstword $(wildcard $(D)/llvm-$(UVERSION)*.tar.* \
+			/usr/src/llvm/llvm-$(UVERSION)*.tar.*))
+tarball		:= $(notdir $(tarpath))
+srcdir		:= $(subst -dfsg,,$(subst .tar$(suffix $(tarball)),,$(tarball)))
+
+define $(PKGSOURCE)_extra_unpack
+	for tool in $(notdir $(wildcard $(D)/tools/*)) ; do \
+	  ln -sf $(D)/tools/$$tool $(D)/$(srcdir)/tools/$$tool ; \
+	done
+endef
+
--- llvm-2.6.orig/debian/debhelper.in/llvm.dirs
+++ llvm-2.6/debian/debhelper.in/llvm.dirs
@@ -0,0 +1,6 @@
+@PF@/bin
+usr/bin
+usr/include
+usr/share/man/man1
+etc/llvm
+usr/share/binfmts
--- llvm-2.6.orig/debian/debhelper.in/llvm-dev.dirs
+++ llvm-2.6/debian/debhelper.in/llvm-dev.dirs
@@ -0,0 +1,4 @@
+@PF@/lib
+@PF@/build
+usr/share/doc/llvm-dev
+usr/share/emacs/site-lisp/llvm
--- llvm-2.6.orig/debian/debhelper.in/llvm.links
+++ llvm-2.6/debian/debhelper.in/llvm.links
@@ -0,0 +1 @@
+# AUTOGENERATED in debian/rules.d/build.mk.
--- llvm-2.6.orig/debian/debhelper.in/llvm.install
+++ llvm-2.6/debian/debhelper.in/llvm.install
@@ -0,0 +1 @@
+debian/@TMP@/@PF@/bin/*			@PF@/bin/
--- llvm-2.6.orig/debian/debhelper.in/llvm-runtime.manpages
+++ llvm-2.6/debian/debhelper.in/llvm-runtime.manpages
@@ -0,0 +1 @@
+debian/@TMP@/@PF@/share/man/man1/lli.*
--- llvm-2.6.orig/debian/debhelper.in/llvm-examples.links
+++ llvm-2.6/debian/debhelper.in/llvm-examples.links
@@ -0,0 +1,3 @@
+@PF@/build/Makefile.common	usr/share/doc/llvm-examples/Makefile.common
+@PF@/build/Makefile.config	usr/share/doc/llvm-examples/Makefile.config
+@PF@/build/Makefile.rules	usr/share/doc/llvm-examples/Makefile.rules
--- llvm-2.6.orig/debian/debhelper.in/llvm-examples.examples
+++ llvm-2.6/debian/debhelper.in/llvm-examples.examples
@@ -0,0 +1 @@
+examples/*
--- llvm-2.6.orig/debian/debhelper.in/libllvm-ocaml-dev.install
+++ llvm-2.6/debian/debhelper.in/libllvm-ocaml-dev.install
@@ -0,0 +1,2 @@
+debian/@TMP@/@OCAML_STDLIB_DIR@/llvm		@OCAML_STDLIB_DIR@/
+debian/@TMP@/@PF@/docs/llvm/ocamldoc/html	usr/share/doc/libllvm-ocaml-dev/
--- llvm-2.6.orig/debian/debhelper.in/llvm-runtime.links
+++ llvm-2.6/debian/debhelper.in/llvm-runtime.links
@@ -0,0 +1 @@
+@PF@/bin/lli		/usr/bin/lli
--- llvm-2.6.orig/debian/debhelper.in/llvm-examples.dirs
+++ llvm-2.6/debian/debhelper.in/llvm-examples.dirs
@@ -0,0 +1 @@
+usr/share/doc/llvm-examples
--- llvm-2.6.orig/debian/debhelper.in/llvm-snapshot.install
+++ llvm-2.6/debian/debhelper.in/llvm-snapshot.install
@@ -0,0 +1,13 @@
+debian/@TMP@/@PF@/bin/*			@PF@/bin/
+debian/@TMP@/@PF@/lib/*			@PF@/lib/
+debian/@TMP@/@PF@/include/*		@PF@/include/
+
+debian/@TMP@/@PF@/docs/llvm/html	usr/share/doc/llvm-snapshot/
+debian/@TMP@/@PF@/docs/llvm/ps		usr/share/doc/llvm-snapshot/
+
+@BUILD@/Makefile.common			@PF@/build/
+@BUILD@/Makefile.config			@PF@/build/
+@BUILD@/config.status			@PF@/build/
+Makefile.rules				@PF@/build/
+configure				@PF@/build/
+autoconf/				@PF@/build/
--- llvm-2.6.orig/debian/debhelper.in/llvm-runtime.install
+++ llvm-2.6/debian/debhelper.in/llvm-runtime.install
@@ -0,0 +1,2 @@
+debian/@TMP@/@PF@/bin/lli		@PF@/bin/
+debian/llvm.binfmt			usr/share/binfmts/
--- llvm-2.6.orig/debian/debhelper.in/llvm-gcc-4.2.install
+++ llvm-2.6/debian/debhelper.in/llvm-gcc-4.2.install
@@ -0,0 +1 @@
+debian/@TMP@/@PF@
--- llvm-2.6.orig/debian/debhelper.in/libllvm-ocaml-dev.doc-base
+++ llvm-2.6/debian/debhelper.in/libllvm-ocaml-dev.doc-base
@@ -0,0 +1,8 @@
+Document: libllvm-ocaml-dev-ocamldoc-api-reference
+Title: Llvm OCamldoc API Reference
+Abstract: API reference manual for libllvm-ocaml-dev (generated via OCamldoc)
+Section: Programming/OCaml
+
+Format: HTML
+Index: /usr/share/doc/libllvm-ocaml-dev/html/index.html
+Files: /usr/share/doc/libllvm-ocaml-dev/html/*
--- llvm-2.6.orig/debian/debhelper.in/clang.links
+++ llvm-2.6/debian/debhelper.in/clang.links
@@ -0,0 +1,2 @@
+usr/share/man/man1/clang.1.gz		usr/share/man/man1/llvm-clang.1.gz
+@PF@/bin/clang				@PF@/bin/llvm-clang
--- llvm-2.6.orig/debian/debhelper.in/llvm-dev.install
+++ llvm-2.6/debian/debhelper.in/llvm-dev.install
@@ -0,0 +1,17 @@
+debian/@TMP@/@PF@/lib/*		@PF@/lib/
+debian/@TMP@/@PF@/include/*	usr/include/
+
+@BUILD@/Makefile.common		@PF@/build/
+@BUILD@/Makefile.config		@PF@/build/
+@BUILD@/config.status		@PF@/build/
+Makefile.rules			@PF@/build/
+configure			@PF@/build/
+autoconf/			@PF@/build/
+
+utils/vim/llvm.vim		usr/share/vim/addons/syntax
+utils/vim/tablegen.vim		usr/share/vim/addons/syntax
+
+utils/emacs/emacs.el		usr/share/emacs/site-lisp/llvm/
+utils/emacs/llvm-mode.el	usr/share/emacs/site-lisp/llvm/
+utils/emacs/tablegen-mode.el	usr/share/emacs/site-lisp/llvm/
+
--- llvm-2.6.orig/debian/debhelper.in/libllvm-ocaml-dev.dirs
+++ llvm-2.6/debian/debhelper.in/libllvm-ocaml-dev.dirs
@@ -0,0 +1 @@
+@OCAML_STDLIB_DIR@/METAS
--- llvm-2.6.orig/debian/debhelper.in/llvm-doc.install
+++ llvm-2.6/debian/debhelper.in/llvm-doc.install
@@ -0,0 +1,2 @@
+debian/@TMP@/@PF@/docs/llvm/html	usr/share/doc/llvm-doc/
+debian/@TMP@/@PF@/docs/llvm/ps		usr/share/doc/llvm-doc/
--- llvm-2.6.orig/debian/debhelper.in/libllvm-ocaml-dev.META
+++ llvm-2.6/debian/debhelper.in/libllvm-ocaml-dev.META
@@ -0,0 +1,63 @@
+description = "Low Level Virtual Machine bindings"
+version = "@UVERSION@"
+
+directory = "+llvm"
+
+archive(byte)   = "llvm.cma"
+archive(native) = "llvm.cmxa"
+linkopts = "-cclib -lstdc++ -cclib -lllvm"
+
+package "executionengine"
+(
+  requires = "llvm"
+  version = "@UVERSION@"
+  archive(native) = "llvm_executionengine.cmxa"
+  archive(byte)   = "llvm_executionengine.cma"
+  linkopts = "-cclib -lllvm_executionengine"
+)
+
+package "target"
+(
+  requires = "llvm"
+  version = "@UVERSION@"
+  archive(native) = "llvm_target.cmxa"
+  archive(byte)   = "llvm_target.cma"
+  linkopts = "-cclib -lllvm_target"
+)
+
+package "scalar_opts"
+(
+  requires = "llvm llvm.target"
+  version = "@UVERSION@"
+  archive(native) = "llvm_scalar_opts.cmxa"
+  archive(byte)   = "llvm_scalar_opts.cma"
+  linkopts = "-cclib -lllvm_scalar_opts"
+)
+
+package "analysis"
+(
+  requires = "llvm"
+  version = "@UVERSION@"
+  archive(native) = "llvm_analysis.cmxa"
+  archive(byte)   = "llvm_analysis.cma"
+  linkopts = "-cclib -lllvm_analysis"
+)
+
+package "bitwriter"
+(
+  requires = "llvm"
+  version = "@UVERSION@"
+  archive(native) = "llvm_bitwriter.cmxa"
+  archive(byte)   = "llvm_bitwriter.cma"
+  linkopts = "-cclib -lllvm_bitwriter"
+)
+
+package "bitreader"
+(
+  requires = "llvm llvm.bitwriter"
+  version = "@UVERSION@"
+  archive(native) = "llvm_bitreader.cmxa"
+  archive(byte)   = "llvm_bitreader.cma"
+  linkopts = "-cclib -lllvm_bitreader"
+)
+
--- llvm-2.6.orig/debian/debhelper.in/llvm-doc.dirs
+++ llvm-2.6/debian/debhelper.in/llvm-doc.dirs
@@ -0,0 +1 @@
+usr/share/doc/llvm-doc
--- llvm-2.6.orig/debian/debhelper.in/llvm-runtime.prerm
+++ llvm-2.6/debian/debhelper.in/llvm-runtime.prerm
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+if test "$1" = "remove"; then
+    if test -x /usr/sbin/update-binfmts; then
+        update-binfmts --package llvm \
+            --remove llvm.binfmt /usr/bin/lli || true
+    fi
+fi
+
+#DEBHELPER#
+
--- llvm-2.6.orig/debian/debhelper.in/llvm.manpages
+++ llvm-2.6/debian/debhelper.in/llvm.manpages
@@ -0,0 +1 @@
+debian/@TMP@/@PF@/share/man/man1/*
--- llvm-2.6.orig/debian/debhelper.in/clang.install
+++ llvm-2.6/debian/debhelper.in/clang.install
@@ -0,0 +1,5 @@
+debian/@TMP@/@PF@/lib/clang			@PF@/lib/
+debian/@TMP@/@PF@/bin/clang			@PF@/bin/
+tools/clang/utils/scan-build			@PF@/bin/
+tools/clang/utils/ccc-analyzer			@PF@/bin/
+debian/@TMP@/@PF@/share/man/man1/clang.1	usr/share/man/man1/
--- llvm-2.6.orig/debian/debhelper.in/llvm-runtime.postinst
+++ llvm-2.6/debian/debhelper.in/llvm-runtime.postinst
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+if test "$1" = "configure"; then
+    if test -x /usr/sbin/update-binfmts; then
+        update-binfmts --import llvm.binfmt || true
+    fi
+fi
+
+#DEBHELPER#
--- llvm-2.6.orig/debian/rules.d/control.mk
+++ llvm-2.6/debian/rules.d/control.mk
@@ -0,0 +1,32 @@
+ifneq (,$(strip $(BUILDDEPS)))
+  BUILDDEPS :=, $(BUILDDEPS)
+endif
+
+packages := $(foreach build,$(builds),$($(build)_packages))
+packages += $(extra_packages)
+
+debian/control:
+	@echo Regenerating control file...
+	sed -e "s/@PKGSOURCE@/$(PKGSOURCE)/g"		\
+	    -e "s/ *@BUILDDEPS@/$(BUILDDEPS)/g"		\
+		-e "s/@UVERSION@/$(UVERSION)/g"			\
+		-e "s/@GCC_VERSION@/$(gcc_version)/g"	\
+	    $@.in/source $(addprefix $@.in/,$(packages)) > $@
+
+control: debian/control
+
+diffstats:
+	@echo Updating diffstats...
+	for patch in $(D)/debian/patches/*.patch ; do \
+	  (echo '---' ; \
+	   diffstat $${patch} ; \
+	   echo ; \
+	   cat $${patch} | awk '/^--- / {put=1} put==1' ; \
+	  ) > $${patch}T && \
+	  diff -U 0 $${patch} $${patch}T ; \
+	  mv -f $${patch}T $${patch} ; \
+	done
+
+clean: control diffstats
+
+.PHONY: clean control debian/control diffstats
--- llvm-2.6.orig/debian/rules.d/vars.mk
+++ llvm-2.6/debian/rules.d/vars.mk
@@ -0,0 +1,41 @@
+DISTRIBUTION	:= $(shell dpkg-parsechangelog | grep ^Distribution | sed -e 's/^Distribution: //')
+PKGSOURCE	:= $(shell dpkg-parsechangelog | grep ^Source | sed -e 's/^Source: //')
+VERSION		:= $(shell dpkg-parsechangelog | grep ^Version | sed -e 's/^Version: //')
+UVERSION	:= $(shell echo $(VERSION) | cut -d'-' -f1)
+OS		:= $(shell lsb_release -is)
+PF		:= /usr/lib/llvm
+D		:= $(CURDIR)
+
+# for llvm-gcc and tools
+dev_version	:= $(UVERSION)-9
+
+$(foreach var,$(shell dpkg-architecture | sed -e 's/=/?=/'),$(eval $(var)))
+
+stampdir	:= $(D)/debian/stamps
+$(foreach target,control unpack patch configure build check install binary, \
+  $(eval $(target)-stamp := $(stampdir)/$(target)-stamp))
+
+packages_arch	:= $(strip $(shell dh_listpackages -a 2>/dev/null))
+packages_indep	:= $(strip $(shell dh_listpackages -i 2>/dev/null))
+packages_all	:= $(packages_arch) $(packages_indep)
+
+NJOBS := 1
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+  NJOBS := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+else
+  # disabled
+  ifeq (0,1)
+    NCPUS := $(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)
+    NJOBS := $(shell if test $(NCPUS) -gt 1; then echo `expr $(NCPUS) + 1`; \
+               else echo $(NCPUS); fi)
+  endif
+endif
+
+include /usr/share/ocaml/ocamlvars.mk
+
+# global shared confargs
+confargs := \
+	--host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
+	--with-pic --enable-pic --enable-optimized --enable-libffi \
+	--with-ocaml-libdir=$(OCAML_STDLIB_DIR)/llvm
+
--- llvm-2.6.orig/debian/rules.d/binary.mk
+++ llvm-2.6/debian/rules.d/binary.mk
@@ -0,0 +1,68 @@
+binary-indep binary-arch: $(build-stamp) $(install-stamp)
+binary-arch: $(addprefix $(binary-stamp)-,$(packages_arch))
+binary-indep: $(addprefix $(binary-stamp)-,$(packages_indep))
+binary: binary-arch binary-indep
+	# TODO: list installed nowhere files
+
+$(foreach build,$(builds),$(foreach package,$($(build)_packages),$(eval \
+tmp-$(package) := tmp-$(build))))
+
+$(foreach build,$(builds),$(foreach package,$($(build)_packages),$(eval \
+build-$(package) := $($(build)_builddir))))
+
+debhelper-%:
+	$(foreach f,$(notdir $(wildcard $(D)/debian/debhelper.in/$*.*)),\
+	    sed -e "s;@PF@;$(PF);g" \
+		-e "s;@TMP@;$(tmp-$*);g" \
+		-e "s;@BUILD@;$(build-$*);g" \
+		-e "s;@UVERSION@;$(UVERSION);g" \
+		-e "s;@GCC_VERSION@;$(GCC_VERSION);g" \
+		-e "s;@LLVM_VERSION@;$(LLVM_VERSION);g" \
+		-e "s;@OCAML_STDLIB_DIR@;$(OCAML_STDLIB_DIR);g" \
+		$(D)/debian/debhelper.in/$f > $(D)/debian/$f &&) :
+
+clean: clean-debhelper
+clean-debhelper: clean-common
+	$(RM) $(addprefix debian/,$(notdir $(wildcard $(D)/debian/debhelper.in/*)))
+
+.PHONY: clean clean-debhelper
+
+$(foreach build,$(builds),$(foreach package,$($(build)_packages),$(eval \
+dependency-$(package): $(install-stamp)-$(build))))
+
+$(foreach package,$(extra_packages),$(eval \
+dependency-$(package): $(patch-stamp)))
+
+$(binary-stamp)-%: dependency-% debhelper-%
+	@echo Building package: $*
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs -p$*
+	dh_installdocs -p$*
+	dh_installexamples -p$*
+	dh_installman -p$*
+	dh_installmime -p$*
+	dh_installdirs -p$*
+	dh_install -p$*
+	for dir in lib libexec bin ; \
+		do for i in $$(find $(D)/debian/$*/$(PF)/$$dir 2>/dev/null || echo -n) ; \
+			do if objdump -p $$i 2>/dev/null | grep RPATH 2>&1 >/dev/null ; \
+				then echo "Removing hardcoded path library from $$i" ; \
+				chrpath -d $$i || true ; \
+			fi ; \
+		done ; \
+	done
+	$(call $*_extra_binary)
+	dh_link -p$*
+	dh_strip -p$*
+	dh_compress -p$*
+	dh_fixperms -p$*
+	dh_installdeb -p$*
+	dh_shlibdeps -p$*
+	dh_ocaml -p$*
+	dh_gencontrol -p$*
+	dh_md5sums -p$*
+	dh_builddeb -p$*
+	touch $@
+
+.PHONY: binary binary-arch binary-indep debhelper-%
--- llvm-2.6.orig/debian/rules.d/build.mk
+++ llvm-2.6/debian/rules.d/build.mk
@@ -0,0 +1,65 @@
+configure: $(configure-stamp)
+$(configure-stamp): $(addprefix $(configure-stamp)-,$(builds))
+	touch $@
+
+build: $(build-stamp)
+$(build-stamp): $(addprefix $(build-stamp)-,$(builds))
+	touch $@
+
+check: $(check-stamp)
+$(check-stamp): $(addprefix $(check-stamp)-,$(builds))
+	touch $@
+
+install: $(install-stamp)
+$(install-stamp): $(addprefix $(install-stamp)-,$(builds))
+	touch $@
+
+clean: clean-common
+clean-common:
+	dh_testdir
+	dh_testroot
+	dh_clean
+	find $(srcdir)/test/Bindings/Ocaml -type f \
+	  -name "*.o" -or -name "*.cmx" | xargs $(RM)
+	$(RM) -r $(D)/debian/tmp-*
+	$(RM) $(D)/test/Bindings/Ocaml/*.cm[io]
+	$(RM) $(D)/debian/log-check-* $(D)/debian/logwatch-*.pid
+	$(RM) $(D)/log-* $(D)/missing
+
+.PHONY: configure build install check clean clean-common
+
+# GENERIC -------------------
+$(configure-stamp)-%: $(unpack-stamp) $(patch-stamp)
+	-mkdir -p $($*_builddir) 2>/dev/null
+	cd $($*_builddir) && \
+	  ../$(srcdir)/configure $($*_confargs)
+	$(call $*_extra_configure)
+	touch $@
+$(build-stamp)-%: $(configure-stamp)-%
+	$(MAKE) -j$(NJOBS) -C $($*_builddir) $($*_MAKEOPTS)
+	$(call $*_extra_build)
+	touch $@
+$(check-stamp)-%: $(build-stamp)-%
+	# TODO: fix logwatch script
+#	  chmod +x $(D)/debian/logwatch.sh && \
+#	  (debian/logwatch.sh -t 900 -p $(D)/debian/logwatch-$*.pid \
+#	     -m '\ntestsuite still running ...\n' \
+#	     $($*_builddir)/test/testrun.log \
+#	     &)
+	if test "x$($*_check)" = "xyes" ; then \
+	  $(MAKE) -C $($*_builddir) $($*_MAKECHECKOPTS) check || true ; \
+	fi
+	$(call $*_extra_check)
+	touch $@
+$(install-stamp)-%: $(build-stamp)-% $(check-stamp)-%
+	$(MAKE) -C $($*_builddir) $($*_MAKEOPTS) install DESTDIR=$(D)/debian/tmp-$*
+	# Fix links that point to install directory
+	find $(D)/debian/tmp-$* -type l | while read i ; \
+	  do \
+	    L=$$(readlink $$i) ; \
+	    L=$${L##$(D)/debian/tmp-$*} ; \
+	    ln -sf $$L $$i ; \
+	  done
+	$(call $*_extra_install)
+	touch $@
+
--- llvm-2.6.orig/debian/rules.d/unpack.mk
+++ llvm-2.6/debian/rules.d/unpack.mk
@@ -0,0 +1,52 @@
+unpack: $(unpack-stamp)
+$(unpack-stamp): $(addprefix $(unpack-stamp)-,$(tarball))
+	mkdir -p $(@D)
+	touch $@
+
+$(unpack-stamp)-%:
+	test -d $(stampdir) || mkdir $(stampdir)
+	if ! test -z "$(tarball)" ; then \
+	  $(RM) -r $(srcdir) ; \
+	  case $(tarball) in \
+	    *.bz2) tar -x --bzip2 -f $(tarpath);; \
+	    *.gz)  tar -x --gzip  -f $(tarpath);; \
+	    *.lzma) lzcat $(tarpath) | tar -x -f -;; \
+	    *)     false;; \
+	  esac ; \
+	fi
+	$(call $(PKGSOURCE)_extra_unpack)
+	touch $@
+
+patches := $(foreach patchdir,$(patchdirs),$(wildcard $(patchdir)/*.patch))
+
+patches_rev := # nothing
+$(foreach patch,$(patches),$(eval patches_rev := $(patch) $(patches_rev)))
+
+patch: $(patch-stamp)
+$(patch-stamp): $(unpack-stamp)
+	test -d $(stampdir)/patches || mkdir -p $(stampdir)/patches
+	cd $(srcdir) && for patch in $(patches) ; do \
+	  if ! test -f $(stampdir)/patches/$$(echo $$patch | tr "/" "_") ; \
+	    then echo "Applying patch: $$patch" && patch -p1 < $$patch && \
+	    touch $(stampdir)/patches/$$(echo $$patch | tr "/" "_") ; \
+	    echo ; \
+	  fi ; \
+	done
+	touch $@
+
+unpatch:
+	test -d $(stampdir)/patches || mkdir -p $(stampdir)/patches
+	test -z "$(tarball)" || (test -d $(srcdir) || mkdir $(srcdir))
+	cd $(srcdir) && for patch in $(patches_rev) ; do \
+	  if test -f $(stampdir)/patches/$$(echo $$patch | tr "/" "_") ; \
+	    then echo "Reverting patch: $$patch" && patch -p1 -R < $$patch && \
+	    $(RM) $(stampdir)/patches/$$(echo $$patch | tr "/" "_") ; \
+	    echo ; \
+	  fi ; \
+	done
+	$(RM) -r $(stampdir)/patches
+	$(RM) $(patch-stamp)
+
+clean: unpatch
+
+.PHONY: clean unpack patch unpatch
--- llvm-2.6.orig/debian/control.in/libllvm-ocaml-dev
+++ llvm-2.6/debian/control.in/libllvm-ocaml-dev
@@ -0,0 +1,20 @@
+Package: libllvm-ocaml-dev
+Section: ocaml
+Architecture: any
+Suggests: llvm-doc, ocaml-findlib
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${ocaml:Depends}, llvm-dev (= ${binary:Version})
+Provides: ${ocaml:Provides}
+Description: Low-Level Virtual Machine (LLVM) bindings for OCaml
+ The Low-Level Virtual Machine (LLVM) is a collection of libraries and
+ tools that make it easy to build compilers, optimizers, Just-In-Time
+ code generators, and many other compiler-related programs. LLVM
+ uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ This package provides the OCaml bindings to develop applications using llvm.
+
--- llvm-2.6.orig/debian/control.in/source
+++ llvm-2.6/debian/control.in/source
@@ -0,0 +1,14 @@
+Source: @PKGSOURCE@
+Section: devel
+Priority: optional
+Maintainer: LLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
+Uploaders: Arthur Loiret <aloiret@debian.org>, Pierre Habouzit <madcoder@debian.org>
+Build-Depends: debhelper (>= 6.0.0), flex, bison, dejagnu, tcl8.4, expect,
+    autoconf, automake1.9, perl, libtool, doxygen, chrpath, texinfo,
+    sharutils, autotools-dev (>= 20060702.1), libffi-dev (>= 3.0.9),
+    ocaml-nox (>= 3.11.2), ocaml-best-compilers | ocaml-nox, dh-ocaml (>= 0.9.1),
+    lsb-release @BUILDDEPS@
+Build-Conflicts: oprofile
+Standards-Version: 3.8.4
+Homepage: http://www.llvm.org/
+
--- llvm-2.6.orig/debian/control.in/llvm-source
+++ llvm-2.6/debian/control.in/llvm-source
@@ -0,0 +1,17 @@
+Package: llvm-source
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Low-Level Virtual Machine (LLVM), source code
+ The Low-Level Virtual Machine (LLVM) is a collection of libraries and
+ tools that make it easy to build compilers, optimizers, Just-In-Time
+ code generators, and many other compiler-related programs. LLVM
+ uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ This package contains the llvm source code.
+
--- llvm-2.6.orig/debian/control.in/llvm-dev
+++ llvm-2.6/debian/control.in/llvm-dev
@@ -0,0 +1,21 @@
+Package: llvm-dev
+Architecture: any
+Depends: libffi-dev, ${shlibs:Depends}, ${misc:Depends}, llvm (= ${binary:Version})
+Provides: llvm-libs
+Conflicts: llvm-libs
+Replaces: llvm-libs, llvm (<< 2.2-3)
+Description: Low-Level Virtual Machine (LLVM), libraries and headers
+ The Low-Level Virtual Machine (LLVM) is a collection of libraries and
+ tools that make it easy to build compilers, optimizers, Just-In-Time
+ code generators, and many other compiler-related programs. LLVM
+ uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ This package provides the libraries and headers to develop applications
+ using llvm.
+
--- llvm-2.6.orig/debian/control.in/llvm-runtime
+++ llvm-2.6/debian/control.in/llvm-runtime
@@ -0,0 +1,20 @@
+Package: llvm-runtime
+Architecture: any
+Depends: binfmt-support, ${shlibs:Depends}, ${misc:Depends}
+Breaks: llvm (<< 2.6-7)
+Replaces: llvm (<< 2.6-7)
+Description: Low-Level Virtual Machine (LLVM), bytecode interpreter
+ The Low-Level Virtual Machine (LLVM) is a collection of libraries and
+ tools that make it easy to build compilers, optimizers, Just-In-Time
+ code generators, and many other compiler-related programs. LLVM
+ uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ This package provides the minimal required to execute programs in LLVM
+ format.
+
--- llvm-2.6.orig/debian/control.in/llvm-snapshot
+++ llvm-2.6/debian/control.in/llvm-snapshot
@@ -0,0 +1,19 @@
+Package: llvm-snapshot
+Priority: extra
+Architecture: any
+Suggests: llvm-doc
+Depends: binfmt-support, ${shlibs:Depends}, ${misc:Depends}
+Description: a SNAPSHOT of the Low-Level Virtual Machine (LLVM)
+ The Low-Level Virtual Machine (LLVM) is a collection of libraries and
+ tools that make it easy to build compilers, optimizers, Just-In-Time
+ code generators, and many other compiler-related programs. LLVM
+ uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ This package is a SNAPSHOT taken from the upstream SVN.
+
--- llvm-2.6.orig/debian/control.in/clang
+++ llvm-2.6/debian/control.in/clang
@@ -0,0 +1,40 @@
+Package: clang
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Recommends: llvm-dev
+Description: Low-Level Virtual Machine (LLVM), C language family frontend
+ The Low-Level Virtual Machine (LLVM) is a collection of libraries and
+ tools that make it easy to build compilers, optimizers, Just-In-Time
+ code generators, and many other compiler-related programs. LLVM
+ uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ Clang project is a new C, C++, Objective C and Objective C++ front-end
+ for the LLVM compiler. Some of its goals include the following:
+ .
+ End-User Features:
+ .
+    * Fast compiles and low memory use
+    * Expressive diagnostics (examples)
+    * GCC compatibility
+ .
+ Utility and Applications:
+ .
+    * Modular library based architecture
+    * Support diverse clients (refactoring, static analysis, code
+      generation, etc)
+    * Allow tight integration with IDEs
+    * Use the LLVM 'BSD' License
+ .
+ Internal Design and Implementation:
+ .
+    * A real-world, production quality compiler
+    * A simple and hackable code base
+    * A single unified parser for C, Objective C, C++, and Objective C++
+    * Conformance with C/C++/ObjC and their variants
+
--- llvm-2.6.orig/debian/control.in/llvm
+++ llvm-2.6/debian/control.in/llvm
@@ -0,0 +1,28 @@
+Package: llvm
+Architecture: any
+Suggests: llvm-doc
+Depends: llvm-runtime (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Recommends: llvm-dev
+Description: Low-Level Virtual Machine (LLVM)
+ The Low-Level Virtual Machine (LLVM) is a collection of libraries and
+ tools that make it easy to build compilers, optimizers, Just-In-Time
+ code generators, and many other compiler-related programs. LLVM
+ uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ The strengths of the LLVM infrastructure are its extremely
+ simple design (which makes it easy to understand and use),
+ source-language independence, powerful mid-level optimizer, automated
+ compiler debugging support, extensibility, and its stability and
+ reliability. LLVM is currently being used to host a wide variety of
+ academic research projects and commercial projects. LLVM includes C
+ and C++ front-ends (based on GCC 4.0.1), a front-end for a Forth-like
+ language (Stacker), a young scheme front-end, and Java support is
+ in development. LLVM can generate code for X86, SparcV9, PowerPC,
+ or it can emit C code.
+
--- llvm-2.6.orig/debian/control.in/llvm-gcc
+++ llvm-2.6/debian/control.in/llvm-gcc
@@ -0,0 +1,22 @@
+Package: llvm-gcc-@GCC_VERSION@
+Architecture: i386 amd64
+Depends: llvm-dev (>= @UVERSION@), llvm (>= @UVERSION@), ${shlibs:Depends}, ${misc:Depends}
+Provides: llvm-gcc, llvm-cfe
+Suggests: gcc-@GCC_VERSION@-doc
+Description: Low-Level Virtual Machine (LLVM), C/C++ front-end
+ The Low-Level Virtual Machine (LLVM) is a collection of libraries and
+ tools that make it easy to build compilers, optimizers, Just-In-Time
+ code generators, and many other compiler-related programs. LLVM
+ uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ This is only a utility package that contains the C/C++ front-end
+ used by the compiler, and was created in order to reduce the overall
+ size of the compiler package itself.  Please install the 'llvm'
+ package to install the actual compiler.
+
--- llvm-2.6.orig/debian/control.in/llvm-examples
+++ llvm-2.6/debian/control.in/llvm-examples
@@ -0,0 +1,19 @@
+Package: llvm-examples
+Section: doc
+Architecture: all
+Depends: ${misc:Depends}, llvm-dev (>= ${source:Version}), llvm-dev (<< ${source:Version}+c~)
+Description: Low-Level Virtual Machine (LLVM), examples
+ The Low-Level Virtual Machine (LLVM) is a collection of libraries and
+ tools that make it easy to build compilers, optimizers, Just-In-Time
+ code generators, and many other compiler-related programs. LLVM
+ uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ This package contains examples for using LLVM, both in developing
+ extensions to LLVM and in using it to compile code.
+
--- llvm-2.6.orig/debian/control.in/llvm-doc
+++ llvm-2.6/debian/control.in/llvm-doc
@@ -0,0 +1,18 @@
+Package: llvm-doc
+Section: doc
+Architecture: all
+Depends: ${misc:Depends}
+Description: Low-Level Virtual Machine (LLVM), documentation
+ The Low-Level Virtual Machine (LLVM) is a collection of libraries and
+ tools that make it easy to build compilers, optimizers, Just-In-Time
+ code generators, and many other compiler-related programs. LLVM
+ uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ This package contains all documentation (extensive).
+
--- llvm-2.6.orig/debian/source/format
+++ llvm-2.6/debian/source/format
@@ -0,0 +1 @@
+1.0
--- llvm-2.6.orig/debian/patches/0001-Update-configure-script-for-kfreebsd-gnu-and-hurd.patch
+++ llvm-2.6/debian/patches/0001-Update-configure-script-for-kfreebsd-gnu-and-hurd.patch
@@ -0,0 +1,25 @@
+---
+
+--- a/configure
++++ b/configure
+@@ -2293,7 +2293,7 @@ else
+     llvm_cv_no_link_all_option="-Wl,-noall_load"
+     llvm_cv_os_type="Darwin"
+     llvm_cv_platform_type="Unix" ;;
+-  *-*-freebsd*)
++  *-*-freebsd* | *-*-kfreebsd-gnu)
+     llvm_cv_link_all_option="-Wl,--whole-archive"
+     llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
+     llvm_cv_os_type="FreeBSD"
+@@ -2328,6 +2328,11 @@ else
+     llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
+     llvm_cv_os_type="Linux"
+     llvm_cv_platform_type="Unix" ;;
++  *-*-gnu*)
++    llvm_cv_link_all_option="-Wl,--whole-archive"
++    llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
++    llvm_cv_os_type="GNU"
++    llvm_cv_platform_type="Unix" ;;
+   *-*-solaris*)
+     llvm_cv_link_all_option="-Wl,-z,allextract"
+     llvm_cv_no_link_all_option="-Wl,-z,defaultextract"
--- llvm-2.6.orig/debian/patches/0005-Disable-llvm-stub.patch
+++ llvm-2.6/debian/patches/0005-Disable-llvm-stub.patch
@@ -0,0 +1,14 @@
+---
+
+--- a/tools/Makefile
++++ b/tools/Makefile
+@@ -20,8 +20,7 @@ PARALLEL_DIRS := opt llvm-as llvm-dis \
+                  llc llvm-ranlib llvm-ar llvm-nm \
+                  llvm-ld llvm-prof llvm-link \
+                  lli gccas gccld llvm-extract llvm-db \
+-                 bugpoint llvm-bcanalyzer llvm-stub \
+-                 llvm-mc llvmc
++                 bugpoint llvm-bcanalyzer llvm-mc llvmc
+ 
+ # Let users override the set of tools to build from the command line.
+ ifdef ONLY_TOOLS
--- llvm-2.6.orig/debian/patches/0002-Fix-llvm-config-script.patch
+++ llvm-2.6/debian/patches/0002-Fix-llvm-config-script.patch
@@ -0,0 +1,27 @@
+---
+
+--- a/tools/llvm-config/llvm-config.in.in
++++ b/tools/llvm-config/llvm-config.in.in
+@@ -92,8 +92,11 @@ if ($ABS_RUN_DIR eq $ABS_OBJ_ROOT) {
+   $INCLUDEOPTION = "-I$INCLUDEDIR -I$LLVM_OBJ_ROOT/include"
+ } else {
+   # If installed, ignore the prefix the tree was configured with, use the
+-  # current prefix.
+-  $PREFIX = $ABS_RUN_DIR;
++  # Debian dirs.
++  $PREFIX     = "/usr/lib/llvm";
++  $INCLUDEDIR = "/usr/include/llvm";
++  $LIBDIR     = "/usr/lib/llvm/lib";
++  $BINDIR     = "/usr/bin";
+ }
+ 
+ sub usage;
+@@ -170,7 +173,7 @@ if (@components == 0) {
+ # Handle any arguments which require building our dependency graph.
+ if ($want_libs || $want_libnames || $want_libfiles) {
+     my @libs = expand_dependencies(@components);
+-    print join(' ', fix_library_names(@libs)), "\n" if ($want_libs);
++    print join(' ', fix_library_names(@libs)), " -L$LIBDIR\n" if ($want_libs);
+     print join(' ',  @libs), "\n" if ($want_libnames);
+     print join(' ', fix_library_files(@libs)), "\n" if ($want_libfiles);
+ }
--- llvm-2.6.orig/debian/patches/0011-Hurd-fixes.patch
+++ llvm-2.6/debian/patches/0011-Hurd-fixes.patch
@@ -0,0 +1,36 @@
+---
+
+--- a/lib/System/Unix/Path.inc
++++ b/lib/System/Unix/Path.inc
+@@ -61,6 +61,11 @@
+ #include <unistd.h>
+ #endif
+ 
++// For GNU Hurd
++#if defined(__GNU__) && !defined(MAXPATHLEN)
++# define MAXPATHLEN 4096
++#endif
++
+ // Put in a hack for Cygwin which falsely reports that the mkdtemp function
+ // is available when it is not.
+ #ifdef __CYGWIN__
+--- a/lib/System/Unix/Process.inc
++++ b/lib/System/Unix/Process.inc
+@@ -134,7 +134,7 @@
+   return getgid();
+ }
+ 
+-#ifdef HAVE_MACH_MACH_H
++#if defined(HAVE_MACH_MACH_H) && !defined(__GNU__)
+ #include <mach/mach.h>
+ #endif
+ 
+@@ -148,7 +148,7 @@
+   setrlimit(RLIMIT_CORE, &rlim);
+ #endif
+ 
+-#ifdef HAVE_MACH_MACH_H
++#if defined(HAVE_MACH_MACH_H) && !defined(__GNU__)
+   // Disable crash reporting on Mac OS X 10.0-10.4
+ 
+   // get information about the original set of exception ports for the task
--- llvm-2.6.orig/debian/patches/0004-Fix-TOOLDIR-path-for-gccas-and-gccld.patch
+++ llvm-2.6/debian/patches/0004-Fix-TOOLDIR-path-for-gccas-and-gccld.patch
@@ -0,0 +1,54 @@
+---
+
+--- a/tools/gccas/Makefile
++++ b/tools/gccas/Makefile
+@@ -10,18 +10,21 @@ LEVEL = ../..
+ 
+ include $(LEVEL)/Makefile.common
+ 
++# Debian install path
++TOOLDIR = /usr/lib/llvm/bin
++
+ install-local:: $(PROJ_bindir)/gccas
+ 	
+ $(PROJ_bindir)/gccas : gccas.sh Makefile
+ 	$(Echo) Installing gccas shell script.
+-	$(Verb) sed "s#@TOOLDIR@#$(PROJ_bindir)#" $< > $@
++	$(Verb) sed "s#@TOOLDIR@#$(TOOLDIR)#" $< > $@
+ 	$(Verb) chmod 0755 $@
+ 
+ all-local:: $(ToolDir)/gccas
+ 	
+ $(ToolDir)/gccas : gccas.sh Makefile
+ 	$(Echo) Making $(ToolDir)/gccas shell script.
+-	$(Verb) sed "s#@TOOLDIR@#$(ToolDir)#" $< > $@
++	$(Verb) sed "s#@TOOLDIR@#$(TOOLDIR)#" $< > $@
+ 	$(Verb) chmod 0755 $@
+ 
+ clean-local::
+--- a/tools/gccld/Makefile
++++ b/tools/gccld/Makefile
+@@ -11,18 +11,21 @@ LEVEL = ../..
+ 
+ include $(LEVEL)/Makefile.common
+ 
++# Debian install path
++TOOLDIR = /usr/lib/llvm/bin
++
+ install-local:: $(PROJ_bindir)/gccld
+ 	
+ $(PROJ_bindir)/gccld : gccld.sh Makefile
+ 	$(Echo) Installing gccld shell script.
+-	$(Verb) sed "s#@TOOLDIR@#$(PROJ_bindir)#" $< > $@
++	$(Verb) sed "s#@TOOLDIR@#$(TOOLDIR)#" $< > $@
+ 	$(Verb) chmod 0755 $@
+ 
+ all-local:: $(ToolDir)/gccld
+ 	
+ $(ToolDir)/gccld : gccld.sh Makefile
+ 	$(Echo) Making $(ToolDir)/gccld shell script.
+-	$(Verb) sed "s#@TOOLDIR@#$(ToolDir)#" $< > $@
++	$(Verb) sed "s#@TOOLDIR@#$(TOOLDIR)#" $< > $@
+ 	$(Verb) chmod 0755 $@
+ 
+ clean-local::
--- llvm-2.6.orig/debian/patches/0010-ARM-BX_to_BLX.patch
+++ llvm-2.6/debian/patches/0010-ARM-BX_to_BLX.patch
@@ -0,0 +1,13 @@
+---
+
+--- a/lib/Target/ARM/ARMInstrInfo.td
++++ b/lib/Target/ARM/ARMInstrInfo.td
+@@ -645,7 +645,7 @@
+                   IIC_Br, "mov lr, pc\n\tbx $func",
+                   [(ARMcall_nolink GPR:$func)]>,
+            Requires<[IsARM, IsNotDarwin]> {
+-    let Inst{7-4}   = 0b0001;
++    let Inst{7-4}   = 0b0011;
+     let Inst{19-8}  = 0b111111111111;
+     let Inst{27-20} = 0b00010010;
+   }
--- llvm-2.6.orig/debian/patches/0006-Update-autotools-for-avr32.patch
+++ llvm-2.6/debian/patches/0006-Update-autotools-for-avr32.patch
@@ -0,0 +1,4223 @@
+---
+
+--- a/autoconf/config.guess
++++ b/autoconf/config.guess
+@@ -1,9 +1,10 @@
+ #! /bin/sh
+ # Attempt to guess a canonical system name.
+ #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+-#   2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
++#   Free Software Foundation, Inc.
+ 
+-timestamp='2004-09-07'
++timestamp='2009-06-10'
+ 
+ # 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 +18,15 @@ timestamp='2004-09-07'
+ #
+ # 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 <per@bothner.com>.
+ # Please send patches to <config-patches@gnu.org>.  Submit a context
+ # diff and a properly formatted ChangeLog entry.
+@@ -53,8 +56,8 @@ version="\
+ GNU config.guess ($timestamp)
+ 
+ Originally written by Per Bothner.
+-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+-Free Software Foundation, Inc.
++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
++2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ 
+ This is free software; see the source for copying conditions.  There is NO
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+@@ -66,11 +69,11 @@ Try \`$me --help' for more information."
+ 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 +107,7 @@ 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 -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 +126,7 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in
+ 	;;
+  ,,*)   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.
+ # (ghazi@noc.rutgers.edu 1994-08-24)
+@@ -158,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ 	    arm*) machine=arm-unknown ;;
+ 	    sh3el) machine=shl-unknown ;;
+ 	    sh3eb) machine=sh-unknown ;;
++	    sh5el) machine=sh5le-unknown ;;
+ 	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ 	esac
+ 	# The Operating System including object format, if it has switched
+@@ -166,7 +170,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 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
++			| grep -q __ELF__
+ 		then
+ 		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ 		    # Return netbsd for either.  FIX?
+@@ -196,55 +200,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ 	# contains redundant information, the shorter form:
+ 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ 	echo "${machine}-${os}${release}"
+-	exit 0 ;;
+-    amd64:OpenBSD:*:*)
+-	echo x86_64-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
+-    amiga:OpenBSD:*:*)
+-	echo m68k-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 ;;
+-    luna88k:OpenBSD:*:*)
+-    	echo m88k-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 ;;
+-    sgi:OpenBSD:*:*)
+-	echo mips64-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
+-    sun3:OpenBSD:*:*)
+-	echo m68k-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 ;;
++	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
++	exit ;;
+     *:MirBSD:*:*)
+ 	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
+     alpha:OSF1:*:*)
+ 	case $UNAME_RELEASE in
+ 	*4.0)
+@@ -297,37 +269,43 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ 	# 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 ;;
++	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*:*:*)
+ 	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ 	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+@@ -335,32 +313,48 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ 	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 ;;
++    s390x:SunOS:*:*)
++	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++	exit ;;
+     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 ;;
+-    i86pc:SunOS:5.*:*)
+-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+-	exit 0 ;;
++	exit ;;
++    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
++	eval $set_cc_for_build
++	SUN_ARCH="i386"
++	# If there is a compiler, see if it is configured for 64-bit objects.
++	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
++	# This test works for both compilers.
++	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
++	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
++		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
++		grep IS_64BIT_ARCH >/dev/null
++	    then
++		SUN_ARCH="x86_64"
++	    fi
++	fi
++	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++	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*)
+@@ -369,10 +363,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ 	esac
+ 	# Japanese Language versions have a version number like `4.1.3-JL'.
+ 	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+-	exit 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
+@@ -384,10 +378,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ 		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
+@@ -398,40 +392,40 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+     # be no problem.
+     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+         echo m68k-atari-mint${UNAME_RELEASE}
+-	exit 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
+@@ -455,32 +449,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ 	  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`
+@@ -496,29 +491,29 @@ EOF
+ 	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`
+@@ -526,7 +521,7 @@ EOF
+ 		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
+@@ -541,15 +536,19 @@ EOF
+ 			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 ;;
+-    *:AIX:*:[45])
++	exit ;;
++    *:AIX:*:[456])
+ 	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
+@@ -562,28 +561,28 @@ EOF
+ 		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
+@@ -645,9 +644,19 @@ EOF
+ 	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 -q __LP64__
+ 	    then
+ 		HP_ARCH="hppa2.0w"
+ 	    else
+@@ -655,11 +664,11 @@ EOF
+ 	    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
+@@ -687,202 +696,227 @@ EOF
+ 	  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 craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+-	exit 0 ;;
++	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:*:*)
+-	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+-	exit 0 ;;
++	case ${UNAME_MACHINE} in
++	    pc98)
++		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++	    amd64)
++		echo x86_64-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 ;;
+-    i*:MINGW*:*)
++	exit ;;
++    *:MINGW*:*)
+ 	echo ${UNAME_MACHINE}-pc-mingw32
+-	exit 0 ;;
++	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 ;;
++    *:Interix*:[3456]*)
++    	case ${UNAME_MACHINE} in
++	    x86)
++		echo i586-pc-interix${UNAME_RELEASE}
++		exit ;;
++	    EM64T | authenticamd | genuineintel)
++		echo x86_64-unknown-interix${UNAME_RELEASE}
++		exit ;;
++	    IA64)
++		echo ia64-unknown-interix${UNAME_RELEASE}
++		exit ;;
++	esac ;;
+     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ 	echo i${UNAME_MACHINE}-pc-mks
+-	exit 0 ;;
++	exit ;;
++    8664:Windows_NT:*)
++	echo x86_64-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 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:*:*)
++	eval $set_cc_for_build
++	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
++	    | grep -q __ARM_EABI__
++	then
++	    echo ${UNAME_MACHINE}-unknown-linux-gnu
++	else
++	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
++	fi
++	exit ;;
++    avr32*: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 0 ;;
++	exit ;;
+     frv:Linux:*:*)
+     	echo frv-unknown-linux-gnu
+-	exit 0 ;;
++	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 ;;
+-    mips:Linux:*:*)
++	exit ;;
++    mips:Linux:*:* | mips64:Linux:*:*)
+ 	eval $set_cc_for_build
+ 	sed 's/^	//' << EOF >$dummy.c
+ 	#undef CPU
+-	#undef mips
+-	#undef mipsel
++	#undef ${UNAME_MACHINE}
++	#undef ${UNAME_MACHINE}el
+ 	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+-	CPU=mipsel
++	CPU=${UNAME_MACHINE}el
+ 	#else
+ 	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+-	CPU=mips
++	CPU=${UNAME_MACHINE}
+ 	#else
+ 	CPU=
+ 	#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
+-	;;
+-    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
+-	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 ;;
+@@ -893,10 +927,13 @@ EOF
+ 	  EV67)  UNAME_MACHINE=alphaev67 ;;
+ 	  EV68*) UNAME_MACHINE=alphaev68 ;;
+         esac
+-	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
++	objdump --private-headers /bin/sh | grep -q ld.so.1
+ 	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ 	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+-	exit 0 ;;
++	exit ;;
++    padre:Linux:*:*)
++	echo sparc-unknown-linux-gnu
++	exit ;;
+     parisc:Linux:*:* | hppa:Linux:*:*)
+ 	# Look for CPU level
+ 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+@@ -904,25 +941,31 @@ EOF
+ 	  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 ;;
++    xtensa*:Linux:*:*)
++    	echo ${UNAME_MACHINE}-unknown-linux-gnu
++	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
+@@ -938,17 +981,6 @@ EOF
+ 	  elf32-i386)
+ 		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ 		;;
+-	  a.out-i386-linux)
+-		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+-		exit 0 ;;
+-	  coff-i386)
+-		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+-		exit 0 ;;
+-	  "")
+-		# Either a pre-BFD a.out linker (linux-gnuoldld) or
+-		# one that does not give us useful --help.
+-		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+-		exit 0 ;;
+ 	esac
+ 	# Determine whether the default compiler is a.out or elf
+ 	eval $set_cc_for_build
+@@ -965,7 +997,7 @@ EOF
+ 	LIBC=gnulibc1
+ 	# endif
+ 	#else
+-	#ifdef __INTEL_COMPILER
++	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+ 	LIBC=gnu
+ 	#else
+ 	LIBC=gnuaout
+@@ -975,16 +1007,23 @@ EOF
+ 	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...
+@@ -992,27 +1031,27 @@ EOF
+ 	# 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 ;;
+-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
++	exit ;;
++    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ 	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
+@@ -1020,15 +1059,16 @@ EOF
+ 	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`
+@@ -1046,73 +1086,86 @@ EOF
+ 	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 ;;
++        # the processor, so we play safe by assuming i586.
++	# Note: whatever this is, it MUST be the same as what config.sub
++	# prints for the "djgpp" host, or else GDB configury will decide that
++	# this is a cross-build.
++	echo i586-pc-msdosdjgpp
++        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 ;;
++	exit ;;
+     M68*:*:R3V[5678]*:*)
+-	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
++	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; } ;;
++    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
++	OS_REL='.3'
++	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; }
++	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
++	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
++	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
++	    && { echo i586-ncr-sysv4.3${OS_REL}; 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 ;;
+-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
++	exit ;;
++    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ 	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`
+@@ -1120,69 +1173,84 @@ EOF
+ 	else
+ 		echo ns32k-sni-sysv
+ 	fi
+-	exit 0 ;;
++	exit ;;
+     PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                       # says <Richard.M.Bartel@ccMail.Census.GOV>
+         echo i586-unisys-sysv4
+-        exit 0 ;;
++        exit ;;
+     *:UNIX_System_V:4*:FTX*)
+ 	# From Gerald Hewes <hewes@openmarket.com>.
+ 	# How about differentiating between stratus architectures? -djm
+ 	echo hppa1.1-stratus-sysv4
+-	exit 0 ;;
++	exit ;;
+     *:*:*:FTX*)
+ 	# From seanf@swdc.stratus.com.
+ 	echo i860-stratus-sysv4
+-	exit 0 ;;
++	exit ;;
++    i*86:VOS:*:*)
++	# From Paul.Green@stratus.com.
++	echo ${UNAME_MACHINE}-stratus-vos
++	exit ;;
+     *:VOS:*:*)
+ 	# From Paul.Green@stratus.com.
+ 	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 ;;
++    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
++	echo i586-pc-haiku
++	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 ;;
++    SX-7:SUPER-UX:*:*)
++	echo sx7-nec-superux${UNAME_RELEASE}
++	exit ;;
++    SX-8:SUPER-UX:*:*)
++	echo sx8-nec-superux${UNAME_RELEASE}
++	exit ;;
++    SX-8R:SUPER-UX:*:*)
++	echo sx8r-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:*:*)
+ 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ 	case $UNAME_PROCESSOR in
+-	    *86) UNAME_PROCESSOR=i686 ;;
+ 	    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
+@@ -1190,22 +1258,25 @@ EOF
+ 		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
+@@ -1216,38 +1287,50 @@ EOF
+ 	    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 0 ;;
+-	    I*) echo ia64-dec-vms && exit 0 ;;
+-	    V*) echo vax-dec-vms && exit 0 ;;
+-	esac
++	    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 ;;
++    i*86:AROS:*:*)
++	echo ${UNAME_MACHINE}-pc-aros
++	exit ;;
+ esac
+ 
+ #echo '(No uname command or uname output not recognized.)' 1>&2
+@@ -1279,7 +1362,7 @@ main ()
+ #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)
+@@ -1368,11 +1451,12 @@ main ()
+ }
+ 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)
+ 
+@@ -1381,22 +1465,22 @@ then
+     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
+ 
+@@ -1407,7 +1491,9 @@ This script, last modified $timestamp, has failed to recognize
+ the operating system you are using. It is advised that you
+ download the most up to date version of the config scripts from
+ 
+-    ftp://ftp.gnu.org/pub/gnu/config/
++  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
++and
++  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+ 
+ If the version you run ($0) is already up to date, please
+ send the following data and any information you think might be
+--- a/autoconf/config.sub
++++ b/autoconf/config.sub
+@@ -1,9 +1,10 @@
+ #! /bin/sh
+ # Configuration validation subroutine script.
+ #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+-#   2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
++#   Free Software Foundation, Inc.
+ 
+-timestamp='2004-08-29'
++timestamp='2009-06-11'
+ 
+ # 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 +22,15 @@ timestamp='2004-08-29'
+ #
+ # 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 <config-patches@gnu.org>.  Submit a context
+ # diff and a properly formatted ChangeLog entry.
+ #
+@@ -70,8 +72,8 @@ Report bugs and patches to <config-patches@gnu.org>."
+ version="\
+ GNU config.sub ($timestamp)
+ 
+-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+-Free Software Foundation, Inc.
++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
++2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ 
+ This is free software; see the source for copying conditions.  There is NO
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+@@ -83,11 +85,11 @@ Try \`$me --help' for more information."
+ 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 +101,7 @@ while test $# -gt 0 ; do
+     *local*)
+        # First pass through any local machine types.
+        echo $1
+-       exit 0;;
++       exit ;;
+ 
+     * )
+        break ;;
+@@ -118,8 +120,10 @@ esac
+ # Here we must recognize all the valid KERNEL-OS combinations.
+ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+ case $maybe_os in
+-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
+-  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
++  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
++  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
++  kopensolaris*-gnu* | \
++  storm-chaos* | os2-emx* | rtmk-nova*)
+     os=-$maybe_os
+     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+     ;;
+@@ -149,6 +153,9 @@ case $os in
+ 		os=
+ 		basic_machine=$1
+ 		;;
++        -bluegene*)
++	        os=-cnk
++		;;
+ 	-sim | -cisco | -oki | -wec | -winbond)
+ 		os=
+ 		basic_machine=$1
+@@ -170,6 +177,10 @@ case $os in
+ 	-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 +197,10 @@ case $os in
+ 		# 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/'`
+@@ -230,22 +245,28 @@ case $basic_machine in
+ 	| 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 \
++	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
++	| bfin \
+ 	| c4x | clipper \
+ 	| d10v | d30v | dlx | dsp16xx \
+-	| fr30 | frv \
++	| fido | 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 \
++	| lm32 \
++	| m32c | m32r | m32rle | m68000 | m68k | m88k \
++	| maxq | mb | microblaze | mcore | mep | metag \
+ 	| mips | mipsbe | mipseb | mipsel | mipsle \
+ 	| mips16 \
+ 	| mips64 | mips64el \
+-	| mips64vr | mips64vrel \
++	| mips64octeon | mips64octeonel \
+ 	| mips64orion | mips64orionel \
++	| mips64r5900 | mips64r5900el \
++	| mips64vr | mips64vrel \
+ 	| mips64vr4100 | mips64vr4100el \
+ 	| mips64vr4300 | mips64vr4300el \
+ 	| mips64vr5000 | mips64vr5000el \
++	| mips64vr5900 | mips64vr5900el \
+ 	| mipsisa32 | mipsisa32el \
+ 	| mipsisa32r2 | mipsisa32r2el \
+ 	| mipsisa64 | mipsisa64el \
+@@ -254,21 +275,26 @@ case $basic_machine in
+ 	| mipsisa64sr71k | mipsisa64sr71kel \
+ 	| mipstx39 | mipstx39el \
+ 	| mn10200 | mn10300 \
++	| moxie \
++	| 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 \
++	| score \
++	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ 	| sh64 | sh64le \
+-	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
+-	| strongarm \
++	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
++	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
++	| spu | strongarm \
+ 	| tahoe | thumb | tic4x | tic80 | tron \
+ 	| v850 | v850e \
+ 	| we32k \
+-	| x86 | xscale | xstormy16 | xtensa \
+-	| z8k)
++	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
++	| z8k | z80)
+ 		basic_machine=$basic_machine-unknown
+ 		;;
+ 	m6811 | m68hc11 | m6812 | m68hc12)
+@@ -278,6 +304,9 @@ case $basic_machine in
+ 		;;
+ 	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
+@@ -297,28 +326,32 @@ case $basic_machine in
+ 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+-	| avr-* \
+-	| bs2000-* \
++	| avr-* | avr32-* \
++	| bfin-* | bs2000-* \
+ 	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ 	| clipper-* | craynv-* | cydra-* \
+ 	| d10v-* | d30v-* | dlx-* \
+ 	| elxsi-* \
+-	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
++	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ 	| h8300-* | h8500-* \
+ 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ 	| i*86-* | i860-* | i960-* | ia64-* \
+ 	| ip2k-* | iq2000-* \
+-	| m32r-* | m32rle-* \
++	| lm32-* \
++	| m32c-* | m32r-* | m32rle-* \
+ 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+-	| m88110-* | m88k-* | mcore-* \
++	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ 	| mips16-* \
+ 	| mips64-* | mips64el-* \
+-	| mips64vr-* | mips64vrel-* \
++	| mips64octeon-* | mips64octeonel-* \
+ 	| mips64orion-* | mips64orionel-* \
++	| mips64r5900-* | mips64r5900el-* \
++	| mips64vr-* | mips64vrel-* \
+ 	| mips64vr4100-* | mips64vr4100el-* \
+ 	| mips64vr4300-* | mips64vr4300el-* \
+ 	| mips64vr5000-* | mips64vr5000el-* \
++	| mips64vr5900-* | mips64vr5900el-* \
+ 	| mipsisa32-* | mipsisa32el-* \
+ 	| mipsisa32r2-* | mipsisa32r2el-* \
+ 	| mipsisa64-* | mipsisa64el-* \
+@@ -327,26 +360,33 @@ case $basic_machine in
+ 	| 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[23]e-* | sh[34]eb-* | shbe-* \
++	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+-	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+-	| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
++	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
++	| sparclite-* \
++	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ 	| tahoe-* | thumb-* \
+-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
++	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+ 	| tron-* \
+ 	| v850-* | v850e-* | vax-* \
+ 	| we32k-* \
+-	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
+-	| xtensa-* \
++	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
++	| xstormy16-* | xtensa*-* \
+ 	| ymp-* \
+-	| z8k-*)
++	| z8k-* | z80-*)
++		;;
++	# Recognize the basic CPU types without company name, with glob match.
++	xtensa*)
++		basic_machine=$basic_machine-unknown
+ 		;;
+ 	# Recognize the various machine names and aliases which stand
+ 	# for a CPU type and a company and sometimes even an OS.
+@@ -410,6 +450,10 @@ case $basic_machine in
+ 		basic_machine=m68k-apollo
+ 		os=-bsd
+ 		;;
++	aros)
++		basic_machine=i386-pc
++		os=-aros
++		;;
+ 	aux)
+ 		basic_machine=m68k-apple
+ 		os=-aux
+@@ -418,10 +462,26 @@ case $basic_machine in
+ 		basic_machine=ns32k-sequent
+ 		os=-dynix
+ 		;;
++	blackfin)
++		basic_machine=bfin-unknown
++		os=-linux
++		;;
++	blackfin-*)
++		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
++		os=-linux
++		;;
++	bluegene*)
++		basic_machine=powerpc-ibm
++		os=-cnk
++		;;
+ 	c90)
+ 		basic_machine=c90-cray
+ 		os=-unicos
+ 		;;
++        cegcc)
++		basic_machine=arm-unknown
++		os=-cegcc
++		;;
+ 	convex-c1)
+ 		basic_machine=c1-convex
+ 		os=-bsd
+@@ -450,8 +510,8 @@ case $basic_machine in
+ 		basic_machine=craynv-cray
+ 		os=-unicosmp
+ 		;;
+-	cr16c)
+-		basic_machine=cr16c-unknown
++	cr16)
++		basic_machine=cr16-unknown
+ 		os=-elf
+ 		;;
+ 	crds | unos)
+@@ -489,6 +549,14 @@ case $basic_machine in
+ 		basic_machine=m88k-motorola
+ 		os=-sysv3
+ 		;;
++	dicos)
++		basic_machine=i686-pc
++		os=-dicos
++		;;
++	djgpp)
++		basic_machine=i586-pc
++		os=-msdosdjgpp
++		;;
+ 	dpx20 | dpx20-*)
+ 		basic_machine=rs6000-bull
+ 		os=-bosx
+@@ -639,6 +707,14 @@ case $basic_machine in
+ 		basic_machine=m68k-isi
+ 		os=-sysv
+ 		;;
++	m68knommu)
++		basic_machine=m68k-unknown
++		os=-linux
++		;;
++	m68knommu-*)
++		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
++		os=-linux
++		;;
+ 	m88k-omron*)
+ 		basic_machine=m88k-omron
+ 		;;
+@@ -654,6 +730,10 @@ case $basic_machine in
+ 		basic_machine=i386-pc
+ 		os=-mingw32
+ 		;;
++	mingw32ce)
++		basic_machine=arm-unknown
++		os=-mingw32ce
++		;;
+ 	miniframe)
+ 		basic_machine=m68000-convergent
+ 		;;
+@@ -679,6 +759,9 @@ case $basic_machine in
+ 		basic_machine=i386-pc
+ 		os=-msdos
+ 		;;
++	ms1-*)
++		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
++		;;
+ 	mvs)
+ 		basic_machine=i370-ibm
+ 		os=-mvs
+@@ -754,9 +837,8 @@ case $basic_machine in
+ 		basic_machine=hppa1.1-oki
+ 		os=-proelf
+ 		;;
+-	or32 | or32-*)
++	openrisc | openrisc-*)
+ 		basic_machine=or32-unknown
+-		os=-coff
+ 		;;
+ 	os400)
+ 		basic_machine=powerpc-ibm
+@@ -778,6 +860,14 @@ case $basic_machine in
+ 		basic_machine=i860-intel
+ 		os=-osf
+ 		;;
++	parisc)
++		basic_machine=hppa-unknown
++		os=-linux
++		;;
++	parisc-*)
++		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
++		os=-linux
++		;;
+ 	pbd)
+ 		basic_machine=sparc-tti
+ 		;;
+@@ -787,6 +877,12 @@ case $basic_machine in
+ 	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 +939,10 @@ case $basic_machine in
+ 		basic_machine=i586-unknown
+ 		os=-pw32
+ 		;;
++	rdos)
++		basic_machine=i386-pc
++		os=-rdos
++		;;
+ 	rom68k)
+ 		basic_machine=m68k-rom68k
+ 		os=-coff
+@@ -869,6 +969,10 @@ case $basic_machine in
+ 	sb1el)
+ 		basic_machine=mipsisa64sb1el-unknown
+ 		;;
++	sde)
++		basic_machine=mipsisa32-sde
++		os=-elf
++		;;
+ 	sei)
+ 		basic_machine=mips-sei
+ 		os=-seiux
+@@ -880,6 +984,9 @@ case $basic_machine in
+ 		basic_machine=sh-hitachi
+ 		os=-hms
+ 		;;
++	sh5el)
++		basic_machine=sh5le-unknown
++		;;
+ 	sh64)
+ 		basic_machine=sh64-unknown
+ 		;;
+@@ -969,6 +1076,10 @@ case $basic_machine in
+ 		basic_machine=tic6x-unknown
+ 		os=-coff
+ 		;;
++	tile*)
++		basic_machine=tile-unknown
++		os=-linux-gnu
++		;;
+ 	tx39)
+ 		basic_machine=mipstx39-unknown
+ 		;;
+@@ -1029,6 +1140,10 @@ case $basic_machine in
+ 		basic_machine=hppa1.1-winbond
+ 		os=-proelf
+ 		;;
++	xbox)
++		basic_machine=i686-pc
++		os=-mingw32
++		;;
+ 	xps | xps100)
+ 		basic_machine=xps100-honeywell
+ 		;;
+@@ -1040,6 +1155,10 @@ case $basic_machine in
+ 		basic_machine=z8k-unknown
+ 		os=-sim
+ 		;;
++	z80-*-coff)
++		basic_machine=z80-unknown
++		os=-sim
++		;;
+ 	none)
+ 		basic_machine=none-none
+ 		os=-none
+@@ -1078,13 +1197,10 @@ case $basic_machine in
+ 	we32k)
+ 		basic_machine=we32k-att
+ 		;;
+-	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
++	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ 		basic_machine=sh-unknown
+ 		;;
+-	sh64)
+-		basic_machine=sh64-unknown
+-		;;
+-	sparc | sparcv8 | sparcv9 | sparcv9b)
++	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ 		basic_machine=sparc-sun
+ 		;;
+ 	cydra)
+@@ -1151,26 +1267,30 @@ case $os in
+ 	# Each alternative MUST END IN A *, to match a version number.
+ 	# -sysv* is not here because it comes later, after sysvr4.
+ 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
++	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
++	      | -kopensolaris* \
+ 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+-	      | -aos* \
++	      | -aos* | -aros* \
+ 	      | -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* \
++	      | -chorusos* | -chorusrdb* | -cegcc* \
+ 	      | -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* | -toppers* | -drops*)
+ 	# Remember, each alternative MUST END IN *, to match a version number.
+ 		;;
+ 	-qnx*)
+@@ -1188,7 +1308,7 @@ case $os in
+ 		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ 		;;
+ 	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
++	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ 	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ 		;;
+ 	-mac*)
+@@ -1297,6 +1417,12 @@ case $os in
+ 	-kaos*)
+ 		os=-kaos
+ 		;;
++	-zvmoe)
++		os=-zvmoe
++		;;
++	-dicos*)
++		os=-dicos
++		;;
+ 	-none)
+ 		;;
+ 	*)
+@@ -1319,6 +1445,12 @@ else
+ # system, and we'll never get to this point.
+ 
+ case $basic_machine in
++        score-*)
++		os=-elf
++		;;
++        spu-*)
++		os=-elf
++		;;
+ 	*-acorn)
+ 		os=-riscix1.2
+ 		;;
+@@ -1328,9 +1460,9 @@ case $basic_machine in
+ 	arm*-semi)
+ 		os=-aout
+ 		;;
+-    c4x-* | tic4x-*)
+-        os=-coff
+-        ;;
++        c4x-* | tic4x-*)
++        	os=-coff
++		;;
+ 	# This must come before the *-dec entry.
+ 	pdp10-*)
+ 		os=-tops20
+@@ -1356,6 +1488,9 @@ case $basic_machine in
+ 	m68*-cisco)
+ 		os=-aout
+ 		;;
++        mep-*)
++		os=-elf
++		;;
+ 	mips*-cisco)
+ 		os=-elf
+ 		;;
+@@ -1374,6 +1509,9 @@ case $basic_machine in
+ 	*-be)
+ 		os=-beos
+ 		;;
++	*-haiku)
++		os=-haiku
++		;;
+ 	*-ibm)
+ 		os=-aix
+ 		;;
+@@ -1482,7 +1620,7 @@ case $basic_machine in
+ 			-sunos*)
+ 				vendor=sun
+ 				;;
+-			-aix*)
++			-cnk*|-aix*)
+ 				vendor=ibm
+ 				;;
+ 			-beos*)
+@@ -1545,7 +1683,7 @@ case $basic_machine in
+ esac
+ 
+ echo $basic_machine$os
+-exit 0
++exit
+ 
+ # Local variables:
+ # eval: (add-hook 'write-file-hooks 'time-stamp)
+--- a/projects/sample/autoconf/config.guess
++++ b/projects/sample/autoconf/config.guess
+@@ -1,9 +1,10 @@
+ #! /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, 2006, 2007, 2008, 2009
++#   Free Software Foundation, Inc.
+ 
+-timestamp='2003-02-22'
++timestamp='2009-06-10'
+ 
+ # 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 +18,15 @@ timestamp='2003-02-22'
+ #
+ # 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 <per@bothner.com>.
+ # Please send patches to <config-patches@gnu.org>.  Submit a context
+ # diff and a properly formatted ChangeLog entry.
+@@ -53,8 +56,8 @@ version="\
+ GNU config.guess ($timestamp)
+ 
+ Originally written by Per Bothner.
+-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, 2006, 2007, 2008 Free Software Foundation, Inc.
+ 
+ This is free software; see the source for copying conditions.  There is NO
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+@@ -66,11 +69,11 @@ Try \`$me --help' for more information."
+ 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,8 +107,9 @@ 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 -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 ; } ;
+ dummy=$tmp/dummy ;
+ tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+@@ -122,7 +126,7 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in
+ 	;;
+  ,,*)   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.
+ # (ghazi@noc.rutgers.edu 1994-08-24)
+@@ -157,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ 	    arm*) machine=arm-unknown ;;
+ 	    sh3el) machine=shl-unknown ;;
+ 	    sh3eb) machine=sh-unknown ;;
++	    sh5el) machine=sh5le-unknown ;;
+ 	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ 	esac
+ 	# The Operating System including object format, if it has switched
+@@ -165,7 +170,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 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
++			| grep -q __ELF__
+ 		then
+ 		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ 		    # Return netbsd for either.  FIX?
+@@ -195,50 +200,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ 	# contains redundant information, the shorter form:
+ 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ 	echo "${machine}-${os}${release}"
+-	exit 0 ;;
+-    amiga:OpenBSD:*:*)
+-	echo m68k-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
+-    arc:OpenBSD:*:*)
+-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
+-    hp300:OpenBSD:*:*)
+-	echo m68k-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
+-    mac68k:OpenBSD:*:*)
+-	echo m68k-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
+-    macppc:OpenBSD:*:*)
+-	echo powerpc-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
+-    mvme68k:OpenBSD:*:*)
+-	echo m68k-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
+-    mvme88k:OpenBSD:*:*)
+-	echo m88k-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
+-    mvmeppc:OpenBSD:*:*)
+-	echo powerpc-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
+-    pmax:OpenBSD:*:*)
+-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
+-    sgi:OpenBSD:*:*)
+-	echo mipseb-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
+-    sun3:OpenBSD:*:*)
+-	echo m68k-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
+-    wgrisc:OpenBSD:*:*)
+-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
++	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 ;;
++    *:SolidBSD:*:*)
++	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
++	exit ;;
++    macppc:MirBSD:*:*)
++	echo powerpc-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
+@@ -276,39 +263,49 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ 	    "EV7.9 (21364A)")
+ 		UNAME_MACHINE="alphaev79" ;;
+ 	esac
++	# A Pn.n version is a patched version.
+ 	# A Vn.n version is a released version.
+ 	# A Tn.n version is a released field test version.
+ 	# A Xn.n version is an unreleased experimental baselevel.
+ 	# 1.2 uses "1.2" for uname -r.
+-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[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;;
++	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 ;;
+     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*:*:*)
+ 	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ 	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+@@ -316,29 +313,48 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ 	else
+ 		echo pyramid-pyramid-bsd
+ 	fi
+-	exit 0 ;;
++	exit ;;
+     NILE*:*:*:dcosx)
+ 	echo pyramid-pyramid-svr4
+-	exit 0 ;;
+-    DRS?6000:UNIX_SV:4.2*:7*)
++	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 0 ;;
++	    sparc) echo sparc-icl-nx7; exit ;;
+ 	esac ;;
++    s390x:SunOS:*:*)
++	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++	exit ;;
+     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 ;;
+-    i86pc:SunOS:5.*:*)
+-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+-	exit 0 ;;
++	exit ;;
++    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
++	eval $set_cc_for_build
++	SUN_ARCH="i386"
++	# If there is a compiler, see if it is configured for 64-bit objects.
++	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
++	# This test works for both compilers.
++	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
++	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
++		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
++		grep IS_64BIT_ARCH >/dev/null
++	    then
++		SUN_ARCH="x86_64"
++	    fi
++	fi
++	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++	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*)
+@@ -347,10 +363,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ 	esac
+ 	# Japanese Language versions have a version number like `4.1.3-JL'.
+ 	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+-	exit 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
+@@ -362,10 +378,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ 		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
+@@ -376,37 +392,40 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+     # be no problem.
+     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+         echo m68k-atari-mint${UNAME_RELEASE}
+-	exit 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 ;;
+     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
+@@ -430,32 +449,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ 	  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`
+@@ -471,29 +491,29 @@ EOF
+ 	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`
+@@ -501,7 +521,7 @@ EOF
+ 		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
+@@ -516,15 +536,19 @@ EOF
+ 			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 ;;
+-    *:AIX:*:[45])
++	exit ;;
++    *:AIX:*:[456])
+ 	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
+@@ -537,28 +561,28 @@ EOF
+ 		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
+@@ -620,9 +644,19 @@ EOF
+ 	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 -q __LP64__
+ 	    then
+ 		HP_ARCH="hppa2.0w"
+ 	    else
+@@ -630,11 +664,11 @@ EOF
+ 	    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
+@@ -662,191 +696,227 @@ EOF
+ 	  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 ;;
+     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=`
+-	echo ${UNAME_MACHINE}-unknown-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/[-(].*//'` ;;
++	    amd64)
++		echo x86_64-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 ;;
+-    i*:MINGW*:*)
++	exit ;;
++    *:MINGW*:*)
+ 	echo ${UNAME_MACHINE}-pc-mingw32
+-	exit 0 ;;
++	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*:3*)
+-	echo i586-pc-interix3
+-	exit 0 ;;
++	exit ;;
++    *:Interix*:[3456]*)
++    	case ${UNAME_MACHINE} in
++	    x86)
++		echo i586-pc-interix${UNAME_RELEASE}
++		exit ;;
++	    EM64T | authenticamd | genuineintel)
++		echo x86_64-unknown-interix${UNAME_RELEASE}
++		exit ;;
++	    IA64)
++		echo ia64-unknown-interix${UNAME_RELEASE}
++		exit ;;
++	esac ;;
+     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ 	echo i${UNAME_MACHINE}-pc-mks
+-	exit 0 ;;
++	exit ;;
++    8664:Windows_NT:*)
++	echo x86_64-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 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 ;;
+     i*86:Minix:*:*)
+ 	echo ${UNAME_MACHINE}-pc-minix
+-	exit 0 ;;
++	exit ;;
+     arm*:Linux:*:*)
++	eval $set_cc_for_build
++	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
++	    | grep -q __ARM_EABI__
++	then
++	    echo ${UNAME_MACHINE}-unknown-linux-gnu
++	else
++	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
++	fi
++	exit ;;
++    avr32*: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-gnu
+-	exit 0 ;;
++	exit ;;
++    m32r*:Linux:*:*)
++	echo ${UNAME_MACHINE}-unknown-linux-gnu
++	exit ;;
+     m68*:Linux:*:*)
+ 	echo ${UNAME_MACHINE}-unknown-linux-gnu
+-	exit 0 ;;
+-    mips:Linux:*:*)
++	exit ;;
++    mips:Linux:*:* | mips64:Linux:*:*)
+ 	eval $set_cc_for_build
+ 	sed 's/^	//' << EOF >$dummy.c
+ 	#undef CPU
+-	#undef mips
+-	#undef mipsel
++	#undef ${UNAME_MACHINE}
++	#undef ${UNAME_MACHINE}el
+ 	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+-	CPU=mipsel
++	CPU=${UNAME_MACHINE}el
+ 	#else
+ 	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+-	CPU=mips
++	CPU=${UNAME_MACHINE}
+ 	#else
+ 	CPU=
+ 	#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
+-	;;
+-    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
+-	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 ;;
+@@ -857,10 +927,13 @@ EOF
+ 	  EV67)  UNAME_MACHINE=alphaev67 ;;
+ 	  EV68*) UNAME_MACHINE=alphaev68 ;;
+         esac
+-	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
++	objdump --private-headers /bin/sh | grep -q ld.so.1
+ 	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ 	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+-	exit 0 ;;
++	exit ;;
++    padre:Linux:*:*)
++	echo sparc-unknown-linux-gnu
++	exit ;;
+     parisc:Linux:*:* | hppa:Linux:*:*)
+ 	# Look for CPU level
+ 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+@@ -868,22 +941,31 @@ EOF
+ 	  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 ;;
++    xtensa*:Linux:*:*)
++    	echo ${UNAME_MACHINE}-unknown-linux-gnu
++	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
+@@ -899,17 +981,6 @@ EOF
+ 	  elf32-i386)
+ 		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ 		;;
+-	  a.out-i386-linux)
+-		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+-		exit 0 ;;
+-	  coff-i386)
+-		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+-		exit 0 ;;
+-	  "")
+-		# Either a pre-BFD a.out linker (linux-gnuoldld) or
+-		# one that does not give us useful --help.
+-		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+-		exit 0 ;;
+ 	esac
+ 	# Determine whether the default compiler is a.out or elf
+ 	eval $set_cc_for_build
+@@ -926,23 +997,33 @@ EOF
+ 	LIBC=gnulibc1
+ 	# endif
+ 	#else
+-	#ifdef __INTEL_COMPILER
++	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+ 	LIBC=gnu
+ 	#else
+ 	LIBC=gnuaout
+ 	#endif
+ 	#endif
++	#ifdef __dietlibc__
++	LIBC=dietlibc
++	#endif
+ EOF
+-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+-	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 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...
+@@ -950,24 +1031,27 @@ EOF
+ 	# 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:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
++	exit ;;
++    i*86:syllable:*:*)
++	echo ${UNAME_MACHINE}-pc-syllable
++	exit ;;
++    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ 	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
+@@ -975,15 +1059,16 @@ EOF
+ 	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`
+@@ -1001,73 +1086,86 @@ EOF
+ 	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 ;;
++        # the processor, so we play safe by assuming i586.
++	# Note: whatever this is, it MUST be the same as what config.sub
++	# prints for the "djgpp" host, or else GDB configury will decide that
++	# this is a cross-build.
++	echo i586-pc-msdosdjgpp
++        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[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0)
++	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; } ;;
++    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
++	OS_REL='.3'
++	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; }
++	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
++	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
++	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
++	    && { echo i586-ncr-sysv4.3${OS_REL}; 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 ;;
+-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
++	exit ;;
++    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ 	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`
+@@ -1075,68 +1173,84 @@ EOF
+ 	else
+ 		echo ns32k-sni-sysv
+ 	fi
+-	exit 0 ;;
++	exit ;;
+     PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                       # says <Richard.M.Bartel@ccMail.Census.GOV>
+         echo i586-unisys-sysv4
+-        exit 0 ;;
++        exit ;;
+     *:UNIX_System_V:4*:FTX*)
+ 	# From Gerald Hewes <hewes@openmarket.com>.
+ 	# How about differentiating between stratus architectures? -djm
+ 	echo hppa1.1-stratus-sysv4
+-	exit 0 ;;
++	exit ;;
+     *:*:*:FTX*)
+ 	# From seanf@swdc.stratus.com.
+ 	echo i860-stratus-sysv4
+-	exit 0 ;;
++	exit ;;
++    i*86:VOS:*:*)
++	# From Paul.Green@stratus.com.
++	echo ${UNAME_MACHINE}-stratus-vos
++	exit ;;
+     *:VOS:*:*)
+ 	# From Paul.Green@stratus.com.
+ 	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 ;;
++    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
++	echo i586-pc-haiku
++	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 ;;
++    SX-7:SUPER-UX:*:*)
++	echo sx7-nec-superux${UNAME_RELEASE}
++	exit ;;
++    SX-8:SUPER-UX:*:*)
++	echo sx8-nec-superux${UNAME_RELEASE}
++	exit ;;
++    SX-8R:SUPER-UX:*:*)
++	echo sx8r-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:*:*)
+-	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
+@@ -1144,22 +1258,25 @@ EOF
+ 		UNAME_MACHINE=pc
+ 	fi
+ 	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
+     *:QNX:*:4*)
+ 	echo i386-pc-qnx
+-	exit 0 ;;
+-    NSR-[DGKLNPTVW]: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
+@@ -1170,25 +1287,50 @@ EOF
+ 	    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 ;;
++    *: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 ;;
++    i*86:AROS:*:*)
++	echo ${UNAME_MACHINE}-pc-aros
++	exit ;;
+ esac
+ 
+ #echo '(No uname command or uname output not recognized.)' 1>&2
+@@ -1220,7 +1362,7 @@ main ()
+ #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)
+@@ -1309,11 +1451,12 @@ main ()
+ }
+ 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)
+ 
+@@ -1322,22 +1465,22 @@ then
+     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
+ 
+@@ -1348,7 +1491,9 @@ This script, last modified $timestamp, has failed to recognize
+ the operating system you are using. It is advised that you
+ download the most up to date version of the config scripts from
+ 
+-    ftp://ftp.gnu.org/pub/gnu/config/
++  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
++and
++  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+ 
+ If the version you run ($0) is already up to date, please
+ send the following data and any information you think might be
+--- a/projects/sample/autoconf/config.sub
++++ b/projects/sample/autoconf/config.sub
+@@ -1,9 +1,10 @@
+ #! /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, 2006, 2007, 2008, 2009
++#   Free Software Foundation, Inc.
+ 
+-timestamp='2003-02-22'
++timestamp='2009-06-11'
+ 
+ # 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 +22,15 @@ timestamp='2003-02-22'
+ #
+ # 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 <config-patches@gnu.org>.  Submit a context
+ # diff and a properly formatted ChangeLog entry.
+ #
+@@ -70,8 +72,8 @@ Report bugs and patches to <config-patches@gnu.org>."
+ version="\
+ GNU config.sub ($timestamp)
+ 
+-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+-Free Software Foundation, Inc.
++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
++2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ 
+ This is free software; see the source for copying conditions.  There is NO
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+@@ -83,11 +85,11 @@ Try \`$me --help' for more information."
+ 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 +101,7 @@ while test $# -gt 0 ; do
+     *local*)
+        # First pass through any local machine types.
+        echo $1
+-       exit 0;;
++       exit ;;
+ 
+     * )
+        break ;;
+@@ -118,7 +120,10 @@ esac
+ # Here we must recognize all the valid KERNEL-OS combinations.
+ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+ case $maybe_os in
+-  nto-qnx* | linux-gnu* | freebsd*-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* | \
++  kopensolaris*-gnu* | \
++  storm-chaos* | os2-emx* | rtmk-nova*)
+     os=-$maybe_os
+     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+     ;;
+@@ -144,10 +149,13 @@ case $os in
+ 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+-	-apple | -axis)
++	-apple | -axis | -knuth | -cray)
+ 		os=
+ 		basic_machine=$1
+ 		;;
++        -bluegene*)
++	        os=-cnk
++		;;
+ 	-sim | -cisco | -oki | -wec | -winbond)
+ 		os=
+ 		basic_machine=$1
+@@ -169,6 +177,10 @@ case $os in
+ 	-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/'`
+@@ -185,6 +197,10 @@ case $os in
+ 		# 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/'`
+@@ -228,44 +244,57 @@ case $basic_machine in
+ 	| a29k \
+ 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+-	| clipper \
++	| am33_2.0 \
++	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
++	| bfin \
++	| c4x | clipper \
+ 	| d10v | d30v | dlx | dsp16xx \
+-	| fr30 | frv \
++	| fido | fr30 | frv \
+ 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ 	| i370 | i860 | i960 | ia64 \
+-	| ip2k \
+-	| m32r | m68000 | m68k | m88k | mcore \
++	| ip2k | iq2000 \
++	| lm32 \
++	| m32c | m32r | m32rle | m68000 | m68k | m88k \
++	| maxq | mb | microblaze | mcore | mep | metag \
+ 	| mips | mipsbe | mipseb | mipsel | mipsle \
+ 	| mips16 \
+ 	| mips64 | mips64el \
+-	| mips64vr | mips64vrel \
++	| mips64octeon | mips64octeonel \
+ 	| mips64orion | mips64orionel \
++	| mips64r5900 | mips64r5900el \
++	| mips64vr | mips64vrel \
+ 	| mips64vr4100 | mips64vr4100el \
+ 	| mips64vr4300 | mips64vr4300el \
+ 	| mips64vr5000 | mips64vr5000el \
++	| mips64vr5900 | mips64vr5900el \
+ 	| mipsisa32 | mipsisa32el \
+ 	| mipsisa32r2 | mipsisa32r2el \
+ 	| mipsisa64 | mipsisa64el \
++	| mipsisa64r2 | mipsisa64r2el \
+ 	| mipsisa64sb1 | mipsisa64sb1el \
+ 	| mipsisa64sr71k | mipsisa64sr71kel \
+ 	| mipstx39 | mipstx39el \
+ 	| mn10200 | mn10300 \
++	| moxie \
++	| 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 \
++	| score \
++	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ 	| sh64 | sh64le \
+-	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
+-	| strongarm \
+-	| tahoe | thumb | tic80 | tron \
++	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
++	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
++	| spu | strongarm \
++	| tahoe | thumb | tic4x | tic80 | tron \
+ 	| v850 | v850e \
+ 	| we32k \
+-	| x86 | xscale | xstormy16 | xtensa \
+-	| z8k)
++	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
++	| z8k | z80)
+ 		basic_machine=$basic_machine-unknown
+ 		;;
+ 	m6811 | m68hc11 | m6812 | m68hc12)
+@@ -275,6 +304,9 @@ case $basic_machine in
+ 		;;
+ 	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
+@@ -294,54 +326,67 @@ case $basic_machine in
+ 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+-	| avr-* \
+-	| bs2000-* \
++	| avr-* | avr32-* \
++	| 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-* \
++	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ 	| h8300-* | h8500-* \
+ 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ 	| i*86-* | i860-* | i960-* | ia64-* \
+-	| ip2k-* \
+-	| m32r-* \
++	| ip2k-* | iq2000-* \
++	| lm32-* \
++	| m32c-* | m32r-* | m32rle-* \
+ 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+-	| m88110-* | m88k-* | mcore-* \
++	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ 	| mips16-* \
+ 	| mips64-* | mips64el-* \
+-	| mips64vr-* | mips64vrel-* \
++	| mips64octeon-* | mips64octeonel-* \
+ 	| mips64orion-* | mips64orionel-* \
++	| mips64r5900-* | mips64r5900el-* \
++	| mips64vr-* | mips64vrel-* \
+ 	| 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-* \
+-	| 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[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+-	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+-	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
++	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
++	| sparclite-* \
++	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ 	| tahoe-* | thumb-* \
+-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
++	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+ 	| tron-* \
+ 	| v850-* | v850e-* | vax-* \
+ 	| we32k-* \
+-	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
+-	| xtensa-* \
++	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
++	| xstormy16-* | xtensa*-* \
+ 	| ymp-* \
+-	| z8k-*)
++	| z8k-* | z80-*)
++		;;
++	# Recognize the basic CPU types without company name, with glob match.
++	xtensa*)
++		basic_machine=$basic_machine-unknown
+ 		;;
+ 	# Recognize the various machine names and aliases which stand
+ 	# for a CPU type and a company and sometimes even an OS.
+@@ -359,6 +404,9 @@ case $basic_machine in
+ 		basic_machine=a29k-amd
+ 		os=-udi
+ 		;;
++    	abacus)
++		basic_machine=abacus-unknown
++		;;
+ 	adobe68k)
+ 		basic_machine=m68010-adobe
+ 		os=-scout
+@@ -373,6 +421,12 @@ case $basic_machine in
+ 		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
+@@ -396,6 +450,10 @@ case $basic_machine in
+ 		basic_machine=m68k-apollo
+ 		os=-bsd
+ 		;;
++	aros)
++		basic_machine=i386-pc
++		os=-aros
++		;;
+ 	aux)
+ 		basic_machine=m68k-apple
+ 		os=-aux
+@@ -404,10 +462,26 @@ case $basic_machine in
+ 		basic_machine=ns32k-sequent
+ 		os=-dynix
+ 		;;
++	blackfin)
++		basic_machine=bfin-unknown
++		os=-linux
++		;;
++	blackfin-*)
++		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
++		os=-linux
++		;;
++	bluegene*)
++		basic_machine=powerpc-ibm
++		os=-cnk
++		;;
+ 	c90)
+ 		basic_machine=c90-cray
+ 		os=-unicos
+ 		;;
++        cegcc)
++		basic_machine=arm-unknown
++		os=-cegcc
++		;;
+ 	convex-c1)
+ 		basic_machine=c1-convex
+ 		os=-bsd
+@@ -432,12 +506,27 @@ case $basic_machine in
+ 		basic_machine=j90-cray
+ 		os=-unicos
+ 		;;
++	craynv)
++		basic_machine=craynv-cray
++		os=-unicosmp
++		;;
++	cr16)
++		basic_machine=cr16-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
+ 		;;
+@@ -460,6 +549,14 @@ case $basic_machine in
+ 		basic_machine=m88k-motorola
+ 		os=-sysv3
+ 		;;
++	dicos)
++		basic_machine=i686-pc
++		os=-dicos
++		;;
++	djgpp)
++		basic_machine=i586-pc
++		os=-msdosdjgpp
++		;;
+ 	dpx20 | dpx20-*)
+ 		basic_machine=rs6000-bull
+ 		os=-bosx
+@@ -610,6 +707,14 @@ case $basic_machine in
+ 		basic_machine=m68k-isi
+ 		os=-sysv
+ 		;;
++	m68knommu)
++		basic_machine=m68k-unknown
++		os=-linux
++		;;
++	m68knommu-*)
++		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
++		os=-linux
++		;;
+ 	m88k-omron*)
+ 		basic_machine=m88k-omron
+ 		;;
+@@ -625,6 +730,10 @@ case $basic_machine in
+ 		basic_machine=i386-pc
+ 		os=-mingw32
+ 		;;
++	mingw32ce)
++		basic_machine=arm-unknown
++		os=-mingw32ce
++		;;
+ 	miniframe)
+ 		basic_machine=m68000-convergent
+ 		;;
+@@ -638,10 +747,6 @@ case $basic_machine in
+ 	mips3*)
+ 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ 		;;
+-	mmix*)
+-		basic_machine=mmix-knuth
+-		os=-mmixware
+-		;;
+ 	monitor)
+ 		basic_machine=m68k-rom68k
+ 		os=-coff
+@@ -654,6 +759,9 @@ case $basic_machine in
+ 		basic_machine=i386-pc
+ 		os=-msdos
+ 		;;
++	ms1-*)
++		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
++		;;
+ 	mvs)
+ 		basic_machine=i370-ibm
+ 		os=-mvs
+@@ -722,10 +830,6 @@ case $basic_machine in
+ 	np1)
+ 		basic_machine=np1-gould
+ 		;;
+-	nv1)
+-		basic_machine=nv1-cray
+-		os=-unicosmp
+-		;;
+ 	nsr-tandem)
+ 		basic_machine=nsr-tandem
+ 		;;
+@@ -733,9 +837,12 @@ case $basic_machine in
+ 		basic_machine=hppa1.1-oki
+ 		os=-proelf
+ 		;;
+-	or32 | or32-*)
++	openrisc | openrisc-*)
+ 		basic_machine=or32-unknown
+-		os=-coff
++		;;
++	os400)
++		basic_machine=powerpc-ibm
++		os=-os400
+ 		;;
+ 	OSE68000 | ose68000)
+ 		basic_machine=m68000-ericsson
+@@ -753,6 +860,14 @@ case $basic_machine in
+ 		basic_machine=i860-intel
+ 		os=-osf
+ 		;;
++	parisc)
++		basic_machine=hppa-unknown
++		os=-linux
++		;;
++	parisc-*)
++		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
++		os=-linux
++		;;
+ 	pbd)
+ 		basic_machine=sparc-tti
+ 		;;
+@@ -762,24 +877,36 @@ case $basic_machine in
+ 	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
+ 		;;
+ 	pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ 		basic_machine=i686-pc
+ 		;;
+-	pentiumii | pentium2)
++	pentiumii | pentium2 | pentiumiii | pentium3)
+ 		basic_machine=i686-pc
+ 		;;
++	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
+ 		;;
+@@ -812,6 +939,10 @@ case $basic_machine in
+ 		basic_machine=i586-unknown
+ 		os=-pw32
+ 		;;
++	rdos)
++		basic_machine=i386-pc
++		os=-rdos
++		;;
+ 	rom68k)
+ 		basic_machine=m68k-rom68k
+ 		os=-coff
+@@ -838,6 +969,14 @@ case $basic_machine in
+ 	sb1el)
+ 		basic_machine=mipsisa64sb1el-unknown
+ 		;;
++	sde)
++		basic_machine=mipsisa32-sde
++		os=-elf
++		;;
++	sei)
++		basic_machine=mips-sei
++		os=-seiux
++		;;
+ 	sequent)
+ 		basic_machine=i386-sequent
+ 		;;
+@@ -845,6 +984,12 @@ case $basic_machine in
+ 		basic_machine=sh-hitachi
+ 		os=-hms
+ 		;;
++	sh5el)
++		basic_machine=sh5le-unknown
++		;;
++	sh64)
++		basic_machine=sh64-unknown
++		;;
+ 	sparclite-wrs | simso-wrs)
+ 		basic_machine=sparclite-wrs
+ 		os=-vxworks
+@@ -919,10 +1064,6 @@ case $basic_machine in
+ 		basic_machine=t90-cray
+ 		os=-unicos
+ 		;;
+-        tic4x | c4x*)
+-		basic_machine=tic4x-unknown
+-		os=-coff
+-		;;
+ 	tic54x | c54x*)
+ 		basic_machine=tic54x-unknown
+ 		os=-coff
+@@ -935,6 +1076,10 @@ case $basic_machine in
+ 		basic_machine=tic6x-unknown
+ 		os=-coff
+ 		;;
++	tile*)
++		basic_machine=tile-unknown
++		os=-linux-gnu
++		;;
+ 	tx39)
+ 		basic_machine=mipstx39-unknown
+ 		;;
+@@ -948,6 +1093,10 @@ case $basic_machine in
+ 	tower | tower-32)
+ 		basic_machine=m68k-ncr
+ 		;;
++	tpf)
++		basic_machine=s390x-ibm
++		os=-tpf
++		;;
+ 	udi29k)
+ 		basic_machine=a29k-amd
+ 		os=-udi
+@@ -991,6 +1140,10 @@ case $basic_machine in
+ 		basic_machine=hppa1.1-winbond
+ 		os=-proelf
+ 		;;
++	xbox)
++		basic_machine=i686-pc
++		os=-mingw32
++		;;
+ 	xps | xps100)
+ 		basic_machine=xps100-honeywell
+ 		;;
+@@ -1002,6 +1155,10 @@ case $basic_machine in
+ 		basic_machine=z8k-unknown
+ 		os=-sim
+ 		;;
++	z80-*-coff)
++		basic_machine=z80-unknown
++		os=-sim
++		;;
+ 	none)
+ 		basic_machine=none-none
+ 		os=-none
+@@ -1021,6 +1178,9 @@ case $basic_machine in
+ 	romp)
+ 		basic_machine=romp-ibm
+ 		;;
++	mmix)
++		basic_machine=mmix-knuth
++		;;
+ 	rs6000)
+ 		basic_machine=rs6000-ibm
+ 		;;
+@@ -1037,13 +1197,10 @@ case $basic_machine in
+ 	we32k)
+ 		basic_machine=we32k-att
+ 		;;
+-	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
++	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ 		basic_machine=sh-unknown
+ 		;;
+-	sh64)
+-		basic_machine=sh64-unknown
+-		;;
+-	sparc | sparcv9 | sparcv9b)
++	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ 		basic_machine=sparc-sun
+ 		;;
+ 	cydra)
+@@ -1110,25 +1267,30 @@ case $os in
+ 	# Each alternative MUST END IN A *, to match a version number.
+ 	# -sysv* is not here because it comes later, after sysvr4.
+ 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
++	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
++	      | -kopensolaris* \
+ 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+-	      | -aos* \
++	      | -aos* | -aros* \
+ 	      | -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* \
++	      | -chorusos* | -chorusrdb* | -cegcc* \
+ 	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+-	      | -mingw32* | -linux-gnu* | -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*)
++	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
++	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+ 	# Remember, each alternative MUST END IN *, to match a version number.
+ 		;;
+ 	-qnx*)
+@@ -1146,12 +1308,15 @@ case $os in
+ 		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ 		;;
+ 	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
++	      | -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|'`
+ 		;;
+@@ -1164,6 +1329,9 @@ case $os in
+ 	-opened*)
+ 		os=-openedition
+ 		;;
++        -os400*)
++		os=-os400
++		;;
+ 	-wince*)
+ 		os=-wince
+ 		;;
+@@ -1185,6 +1353,9 @@ case $os in
+ 	-atheos*)
+ 		os=-atheos
+ 		;;
++	-syllable*)
++		os=-syllable
++		;;
+ 	-386bsd)
+ 		os=-bsd
+ 		;;
+@@ -1207,6 +1378,9 @@ case $os in
+ 	-sinix*)
+ 		os=-sysv4
+ 		;;
++        -tpf*)
++		os=-tpf
++		;;
+ 	-triton*)
+ 		os=-sysv3
+ 		;;
+@@ -1243,6 +1417,12 @@ case $os in
+ 	-kaos*)
+ 		os=-kaos
+ 		;;
++	-zvmoe)
++		os=-zvmoe
++		;;
++	-dicos*)
++		os=-dicos
++		;;
+ 	-none)
+ 		;;
+ 	*)
+@@ -1265,6 +1445,12 @@ else
+ # system, and we'll never get to this point.
+ 
+ case $basic_machine in
++        score-*)
++		os=-elf
++		;;
++        spu-*)
++		os=-elf
++		;;
+ 	*-acorn)
+ 		os=-riscix1.2
+ 		;;
+@@ -1274,6 +1460,9 @@ case $basic_machine in
+ 	arm*-semi)
+ 		os=-aout
+ 		;;
++        c4x-* | tic4x-*)
++        	os=-coff
++		;;
+ 	# This must come before the *-dec entry.
+ 	pdp10-*)
+ 		os=-tops20
+@@ -1299,6 +1488,9 @@ case $basic_machine in
+ 	m68*-cisco)
+ 		os=-aout
+ 		;;
++        mep-*)
++		os=-elf
++		;;
+ 	mips*-cisco)
+ 		os=-elf
+ 		;;
+@@ -1317,9 +1509,15 @@ case $basic_machine in
+ 	*-be)
+ 		os=-beos
+ 		;;
++	*-haiku)
++		os=-haiku
++		;;
+ 	*-ibm)
+ 		os=-aix
+ 		;;
++    	*-knuth)
++		os=-mmixware
++		;;
+ 	*-wec)
+ 		os=-proelf
+ 		;;
+@@ -1422,7 +1620,7 @@ case $basic_machine in
+ 			-sunos*)
+ 				vendor=sun
+ 				;;
+-			-aix*)
++			-cnk*|-aix*)
+ 				vendor=ibm
+ 				;;
+ 			-beos*)
+@@ -1452,9 +1650,15 @@ case $basic_machine in
+ 			-mvs* | -opened*)
+ 				vendor=ibm
+ 				;;
++			-os400*)
++				vendor=ibm
++				;;
+ 			-ptx*)
+ 				vendor=sequent
+ 				;;
++			-tpf*)
++				vendor=ibm
++				;;
+ 			-vxsim* | -vxworks* | -windiss*)
+ 				vendor=wrs
+ 				;;
+@@ -1479,7 +1683,7 @@ case $basic_machine in
+ esac
+ 
+ echo $basic_machine$os
+-exit 0
++exit
+ 
+ # Local variables:
+ # eval: (add-hook 'write-file-hooks 'time-stamp)
--- llvm-2.6.orig/debian/patches/0009-Fix-doclinks.patch
+++ llvm-2.6/debian/patches/0009-Fix-doclinks.patch
@@ -0,0 +1,57 @@
+---
+
+--- a/docs/index.html
++++ b/docs/index.html
+@@ -66,32 +66,32 @@
+ Microsoft Visual Studio</a> - An addendum to the main Getting Started guide for
+ those using Visual Studio on Windows.</li>
+ 
+-<li><a href="tutorial/">LLVM Tutorial</a> - A walk through the process of using
++<li><a href="tutorial/index.html">LLVM Tutorial</a> - A walk through the process of using
+ LLVM for a custom language, and the facilities LLVM offers in tutorial form.</li>
+ <li><a href="DeveloperPolicy.html">Developer Policy</a> - The LLVM project's
+ policy towards developers and their contributions.</li>
+ 
+-<li><a href="/docs/CommandGuide/index.html">LLVM Command Guide</a> - A reference
++<li><a href="CommandGuide/index.html">LLVM Command Guide</a> - A reference
+ manual for the LLVM command line utilities ("man" pages for LLVM tools).<br>
+ Current tools:
+- <a href="/cmds/llvm-ar.html">llvm-ar</a>,
+- <a href="/cmds/llvm-as.html">llvm-as</a>,
+- <a href="/cmds/llvm-dis.html">llvm-dis</a>,
+- <a href="/cmds/llvm-extract.html">llvm-extract</a>,
+- <a href="/cmds/llvm-ld.html">llvm-ld</a>,
+- <a href="/cmds/llvm-link.html">llvm-link</a>,
+- <a href="/cmds/llvm-nm.html">llvm-nm</a>,
+- <a href="/cmds/llvm-prof.html">llvm-prof</a>,
+- <a href="/cmds/llvm-ranlib.html">llvm-ranlib</a>,
+- <a href="/cmds/opt.html">opt</a>,
+- <a href="/cmds/llc.html">llc</a>,
+- <a href="/cmds/lli.html">lli</a>,
+- <a href="/cmds/llvmc.html">llvmc</a>
+- <a href="/cmds/llvmgcc.html">llvm-gcc</a>,
+- <a href="/cmds/llvmgxx.html">llvm-g++</a>,
+- <a href="/cmds/stkrc.html">stkrc</a>,
+- <a href="/cmds/bugpoint.html">bugpoint</a>,
+- <a href="/cmds/llvm-bcanalyzer.html">llvm-bcanalyzer</a>,
++ <a href="CommandGuide/llvm-ar.html">llvm-ar</a>,
++ <a href="CommandGuide/llvm-as.html">llvm-as</a>,
++ <a href="CommandGuide/llvm-dis.html">llvm-dis</a>,
++ <a href="CommandGuide/llvm-extract.html">llvm-extract</a>,
++ <a href="CommandGuide/llvm-ld.html">llvm-ld</a>,
++ <a href="CommandGuide/llvm-link.html">llvm-link</a>,
++ <a href="CommandGuide/llvm-nm.html">llvm-nm</a>,
++ <a href="CommandGuide/llvm-prof.html">llvm-prof</a>,
++ <a href="CommandGuide/llvm-ranlib.html">llvm-ranlib</a>,
++ <a href="CommandGuide/opt.html">opt</a>,
++ <a href="CommandGuide/llc.html">llc</a>,
++ <a href="CommandGuide/lli.html">lli</a>,
++ <a href="CommandGuide/llvmc.html">llvmc</a>
++ <a href="CommandGuide/llvmgcc.html">llvm-gcc</a>,
++ <a href="CommandGuide/llvmgxx.html">llvm-g++</a>,
++ <a href="CommandGuide/stkrc.html">stkrc</a>,
++ <a href="CommandGuide/bugpoint.html">bugpoint</a>,
++ <a href="CommandGuide/llvm-bcanalyzer.html">llvm-bcanalyzer</a>,
+ </li>
+ 
+ <li><a href="Passes.html">LLVM's Analysis and Transform Passes</a> - A list of
--- llvm-2.6.orig/debian/patches/0008-path-eraseFromDisk.patch
+++ llvm-2.6/debian/patches/0008-path-eraseFromDisk.patch
@@ -0,0 +1,36 @@
+---
+
+--- a/lib/System/Unix/Path.inc
++++ b/lib/System/Unix/Path.inc
+@@ -57,6 +57,10 @@
+ #include <dlfcn.h>
+ #endif
+ 
++#if HAVE_UNISTD_H
++#include <unistd.h>
++#endif
++
+ // Put in a hack for Cygwin which falsely reports that the mkdtemp function
+ // is available when it is not.
+ #ifdef __CYGWIN__
+@@ -731,9 +735,18 @@
+   }
+ 
+   if (remove_contents) {
++    int rv;
+     // Recursively descend the directory to remove its contents.
+-    std::string cmd = "/bin/rm -rf " + path;
+-    if (system(cmd.c_str()) != 0) {
++    switch (fork()) {
++    case -1:
++      return MakeErrMsg(ErrStr, path + ": failed to fork (recursively removing directory).");
++    case 0:
++      execl("/bin/rm", "/bin/rm", "-rf", "--", path.c_str(), (char *) 0);
++      exit(1);
++    default:
++      wait(&rv);
++    }
++    if (rv != 0) {
+       MakeErrMsg(ErrStr, path + ": failed to recursively remove directory.");
+       return true;
+     }
--- llvm-2.6.orig/debian/patches/0012-RUNTESTFLAGS.patch
+++ llvm-2.6/debian/patches/0012-RUNTESTFLAGS.patch
@@ -0,0 +1,15 @@
+---
+
+--- a/test/Makefile
++++ b/test/Makefile
+@@ -26,10 +26,6 @@
+ $(warning GREP_OPTIONS environment variable may interfere with test results)
+ endif
+ 
+-ifdef VERBOSE
+-RUNTESTFLAGS := $(VERBOSE)
+-endif
+-
+ ifdef TESTSUITE
+ CLEANED_TESTSUITE := $(patsubst %/,%,$(TESTSUITE))
+ CLEANED_TESTSUITE := $(patsubst test/%,%,$(CLEANED_TESTSUITE))
--- llvm-2.6.orig/debian/patches/0003-Debian-version-info-and-bugreport.patch
+++ llvm-2.6/debian/patches/0003-Debian-version-info-and-bugreport.patch
@@ -0,0 +1,36 @@
+---
+
+--- a/Makefile.rules
++++ b/Makefile.rules
+@@ -641,7 +641,7 @@ CPP.Flags     += $(sort -I$(PROJ_OBJ_DIR) -I$(PROJ_SRC_DIR) \
+ 	         $(patsubst %,-I%/include,\
+ 	         $(PROJ_OBJ_ROOT) $(PROJ_SRC_ROOT) \
+ 	         $(LLVM_OBJ_ROOT) $(LLVM_SRC_ROOT))) \
+-	         $(CPP.BaseFlags)
++	         $(CPP.BaseFlags) $(DebianOpts)
+ 
+ ifeq ($(BUILD_COMPONENT), 1)
+   Compile.C     = $(BUILD_CC) $(CPP.Flags) $(C.Flags) $(CFLAGS) $(CPPFLAGS) \
+--- a/configure
++++ b/configure
+@@ -717,7 +717,7 @@ PACKAGE_NAME='llvm'
+ PACKAGE_TARNAME='-llvm-'
+ PACKAGE_VERSION='2.6'
+ PACKAGE_STRING='llvm 2.6'
+-PACKAGE_BUGREPORT='llvmbugs@cs.uiuc.edu'
++PACKAGE_BUGREPORT='pkg-llvm-team@lists.alioth.debian.org'
+ 
+ ac_unique_file="lib/VMCore/Module.cpp"
+ # Factoring default headers for most tests.
+--- a/lib/Support/CommandLine.cpp
++++ b/lib/Support/CommandLine.cpp
+@@ -1130,6 +1130,9 @@ public:
+ #ifdef LLVM_VERSION_INFO
+         cout << LLVM_VERSION_INFO;
+ #endif
++#ifdef LLVM_DEBIAN_INFO
++	cout << LLVM_DEBIAN_INFO;
++#endif
+         cout << "\n  ";
+ #ifndef __OPTIMIZE__
+         cout << "DEBUG build";
--- llvm-2.6.orig/debian/patches/0007-Triple.h-Avoid-identifier-conflicts-on-mips-and-spar.patch
+++ llvm-2.6/debian/patches/0007-Triple.h-Avoid-identifier-conflicts-on-mips-and-spar.patch
@@ -0,0 +1,16 @@
+---
+
+--- a/include/llvm/ADT/Triple.h
++++ b/include/llvm/ADT/Triple.h
+@@ -13,6 +13,11 @@
+ #include "llvm/ADT/StringRef.h"
+ #include <string>
+ 
++// Some system headers or GCC predefined macros conflict with identifiers in
++// this file.  Undefine them here.
++#undef mips
++#undef sparc
++
+ namespace llvm {
+ class StringRef;
+ class Twine;