Check-in [e29b34acd1]
Overview
Comment:Merge updates from trunk.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | win32-install
Files: files | file ages | folders
SHA1:e29b34acd1faaaba383f026a13d261749f09596f
User & Date: mistachkin on 2016-06-29 01:19:59
Other Links: manifest | tags
Context
2016-06-29
02:46
Add Fossil 'keep-glob' setting to prevent the downloaded files from being cleaned. Leaf check-in: 685cc32776 user: mistachkin tags: win32-install
01:19
Merge updates from trunk. check-in: e29b34acd1 user: mistachkin tags: win32-install
2016-05-13
02:00
Fix to build of TCL_UTF_MAX check-in: 71bd41f921 user: rkeene tags: trunk
2015-12-14
21:01
Experimental adjustments to the install targets for Win32. check-in: 2ec7ce2722 user: mistachkin tags: win32-install
Changes

Modified .fossil-settings/ignore-glob from [e36d46f2b3] to [6de3991281].

   142    142   kitdll/buildsrc/kitdll-0.0/config.log
   143    143   kitdll/buildsrc/kitdll-0.0/config.status
   144    144   kitdll/buildsrc/kitdll-0.0/vfs_kitdll_data_tcl.c
   145    145   kitdll/buildsrc/kitdll-0.0/vfs_kitdll.tcl.h
   146    146   kitdll/build/kitdll-*
   147    147   kitdll/build/kitdll-*/*
   148    148   kitdll/build.log
   149         -libtclkit-*.*
          149  +libtclkit*.*

Modified README from [c5d7d876b1] to [8577620ff5].

   141    141   		are excluded.  This typically includes (as of Tcl 8.6):
   142    142   			itcl thread
   143    143   
   144    144   	10. KC_TCL_STATICPKGS
   145    145   		Set this variable to the value "1" to attempt to force the
   146    146   		packages included in the "pkgs" directory of Tcl 8.6+
   147    147   		to be compiled statically
          148  +
          149  +	11. KITCREATOR_STATIC_KITDLL
          150  +		Set this variable to the value "1" to build a static KitDLL.
          151  +		This only has an affect when KITCREATOR_PKGS specifies that
          152  +		"kitdll" is to be built (e.g., KITCREATOR_PKGS='kitdll')
          153  +
          154  +	12. KITCREATOR_ITCL3_FORCE
          155  +		Set this variable to the value "1" to build [incr Tcl] version
          156  +		3.x even with Tcl 8.6+.  Note that [incr Tcl] 4.x will still
          157  +		be built as part of Tcl 8.6+ (unless excluded using
          158  +		KITCREATOR_MINBUILD).
   148    159   
   149    160   
   150    161   Cross compiling Environment Variables:
   151    162   
   152    163   	1. CC  
   153    164   		C compiler   e.g. i686-pc-mingw32-gcc
   154    165   

Modified build/make-kit-macosx-amd64 from [17e09199c0] to [2ff67a4329].

     1      1   #! /bin/sh
     2      2   
     3      3   CC='gcc -arch x86_64'
     4      4   CXX='g++ -arch x86_64'
     5      5   export CC CXX
     6      6   
     7         -./build/make-kit-powermacg5 "$@" --enable-aqua --host=x86_64-apple-darwin9
            7  +./build/make-kit-remote buildb.wu.ac.at "$@" --enable-aqua --host=x86_64-apple-darwin9

Modified build/make-kit-macosx-i386 from [33d805adde] to [d0ef76fb73].

     1      1   #! /bin/sh
     2      2   
     3      3   CC='gcc -arch i386'
     4      4   CXX='g++ -arch i386'
     5      5   export CC CXX
     6      6   
     7         -./build/make-kit-powermacg5 "$@" --enable-aqua --host=i386-apple-darwin9
            7  +./build/make-kit-remote buildb.wu.ac.at "$@" --enable-aqua --host=i386-apple-darwin9

Modified build/make-kit-macosx-ppc from [3867238257] to [90b249d07a].

     1      1   #! /bin/sh
     2      2   
     3         -./build/make-kit-powermacg5 "$@" --enable-aqua
            3  +./build/make-kit-remote powermacg5.vpn.oc9.org "$@" --enable-aqua

Modified build/make-kit-macosx-ppc64 from [9dcb9c91cc] to [9ab10e87a6].

     1      1   #! /bin/sh
     2      2   
     3      3   CC='gcc -arch ppc64'
     4      4   CXX='g++ -arch ppc64'
     5      5   export CC CXX
     6      6   
     7         -./build/make-kit-powermacg5 "$@" --enable-aqua
            7  +./build/make-kit-remote powermacg5.vpn.oc9.org "$@" --enable-aqua

Modified build/make-kit-remote from [9ceb1cf4f7] to [e991615aec].

     1      1   #! /bin/bash
     2      2   
     3         -if [ "$(uname -s)" != 'Darwin' ]; then
     4         -	buildid="$(( hostname; id -u; pwd ) | openssl sha1 | sed 's@^.*= *@@')"
     5         -	workdir="/tmp/work-kitcreator-${buildid}"
            3  +TARGET="$1"
            4  +shift
            5  +
            6  +buildid="$(( hostname; id -u; pwd ) | openssl sha1 | sed 's@^.*= *@@')"
            7  +workdir="/tmp/work-kitcreator-${buildid}"
            8  +
            9  +hostUp='0'
           10  +for try in {1..3}; do
           11  +	checkOk="$(timeout 300 ssh -q "${TARGET}" 'echo ok' 2>/dev/null)"
           12  +
           13  +	if [ "${checkOk}" = 'ok' ]; then
           14  +		hostUp='1'
           15  +		break
           16  +	fi
           17  +
           18  +	sleep 10
           19  +done
           20  +
           21  +if [ "${hostUp}" != '1' ]; then
           22  +	echo "Unable to establish a link to the remote system." >&2
           23  +
           24  +	exit 1
           25  +fi
     6     26   
     7         -	rsync -aq --delete -e ssh . powermacg5.vpn.oc9.org:${workdir}/ || exit 1
           27  +rsync -aq --delete -e ssh . "${TARGET}:${workdir}/" || exit 1
     8     28   
     9         -	(
    10         -		newArgv=("$@"); declare -p newArgv
    11         -		declare -p workdir
    12         -		export
    13         -		cat << \_EOF_
           29  +(
           30  +	newArgv=("$@"); declare -p newArgv
           31  +	declare -p workdir
           32  +	export
           33  +	cat << \_EOF_
    14     34   cd "${workdir}" || exit 1
    15     35   export PATH="${PATH}:/usr/local/bin:/usr/bin"
    16     36   ./kitcreator "${newArgv[@]}"
    17     37   exit "$?"
    18     38   _EOF_
    19         -	) | ssh powermacg5.vpn.oc9.org bash -s
    20         -	retval="$?"
           39  +) | ssh "${TARGET}" bash -s
           40  +retval="$?"
    21     41   
    22         -	rm -f */build.log
    23         -	ssh powermacg5.vpn.oc9.org "workdir='${workdir}'; "'cd "${workdir}" && tar -cf - tclkit-* libtclkit* */build.log 2>/dev/null' | tar -xf -
           42  +rm -f */build.log
           43  +ssh "${TARGET}" "workdir='${workdir}'; "'cd "${workdir}" && tar -cf - tclkit-* libtclkit* */build.log 2>/dev/null' | tar -xf -
    24     44   
    25         -	# Clean-up if appropriate
    26         -	case "$(pwd)" in
    27         -		/home/rkeene/*)
    28         -			;;
    29         -		*)
    30         -			ssh powermacg5.vpn.oc9.org "workdir='${workdir}'; "'rm -rf "${workdir}"'
    31         -			;;
    32         -	esac
           45  +# Clean-up if appropriate
           46  +case "$(pwd)" in
           47  +	/home/rkeene/*)
           48  +		;;
           49  +	*)
           50  +		ssh "${TARGET}" "workdir='${workdir}'; "'rm -rf "${workdir}"'
           51  +		;;
           52  +esac
    33     53   
    34         -	exit "${retval}"
    35         -else
    36         -	exec ./kitcreator "$@"
    37         -fi
    38         -
    39         -exit 1
           54  +exit "${retval}"

Modified build/makearch.info from [fe83d4d792] to [7129edb006].

    12     12   # If set to "auto" it will be maintained in a file called .version
    13     13   # in the source directory and the revision will be incremented
    14     14   # each time a "makearch" is done.
    15     15   #
    16     16   # If @@SVNLCR@@ is used anywhere in this version number, it will be
    17     17   # replaced with the highest last-changed-rev from the output of
    18     18   #   svn info -R    (or 0)
    19         -VERS="0.9.2"
           19  +VERS="0.9.5"
    20     20   
    21     21   # Space sperated list of documents, if they exist, they will be
    22     22   # prefixed with the contents of the DOC_HDR file and substitution
    23     23   # will occur:
    24     24   #     @@UTIL@@ becomes the utility name ${UTIL}
    25     25   #     @@VERS@@ becomes the utility version
    26     26   #     @@DATE@@ becomes the current date

Modified build/test/test from [b787f2bb27] to [1606fd2709].

     1      1   #! /bin/bash
     2      2   
     3         -VERSIONS="8.5.18 8.6.4 fossil_trunk"
            3  +VERSIONS="8.5.19 8.6.5 fossil_trunk"
     4      4   
     5      5   # Find the base directory
     6      6   for x in 1 2 3 4 __fail__; do
     7      7   	if [ "${x}" = "__fail__" ]; then
     8      8   		echo 'Unable to find KitCreator, aborting.' >&2
     9      9   
    10     10   		exit 1

Added build/utils/download-tclkit.tcl version [092ef76dba].

            1  +#!/usr/bin/env tclsh
            2  +# Tclkit Downloader v0.2.2 -- download Tclkits created with the KitCreator
            3  +# Web Interface. Works with Tcl 8.5+ and Jim Tcl v0.75+. This script requires
            4  +# that cURL be available through [exec curl].
            5  +# Copyright (C) 2016, dbohdan.
            6  +# License: MIT.
            7  +proc download url {
            8  +    if {![string match */buildinfo $url]} {
            9  +        # Guess at what the buildinfo URL might be if we are given, e.g., a
           10  +        # building page URL.
           11  +        set url [string map {/building {}} $url]
           12  +        set checksum {}
           13  +        foreach piece [split $url /] {
           14  +            if {[regexp {^[a-z0-9]{40}$} $piece checksum]} {
           15  +                break
           16  +            }
           17  +        }
           18  +        if {$checksum eq {}} {
           19  +            error "can't determine how to get the from the URL \"$url\" to the\
           20  +                    buildinfo"
           21  +        }
           22  +        set url [regexp -inline "^.*$checksum" $url]/buildinfo
           23  +    }
           24  +
           25  +    set buildInfo [exec curl -s $url]
           26  +
           27  +    set filename [dict get $buildInfo filename]
           28  +    append filename -[dict get $buildInfo tcl_version]
           29  +    append filename -[dict get $buildInfo platform]
           30  +
           31  +    if {[llength [dict get $buildInfo packages]] > 0} {
           32  +        foreach option {staticpkgs threaded debug} {
           33  +            if {[dict exists $buildInfo options $option] &&
           34  +                    [dict get $buildInfo options $option]} {
           35  +                append filename -$option
           36  +            }
           37  +        }
           38  +        append filename -[join [dict get $buildInfo packages] -]
           39  +    }
           40  +
           41  +    set tail [file tail $url]
           42  +    # We can't use [file dirname] here because it will transform
           43  +    # "http://example.com/" into "http:/example.com/".
           44  +    set baseUrl [string range $url 0 end-[string length $tail]]
           45  +    if {[string index $baseUrl end] ne {/}} {
           46  +        append baseUrl /
           47  +    }
           48  +    set tclkit $baseUrl[dict get $buildInfo filename]
           49  +
           50  +    puts "Downloading $tclkit to $filename..."
           51  +    exec curl -o $filename $tclkit >@ stdout 2>@ stderr
           52  +
           53  +    catch {exec chmod +x $filename}
           54  +}
           55  +
           56  +set url [lindex $argv 0]
           57  +if {$url eq {}} {
           58  +    puts "usage: $argv0 url"
           59  +    puts {The URL should be a KitCreator Web Interface buildinfo page.\
           60  +            If it is instead, e.g., a building page or a direct Tclkit download\
           61  +            URL, the script will try to guess where the buildinfo is.}
           62  +} else {
           63  +    download $url
           64  +}

Modified build/web/building.cgi from [ceea8a8659] to [c7e1a0c441].

    69     69   					append description ", Without Tcl pkgs/ and all encodings"
    70     70   				}
    71     71   			}
    72     72   			"staticlibssl" {
    73     73   				if {$value} {
    74     74   					append description ", Statically linked to LibSSL"
    75     75   				}
           76  +			}
           77  +			"staticpkgs" {
           78  +				if {$value} {
           79  +					append description ", With Tcl 8.6+ pkgs/ directory all packages statically linked in"
           80  +				}
    76     81   			}
    77     82   			"storage" {
    78     83   				switch -- $value {
    79     84   					"mk4" {
    80     85   						append description ", Metakit-based"
    81     86   					}
    82     87   					"zip" {

Modified build/web/kitcreator.vfs/index.rvt from [e6bae894b6] to [72c38390f4].

    15     15   
    16     16   	set kitcreator_versions(trunk) "Fossil Trunk Tip"
    17     17   
    18     18   	set tcl_versions(8.5.15) 8.5.15
    19     19   	set tcl_versions(8.5.16) 8.5.16
    20     20   	set tcl_versions(8.5.17) 8.5.17
    21     21   	set tcl_versions(8.5.18) 8.5.18
           22  +	set tcl_versions(8.5.19) 8.5.19
    22     23   	set tcl_versions(8.6.1) 8.6.1
    23     24   	set tcl_versions(8.6.2) 8.6.2
    24     25   	set tcl_versions(8.6.3) 8.6.3
    25     26   	set tcl_versions(8.6.4) 8.6.4
           27  +	set tcl_versions(8.6.5) 8.6.5
    26     28   	set tcl_versions(fossil_trunk) "Fossil Trunk Tip"
    27     29   
    28     30   	set platforms(android-arm) "Android/ARM"
    29     31   	set platforms(freebsd-amd64) "FreeBSD/amd64"
    30     32   	set platforms(hpux-hppa64) "HP-UX/PA-RISC 2.0"
    31     33   	set platforms(linux-amd64) "Linux/amd64"
    32     34   	set platforms(linux-amd64-static) "Linux/amd64 (static)"
................................................................................
   118    120   				}
   119    121   				"option_minbuild" {
   120    122   					set build_options(minbuild) 1
   121    123   				}
   122    124   				"option_staticlibssl" {
   123    125   					set build_options(staticlibssl) 1
   124    126   				}
          127  +				"option_staticpkgs" {
          128  +					set build_options(staticpkgs) 1
          129  +				}
          130  +				"option_tclutfmax6" {
          131  +					set build_options(tclutfmax6) 1
          132  +				}
   125    133   				"option_storage" {
   126    134   					switch -- $args($arg) {
   127    135   						"mk4" - "zip" - "cvfs" {
   128    136   							set build_options(storage) $args($arg)
   129    137   						}
   130    138   					}
   131    139   				}
................................................................................
   357    365               <input type="checkbox" name="option_package_<? puts -nonewline $package ?>" id="option_package_<? puts -nonewline $package ?>">Package: <? puts -nonewline $packages($package) ?><br>
   358    366   <? } ?>
   359    367               <input type="checkbox" name="option_threaded">Kit: Threaded<br>
   360    368               <input type="checkbox" name="option_debug">Kit: Debugging Build<br>
   361    369               <input type="checkbox" name="option_kitdll" id="option_kitdll">Kit: Build Library (KitDLL)<br>
   362    370               <input type="checkbox" name="option_dynamictk" id="option_dynamictk">Kit: Always link Tk dynamically (if Tk is built)<br>
   363    371               <input type="checkbox" name="option_minbuild">Kit: "Minimal" build (remove extra packages shipped as part of Tcl and reduce encodings)<br>
          372  +            <input type="checkbox" name="option_staticpkgs">Kit: Statically link packages in pkgs directory<br>
          373  +            <input type="checkbox" name="option_tclutfmax6">Kit: TCL_UTF_MAX=6 (incompatibility with standard Tcl)<br>
   364    374               <input type="checkbox" name="option_staticlibssl">TLS: Statically link to LibSSL
   365    375             </td>
   366    376           </tr>
   367    377   	<tr>
   368    378   		<td>Kit Storage:</td>
   369    379   		<td>
   370    380   			<select name="option_storage">

Modified build/web/process_queue from [213ef78771] to [611cdd4af4].

   104    104   					set ::env(KITCREATOR_MINBUILD) 1
   105    105   				}
   106    106   			}
   107    107   			"staticlibssl" {
   108    108   				if {$value} {
   109    109   					set ::env(KC_TLS_LINKSSLSTATIC) 1
   110    110   				}
          111  +			}
          112  +			"staticpkgs" {
          113  +				if {$value} {
          114  +					set ::env(KC_TCL_STATICPKGS) 1
          115  +				}
          116  +			}
          117  +			"tclutfmax6" {
          118  +				if {$value} {
          119  +					set ::env(KC_TCL_UTF_MAX) 6
          120  +				}
   111    121   			}
   112    122   			"staticmk4" {
   113    123   			}
   114    124   		}
   115    125   	}
   116    126   
   117    127   	catch {
................................................................................
   123    133   	}
   124    134   
   125    135   	catch {
   126    136   		set cmd [list $script $buildinfo(tcl_version) {*}$args]
   127    137   		set fd [open "${outfile}.log" w+]
   128    138   		puts $fd "Running: export KITCREATOR_PKGS=\"$::env(KITCREATOR_PKGS)\""
   129    139   
   130         -		foreach variable [list STRIP STATICTK KITCREATOR_MINENCODINGS KITCREATOR_MINBUILD KC_TLS_LINKSSLSTATIC] {
          140  +		foreach variable [list STRIP STATICTK KITCREATOR_MINENCODINGS KITCREATOR_MINBUILD KC_TLS_LINKSSLSTATIC KC_TCL_STATICPKGS KC_TCL_UTF_MAX] {
   131    141   			if {[info exists ::env($variable)]} {
   132    142   				puts $fd "Running: export $variable=\"$::env($variable)\""
   133    143   			}
   134    144   		}
   135    145   
   136    146   		puts $fd "Running: $cmd"
   137    147   		close $fd

Added common/helpers/download version [d546c4b48d].

            1  +#! /usr/bin/env bash
            2  +
            3  +url="$1"
            4  +file="$2"
            5  +hash="$3"
            6  +
            7  +if [ "${#}" != '3' ]; then
            8  +	echo 'Usage: download <url> <file> <hash>' >&2
            9  +
           10  +	exit 1
           11  +fi
           12  +
           13  +for tryDownloadProgram in wget curl; do
           14  +	tryDownloadProgramPath="$(which "${tryDownloadProgram}" 2>/dev/null)"
           15  +
           16  +	if [ -z "${tryDownloadProgramPath}" ]; then
           17  +		continue
           18  +	fi
           19  +
           20  +	if [ -x "${tryDownloadProgramPath}" ]; then
           21  +		downloadProgram="${tryDownloadProgram}"
           22  +		downloadProgramPath="${tryDownloadProgramPath}"
           23  +
           24  +		break
           25  +	fi
           26  +done
           27  +
           28  +case "${hash}" in
           29  +	????????????????????????????????????????)
           30  +		hashMethod='sha1'
           31  +		;;
           32  +	????????????????????????????????????????????????????????????????)
           33  +		hashMethod='sha256'
           34  +		;;
           35  +	-)
           36  +		hashMethod='null'
           37  +		;;
           38  +	*)
           39  +		echo "Unknown hash method for hash ${hash}" >&2
           40  +
           41  +		exit 1
           42  +		;;
           43  +esac
           44  +
           45  +function downloadFile() {
           46  +	local file urls
           47  +	local downloadProgramArgs
           48  +	local url
           49  +	local authoritativeURL
           50  +
           51  +	file="$1"
           52  +	shift
           53  +
           54  +	urls=("$@")
           55  +
           56  +	authoritativeURL="${urls[@]: -1}"
           57  +
           58  +	case "${downloadProgram}" in
           59  +		curl)
           60  +			downloadProgramArgs=(--header "X-Cache-URL: ${authoritativeURL}" --location --insecure --fail --output "${file}")
           61  +			;;
           62  +		wget)
           63  +			downloadProgramArgs=(--header="X-Cache-URL: ${authoritativeURL}" --no-check-certificate --output-document="${file}")
           64  +			;;
           65  +	esac
           66  +
           67  +	for url in "${urls[@]}" __fail__; do
           68  +		rm -f "${file}"
           69  +
           70  +		if [ "${url}" = '__fail__' ]; then
           71  +			return 1
           72  +		fi
           73  +
           74  +		"${downloadProgram}" "${downloadProgramArgs[@]}" "${url}" && break
           75  +	done
           76  +
           77  +	return 0
           78  +}
           79  +
           80  +function verifyHash() {
           81  +	local file hash hashMethod
           82  +	local checkHash
           83  +
           84  +	file="$1"
           85  +	hash="$2"
           86  +	hashMethod="$3"
           87  +
           88  +	if [ "${hashMethod}" = 'null' ]; then
           89  +		return 0
           90  +	fi
           91  +
           92  +	checkHash="$(openssl dgst "-${hashMethod}" "${file}" | sed 's@.*= *@@')"
           93  +
           94  +	if [ "${checkHash}" = "${hash}" ]; then
           95  +		return 0
           96  +	fi
           97  +
           98  +	echo "Hash (${hashMethod}) mismatch: Got: ${checkHash}; Expected: ${hash}" >&2
           99  +
          100  +	return 1
          101  +}
          102  +
          103  +rm -f "${file}.new" || exit 1
          104  +
          105  +urls=("${url}")
          106  +
          107  +if [ "${hashMethod}" != 'null' ]; then
          108  +	urls=(
          109  +		"http://hashcache.rkeene.org/${hashMethod}/${hash}"
          110  +		"${urls[@]}"
          111  +	)
          112  +fi
          113  +
          114  +downloadFile "${file}.new" "${urls[@]}" || exit 1
          115  +
          116  +verifyHash "${file}.new" "${hash}" "${hashMethod}" || exit 1
          117  +
          118  +mv "${file}.new" "${file}" || exit 1
          119  +
          120  +exit 0

Modified dbus/build.sh from [f52d4218f1] to [374386d172].

    17     17   mkdir 'build' 'out' 'inst' || exit 1
    18     18   
    19     19   # The dbus package
    20     20   
    21     21   DBUSVERS="2.0"
    22     22   SRC="src/dbus-${DBUSVERS}.tar.gz"
    23     23   SRCURL="http://sourceforge.net/projects/dbus-tcl/files/dbus/${DBUSVERS}/dbus-${DBUSVERS}.tar.gz/download"
           24  +SRCHASH='-'
    24     25   BUILDDIR="$(pwd)/build/dbus-${DBUSVERS}"
    25     26   OUTDIR="$(pwd)/out"
    26     27   INSTDIR="$(pwd)/inst"
    27     28   export DBUSVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR
    28     29   
    29     30   # Set configure options for this sub-project
    30     31   LDFLAGS="${LDFLAGS} ${KC_DBUS_LDFLAGS}"
................................................................................
    33     34   LIBS="${LIBS} ${KC_DBUS_LIBS}"
    34     35   export LDFLAGS CFLAGS CPPFLAGS LIBS
    35     36   
    36     37   if [ ! -f "${SRC}" ]; then
    37     38   	mkdir 'src' >/dev/null 2>/dev/null
    38     39   
    39     40   	if [ ! -d 'buildsrc' ]; then
    40         -		rm -f "${SRC}.tmp"
    41         -		wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
    42         -		mv "${SRC}.tmp" "${SRC}"
           41  +		download "${SRCURL}" "${SRC}" "${SRCHASH}" || exit 1
    43     42   	fi
    44     43   fi
    45     44   
    46     45   (
    47     46   	cd 'build' || exit 1
    48     47   
    49     48   	if [ ! -d '../buildsrc' ]; then

Modified itcl/build.sh from [a91c158a0c] to [fd163a032f].

     7      7   fi
     8      8   if [ -z "${TCLVERS}" ]; then
     9      9   	echo 'ERROR: The TCLVERS environment variable is not set' >&2
    10     10   
    11     11   	exit 1
    12     12   fi
    13     13   
    14         -ITCLVERS="3.4.2"
           14  +ITCLVERS="3.4.3"
    15     15   ITCLVERSEXTRA=""
    16     16   SRC="src/itcl-${ITCLVERS}.tar.gz"
    17         -SRCURL="http://sourceforge.net/projects/incrtcl/files/%5BIncr%20Tcl_Tk%5D-source/${ITCLVERS}/itcl${ITCLVERS}${ITCLVERSEXTRA}.tar.gz/download"
           17  +SRCURL="http://sourceforge.net/projects/incrtcl/files/%5BIncr%20Tcl_Tk%5D-source/Itcl%20${ITCLVERS}/itcl${ITCLVERS}${ITCLVERSEXTRA}.tar.gz/download"
           18  +SRCHASH='28b55f44a2fd450862a6f12982c00c1d03d767f62a834d83945a616e06068887'
    18     19   BUILDDIR="$(pwd)/build/itcl${ITCLVERS}"
    19     20   OUTDIR="$(pwd)/out"
    20     21   INSTDIR="$(pwd)/inst"
    21     22   export ITCLVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR
    22     23   
    23     24   # Set configure options for this sub-project
    24     25   LDFLAGS="${LDFLAGS} ${KC_ITCL_LDFLAGS}"
................................................................................
    28     29   export LDFLAGS CFLAGS CPPFLAGS LIBS
    29     30   
    30     31   rm -rf 'build' 'out' 'inst'
    31     32   mkdir 'build' 'out' 'inst' || exit 1
    32     33   
    33     34   # Determine if Itcl is even needed
    34     35   (
           36  +	# Always build if we are being forced to build
           37  +	if [ "${KITCREATOR_ITCL3_FORCE}" = '1' ]; then
           38  +		exit 0
           39  +	fi
           40  +
    35     41   	TCL_VERSION="unknown"
    36     42   	if [ -f "${TCLCONFIGDIR}/tclConfig.sh" ]; then
    37     43   		source "${TCLCONFIGDIR}/tclConfig.sh"
    38     44   	fi
    39     45   
    40     46   	if echo "${TCL_VERSION}" | grep '^8\.[45]$' >/dev/null; then
    41     47   		# Itcl is required for Tcl 8.4 and Tcl 8.5
................................................................................
    55     61   	exit 1
    56     62   ) || exit 0
    57     63   
    58     64   if [ ! -f "${SRC}" ]; then
    59     65   	mkdir 'src' >/dev/null 2>/dev/null
    60     66   
    61     67   	if [ ! -d 'buildsrc' ]; then
    62         -		rm -f "${SRC}.tmp"
    63         -		wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
    64         -		mv "${SRC}.tmp" "${SRC}"
           68  +		download "${SRCURL}" "${SRC}" "${SRCHASH}" || exit 1
    65     69   	fi
    66     70   fi
    67     71   
    68     72   (
    69     73   	cd 'build' || exit 1
    70     74   
    71     75   	if [ ! -d '../buildsrc' ]; then

Modified kitcreator from [4ae47ac847] to [00afc10ef6].

     9      9   	clean|distclean|build|retry)
    10     10   		mode="$1"
    11     11   		shift
    12     12   		;;
    13     13   esac
    14     14   
    15     15   # Determine which Tcl version to build
    16         -TCLVERS="8.6.4"
           16  +TCLVERS="8.6.5"
    17     17   if echo "$1" | grep '^[0-9][0-9]*\.' >/dev/null || echo "$1" | egrep '^(cvs|fossil)_' >/dev/null; then
    18     18   	TCLVERS="$1"
    19     19   
    20     20   	shift
    21     21   fi
    22     22   export TCLVERS
           23  +
           24  +# Add the helpers directory to the path
           25  +PATH="$(cd "$(dirname "$(which "$0")")" && pwd)"/common/helpers:"${PATH}"
           26  +export PATH
    23     27   
    24     28   # Verify that "pre.sh" has been run if this is a development snapshot of
    25     29   # KitCreator
    26     30   if [ -f 'build/pre.sh' ]; then
    27     31   	if ! find 'kitsh/buildsrc/' -name configure -type f 2>/dev/null | grep configure >/dev/null; then
    28     32   		echo "Please remember to run 'build/pre.sh' if you expect this build to work." >&2
    29     33   	fi
................................................................................
   153    157   	if echo 'exit 0' | "${testsh}" >/dev/null 2>/dev/null; then
   154    158   		TCLSH_NATIVE="${testsh}"
   155    159   
   156    160   		break
   157    161   	fi
   158    162   done
   159    163   export TCLSH_NATIVE
          164  +
          165  +# Verify that each component is happy with the environment
          166  +validatefailed="0"
          167  +for pkg in tcl tclvfs zlib ${KITCREATOR_PKGS} kitsh; do
          168  +	failed='0'
          169  +	if [ -f "${pkg}/.success" ]; then
          170  +		continue
          171  +	fi
          172  +
          173  +	if [ -x "${pkg}/validate.sh" ]; then
          174  +		(
          175  +			cd "${pkg}" >/dev/null 2>/dev/null || exit 1
          176  +
          177  +			./validate.sh 3>&1 4>&2 > build.log 2>&1 || exit 1
          178  +		) || failed="1"
          179  +
          180  +		if [ "${failed}" = '1' ]; then
          181  +			echo "Failed pre-requisite check for ${pkg}" >&2
          182  +
          183  +			validatefailed='1'
          184  +		fi
          185  +	fi
          186  +done
          187  +
          188  +if [ "${validatefailed}" = '1' ]; then
          189  +	exit 1
          190  +fi
   160    191   
   161    192   # Do build
   162    193   failedpkgs=""
   163    194   buildfailed="0"
   164    195   for pkg in tcl tclvfs zlib ${KITCREATOR_PKGS} kitsh; do
   165    196   	failed="0"
   166    197   	if [ -f "${pkg}/.success" ]; then

Modified kitsh/build.sh from [fe33f09af3] to [a050224c70].

    32     32   export ENABLECOMPRESSION
    33     33   
    34     34   rm -rf 'build' 'out' 'inst'
    35     35   mkdir 'out' 'inst' || exit 1
    36     36   
    37     37   
    38     38   (
    39         -	cp -r 'buildsrc' 'build'
           39  +	cp -rp 'buildsrc' 'build'
    40     40   	cd "${BUILDDIR}" || exit 1
    41     41   
    42     42   	# Fix up archives that Tcl gets wrong
    43     43   	for archive in ../../../tcl/inst/lib/dde*/tcldde*.a ../../../tcl/inst/lib/reg*/tclreg*.a; do
    44     44   		if [ ! -f "${archive}" ]; then
    45     45   			continue
    46     46   		fi
................................................................................
   111    111   	fi
   112    112   
   113    113   	# Cleanup
   114    114   	rm -f kit kit.exe tclsh tclsh.exe
   115    115   
   116    116   	# Determine if target is KitDLL or KitSH
   117    117   	if [ "${KITTARGET}" = "kitdll" ]; then
   118         -		CONFIGUREEXTRA="${CONFIGUREEXTRA} --enable-kitdll"
          118  +		if [ "${KITCREATOR_STATIC_KITDLL}" = '1' ]; then
          119  +			CONFIGUREEXTRA="${CONFIGUREEXTRA} --enable-kitdll=static"
          120  +		else
          121  +			CONFIGUREEXTRA="${CONFIGUREEXTRA} --enable-kitdll"
          122  +		fi
   119    123   	fi
   120    124   
   121    125   	# Compile Kit
   122    126   	if [ -z "${ZLIBDIR}" ]; then
   123    127   		echo "Running: ./configure --with-tcl=\"${TCLCONFIGDIR}\" ${CONFIGUREEXTRA}"
   124    128   
   125    129   		./configure --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA}
................................................................................
   164    168   	if [ "${KITTARGET}" = "kitdll" ]; then
   165    169   		## Find the library created
   166    170   		for chkkittarget in libtclkit*.*; do
   167    171   			if [ ! -f "${chkkittarget}" ]; then
   168    172   				continue
   169    173   			fi
   170    174   
   171         -			if echo "${chkkittarget}" | egrep '\.(lib|def|a)$'; then
          175  +			if echo "${chkkittarget}" | egrep '\..*\.(lib|def|a)$'; then
   172    176   				continue
   173    177   			fi
   174    178   
   175    179   			KITTARGET_NAME="./${chkkittarget}"
   176    180   
   177    181   			break
   178    182   		done

Modified kitsh/buildsrc/kitsh-0.0/Makefile.common.in from [93d968f811] to [bfce9994ae].

    12     12   EXTRA_OBJS = @EXTRA_OBJS@
    13     13   LDRUNPATH = @LDRUNPATH@
    14     14   EXTRA_KIT_DEPS = @EXTRA_KIT_DEPS@
    15     15   EXTRA_VFS_OBJS = @EXTRA_VFS_OBJS@
    16     16   TCLSH_NATIVE = tclsh
    17     17   LDFLAGS_ADD = @LDFLAGS_ADD@
    18     18   DIR2C_FLAGS = @DIR2C_FLAGS@
           19  +AR = @AR@
           20  +RANLIB = @RANLIB@
    19     21   
    20     22   # Build targets
    21     23   ## VFS Build
    22     24   cvfs_data_tcl.o: cvfs_data_tcl.c
    23     25   cvfs_data_tcl.c: dir2c.tcl starpack.vfs cvfs_data.c
    24     26   	"$(TCLSH_NATIVE)" dir2c.tcl tcl starpack.vfs $(DIR2C_FLAGS) > cvfs_data_tcl.c
    25     27   
................................................................................
    41     43   
    42     44   ### Windows resources
    43     45   kit.res.o: kit.rc tclkit.ico
    44     46   	$(RC) -o kit.res.o $(CPPFLAGS) kit.rc
    45     47   
    46     48   # Cleanup routines
    47     49   clean:
           50  +	rm -rf __TMP__
    48     51   	rm -f kit kit.res.o
    49     52   	rm -f libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@
    50     53   	rm -f $(OBJS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS)
    51     54   	rm -f cvfs_data_tcl.c cvfs_data_tcl.o
    52     55   	rm -f cvfs.tcl.h
    53     56   	rm -f tclsh.o tclsh tclsh.exe
    54     57   	rm -f wish.o wish wish.exe

Modified kitsh/buildsrc/kitsh-0.0/Makefile.kitdll.in from [05829b4d07] to [e922f32836].

     1      1   OBJS = kitInit.o rechan.o pwb.o zlib.o
     2      2   
     3      3   # Default target
     4         -all: libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@
            4  +all: @TARGET@
     5      5   
     6      6   -include Makefile.common
            7  +
            8  +kitdll: libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@
            9  +kitdll-static: libtclkit@KITDLL_LIB_VERSION@.a
     7     10   
     8     11   ## DLL Build
     9     12   libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@: $(OBJS) $(EXTRA_KIT_DEPS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS)
    10     13   	$(CC) $(CPPFLAGS) $(CFLAGS) -o libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@ $(OBJS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS) $(LDFLAGS) $(SHOBJLDFLAGS) @WHOLEARCHIVE@ $(ARCHS) @NOWHOLEARCHIVE@ $(LIBS) $(LDFLAGS_ADD)
    11     14   	-for striplib in $(STRIPLIBS); do $(OBJCOPY) --weaken "$${striplib}"; done
    12     15   	-mv libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@ libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@.safe; \
    13     16   		$(CC) $(CPPFLAGS) $(CFLAGS) -o libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@ $(OBJS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS) $(LDFLAGS) $(SHOBJLDFLAGS) @WHOLEARCHIVE@ $(ARCHS) @NOWHOLEARCHIVE@ $(LIBS) || \
    14     17   			mv libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@.safe libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@
    15     18   	-rm -f libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@.safe
    16     19   
           20  +## Static archive build
           21  +libtclkit@KITDLL_LIB_VERSION@.a: $(OBJS) $(EXTRA_KIT_DEPS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS)
           22  +	rm -f libtclkit@KITDLL_LIB_VERSION@.a.new
           23  +	rm -rf __TMP__
           24  +	mkdir __TMP__
           25  +	for arch in $(ARCHS); do ( cd __TMP__ && ar x ../$${arch} ); done
           26  +	$(OBJCOPY) --redefine-sym Tcl_Init=Tcl_InitReal --redefine-sym _Tcl_Init=_Tcl_InitReal __TMP__/tclInterp.o
           27  +	$(AR) cr libtclkit@KITDLL_LIB_VERSION@.a.new $(OBJS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS) __TMP__/*.o
           28  +	rm -rf __TMP__
           29  +	$(RANLIB) libtclkit@KITDLL_LIB_VERSION@.a.new
           30  +	mv libtclkit@KITDLL_LIB_VERSION@.a.new libtclkit@KITDLL_LIB_VERSION@.a
           31  +
    17     32   # Test driver
    18     33   tclsh.o: tclsh.c
    19         -tclsh: tclsh.o $(EXTRA_OBJS) libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@
           34  +tclsh: tclsh.o $(EXTRA_OBJS) @TARGET@
    20     35   	$(CC) $(CPPFLAGS) $(CFLAGS) -o tclsh tclsh.o $(EXTRA_OBJS) -L. -ltclkit@KITDLL_LIB_VERSION@ $(LDRUNPATH)
    21     36   
    22     37   wish.o: wish.c
    23     38   wish: wish.o $(EXTRA_OBJS) libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@
    24     39   	$(CC) $(CPPFLAGS) $(CFLAGS) $(WISH_CFLAGS) -o wish wish.o $(EXTRA_OBJS) -L. -ltclkit@KITDLL_LIB_VERSION@ $(LDRUNPATH)
           40  +
           41  +.PHONY: kitdll kitdll-static

Modified kitsh/buildsrc/kitsh-0.0/boot.tcl from [63e41b84b9] to [f2b9d8ad84].

   161    161   			package require vfs::zip
   162    162   			set ::zip::max_header_seek 8192
   163    163   		}
   164    164   
   165    165   		# Now that the initialization is complete, mount the user VFS if needed
   166    166   		## Mount the VFS from the Shared Object
   167    167   		if {[info exists ::TCLKIT_INITVFS] && [info exists ::tclKitFilename]} {
   168         -			catch {
          168  +			if {![catch {
   169    169   				vfs::zip::Mount $::tclKitFilename "/.KITDLL_USER"
          170  +			}]} {
          171  +				if {[file exists "/.KITDLL_USER"]} {
          172  +					lappend auto_path [file normalize "/.KITDLL_USER/lib"]
          173  +				}
   170    174   			}
   171    175   		}
   172         -		lappend auto_path "/.KITDLL_USER/lib"
          176  +
   173    177   
   174    178   		## Mount the VFS from executable
   175    179   		if {[info exists ::TCLKIT_INITVFS]} {
   176         -			catch {
          180  +			if {![catch {
   177    181   				vfs::zip::Mount [info nameofexecutable] "/.KITDLL_APP"
          182  +			}]} {
          183  +				if {[file exists "/.KITDLL_APP"]} {
          184  +					lappend auto_path [file normalize "/.KITDLL_APP/lib"]
          185  +				}
   178    186   			}
   179    187   		}
   180         -		lappend auto_path "/.KITDLL_APP/lib"
   181    188   	}
   182    189   
   183    190   	# Clean up
   184    191   	unset -nocomplain ::zip::max_header_seek
   185    192   	unset -nocomplain ::TCLKIT_TYPE ::TCLKIT_INITVFS
   186    193   	unset -nocomplain ::TCLKIT_MOUNTPOINT ::TCLKIT_VFSSOURCE ::TCLKIT_MOUNTPOINT_VAR ::TCLKIT_VFSSOURCE_VAR
   187    194   	unset -nocomplain ::tclKitStorage ::tclKitStorage_fd ::tclKitFilename
   188    195   	unset -nocomplain ::tclkit_system_encoding
   189    196   }

Modified kitsh/buildsrc/kitsh-0.0/config.guess from [94cc57e2a3] to [2721371267].

     1      1   #! /bin/sh
     2      2   # Attempt to guess a canonical system name.
     3         -#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
     4         -#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
     5         -#   2011, 2012 Free Software Foundation, Inc.
            3  +#   Copyright 1992-2016 Free Software Foundation, Inc.
     6      4   
     7         -timestamp='2012-02-10'
            5  +timestamp='2016-04-02'
     8      6   
     9      7   # This file is free software; you can redistribute it and/or modify it
    10      8   # under the terms of the GNU General Public License as published by
    11         -# the Free Software Foundation; either version 2 of the License, or
            9  +# the Free Software Foundation; either version 3 of the License, or
    12     10   # (at your option) any later version.
    13     11   #
    14     12   # This program is distributed in the hope that it will be useful, but
    15     13   # WITHOUT ANY WARRANTY; without even the implied warranty of
    16     14   # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    17     15   # General Public License for more details.
    18     16   #
    19     17   # You should have received a copy of the GNU General Public License
    20     18   # along with this program; if not, see <http://www.gnu.org/licenses/>.
    21     19   #
    22     20   # As a special exception to the GNU General Public License, if you
    23     21   # distribute this file as part of a program that contains a
    24     22   # configuration script generated by Autoconf, you may include it under
    25         -# the same distribution terms that you use for the rest of that program.
    26         -
    27         -
    28         -# Originally written by Per Bothner.  Please send patches (context
    29         -# diff format) to <config-patches@gnu.org> and include a ChangeLog
    30         -# entry.
           23  +# the same distribution terms that you use for the rest of that
           24  +# program.  This Exception is an additional permission under section 7
           25  +# of the GNU General Public License, version 3 ("GPLv3").
    31     26   #
    32         -# This script attempts to guess a canonical system name similar to
    33         -# config.sub.  If it succeeds, it prints the system name on stdout, and
    34         -# exits with 0.  Otherwise, it exits with 1.
           27  +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
    35     28   #
    36     29   # You can get the latest version of this script from:
    37         -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
           30  +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
           31  +#
           32  +# Please send patches to <config-patches@gnu.org>.
           33  +
    38     34   
    39     35   me=`echo "$0" | sed -e 's,.*/,,'`
    40     36   
    41     37   usage="\
    42     38   Usage: $0 [OPTION]
    43     39   
    44     40   Output the configuration name of the system \`$me' is run on.
................................................................................
    50     46   
    51     47   Report bugs and patches to <config-patches@gnu.org>."
    52     48   
    53     49   version="\
    54     50   GNU config.guess ($timestamp)
    55     51   
    56     52   Originally written by Per Bothner.
    57         -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
    58         -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
    59         -Free Software Foundation, Inc.
           53  +Copyright 1992-2016 Free Software Foundation, Inc.
    60     54   
    61     55   This is free software; see the source for copying conditions.  There is NO
    62     56   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
    63     57   
    64     58   help="
    65     59   Try \`$me --help' for more information."
    66     60   
................................................................................
   133    127   	PATH=$PATH:/.attbin ; export PATH
   134    128   fi
   135    129   
   136    130   UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
   137    131   UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
   138    132   UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
   139    133   UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
          134  +
          135  +case "${UNAME_SYSTEM}" in
          136  +Linux|GNU|GNU/*)
          137  +	# If the system lacks a compiler, then just pick glibc.
          138  +	# We could probably try harder.
          139  +	LIBC=gnu
          140  +
          141  +	eval $set_cc_for_build
          142  +	cat <<-EOF > $dummy.c
          143  +	#include <features.h>
          144  +	#if defined(__UCLIBC__)
          145  +	LIBC=uclibc
          146  +	#elif defined(__dietlibc__)
          147  +	LIBC=dietlibc
          148  +	#else
          149  +	LIBC=gnu
          150  +	#endif
          151  +	EOF
          152  +	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
          153  +	;;
          154  +esac
   140    155   
   141    156   # Note: order is significant - the case branches are not exclusive.
   142    157   
   143    158   case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
   144    159       *:NetBSD:*:*)
   145    160   	# NetBSD (nbsd) targets should (where applicable) match one or
   146    161   	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
................................................................................
   149    164   	# object file format.  This provides both forward
   150    165   	# compatibility and a consistent mechanism for selecting the
   151    166   	# object file format.
   152    167   	#
   153    168   	# Note: NetBSD doesn't particularly care about the vendor
   154    169   	# portion of the name.  We always set it to "unknown".
   155    170   	sysctl="sysctl -n hw.machine_arch"
   156         -	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
   157         -	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
          171  +	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
          172  +	    /sbin/$sysctl 2>/dev/null || \
          173  +	    /usr/sbin/$sysctl 2>/dev/null || \
          174  +	    echo unknown)`
   158    175   	case "${UNAME_MACHINE_ARCH}" in
   159    176   	    armeb) machine=armeb-unknown ;;
   160    177   	    arm*) machine=arm-unknown ;;
   161    178   	    sh3el) machine=shl-unknown ;;
   162    179   	    sh3eb) machine=sh-unknown ;;
   163    180   	    sh5el) machine=sh5le-unknown ;;
          181  +	    earmv*)
          182  +		arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
          183  +		endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
          184  +		machine=${arch}${endian}-unknown
          185  +		;;
   164    186   	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
   165    187   	esac
   166    188   	# The Operating System including object format, if it has switched
   167    189   	# to ELF recently, or will in the future.
   168    190   	case "${UNAME_MACHINE_ARCH}" in
   169         -	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
          191  +	    arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
   170    192   		eval $set_cc_for_build
   171    193   		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
   172    194   			| grep -q __ELF__
   173    195   		then
   174    196   		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
   175    197   		    # Return netbsd for either.  FIX?
   176    198   		    os=netbsd
................................................................................
   177    199   		else
   178    200   		    os=netbsdelf
   179    201   		fi
   180    202   		;;
   181    203   	    *)
   182    204   		os=netbsd
   183    205   		;;
          206  +	esac
          207  +	# Determine ABI tags.
          208  +	case "${UNAME_MACHINE_ARCH}" in
          209  +	    earm*)
          210  +		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
          211  +		abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
          212  +		;;
   184    213   	esac
   185    214   	# The OS release
   186    215   	# Debian GNU/NetBSD machines have a different userland, and
   187    216   	# thus, need a distinct triplet. However, they do not need
   188    217   	# kernel version information, so it can be replaced with a
   189    218   	# suitable tag, in the style of linux-gnu.
   190    219   	case "${UNAME_VERSION}" in
   191    220   	    Debian*)
   192    221   		release='-gnu'
   193    222   		;;
   194    223   	    *)
   195         -		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
          224  +		release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
   196    225   		;;
   197    226   	esac
   198    227   	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
   199    228   	# contains redundant information, the shorter form:
   200    229   	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
   201         -	echo "${machine}-${os}${release}"
          230  +	echo "${machine}-${os}${release}${abi}"
          231  +	exit ;;
          232  +    *:Bitrig:*:*)
          233  +	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
          234  +	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
   202    235   	exit ;;
   203    236       *:OpenBSD:*:*)
   204    237   	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
   205    238   	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
   206    239   	exit ;;
          240  +    *:LibertyBSD:*:*)
          241  +	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
          242  +	echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
          243  +	exit ;;
   207    244       *:ekkoBSD:*:*)
   208    245   	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
   209    246   	exit ;;
   210    247       *:SolidBSD:*:*)
   211    248   	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
   212    249   	exit ;;
   213    250       macppc:MirBSD:*:*)
   214    251   	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
   215    252   	exit ;;
   216    253       *:MirBSD:*:*)
   217    254   	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
   218    255   	exit ;;
          256  +    *:Sortix:*:*)
          257  +	echo ${UNAME_MACHINE}-unknown-sortix
          258  +	exit ;;
   219    259       alpha:OSF1:*:*)
   220    260   	case $UNAME_RELEASE in
   221    261   	*4.0)
   222    262   		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
   223    263   		;;
   224    264   	*5.*)
   225    265   		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
................................................................................
   228    268   	# According to Compaq, /usr/sbin/psrinfo has been available on
   229    269   	# OSF/1 and Tru64 systems produced since 1995.  I hope that
   230    270   	# covers most systems running today.  This code pipes the CPU
   231    271   	# types through head -n 1, so we only detect the type of CPU 0.
   232    272   	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
   233    273   	case "$ALPHA_CPU_TYPE" in
   234    274   	    "EV4 (21064)")
   235         -		UNAME_MACHINE="alpha" ;;
          275  +		UNAME_MACHINE=alpha ;;
   236    276   	    "EV4.5 (21064)")
   237         -		UNAME_MACHINE="alpha" ;;
          277  +		UNAME_MACHINE=alpha ;;
   238    278   	    "LCA4 (21066/21068)")
   239         -		UNAME_MACHINE="alpha" ;;
          279  +		UNAME_MACHINE=alpha ;;
   240    280   	    "EV5 (21164)")
   241         -		UNAME_MACHINE="alphaev5" ;;
          281  +		UNAME_MACHINE=alphaev5 ;;
   242    282   	    "EV5.6 (21164A)")
   243         -		UNAME_MACHINE="alphaev56" ;;
          283  +		UNAME_MACHINE=alphaev56 ;;
   244    284   	    "EV5.6 (21164PC)")
   245         -		UNAME_MACHINE="alphapca56" ;;
          285  +		UNAME_MACHINE=alphapca56 ;;
   246    286   	    "EV5.7 (21164PC)")
   247         -		UNAME_MACHINE="alphapca57" ;;
          287  +		UNAME_MACHINE=alphapca57 ;;
   248    288   	    "EV6 (21264)")
   249         -		UNAME_MACHINE="alphaev6" ;;
          289  +		UNAME_MACHINE=alphaev6 ;;
   250    290   	    "EV6.7 (21264A)")
   251         -		UNAME_MACHINE="alphaev67" ;;
          291  +		UNAME_MACHINE=alphaev67 ;;
   252    292   	    "EV6.8CB (21264C)")
   253         -		UNAME_MACHINE="alphaev68" ;;
          293  +		UNAME_MACHINE=alphaev68 ;;
   254    294   	    "EV6.8AL (21264B)")
   255         -		UNAME_MACHINE="alphaev68" ;;
          295  +		UNAME_MACHINE=alphaev68 ;;
   256    296   	    "EV6.8CX (21264D)")
   257         -		UNAME_MACHINE="alphaev68" ;;
          297  +		UNAME_MACHINE=alphaev68 ;;
   258    298   	    "EV6.9A (21264/EV69A)")
   259         -		UNAME_MACHINE="alphaev69" ;;
          299  +		UNAME_MACHINE=alphaev69 ;;
   260    300   	    "EV7 (21364)")
   261         -		UNAME_MACHINE="alphaev7" ;;
          301  +		UNAME_MACHINE=alphaev7 ;;
   262    302   	    "EV7.9 (21364A)")
   263         -		UNAME_MACHINE="alphaev79" ;;
          303  +		UNAME_MACHINE=alphaev79 ;;
   264    304   	esac
   265    305   	# A Pn.n version is a patched version.
   266    306   	# A Vn.n version is a released version.
   267    307   	# A Tn.n version is a released field test version.
   268    308   	# A Xn.n version is an unreleased experimental baselevel.
   269    309   	# 1.2 uses "1.2" for uname -r.
   270         -	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
          310  +	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
   271    311   	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
   272    312   	exitcode=$?
   273    313   	trap '' 0
   274    314   	exit $exitcode ;;
   275    315       Alpha\ *:Windows_NT*:*)
   276    316   	# How do we know it's Interix rather than the generic POSIX subsystem?
   277    317   	# Should we change UNAME_MACHINE based on the output of uname instead
................................................................................
   298    338   	exit ;;
   299    339       *:OS400:*:*)
   300    340   	echo powerpc-ibm-os400
   301    341   	exit ;;
   302    342       arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
   303    343   	echo arm-acorn-riscix${UNAME_RELEASE}
   304    344   	exit ;;
   305         -    arm:riscos:*:*|arm:RISCOS:*:*)
          345  +    arm*:riscos:*:*|arm*:RISCOS:*:*)
   306    346   	echo arm-unknown-riscos
   307    347   	exit ;;
   308    348       SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
   309    349   	echo hppa1.1-hitachi-hiuxmpp
   310    350   	exit ;;
   311    351       Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
   312    352   	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
................................................................................
   336    376   	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
   337    377   	exit ;;
   338    378       i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
   339    379   	echo i386-pc-auroraux${UNAME_RELEASE}
   340    380   	exit ;;
   341    381       i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
   342    382   	eval $set_cc_for_build
   343         -	SUN_ARCH="i386"
          383  +	SUN_ARCH=i386
   344    384   	# If there is a compiler, see if it is configured for 64-bit objects.
   345    385   	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
   346    386   	# This test works for both compilers.
   347         -	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
          387  +	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
   348    388   	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
   349         -		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
          389  +		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
   350    390   		grep IS_64BIT_ARCH >/dev/null
   351    391   	    then
   352         -		SUN_ARCH="x86_64"
          392  +		SUN_ARCH=x86_64
   353    393   	    fi
   354    394   	fi
   355    395   	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
   356    396   	exit ;;
   357    397       sun4*:SunOS:6*:*)
   358    398   	# According to config.sub, this is the proper way to canonicalize
   359    399   	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
................................................................................
   370    410   	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
   371    411   	exit ;;
   372    412       sun3*:SunOS:*:*)
   373    413   	echo m68k-sun-sunos${UNAME_RELEASE}
   374    414   	exit ;;
   375    415       sun*:*:4.2BSD:*)
   376    416   	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
   377         -	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
          417  +	test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
   378    418   	case "`/bin/arch`" in
   379    419   	    sun3)
   380    420   		echo m68k-sun-sunos${UNAME_RELEASE}
   381    421   		;;
   382    422   	    sun4)
   383    423   		echo sparc-sun-sunos${UNAME_RELEASE}
   384    424   		;;
................................................................................
   556    596       *:AIX:*:[4567])
   557    597   	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
   558    598   	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
   559    599   		IBM_ARCH=rs6000
   560    600   	else
   561    601   		IBM_ARCH=powerpc
   562    602   	fi
   563         -	if [ -x /usr/bin/oslevel ] ; then
   564         -		IBM_REV=`/usr/bin/oslevel`
          603  +	if [ -x /usr/bin/lslpp ] ; then
          604  +		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
          605  +			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
   565    606   	else
   566    607   		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
   567    608   	fi
   568    609   	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
   569    610   	exit ;;
   570    611       *:AIX:*:*)
   571    612   	echo rs6000-ibm-aix
................................................................................
   594    635   	    9000/31? )            HP_ARCH=m68000 ;;
   595    636   	    9000/[34]?? )         HP_ARCH=m68k ;;
   596    637   	    9000/[678][0-9][0-9])
   597    638   		if [ -x /usr/bin/getconf ]; then
   598    639   		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
   599    640   		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
   600    641   		    case "${sc_cpu_version}" in
   601         -		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
   602         -		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
          642  +		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
          643  +		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
   603    644   		      532)                      # CPU_PA_RISC2_0
   604    645   			case "${sc_kernel_bits}" in
   605         -			  32) HP_ARCH="hppa2.0n" ;;
   606         -			  64) HP_ARCH="hppa2.0w" ;;
   607         -			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
          646  +			  32) HP_ARCH=hppa2.0n ;;
          647  +			  64) HP_ARCH=hppa2.0w ;;
          648  +			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
   608    649   			esac ;;
   609    650   		    esac
   610    651   		fi
   611    652   		if [ "${HP_ARCH}" = "" ]; then
   612    653   		    eval $set_cc_for_build
   613    654   		    sed 's/^		//' << EOF >$dummy.c
   614    655   
................................................................................
   639    680   			    puts ("hppa2.0"); break;
   640    681   		#endif
   641    682   			default: puts ("hppa1.0"); break;
   642    683   			}
   643    684   		    exit (0);
   644    685   		}
   645    686   EOF
   646         -		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
          687  +		    (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
   647    688   		    test -z "$HP_ARCH" && HP_ARCH=hppa
   648    689   		fi ;;
   649    690   	esac
   650         -	if [ ${HP_ARCH} = "hppa2.0w" ]
          691  +	if [ ${HP_ARCH} = hppa2.0w ]
   651    692   	then
   652    693   	    eval $set_cc_for_build
   653    694   
   654    695   	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
   655    696   	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
   656    697   	    # generating 64-bit code.  GNU and HP use different nomenclature:
   657    698   	    #
   658    699   	    # $ CC_FOR_BUILD=cc ./config.guess
   659    700   	    # => hppa2.0w-hp-hpux11.23
   660    701   	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
   661    702   	    # => hppa64-hp-hpux11.23
   662    703   
   663         -	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
          704  +	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
   664    705   		grep -q __LP64__
   665    706   	    then
   666         -		HP_ARCH="hppa2.0w"
          707  +		HP_ARCH=hppa2.0w
   667    708   	    else
   668         -		HP_ARCH="hppa64"
          709  +		HP_ARCH=hppa64
   669    710   	    fi
   670    711   	fi
   671    712   	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
   672    713   	exit ;;
   673    714       ia64:HP-UX:*:*)
   674    715   	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
   675    716   	echo ia64-hp-hpux${HPUX_REV}
................................................................................
   766    807       CRAY*SV1:*:*:*)
   767    808   	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   768    809   	exit ;;
   769    810       *:UNICOS/mp:*:*)
   770    811   	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   771    812   	exit ;;
   772    813       F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
   773         -	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
   774         -	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
          814  +	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
          815  +	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
   775    816   	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
   776    817   	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
   777    818   	exit ;;
   778    819       5000:UNIX_System_V:4.*:*)
   779         -	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
   780         -	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
          820  +	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
          821  +	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
   781    822   	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
   782    823   	exit ;;
   783    824       i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
   784    825   	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
   785    826   	exit ;;
   786    827       sparc*:BSD/OS:*:*)
   787    828   	echo sparc-unknown-bsdi${UNAME_RELEASE}
................................................................................
   797    838   	    *)
   798    839   		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
   799    840   	esac
   800    841   	exit ;;
   801    842       i*:CYGWIN*:*)
   802    843   	echo ${UNAME_MACHINE}-pc-cygwin
   803    844   	exit ;;
          845  +    *:MINGW64*:*)
          846  +	echo ${UNAME_MACHINE}-pc-mingw64
          847  +	exit ;;
   804    848       *:MINGW*:*)
   805    849   	echo ${UNAME_MACHINE}-pc-mingw32
   806    850   	exit ;;
   807         -    i*:MSYS*:*)
          851  +    *:MSYS*:*)
   808    852   	echo ${UNAME_MACHINE}-pc-msys
   809    853   	exit ;;
   810    854       i*:windows32*:*)
   811    855   	# uname -m includes "-pc" on this system.
   812    856   	echo ${UNAME_MACHINE}-mingw32
   813    857   	exit ;;
   814    858       i*:PW*:*)
................................................................................
   848    892   	echo powerpcle-unknown-cygwin
   849    893   	exit ;;
   850    894       prep*:SunOS:5.*:*)
   851    895   	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
   852    896   	exit ;;
   853    897       *:GNU:*:*)
   854    898   	# the GNU system
   855         -	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
          899  +	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
   856    900   	exit ;;
   857    901       *:GNU/*:*:*)
   858    902   	# other systems with GNU libc and userland
   859         -	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
          903  +	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
   860    904   	exit ;;
   861    905       i*86:Minix:*:*)
   862    906   	echo ${UNAME_MACHINE}-pc-minix
   863    907   	exit ;;
   864    908       aarch64:Linux:*:*)
   865         -	echo ${UNAME_MACHINE}-unknown-linux-gnu
          909  +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   866    910   	exit ;;
   867    911       aarch64_be:Linux:*:*)
   868    912   	UNAME_MACHINE=aarch64_be
   869         -	echo ${UNAME_MACHINE}-unknown-linux-gnu
          913  +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   870    914   	exit ;;
   871    915       alpha:Linux:*:*)
   872    916   	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
   873    917   	  EV5)   UNAME_MACHINE=alphaev5 ;;
   874    918   	  EV56)  UNAME_MACHINE=alphaev56 ;;
   875    919   	  PCA56) UNAME_MACHINE=alphapca56 ;;
   876    920   	  PCA57) UNAME_MACHINE=alphapca56 ;;
   877    921   	  EV6)   UNAME_MACHINE=alphaev6 ;;
   878    922   	  EV67)  UNAME_MACHINE=alphaev67 ;;
   879    923   	  EV68*) UNAME_MACHINE=alphaev68 ;;
   880    924   	esac
   881    925   	objdump --private-headers /bin/sh | grep -q ld.so.1
   882         -	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
   883         -	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
          926  +	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
          927  +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
          928  +	exit ;;
          929  +    arc:Linux:*:* | arceb:Linux:*:*)
          930  +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   884    931   	exit ;;
   885    932       arm*:Linux:*:*)
   886    933   	eval $set_cc_for_build
   887    934   	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
   888    935   	    | grep -q __ARM_EABI__
   889    936   	then
   890         -	    echo ${UNAME_MACHINE}-unknown-linux-gnu
          937  +	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   891    938   	else
   892    939   	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
   893    940   		| grep -q __ARM_PCS_VFP
   894    941   	    then
   895         -		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
          942  +		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
   896    943   	    else
   897         -		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
          944  +		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
   898    945   	    fi
   899    946   	fi
   900    947   	exit ;;
   901    948       avr32*:Linux:*:*)
   902         -	echo ${UNAME_MACHINE}-unknown-linux-gnu
          949  +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   903    950   	exit ;;
   904    951       cris:Linux:*:*)
   905         -	echo ${UNAME_MACHINE}-axis-linux-gnu
          952  +	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
   906    953   	exit ;;
   907    954       crisv32:Linux:*:*)
   908         -	echo ${UNAME_MACHINE}-axis-linux-gnu
          955  +	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
          956  +	exit ;;
          957  +    e2k:Linux:*:*)
          958  +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   909    959   	exit ;;
   910    960       frv:Linux:*:*)
   911         -	echo ${UNAME_MACHINE}-unknown-linux-gnu
          961  +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   912    962   	exit ;;
   913    963       hexagon:Linux:*:*)
   914         -	echo ${UNAME_MACHINE}-unknown-linux-gnu
          964  +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   915    965   	exit ;;
   916    966       i*86:Linux:*:*)
   917         -	LIBC=gnu
   918         -	eval $set_cc_for_build
   919         -	sed 's/^	//' << EOF >$dummy.c
   920         -	#ifdef __dietlibc__
   921         -	LIBC=dietlibc
   922         -	#endif
   923         -EOF
   924         -	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
   925         -	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
          967  +	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
   926    968   	exit ;;
   927    969       ia64:Linux:*:*)
   928         -	echo ${UNAME_MACHINE}-unknown-linux-gnu
          970  +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
          971  +	exit ;;
          972  +    k1om:Linux:*:*)
          973  +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   929    974   	exit ;;
   930    975       m32r*:Linux:*:*)
   931         -	echo ${UNAME_MACHINE}-unknown-linux-gnu
          976  +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   932    977   	exit ;;
   933    978       m68*:Linux:*:*)
   934         -	echo ${UNAME_MACHINE}-unknown-linux-gnu
          979  +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   935    980   	exit ;;
   936    981       mips:Linux:*:* | mips64:Linux:*:*)
   937    982   	eval $set_cc_for_build
   938    983   	sed 's/^	//' << EOF >$dummy.c
   939    984   	#undef CPU
   940    985   	#undef ${UNAME_MACHINE}
   941    986   	#undef ${UNAME_MACHINE}el
................................................................................
   946    991   	CPU=${UNAME_MACHINE}
   947    992   	#else
   948    993   	CPU=
   949    994   	#endif
   950    995   	#endif
   951    996   EOF
   952    997   	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
   953         -	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
          998  +	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
   954    999   	;;
   955         -    or32:Linux:*:*)
   956         -	echo ${UNAME_MACHINE}-unknown-linux-gnu
         1000  +    openrisc*:Linux:*:*)
         1001  +	echo or1k-unknown-linux-${LIBC}
         1002  +	exit ;;
         1003  +    or32:Linux:*:* | or1k*:Linux:*:*)
         1004  +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   957   1005   	exit ;;
   958   1006       padre:Linux:*:*)
   959         -	echo sparc-unknown-linux-gnu
         1007  +	echo sparc-unknown-linux-${LIBC}
   960   1008   	exit ;;
   961   1009       parisc64:Linux:*:* | hppa64:Linux:*:*)
   962         -	echo hppa64-unknown-linux-gnu
         1010  +	echo hppa64-unknown-linux-${LIBC}
   963   1011   	exit ;;
   964   1012       parisc:Linux:*:* | hppa:Linux:*:*)
   965   1013   	# Look for CPU level
   966   1014   	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
   967         -	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
   968         -	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
   969         -	  *)    echo hppa-unknown-linux-gnu ;;
         1015  +	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
         1016  +	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
         1017  +	  *)    echo hppa-unknown-linux-${LIBC} ;;
   970   1018   	esac
   971   1019   	exit ;;
   972   1020       ppc64:Linux:*:*)
   973         -	echo powerpc64-unknown-linux-gnu
         1021  +	echo powerpc64-unknown-linux-${LIBC}
   974   1022   	exit ;;
   975   1023       ppc:Linux:*:*)
   976         -	echo powerpc-unknown-linux-gnu
         1024  +	echo powerpc-unknown-linux-${LIBC}
         1025  +	exit ;;
         1026  +    ppc64le:Linux:*:*)
         1027  +	echo powerpc64le-unknown-linux-${LIBC}
         1028  +	exit ;;
         1029  +    ppcle:Linux:*:*)
         1030  +	echo powerpcle-unknown-linux-${LIBC}
   977   1031   	exit ;;
   978   1032       s390:Linux:*:* | s390x:Linux:*:*)
   979         -	echo ${UNAME_MACHINE}-ibm-linux
         1033  +	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
   980   1034   	exit ;;
   981   1035       sh64*:Linux:*:*)
   982         -	echo ${UNAME_MACHINE}-unknown-linux-gnu
         1036  +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   983   1037   	exit ;;
   984   1038       sh*:Linux:*:*)
   985         -	echo ${UNAME_MACHINE}-unknown-linux-gnu
         1039  +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   986   1040   	exit ;;
   987   1041       sparc:Linux:*:* | sparc64:Linux:*:*)
   988         -	echo ${UNAME_MACHINE}-unknown-linux-gnu
         1042  +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   989   1043   	exit ;;
   990   1044       tile*:Linux:*:*)
   991         -	echo ${UNAME_MACHINE}-unknown-linux-gnu
         1045  +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   992   1046   	exit ;;
   993   1047       vax:Linux:*:*)
   994         -	echo ${UNAME_MACHINE}-dec-linux-gnu
         1048  +	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
   995   1049   	exit ;;
   996   1050       x86_64:Linux:*:*)
   997         -	echo ${UNAME_MACHINE}-unknown-linux-gnu
         1051  +	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
   998   1052   	exit ;;
   999   1053       xtensa*:Linux:*:*)
  1000         -	echo ${UNAME_MACHINE}-unknown-linux-gnu
         1054  +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  1001   1055   	exit ;;
  1002   1056       i*86:DYNIX/ptx:4*:*)
  1003   1057   	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
  1004   1058   	# earlier versions are messed up and put the nodename in both
  1005   1059   	# sysname and nodename.
  1006   1060   	echo i386-sequent-sysv4
  1007   1061   	exit ;;
................................................................................
  1069   1123   	fi
  1070   1124   	exit ;;
  1071   1125       pc:*:*:*)
  1072   1126   	# Left here for compatibility:
  1073   1127   	# uname -m prints for DJGPP always 'pc', but it prints nothing about
  1074   1128   	# the processor, so we play safe by assuming i586.
  1075   1129   	# Note: whatever this is, it MUST be the same as what config.sub
  1076         -	# prints for the "djgpp" host, or else GDB configury will decide that
         1130  +	# prints for the "djgpp" host, or else GDB configure will decide that
  1077   1131   	# this is a cross-build.
  1078   1132   	echo i586-pc-msdosdjgpp
  1079   1133   	exit ;;
  1080   1134       Intel:Mach:3*:*)
  1081   1135   	echo i386-pc-mach3
  1082   1136   	exit ;;
  1083   1137       paragon:*:*:*)
................................................................................
  1197   1251   	exit ;;
  1198   1252       BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
  1199   1253   	echo i586-pc-beos
  1200   1254   	exit ;;
  1201   1255       BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
  1202   1256   	echo i586-pc-haiku
  1203   1257   	exit ;;
         1258  +    x86_64:Haiku:*:*)
         1259  +	echo x86_64-unknown-haiku
         1260  +	exit ;;
  1204   1261       SX-4:SUPER-UX:*:*)
  1205   1262   	echo sx4-nec-superux${UNAME_RELEASE}
  1206   1263   	exit ;;
  1207   1264       SX-5:SUPER-UX:*:*)
  1208   1265   	echo sx5-nec-superux${UNAME_RELEASE}
  1209   1266   	exit ;;
  1210   1267       SX-6:SUPER-UX:*:*)
................................................................................
  1215   1272   	exit ;;
  1216   1273       SX-8:SUPER-UX:*:*)
  1217   1274   	echo sx8-nec-superux${UNAME_RELEASE}
  1218   1275   	exit ;;
  1219   1276       SX-8R:SUPER-UX:*:*)
  1220   1277   	echo sx8r-nec-superux${UNAME_RELEASE}
  1221   1278   	exit ;;
         1279  +    SX-ACE:SUPER-UX:*:*)
         1280  +	echo sxace-nec-superux${UNAME_RELEASE}
         1281  +	exit ;;
  1222   1282       Power*:Rhapsody:*:*)
  1223   1283   	echo powerpc-apple-rhapsody${UNAME_RELEASE}
  1224   1284   	exit ;;
  1225   1285       *:Rhapsody:*:*)
  1226   1286   	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
  1227   1287   	exit ;;
  1228   1288       *:Darwin:*:*)
  1229   1289   	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
  1230         -	case $UNAME_PROCESSOR in
  1231         -	    i386)
  1232         -		eval $set_cc_for_build
  1233         -		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
  1234         -		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
  1235         -		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
  1236         -		      grep IS_64BIT_ARCH >/dev/null
  1237         -		  then
  1238         -		      UNAME_PROCESSOR="x86_64"
  1239         -		  fi
  1240         -		fi ;;
  1241         -	    unknown) UNAME_PROCESSOR=powerpc ;;
  1242         -	esac
         1290  +	eval $set_cc_for_build
         1291  +	if test "$UNAME_PROCESSOR" = unknown ; then
         1292  +	    UNAME_PROCESSOR=powerpc
         1293  +	fi
         1294  +	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
         1295  +	    if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
         1296  +		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
         1297  +		    (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
         1298  +		    grep IS_64BIT_ARCH >/dev/null
         1299  +		then
         1300  +		    case $UNAME_PROCESSOR in
         1301  +			i386) UNAME_PROCESSOR=x86_64 ;;
         1302  +			powerpc) UNAME_PROCESSOR=powerpc64 ;;
         1303  +		    esac
         1304  +		fi
         1305  +	    fi
         1306  +	elif test "$UNAME_PROCESSOR" = i386 ; then
         1307  +	    # Avoid executing cc on OS X 10.9, as it ships with a stub
         1308  +	    # that puts up a graphical alert prompting to install
         1309  +	    # developer tools.  Any system running Mac OS X 10.7 or
         1310  +	    # later (Darwin 11 and later) is required to have a 64-bit
         1311  +	    # processor. This is not true of the ARM version of Darwin
         1312  +	    # that Apple uses in portable devices.
         1313  +	    UNAME_PROCESSOR=x86_64
         1314  +	fi
  1243   1315   	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
  1244   1316   	exit ;;
  1245   1317       *:procnto*:*:* | *:QNX:[0123456789]*:*)
  1246   1318   	UNAME_PROCESSOR=`uname -p`
  1247         -	if test "$UNAME_PROCESSOR" = "x86"; then
         1319  +	if test "$UNAME_PROCESSOR" = x86; then
  1248   1320   		UNAME_PROCESSOR=i386
  1249   1321   		UNAME_MACHINE=pc
  1250   1322   	fi
  1251   1323   	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
  1252   1324   	exit ;;
  1253   1325       *:QNX:*:4*)
  1254   1326   	echo i386-pc-qnx
  1255   1327   	exit ;;
  1256   1328       NEO-?:NONSTOP_KERNEL:*:*)
  1257   1329   	echo neo-tandem-nsk${UNAME_RELEASE}
  1258   1330   	exit ;;
  1259         -    NSE-?:NONSTOP_KERNEL:*:*)
         1331  +    NSE-*:NONSTOP_KERNEL:*:*)
  1260   1332   	echo nse-tandem-nsk${UNAME_RELEASE}
  1261   1333   	exit ;;
  1262   1334       NSR-?:NONSTOP_KERNEL:*:*)
  1263   1335   	echo nsr-tandem-nsk${UNAME_RELEASE}
  1264   1336   	exit ;;
  1265   1337       *:NonStop-UX:*:*)
  1266   1338   	echo mips-compaq-nonstopux
................................................................................
  1271   1343       DS/*:UNIX_System_V:*:*)
  1272   1344   	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
  1273   1345   	exit ;;
  1274   1346       *:Plan9:*:*)
  1275   1347   	# "uname -m" is not consistent, so use $cputype instead. 386
  1276   1348   	# is converted to i386 for consistency with other x86
  1277   1349   	# operating systems.
  1278         -	if test "$cputype" = "386"; then
         1350  +	if test "$cputype" = 386; then
  1279   1351   	    UNAME_MACHINE=i386
  1280   1352   	else
  1281   1353   	    UNAME_MACHINE="$cputype"
  1282   1354   	fi
  1283   1355   	echo ${UNAME_MACHINE}-unknown-plan9
  1284   1356   	exit ;;
  1285   1357       *:TOPS-10:*:*)
................................................................................
  1313   1385   	    I*) echo ia64-dec-vms ; exit ;;
  1314   1386   	    V*) echo vax-dec-vms ; exit ;;
  1315   1387   	esac ;;
  1316   1388       *:XENIX:*:SysV)
  1317   1389   	echo i386-pc-xenix
  1318   1390   	exit ;;
  1319   1391       i*86:skyos:*:*)
  1320         -	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
         1392  +	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
  1321   1393   	exit ;;
  1322   1394       i*86:rdos:*:*)
  1323   1395   	echo ${UNAME_MACHINE}-pc-rdos
  1324   1396   	exit ;;
  1325   1397       i*86:AROS:*:*)
  1326   1398   	echo ${UNAME_MACHINE}-pc-aros
  1327   1399   	exit ;;
  1328   1400       x86_64:VMkernel:*:*)
  1329   1401   	echo ${UNAME_MACHINE}-unknown-esx
  1330   1402   	exit ;;
  1331         -esac
  1332         -
  1333         -#echo '(No uname command or uname output not recognized.)' 1>&2
  1334         -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
  1335         -
  1336         -eval $set_cc_for_build
  1337         -cat >$dummy.c <<EOF
  1338         -#ifdef _SEQUENT_
  1339         -# include <sys/types.h>
  1340         -# include <sys/utsname.h>
  1341         -#endif
  1342         -main ()
  1343         -{
  1344         -#if defined (sony)
  1345         -#if defined (MIPSEB)
  1346         -  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
  1347         -     I don't know....  */
  1348         -  printf ("mips-sony-bsd\n"); exit (0);
  1349         -#else
  1350         -#include <sys/param.h>
  1351         -  printf ("m68k-sony-newsos%s\n",
  1352         -#ifdef NEWSOS4
  1353         -	"4"
  1354         -#else
  1355         -	""
  1356         -#endif
  1357         -	); exit (0);
  1358         -#endif
  1359         -#endif
  1360         -
  1361         -#if defined (__arm) && defined (__acorn) && defined (__unix)
  1362         -  printf ("arm-acorn-riscix\n"); exit (0);
  1363         -#endif
  1364         -
  1365         -#if defined (hp300) && !defined (hpux)
  1366         -  printf ("m68k-hp-bsd\n"); exit (0);
  1367         -#endif
  1368         -
  1369         -#if defined (NeXT)
  1370         -#if !defined (__ARCHITECTURE__)
  1371         -#define __ARCHITECTURE__ "m68k"
  1372         -#endif
  1373         -  int version;
  1374         -  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
  1375         -  if (version < 4)
  1376         -    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
  1377         -  else
  1378         -    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
  1379         -  exit (0);
  1380         -#endif
  1381         -
  1382         -#if defined (MULTIMAX) || defined (n16)
  1383         -#if defined (UMAXV)
  1384         -  printf ("ns32k-encore-sysv\n"); exit (0);
  1385         -#else
  1386         -#if defined (CMU)
  1387         -  printf ("ns32k-encore-mach\n"); exit (0);
  1388         -#else
  1389         -  printf ("ns32k-encore-bsd\n"); exit (0);
  1390         -#endif
  1391         -#endif
  1392         -#endif
  1393         -
  1394         -#if defined (__386BSD__)
  1395         -  printf ("i386-pc-bsd\n"); exit (0);
  1396         -#endif
  1397         -
  1398         -#if defined (sequent)
  1399         -#if defined (i386)
  1400         -  printf ("i386-sequent-dynix\n"); exit (0);
  1401         -#endif
  1402         -#if defined (ns32000)
  1403         -  printf ("ns32k-sequent-dynix\n"); exit (0);
  1404         -#endif
  1405         -#endif
  1406         -
  1407         -#if defined (_SEQUENT_)
  1408         -    struct utsname un;
  1409         -
  1410         -    uname(&un);
  1411         -
  1412         -    if (strncmp(un.version, "V2", 2) == 0) {
  1413         -	printf ("i386-sequent-ptx2\n"); exit (0);
  1414         -    }
  1415         -    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
  1416         -	printf ("i386-sequent-ptx1\n"); exit (0);
  1417         -    }
  1418         -    printf ("i386-sequent-ptx\n"); exit (0);
  1419         -
  1420         -#endif
  1421         -
  1422         -#if defined (vax)
  1423         -# if !defined (ultrix)
  1424         -#  include <sys/param.h>
  1425         -#  if defined (BSD)
  1426         -#   if BSD == 43
  1427         -      printf ("vax-dec-bsd4.3\n"); exit (0);
  1428         -#   else
  1429         -#    if BSD == 199006
  1430         -      printf ("vax-dec-bsd4.3reno\n"); exit (0);
  1431         -#    else
  1432         -      printf ("vax-dec-bsd\n"); exit (0);
  1433         -#    endif
  1434         -#   endif
  1435         -#  else
  1436         -    printf ("vax-dec-bsd\n"); exit (0);
  1437         -#  endif
  1438         -# else
  1439         -    printf ("vax-dec-ultrix\n"); exit (0);
  1440         -# endif
  1441         -#endif
  1442         -
  1443         -#if defined (alliant) && defined (i860)
  1444         -  printf ("i860-alliant-bsd\n"); exit (0);
  1445         -#endif
  1446         -
  1447         -  exit (1);
  1448         -}
  1449         -EOF
  1450         -
  1451         -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
  1452         -	{ echo "$SYSTEM_NAME"; exit; }
  1453         -
  1454         -# Apollos put the system type in the environment.
  1455         -
  1456         -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
  1457         -
  1458         -# Convex versions that predate uname can use getsysinfo(1)
  1459         -
  1460         -if [ -x /usr/convex/getsysinfo ]
  1461         -then
  1462         -    case `getsysinfo -f cpu_type` in
  1463         -    c1*)
  1464         -	echo c1-convex-bsd
         1403  +    amd64:Isilon\ OneFS:*:*)
         1404  +	echo x86_64-unknown-onefs
  1465   1405   	exit ;;
  1466         -    c2*)
  1467         -	if getsysinfo -f scalar_acc
  1468         -	then echo c32-convex-bsd
  1469         -	else echo c2-convex-bsd
  1470         -	fi
  1471         -	exit ;;
  1472         -    c34*)
  1473         -	echo c34-convex-bsd
  1474         -	exit ;;
  1475         -    c38*)
  1476         -	echo c38-convex-bsd
  1477         -	exit ;;
  1478         -    c4*)
  1479         -	echo c4-convex-bsd
  1480         -	exit ;;
  1481         -    esac
  1482         -fi
         1406  +esac
  1483   1407   
  1484   1408   cat >&2 <<EOF
  1485   1409   $0: unable to guess system type
  1486   1410   
  1487   1411   This script, last modified $timestamp, has failed to recognize
  1488   1412   the operating system you are using. It is advised that you
  1489   1413   download the most up to date version of the config scripts from
  1490   1414   
  1491         -  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
         1415  +  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
  1492   1416   and
  1493         -  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
         1417  +  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
  1494   1418   
  1495   1419   If the version you run ($0) is already up to date, please
  1496   1420   send the following data and any information you think might be
  1497   1421   pertinent to <config-patches@gnu.org> in order to provide the needed
  1498   1422   information to handle your system.
  1499   1423   
  1500   1424   config.guess timestamp = $timestamp

Modified kitsh/buildsrc/kitsh-0.0/config.sub from [c46c874230] to [7d66e32bb3].

     1      1   #! /bin/sh
     2      2   # Configuration validation subroutine script.
     3         -#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
     4         -#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
     5         -#   2011, 2012 Free Software Foundation, Inc.
            3  +#   Copyright 1992-2016 Free Software Foundation, Inc.
     6      4   
     7         -timestamp='2012-04-18'
            5  +timestamp='2016-03-30'
     8      6   
     9         -# This file is (in principle) common to ALL GNU software.
    10         -# The presence of a machine in this file suggests that SOME GNU software
    11         -# can handle that machine.  It does not imply ALL GNU software can.
    12         -#
    13         -# This file is free software; you can redistribute it and/or modify
    14         -# it under the terms of the GNU General Public License as published by
    15         -# the Free Software Foundation; either version 2 of the License, or
            7  +# This file is free software; you can redistribute it and/or modify it
            8  +# under the terms of the GNU General Public License as published by
            9  +# the Free Software Foundation; either version 3 of the License, or
    16     10   # (at your option) any later version.
    17     11   #
    18         -# This program is distributed in the hope that it will be useful,
    19         -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    20         -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    21         -# GNU General Public License for more details.
           12  +# This program is distributed in the hope that it will be useful, but
           13  +# WITHOUT ANY WARRANTY; without even the implied warranty of
           14  +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
           15  +# General Public License for more details.
    22     16   #
    23     17   # You should have received a copy of the GNU General Public License
    24     18   # along with this program; if not, see <http://www.gnu.org/licenses/>.
    25     19   #
    26     20   # As a special exception to the GNU General Public License, if you
    27     21   # distribute this file as part of a program that contains a
    28     22   # configuration script generated by Autoconf, you may include it under
    29         -# the same distribution terms that you use for the rest of that program.
           23  +# the same distribution terms that you use for the rest of that
           24  +# program.  This Exception is an additional permission under section 7
           25  +# of the GNU General Public License, version 3 ("GPLv3").
    30     26   
    31     27   
    32         -# Please send patches to <config-patches@gnu.org>.  Submit a context
    33         -# diff and a properly formatted GNU ChangeLog entry.
           28  +# Please send patches to <config-patches@gnu.org>.
    34     29   #
    35     30   # Configuration subroutine to validate and canonicalize a configuration type.
    36     31   # Supply the specified configuration type as an argument.
    37     32   # If it is invalid, we print an error message on stderr and exit with code 1.
    38     33   # Otherwise, we print the canonical config type on stdout and succeed.
    39     34   
    40     35   # You can get the latest version of this script from:
    41         -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
           36  +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
    42     37   
    43     38   # This file is supposed to be the same for all GNU packages
    44     39   # and recognize all the CPU types, system types and aliases
    45     40   # that are meaningful with *any* GNU software.
    46     41   # Each package is responsible for reporting which valid configurations
    47     42   # it does not support.  The user should be able to distinguish
    48     43   # a failure to support a valid configuration from a meaningless
................................................................................
    54     49   # or in some cases, the newer four-part form:
    55     50   #	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
    56     51   # It is wrong to echo any other type of specification.
    57     52   
    58     53   me=`echo "$0" | sed -e 's,.*/,,'`
    59     54   
    60     55   usage="\
    61         -Usage: $0 [OPTION] CPU-MFR-OPSYS
    62         -       $0 [OPTION] ALIAS
           56  +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
    63     57   
    64     58   Canonicalize a configuration name.
    65     59   
    66     60   Operation modes:
    67     61     -h, --help         print this help, then exit
    68     62     -t, --time-stamp   print date of last modification, then exit
    69     63     -v, --version      print version number, then exit
    70     64   
    71     65   Report bugs and patches to <config-patches@gnu.org>."
    72     66   
    73     67   version="\
    74     68   GNU config.sub ($timestamp)
    75     69   
    76         -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
    77         -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
    78         -Free Software Foundation, Inc.
           70  +Copyright 1992-2016 Free Software Foundation, Inc.
    79     71   
    80     72   This is free software; see the source for copying conditions.  There is NO
    81     73   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
    82     74   
    83     75   help="
    84     76   Try \`$me --help' for more information."
    85     77   
................................................................................
   118    110       exit 1;;
   119    111   esac
   120    112   
   121    113   # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
   122    114   # Here we must recognize all the valid KERNEL-OS combinations.
   123    115   maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
   124    116   case $maybe_os in
   125         -  nto-qnx* | linux-gnu* | linux-musl | linux-android* | linux-dietlibc | linux-newlib* | \
   126         -  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
   127         -  knetbsd*-gnu* | netbsd*-gnu* | \
          117  +  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
          118  +  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
          119  +  knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
   128    120     kopensolaris*-gnu* | \
   129    121     storm-chaos* | os2-emx* | rtmk-nova*)
   130    122       os=-$maybe_os
   131    123       basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
   132    124       ;;
   133    125     android-linux)
   134    126       os=-linux-android
................................................................................
   152    144   		;;
   153    145   	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
   154    146   	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
   155    147   	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
   156    148   	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
   157    149   	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
   158    150   	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
   159         -	-apple | -axis | -knuth | -cray | -microblaze)
          151  +	-apple | -axis | -knuth | -cray | -microblaze*)
   160    152   		os=
   161    153   		basic_machine=$1
   162    154   		;;
   163    155   	-bluegene*)
   164    156   		os=-cnk
   165    157   		;;
   166    158   	-sim | -cisco | -oki | -wec | -winbond)
................................................................................
   255    247   	# Some are omitted here because they have special meanings below.
   256    248   	1750a | 580 \
   257    249   	| a29k \
   258    250   	| aarch64 | aarch64_be \
   259    251   	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
   260    252   	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
   261    253   	| am33_2.0 \
   262         -	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
   263         -        | be32 | be64 \
          254  +	| arc | arceb \
          255  +	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
          256  +	| avr | avr32 \
          257  +	| ba \
          258  +	| be32 | be64 \
   264    259   	| bfin \
   265         -	| c4x | clipper \
          260  +	| c4x | c8051 | clipper \
   266    261   	| d10v | d30v | dlx | dsp16xx \
   267         -	| epiphany \
   268         -	| fido | fr30 | frv \
          262  +	| e2k | epiphany \
          263  +	| fido | fr30 | frv | ft32 \
   269    264   	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
   270    265   	| hexagon \
   271    266   	| i370 | i860 | i960 | ia64 \
   272    267   	| ip2k | iq2000 \
          268  +	| k1om \
   273    269   	| le32 | le64 \
   274    270   	| lm32 \
   275    271   	| m32c | m32r | m32rle | m68000 | m68k | m88k \
   276         -	| maxq | mb | microblaze | mcore | mep | metag \
          272  +	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
   277    273   	| mips | mipsbe | mipseb | mipsel | mipsle \
   278    274   	| mips16 \
   279    275   	| mips64 | mips64el \
   280    276   	| mips64octeon | mips64octeonel \
   281    277   	| mips64orion | mips64orionel \
   282    278   	| mips64r5900 | mips64r5900el \
   283    279   	| mips64vr | mips64vrel \
   284    280   	| mips64vr4100 | mips64vr4100el \
   285    281   	| mips64vr4300 | mips64vr4300el \
   286    282   	| mips64vr5000 | mips64vr5000el \
   287    283   	| mips64vr5900 | mips64vr5900el \
   288    284   	| mipsisa32 | mipsisa32el \
   289    285   	| mipsisa32r2 | mipsisa32r2el \
          286  +	| mipsisa32r6 | mipsisa32r6el \
   290    287   	| mipsisa64 | mipsisa64el \
   291    288   	| mipsisa64r2 | mipsisa64r2el \
          289  +	| mipsisa64r6 | mipsisa64r6el \
   292    290   	| mipsisa64sb1 | mipsisa64sb1el \
   293    291   	| mipsisa64sr71k | mipsisa64sr71kel \
          292  +	| mipsr5900 | mipsr5900el \
   294    293   	| mipstx39 | mipstx39el \
   295    294   	| mn10200 | mn10300 \
   296    295   	| moxie \
   297    296   	| mt \
   298    297   	| msp430 \
   299    298   	| nds32 | nds32le | nds32be \
   300         -	| nios | nios2 \
          299  +	| nios | nios2 | nios2eb | nios2el \
   301    300   	| ns16k | ns32k \
   302         -	| open8 \
   303         -	| or32 \
          301  +	| open8 | or1k | or1knd | or32 \
   304    302   	| pdp10 | pdp11 | pj | pjl \
   305    303   	| powerpc | powerpc64 | powerpc64le | powerpcle \
   306    304   	| pyramid \
          305  +	| riscv32 | riscv64 \
   307    306   	| rl78 | rx \
   308    307   	| score \
   309         -	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
          308  +	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
   310    309   	| sh64 | sh64le \
   311    310   	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
   312    311   	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
   313    312   	| spu \
   314    313   	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
   315    314   	| ubicom32 \
   316    315   	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
          316  +	| visium \
   317    317   	| we32k \
   318    318   	| x86 | xc16x | xstormy16 | xtensa \
   319    319   	| z8k | z80)
   320    320   		basic_machine=$basic_machine-unknown
   321    321   		;;
   322    322   	c54x)
   323    323   		basic_machine=tic54x-unknown
................................................................................
   324    324   		;;
   325    325   	c55x)
   326    326   		basic_machine=tic55x-unknown
   327    327   		;;
   328    328   	c6x)
   329    329   		basic_machine=tic6x-unknown
   330    330   		;;
   331         -	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
          331  +	leon|leon[3-9])
          332  +		basic_machine=sparc-$basic_machine
          333  +		;;
          334  +	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
   332    335   		basic_machine=$basic_machine-unknown
   333    336   		os=-none
   334    337   		;;
   335    338   	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
   336    339   		;;
   337    340   	ms1)
   338    341   		basic_machine=mt-unknown
................................................................................
   366    369   		;;
   367    370   	# Recognize the basic CPU types with company name.
   368    371   	580-* \
   369    372   	| a29k-* \
   370    373   	| aarch64-* | aarch64_be-* \
   371    374   	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
   372    375   	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
   373         -	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
          376  +	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
   374    377   	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
   375    378   	| avr-* | avr32-* \
          379  +	| ba-* \
   376    380   	| be32-* | be64-* \
   377    381   	| bfin-* | bs2000-* \
   378    382   	| c[123]* | c30-* | [cjt]90-* | c4x-* \
   379         -	| clipper-* | craynv-* | cydra-* \
          383  +	| c8051-* | clipper-* | craynv-* | cydra-* \
   380    384   	| d10v-* | d30v-* | dlx-* \
   381         -	| elxsi-* \
          385  +	| e2k-* | elxsi-* \
   382    386   	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
   383    387   	| h8300-* | h8500-* \
   384    388   	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
   385    389   	| hexagon-* \
   386    390   	| i*86-* | i860-* | i960-* | ia64-* \
   387    391   	| ip2k-* | iq2000-* \
          392  +	| k1om-* \
   388    393   	| le32-* | le64-* \
   389    394   	| lm32-* \
   390    395   	| m32c-* | m32r-* | m32rle-* \
   391    396   	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
   392         -	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
          397  +	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
          398  +	| microblaze-* | microblazeel-* \
   393    399   	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
   394    400   	| mips16-* \
   395    401   	| mips64-* | mips64el-* \
   396    402   	| mips64octeon-* | mips64octeonel-* \
   397    403   	| mips64orion-* | mips64orionel-* \
   398    404   	| mips64r5900-* | mips64r5900el-* \
   399    405   	| mips64vr-* | mips64vrel-* \
   400    406   	| mips64vr4100-* | mips64vr4100el-* \
   401    407   	| mips64vr4300-* | mips64vr4300el-* \
   402    408   	| mips64vr5000-* | mips64vr5000el-* \
   403    409   	| mips64vr5900-* | mips64vr5900el-* \
   404    410   	| mipsisa32-* | mipsisa32el-* \
   405    411   	| mipsisa32r2-* | mipsisa32r2el-* \
          412  +	| mipsisa32r6-* | mipsisa32r6el-* \
   406    413   	| mipsisa64-* | mipsisa64el-* \
   407    414   	| mipsisa64r2-* | mipsisa64r2el-* \
          415  +	| mipsisa64r6-* | mipsisa64r6el-* \
   408    416   	| mipsisa64sb1-* | mipsisa64sb1el-* \
   409    417   	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
          418  +	| mipsr5900-* | mipsr5900el-* \
   410    419   	| mipstx39-* | mipstx39el-* \
   411    420   	| mmix-* \
   412    421   	| mt-* \
   413    422   	| msp430-* \
   414    423   	| nds32-* | nds32le-* | nds32be-* \
   415         -	| nios-* | nios2-* \
          424  +	| nios-* | nios2-* | nios2eb-* | nios2el-* \
   416    425   	| none-* | np1-* | ns16k-* | ns32k-* \
   417    426   	| open8-* \
          427  +	| or1k*-* \
   418    428   	| orion-* \
   419    429   	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
   420    430   	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
   421    431   	| pyramid-* \
          432  +	| riscv32-* | riscv64-* \
   422    433   	| rl78-* | romp-* | rs6000-* | rx-* \
   423    434   	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
   424    435   	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
   425    436   	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
   426    437   	| sparclite-* \
   427         -	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
          438  +	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
   428    439   	| tahoe-* \
   429    440   	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
   430    441   	| tile*-* \
   431    442   	| tron-* \
   432    443   	| ubicom32-* \
   433    444   	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
   434    445   	| vax-* \
          446  +	| visium-* \
   435    447   	| we32k-* \
   436    448   	| x86-* | x86_64-* | xc16x-* | xps100-* \
   437    449   	| xstormy16-* | xtensa*-* \
   438    450   	| ymp-* \
   439    451   	| z8k-* | z80-*)
   440    452   		;;
   441    453   	# Recognize the basic CPU types without company name, with glob match.
................................................................................
   504    516   		basic_machine=m68k-apollo
   505    517   		os=-bsd
   506    518   		;;
   507    519   	aros)
   508    520   		basic_machine=i386-pc
   509    521   		os=-aros
   510    522   		;;
          523  +	asmjs)
          524  +		basic_machine=asmjs-unknown
          525  +		;;
   511    526   	aux)
   512    527   		basic_machine=m68k-apple
   513    528   		os=-aux
   514    529   		;;
   515    530   	balance)
   516    531   		basic_machine=ns32k-sequent
   517    532   		os=-dynix
................................................................................
   765    780   			;;
   766    781   		esac
   767    782   		;;
   768    783   	isi68 | isi)
   769    784   		basic_machine=m68k-isi
   770    785   		os=-sysv
   771    786   		;;
          787  +	leon-*|leon[3-9]-*)
          788  +		basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
          789  +		;;
   772    790   	m68knommu)
   773    791   		basic_machine=m68k-unknown
   774    792   		os=-linux
   775    793   		;;
   776    794   	m68knommu-*)
   777    795   		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
   778    796   		os=-linux
................................................................................
   784    802   		basic_machine=mips-mips
   785    803   		os=-sysv
   786    804   		;;
   787    805   	merlin)
   788    806   		basic_machine=ns32k-utek
   789    807   		os=-sysv
   790    808   		;;
   791         -	microblaze)
          809  +	microblaze*)
   792    810   		basic_machine=microblaze-xilinx
   793    811   		;;
          812  +	mingw64)
          813  +		basic_machine=x86_64-pc
          814  +		os=-mingw64
          815  +		;;
   794    816   	mingw32)
   795         -		basic_machine=i386-pc
          817  +		basic_machine=i686-pc
   796    818   		os=-mingw32
   797    819   		;;
   798    820   	mingw32ce)
   799    821   		basic_machine=arm-unknown
   800    822   		os=-mingw32ce
   801    823   		;;
   802    824   	miniframe)
................................................................................
   816    838   		basic_machine=m68k-rom68k
   817    839   		os=-coff
   818    840   		;;
   819    841   	morphos)
   820    842   		basic_machine=powerpc-unknown
   821    843   		os=-morphos
   822    844   		;;
          845  +	moxiebox)
          846  +		basic_machine=moxie-unknown
          847  +		os=-moxiebox
          848  +		;;
   823    849   	msdos)
   824    850   		basic_machine=i386-pc
   825    851   		os=-msdos
   826    852   		;;
   827    853   	ms1-*)
   828    854   		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
   829    855   		;;
   830    856   	msys)
   831         -		basic_machine=i386-pc
          857  +		basic_machine=i686-pc
   832    858   		os=-msys
   833    859   		;;
   834    860   	mvs)
   835    861   		basic_machine=i370-ibm
   836    862   		os=-mvs
   837    863   		;;
   838    864   	nacl)
................................................................................
  1015   1041   	ps2)
  1016   1042   		basic_machine=i386-ibm
  1017   1043   		;;
  1018   1044   	pw32)
  1019   1045   		basic_machine=i586-unknown
  1020   1046   		os=-pw32
  1021   1047   		;;
  1022         -	rdos)
         1048  +	rdos | rdos64)
         1049  +		basic_machine=x86_64-pc
         1050  +		os=-rdos
         1051  +		;;
         1052  +	rdos32)
  1023   1053   		basic_machine=i386-pc
  1024   1054   		os=-rdos
  1025   1055   		;;
  1026   1056   	rom68k)
  1027   1057   		basic_machine=m68k-rom68k
  1028   1058   		os=-coff
  1029   1059   		;;
................................................................................
  1342   1372   	# First accept the basic system types.
  1343   1373   	# The portable systems comes first.
  1344   1374   	# Each alternative MUST END IN A *, to match a version number.
  1345   1375   	# -sysv* is not here because it comes later, after sysvr4.
  1346   1376   	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
  1347   1377   	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
  1348   1378   	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
  1349         -	      | -sym* | -kopensolaris* \
         1379  +	      | -sym* | -kopensolaris* | -plan9* \
  1350   1380   	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
  1351         -	      | -aos* | -aros* \
         1381  +	      | -aos* | -aros* | -cloudabi* | -sortix* \
  1352   1382   	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
  1353   1383   	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
  1354   1384   	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
  1355         -	      | -openbsd* | -solidbsd* \
         1385  +	      | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
  1356   1386   	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
  1357   1387   	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
  1358   1388   	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
  1359   1389   	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
  1360   1390   	      | -chorusos* | -chorusrdb* | -cegcc* \
  1361   1391   	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
  1362         -	      | -mingw32* | -linux-gnu* | -linux-android* \
  1363         -	      | -linux-newlib* | -linux-uclibc* \
  1364         -	      | -uxpv* | -beos* | -mpeix* | -udk* \
         1392  +	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
         1393  +	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
         1394  +	      | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
  1365   1395   	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
  1366   1396   	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
  1367   1397   	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
  1368   1398   	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
  1369   1399   	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
  1370   1400   	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
  1371         -	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
         1401  +	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
         1402  +	      | -onefs* | -tirtos*)
  1372   1403   	# Remember, each alternative MUST END IN *, to match a version number.
  1373   1404   		;;
  1374   1405   	-qnx*)
  1375   1406   		case $basic_machine in
  1376   1407   		    x86-* | i*86-*)
  1377   1408   			;;
  1378   1409   		    *)
................................................................................
  1488   1519   		;;
  1489   1520   	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
  1490   1521   		os=-mint
  1491   1522   		;;
  1492   1523   	-aros*)
  1493   1524   		os=-aros
  1494   1525   		;;
  1495         -	-kaos*)
  1496         -		os=-kaos
  1497         -		;;
  1498   1526   	-zvmoe)
  1499   1527   		os=-zvmoe
  1500   1528   		;;
  1501   1529   	-dicos*)
  1502   1530   		os=-dicos
  1503   1531   		;;
  1504   1532   	-nacl*)
         1533  +		;;
         1534  +	-ios)
  1505   1535   		;;
  1506   1536   	-none)
  1507   1537   		;;
  1508   1538   	*)
  1509   1539   		# Get rid of the `-' at the beginning of $os.
  1510   1540   		os=`echo $os | sed 's/[^-]*-//'`
  1511   1541   		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
................................................................................
  1538   1568   		os=-linux
  1539   1569   		;;
  1540   1570   	arm*-semi)
  1541   1571   		os=-aout
  1542   1572   		;;
  1543   1573   	c4x-* | tic4x-*)
  1544   1574   		os=-coff
         1575  +		;;
         1576  +	c8051-*)
         1577  +		os=-elf
         1578  +		;;
         1579  +	hexagon-*)
         1580  +		os=-elf
  1545   1581   		;;
  1546   1582   	tic54x-*)
  1547   1583   		os=-coff
  1548   1584   		;;
  1549   1585   	tic55x-*)
  1550   1586   		os=-coff
  1551   1587   		;;

Modified kitsh/buildsrc/kitsh-0.0/configure.ac from [42d57f3f66] to [77fa1a4052].

    13     13   EXTRA_KIT_DEPS=""
    14     14   AC_MSG_CHECKING([what target to build])
    15     15   AC_ARG_ENABLE(kitdll, AC_HELP_STRING([--enable-kitdll], [Enable building KitDLL instead of Tclkit (default: no)]), [
    16     16   	AS_CASE([$enableval],
    17     17   		[yes|kitdll], [
    18     18   			TARGET="kitdll"
    19     19   		],
           20  +		static, [
           21  +			TARGET="kitdll-static"
           22  +		],
    20     23   		no, [
    21     24   			true
    22     25   		], [
    23     26   			AC_MSG_RESULT([unknown])
    24     27   
    25     28   			AC_MSG_ERROR([Invalid option: $enableval])
    26     29   		]
    27     30   	)
    28     31   ])
    29     32   AC_MSG_RESULT([$TARGET])
           33  +AC_SUBST(TARGET)
    30     34   
    31     35   dnl Find the appropriate libraries to link to
    32     36   AC_SEARCH_LIBS(acos, m,, [ AC_MSG_WARN([Couldn't find acos (normally in libm)!]) ])
    33     37   AC_SEARCH_LIBS(dlsym, dl,, [ AC_MSG_WARN([Couldn't find dlsym (normally in libdl)!]) ])
    34     38   
    35     39   AS_IF([test "$TARGET" = "tclkit"], [
    36     40   	dnl We have Tclkit
           41  +	TARGET_BASE='tclkit'
    37     42   
    38     43   	dnl Specify local Appinit function
    39     44   	AC_DEFINE(TK_LOCAL_APPINIT, [TclKit_AppInit], [Tclkit appinit function])
           45  +
    40     46   ], [
    41     47   	dnl We have KitDLL
           48  +	TARGET_BASE='kitdll'
    42     49   
    43     50   	dnl Determine system information
    44     51   	DC_CHK_OS_INFO
    45     52   
    46     53   	dnl Determine how to create a shared object
    47     54   	DC_GET_SHOBJFLAGS
    48     55   
    49     56   	dnl Determine if we have "objcopy" available to weaken non-Tcl/Tk symbols
    50     57   	AC_CHECK_TOOL(OBJCOPY, objcopy, [:])
    51     58   
    52     59   	dnl Define KitDLL usage
    53     60   	AC_DEFINE([TCLKIT_DLL], [1], [Define if you are using a KitDLL rather than a Tclkit])
           61  +
           62  +	dnl Define a static KitDLL
           63  +	AS_IF([test "$TARGET" = "kitdll-static"], [
           64  +		AC_CHECK_TOOL(RANLIB, [ranlib], [:])
           65  +		AC_CHECK_TOOL(AR, [ar], [false MISSING AR])
           66  +
           67  +		AC_DEFINE([TCLKIT_DLL_STATIC], [1], [Define if you are building a static KitDLL])
           68  +	])
    54     69   ])
    55     70   
    56     71   dnl Figure out how to statically link to libgcc, if needed
    57     72   DC_STATIC_LIBGCC
    58     73   
    59     74   dnl Set linker rpath for tclsh/wish
    60     75   DC_SETLDRUNPATH([.])
................................................................................
   197    212   )
   198    213   
   199    214   AC_SUBST(EXTRA_KIT_DEPS)
   200    215   AC_SUBST(LDFLAGS_ADD)
   201    216   
   202    217   dnl Put correct Makefile template in place
   203    218   rm -f Makefile.in
   204         -cp Makefile.${TARGET}.in Makefile.in
          219  +cp Makefile.${TARGET_BASE}.in Makefile.in
   205    220   
   206    221   dnl Produce output
   207    222   AC_OUTPUT(Makefile Makefile.common)

Modified kitsh/buildsrc/kitsh-0.0/kitInit.c from [3cb384a768] to [4efdf6eacc].

   205    205   	"}\n"
   206    206   #ifdef TCLKIT_DLL
   207    207   	"set ::TCLKIT_TYPE \"kitdll\"\n"
   208    208   #else
   209    209   	"set ::TCLKIT_TYPE \"tclkit\"\n"
   210    210   #endif /* TCLKIT_DLL */
   211    211   	"set ::TCLKIT_MOUNTPOINT " TCLKIT_MOUNTPOINT "\n"
   212         -	"set ::TCLKIT_VFSSOURCE " TCLKIT_VFSSOURCE "\n"
          212  +	"catch { set ::TCLKIT_VFSSOURCE " TCLKIT_VFSSOURCE " }\n"
   213    213   	"set ::TCLKIT_MOUNTPOINT_VAR {" TCLKIT_MOUNTPOINT "}\n"
   214    214   	"set ::TCLKIT_VFSSOURCE_VAR {" TCLKIT_VFSSOURCE "}\n"
   215    215   	"uplevel #0 $s\n"
   216    216   #if defined(KIT_INCLUDES_TK) && defined(KIT_TK_VERSION)
   217    217   	"package ifneeded Tk " KIT_TK_VERSION " {\n"
   218    218   		"load {} Tk\n"
   219    219   	"}\n"
................................................................................
   567    567    * are ready to be used when invoked.
   568    568    */
   569    569   #ifdef TCLKIT_DLL
   570    570   void __attribute__((constructor)) _Tclkit_Init(void) {
   571    571   #else
   572    572   static void _Tclkit_Init(void) {
   573    573   #endif
          574  +	static int called = 0;
          575  +
          576  +	if (called) {
          577  +		return;
          578  +	}
          579  +
          580  +	called = 1;
          581  +
   574    582   	Tcl_StaticPackage(0, "tclkit::init", Tclkit_init_Init, NULL);
   575    583   
   576    584   	_Tclkit_Generic_Init();
   577    585   
   578    586   	return;
   579    587   }
          588  +
          589  +#if defined(TCLKIT_DLL) && defined(TCLKIT_DLL_STATIC)
          590  +int Tcl_InitReal(Tcl_Interp *interp);
          591  +
          592  +int Tcl_Init(Tcl_Interp *interp) {
          593  +	_Tclkit_Init();
          594  +
          595  +	return(Tcl_InitReal(interp));
          596  +}
          597  +#endif

Modified mk4tcl/build.sh from [c5265584d3] to [044d5dd870].

    11     11   	exit 1
    12     12   fi
    13     13   
    14     14   MK4VERS="2.4.9.7"
    15     15   SRC="src/metakit-${MK4VERS}.tar.gz"
    16     16   SRCURL="http://www.equi4.com/pub/mk/metakit-${MK4VERS}.tar.gz"
    17     17   SRCURL="http://pkgs.fedoraproject.org/repo/pkgs/metakit/metakit-${MK4VERS}.tar.gz/17330257376eea657827ed632ea62c9e/metakit-${MK4VERS}.tar.gz"
           18  +SRCHASH='d1ba361d2d8517925cff5c23e8602822da9c8c347a75a15c225ec656ff7ca94d'
    18     19   BUILDDIR="$(pwd)/build/metakit-${MK4VERS}"
    19     20   OUTDIR="$(pwd)/out"
    20     21   INSTDIR="$(pwd)/inst"
    21     22   PATCHDIR="$(pwd)/patches"
    22     23   export MK4VERS SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHDIR
    23     24   
    24     25   # Set configure options for this sub-project
................................................................................
    38     39   fi
    39     40   export TCL_VERSION
    40     41   
    41     42   if [ ! -f "${SRC}" ]; then
    42     43   	mkdir 'src' >/dev/null 2>/dev/null
    43     44   
    44     45   	if [ ! -d 'buildsrc' ]; then
    45         -		rm -f "${SRC}.tmp"
    46         -		wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
    47         -		mv "${SRC}.tmp" "${SRC}"
           46  +		download "${SRCURL}" "${SRC}" "${SRCHASH}" || exit 1
    48     47   	fi
    49     48   fi
    50     49   
    51     50   (
    52     51   	cd 'build' || exit 1
    53     52   
    54     53   	if [ ! -d '../buildsrc' ]; then

Modified nsf/build.sh from [08cdee6d2a] to [8ab6337fe5].

    11     11       exit 1
    12     12   fi
    13     13   
    14     14   NSFVERS="2.0.0"
    15     15   NSFVERSEXTRA=""
    16     16   SRC="src/nsf${NSFVERS}.tar.gz"
    17     17   SRCURL="http://sourceforge.net/projects/next-scripting/files/${NSFVERS}/nsf${NSFVERS}.tar.gz/download"
           18  +SRCHASH='-'
    18     19   BUILDDIR="$(pwd)/build/nsf${NSFVERS}"
    19     20   OUTDIR="$(pwd)/out"
    20     21   INSTDIR="$(pwd)/inst"
    21     22   export NSFVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR
    22     23   
    23     24   # Set configure options for this sub-project
    24     25   LDFLAGS="${LDFLAGS} ${KC_NSF_LDFLAGS}"
................................................................................
    30     31   rm -rf 'build' 'out' 'inst'
    31     32   mkdir 'build' 'out' 'inst' || exit 1
    32     33   
    33     34   if [ ! -f "${SRC}" ]; then
    34     35       mkdir 'src' >/dev/null 2>/dev/null
    35     36       
    36     37       if [ ! -d 'buildsrc' ]; then
    37         -	rm -f "${SRC}.tmp"
    38         -	wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
    39         -	mv "${SRC}.tmp" "${SRC}"
           38  +	download "${SRCURL}" "${SRC}" "${SRCHASH}" || exit 1
    40     39       fi
    41     40   fi
    42     41   
    43     42   (
    44     43       cd 'build' || exit 1
    45     44       
    46     45       if [ ! -d '../buildsrc' ]; then

Modified tcc4tcl/build.sh from [a8c1cbf0ad] to [15c640b06a].

     7      7   fi
     8      8   if [ -z "${TCLVERS}" ]; then
     9      9   	echo 'ERROR: The TCLVERS environment variable is not set' >&2
    10     10   
    11     11   	exit 1
    12     12   fi
    13     13   
    14         -TCC4TCLVERS="0.23"
           14  +TCC4TCLVERS="0.26"
    15     15   SRC="src/tcc4tcl-${TCC4TCLVERS}.tar.gz"
    16     16   SRCURL="http://rkeene.org/devel/tcc4tcl/tcc4tcl-${TCC4TCLVERS}.tar.gz"
           17  +SRCHASH='8116d2ab94cc611c4e0be81e34bd8cc11a6f3e1fd49d02d7e894bbadcfffde0b'
    17     18   BUILDDIR="$(pwd)/build/tcc4tcl-${TCC4TCLVERS}"
    18     19   OUTDIR="$(pwd)/out"
    19     20   INSTDIR="$(pwd)/inst"
    20     21   PATCHDIR="$(pwd)/patches"
    21     22   export TCC4TCLVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHDIR
    22     23   
    23     24   # Set configure options for this sub-project
................................................................................
    36     37   fi
    37     38   export TCL_VERSION
    38     39   
    39     40   if [ ! -f "${SRC}" ]; then
    40     41   	mkdir 'src' >/dev/null 2>/dev/null
    41     42   
    42     43   	if [ ! -d 'buildsrc' ]; then
    43         -		rm -f "${SRC}.tmp"
    44         -		wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
    45         -		mv "${SRC}.tmp" "${SRC}"
           44  +		download "${SRCURL}" "${SRC}" "${SRCHASH}" || exit 1
    46     45   	fi
    47     46   fi
    48     47   
    49     48   (
    50     49   	cd 'build' || exit 1
    51     50   
    52     51   	if [ ! -d '../buildsrc' ]; then

Modified tcl/build.sh from [c5ef63a316] to [72e6b1e1d8].

     9      9   	echo 'ERROR: The TCLVERS environment variable is not set' >&2
    10     10   
    11     11   	exit 1
    12     12   fi
    13     13   
    14     14   SRC="src/tcl${TCLVERS}.tar.gz"
    15     15   SRCURL="http://prdownloads.sourceforge.net/tcl/tcl${TCLVERS}-src.tar.gz"
           16  +SRCHASH='-'
    16     17   BUILDDIR="$(pwd)/build/tcl${TCLVERS}"
    17     18   OUTDIR="$(pwd)/out"
    18     19   INSTDIR="$(pwd)/inst"
    19     20   PATCHSCRIPTDIR="$(pwd)/patchscripts"
    20     21   PATCHDIR="$(pwd)/patches"
    21     22   export SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHSCRIPTDIR PATCHDIR
           23  +
           24  +case "${TCLVERS}" in
           25  +	8.6.4)
           26  +		SRCHASH='9e6ed94c981c1d0c5f5fefb8112d06c6bf4d050a7327e95e71d417c416519c8d'
           27  +		;;
           28  +esac
    22     29   
    23     30   # Set configure options for this sub-project
    24     31   LDFLAGS="${LDFLAGS} ${KC_TCL_LDFLAGS}"
    25     32   CFLAGS="${CFLAGS} ${KC_TCL_CFLAGS}"
    26     33   CPPFLAGS="${CPPFLAGS} ${KC_TCL_CPPFLAGS}"
    27     34   LIBS="${LIBS} ${KC_TCL_LIBS}"
    28     35   export LDFLAGS CFLAGS CPPFLAGS LIBS
................................................................................
    61     68   			workdir="tmp-$$${RANDOM}${RANDOM}${RANDOM}"
    62     69   			rm -rf "${workdir}"
    63     70   
    64     71   			mkdir "${workdir}" || exit 1
    65     72   			cd "${workdir}" || exit 1
    66     73   
    67     74   			# Handle Tcl first, since it will be used to base other packages on
    68         -			wget -O "tmp-tcl.tar.gz" "http://core.tcl.tk/tcl/tarball/tcl-fossil.tar.gz?uuid=${FOSSILTAG}" || rm -f 'tmp-tcl.tar.gz'
           75  +			download "http://core.tcl.tk/tcl/tarball/tcl-fossil.tar.gz?uuid=${FOSSILTAG}" "tmp-tcl.tar.gz" - || rm -f 'tmp-tcl.tar.gz'
    69     76   			gzip -dc 'tmp-tcl.tar.gz' | tar -xf -
    70     77   			mv "tcl-fossil" "tcl${TCLVERS}"
    71     78   
    72     79   			# Determine date of this Tcl release and use that date for all other dependent packages
    73     80   			## Unless the release we are talking about is "trunk", in which case we use that everywhere
    74     81   			if [ "${FOSSILTAG}" = "trunk" ]; then
    75     82   				FOSSILDATE="${FOSSILTAG}"
................................................................................
    79     86   
    80     87   			## If we are unable to determine the modification date, fall-back to the tag and hope for the best
    81     88   			if [ -z "${FOSSILDATE}" ]; then
    82     89   				FOSSILDATE="${FOSSILTAG}"
    83     90   			fi
    84     91   
    85     92   			# Handle other packages
    86         -			wget -O "tmp-itcl.tar.gz" "http://core.tcl.tk/itcl/tarball/itcl-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f 'tmp-itcl.tar.gz'
    87         -			wget -O "tmp-thread.tar.gz" "http://core.tcl.tk/thread/tarball/thread-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f "tmp-thread.tar.gz"
    88         -			wget -O "tmp-tclconfig.tar.gz" "http://core.tcl.tk/tclconfig/tarball/tclconfig-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f "tmp-tclconfig.tar.gz"
           93  +			download "http://core.tcl.tk/itcl/tarball/itcl-fossil.tar.gz?uuid=${FOSSILDATE}" "tmp-itcl.tar.gz" - || rm -f 'tmp-itcl.tar.gz'
           94  +			download "http://core.tcl.tk/thread/tarball/thread-fossil.tar.gz?uuid=${FOSSILDATE}" "tmp-thread.tar.gz" - || rm -f "tmp-thread.tar.gz"
           95  +			download "http://core.tcl.tk/tclconfig/tarball/tclconfig-fossil.tar.gz?uuid=${FOSSILDATE}" "tmp-tclconfig.tar.gz" - || rm -f "tmp-tclconfig.tar.gz"
    89     96   			if [ "${FOSSILDATE}" = "trunk" ] || [ "$(echo "${FOSSILDATE}" | cut -f 1 -d '-')" -ge '2012' ]; then
    90     97   				_USE_TDBC='1'
    91     98   				_USE_SQLITE='1'
    92     99   				SQLITEVERS='3071401'
    93    100   			fi
    94    101   
    95    102   			if [ "${_USE_TDBC}" = '1' ]; then
    96         -				wget -O "tmp-tdbc.tar.gz" "http://core.tcl.tk/tdbc/tarball/tdbc-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f "tmp-tdbc.tar.gz"
          103  +				download "http://core.tcl.tk/tdbc/tarball/tdbc-fossil.tar.gz?uuid=${FOSSILDATE}" "tmp-tdbc.tar.gz" - || rm -f "tmp-tdbc.tar.gz"
    97    104   			fi
    98    105   
    99    106   			if [ "${_USE_SQLITE}" = '1' ]; then
   100         -				wget -O "tmp-sqlite3.tar.gz" "http://www.sqlite.org/sqlite-autoconf-${SQLITEVERS}.tar.gz" || rm -f "tmp-sqlite3.tar.gz"
          107  +				download "http://www.sqlite.org/sqlite-autoconf-${SQLITEVERS}.tar.gz" "tmp-sqlite3.tar.gz" - || rm -f "tmp-sqlite3.tar.gz"
   101    108   			fi
   102    109   
   103    110   			gzip -dc "tmp-itcl.tar.gz" | tar -xf -
   104    111   			gzip -dc "tmp-thread.tar.gz" | tar -xf -
   105    112   			gzip -dc "tmp-tclconfig.tar.gz" | tar -xf -
   106    113   
   107    114   			mkdir -p "tcl${TCLVERS}/pkgs/" >/dev/null 2>/dev/null
................................................................................
   147    154   
   148    155   			cd ..
   149    156   
   150    157   			rm -rf "${workdir}"
   151    158   		) || exit 1
   152    159   	else
   153    160   		if [ ! -d 'buildsrc' ]; then
   154         -			rm -f "${SRC}.tmp"
   155         -			wget -O "${SRC}.tmp" "${SRCURL}" || (
          161  +			download "${SRCURL}" "${SRC}" "${SRCHASH}" || (
   156    162   				echo '  Unable to download source code for Tcl.' >&4
   157         -				echo "  Attempted to run:  wget -O \"${SRC}.tmp\" \"${SRCURL}\"" >&4
   158         -				echo "  Got:"
   159         -				wget -O "${SRC}.tmp" "${SRCURL}" 2>&1 | sed 's@^@    @' >&4
   160         -
   161    163   				echo '  Aborting Tcl -- further packages will likely also fail.' >&4
   162    164   
   163    165   				exit 1
   164    166   			) || exit 1
   165         -			mv "${SRC}.tmp" "${SRC}"
   166    167   		fi
   167    168   	fi
   168    169   fi
   169    170   
   170    171   (
   171    172   	cd 'build' || exit 1
   172    173   

Added tcl/patchscripts/static-kitdll-noextern.sh version [a32606647f].

            1  +#! /bin/bash
            2  +
            3  +if [ "${KITTARGET}" != "kitdll" ]; then
            4  +	exit 0
            5  +fi
            6  +
            7  +if [ "${KITCREATOR_STATIC_KITDLL}" != '1' ]; then
            8  +	exit 0
            9  +fi
           10  +
           11  +# For a static KitDLL we are linking directly to the object
           12  +# so there is nothing external.
           13  +sed 's/define EXTERN .*/define EXTERN/' generic/tcl.h > generic/tcl.h.new
           14  +cat generic/tcl.h.new > generic/tcl.h
           15  +rm -f generic/tcl.h.new

Added tcl/patchscripts/tcl-utf-max.sh version [22c18daa85].

            1  +#! /bin/bash
            2  +
            3  +if [ -z "${KC_TCL_UTF_MAX}" ]; then
            4  +	exit 0
            5  +fi
            6  +
            7  +sed 's@^# *define TCL_UTF_MAX.*$@#define TCL_UTF_MAX '"${KC_TCL_UTF_MAX}"'@' generic/tcl.h > generic/tcl.h.new
            8  +cat generic/tcl.h.new > generic/tcl.h
            9  +rm -f generic/tcl.h.new
           10  +
           11  +exit 0

Added tcl/validate.sh version [188d2f0127].

            1  +#! /usr/bin/env bash
            2  +
            3  +PATCH="${PATCH:-patch}"
            4  +if [ ! -x "$(which "${PATCH}" 2>/dev/null)" ]; then
            5  +	echo "No \"${PATCH}\" command (for patch)."
            6  +	echo "No \"${PATCH}\" command (for patch)." >&4
            7  +
            8  +	exit 1
            9  +fi
           10  +
           11  +exit 0

Modified tcllib/build.sh from [d804d69dc7] to [2b5cf345b1].

     1      1   #! /usr/bin/env bash
     2      2   
     3      3   TCLLIB_VERS='1.16'
     4      4   SRC="src/tcllib-${TCLLIB_VERS}.tar.bz2"
     5      5   SRCURL="http://sourceforge.net/projects/tcllib/files/tcllib/${TCLLIB_VERS}/tcllib-${TCLLIB_VERS}.tar.bz2"
            6  +SRCHASH='033334306d3ffc499c8830d393bf7528227e49c68077b3e9247c4171b15be012'
     6      7   BUILDDIR="$(pwd)/build/Tcllib-${TCLLIB_VERS}"
     7      8   OUTDIR="$(pwd)/out"
     8      9   INSTDIR="$(pwd)/inst"
     9     10   PATCHDIR="$(pwd)/patches"
    10     11   export TCLLIB_VERS SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHDIR
    11     12   
    12     13   rm -rf 'build' 'out' 'inst'
    13     14   mkdir 'build' 'out' 'inst' || exit 1
    14     15   
    15     16   if [ ! -f "${SRC}" ]; then
    16     17   	mkdir 'src' >/dev/null 2>/dev/null
    17     18   
    18     19   	if [ ! -d 'buildsrc' ]; then
    19         -		rm -f "${SRC}.tmp"
    20         -		wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
    21         -		mv "${SRC}.tmp" "${SRC}"
           20  +		download "${SRCURL}" "${SRC}" "${SRCHASH}" || exit 1
    22     21   	fi
    23     22   fi
    24     23   
    25     24   (
    26     25   	cd 'build' || exit 1
    27     26   
    28     27   	if [ ! -d '../buildsrc' ]; then

Modified tclvfs/build.sh from [7e37283f7c] to [80cc783e96].

    10     10   
    11     11   	exit 1
    12     12   fi
    13     13   
    14     14   TCLVFSVERS="20080503"
    15     15   SRC="src/tclvfs-${TCLVFSVERS}.tar.gz"
    16     16   SRCURL="http://sourceforge.net/projects/tclvfs/files/tclvfs/tclvfs-${TCLVFSVERS}/tclvfs-${TCLVFSVERS}.tar.gz/download"
           17  +SRCHASH='0d90362078c8f59347b14be377e9306336b6d25d147397f845e705a6fa1d38f2'
    17     18   BUILDDIR="$(pwd)/build/tclvfs-${TCLVFSVERS}"
    18     19   OUTDIR="$(pwd)/out"
    19     20   INSTDIR="$(pwd)/inst"
    20     21   PATCHDIR="$(pwd)/patches"
    21     22   export TCLVFSVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHDIR
    22     23   
    23     24   # Set configure options for this sub-project
................................................................................
    36     37   fi
    37     38   export TCL_VERSION
    38     39   
    39     40   if [ ! -f "${SRC}" ]; then
    40     41   	mkdir 'src' >/dev/null 2>/dev/null
    41     42   
    42     43   	if [ ! -d 'buildsrc' ]; then
    43         -		rm -f "${SRC}.tmp"
    44         -		wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
    45         -		mv "${SRC}.tmp" "${SRC}"
           44  +		download "${SRCURL}" "${SRC}" "${SRCHASH}" || exit 1
    46     45   	fi
    47     46   fi
    48     47   
    49     48   (
    50     49   	cd 'build' || exit 1
    51     50   
    52     51   	if [ ! -d '../buildsrc' ]; then

Modified tclx/build.sh from [e8fda61b35] to [0d543b9c73].

    10     10   
    11     11   	exit 1
    12     12   fi
    13     13   
    14     14   TCLXVERS="8.4.1"
    15     15   SRC="src/tclx${TCLXVERS}.tar.bz2"
    16     16   SRCURL="http://sourceforge.net/projects/tclx/files/TclX/${TCLXVERS}/tclx${TCLXVERS}.tar.bz2/download"
           17  +SRCHASH='-'
    17     18   BUILDDIR="$(pwd)/build/tclx8.4"
    18     19   OUTDIR="$(pwd)/out"
    19     20   INSTDIR="$(pwd)/inst"
    20     21   PATCHDIR="$(pwd)/patches"
    21     22   export TCLXVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHDIR
    22     23   
    23     24   # Set configure options for this sub-project
................................................................................
    36     37   fi
    37     38   export TCL_VERSION
    38     39   
    39     40   if [ ! -f "${SRC}" ]; then
    40     41   	mkdir 'src' >/dev/null 2>/dev/null
    41     42   
    42     43   	if [ ! -d 'buildsrc' ]; then
    43         -		rm -f "${SRC}.tmp"
    44         -		wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
    45         -		mv "${SRC}.tmp" "${SRC}"
           44  +		download "${SRCURL}" "${SRC}" "${SRCHASH}" || exit 1
    46     45   	fi
    47     46   fi
    48     47   
    49     48   (
    50     49   	cd 'build' || exit 1
    51     50   
    52     51   	if [ ! -d '../buildsrc' ]; then

Modified thread/build.sh from [b4f11c7a4a] to [1c20594f00].

    10     10   
    11     11   	exit 1
    12     12   fi
    13     13   
    14     14   THREADVERS="2.7.2"
    15     15   SRC="src/thread-${THREADVERS}.tar.gz"
    16     16   SRCURL="http://sourceforge.net/projects/tcl/files/Thread%20Extension/${THREADVERS}/thread${THREADVERS}.tar.gz/download"
           17  +SRCHASH='-'
    17     18   BUILDDIR="$(pwd)/build/thread${THREADVERS}"
    18     19   OUTDIR="$(pwd)/out"
    19     20   INSTDIR="$(pwd)/inst"
    20     21   export THREADVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR
    21     22   
    22     23   # Set configure options for this sub-project
    23     24   LDFLAGS="${LDFLAGS} ${KC_THREAD_LDFLAGS}"
................................................................................
    54     55   	exit 1
    55     56   ) || exit 0
    56     57   
    57     58   if [ ! -f "${SRC}" ]; then
    58     59   	mkdir 'src' >/dev/null 2>/dev/null
    59     60   
    60     61   	if [ ! -d 'buildsrc' ]; then
    61         -		rm -f "${SRC}.tmp"
    62         -		wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
    63         -		mv "${SRC}.tmp" "${SRC}"
           62  +		download "${SRCURL}" "${SRC}" "${SRCHASH}" || exit 1
    64     63   	fi
    65     64   fi
    66     65   
    67     66   (
    68     67   	cd 'build' || exit 1
    69     68   
    70     69   	if [ ! -d '../buildsrc' ]; then

Modified tk/build.sh from [bb348ac8e4] to [b84462b734].

     9      9   	echo 'ERROR: The TCLVERS environment variable is not set' >&2
    10     10   
    11     11   	exit 1
    12     12   fi
    13     13   
    14     14   SRC="src/tk${TCLVERS}.tar.gz"
    15     15   SRCURL="http://prdownloads.sourceforge.net/tcl/tk${TCLVERS}-src.tar.gz"
           16  +SRCHASH='-'
    16     17   BUILDDIR="$(pwd)/build/tk${TCLVERS}"
    17     18   PATCHDIR="$(pwd)/patches"
    18     19   OUTDIR="$(pwd)/out"
    19     20   INSTDIR="$(pwd)/inst"
    20     21   PATCHSCRIPTDIR="$(pwd)/patchscripts"
    21     22   export SRC SRCURL BUILDDIR PATCHDIR OUTDIR INSTDIR PATCHSCRIPTDIR
           23  +
           24  +case "${TCLVERS}" in
           25  +	8.6.4)
           26  +		SRCHASH='08f99df85e5dc9c4271762163c6aabb962c8b297dc5c4c1af8bdd05fc2dd26c1'
           27  +		;;
           28  +esac
    22     29   
    23     30   # Set configure options for this sub-project
    24     31   LDFLAGS="${LDFLAGS} ${KC_TK_LDFLAGS}"
    25     32   CFLAGS="${CFLAGS} ${KC_TK_CFLAGS}"
    26     33   CPPFLAGS="${CPPFLAGS} ${KC_TK_CPPFLAGS}"
    27     34   LIBS="${LIBS} ${KC_TK_LIBS}"
    28     35   export LDFLAGS CFLAGS CPPFLAGS LIBS
................................................................................
    77     84   
    78     85   			workdir="tmp-$$${RANDOM}${RANDOM}${RANDOM}"
    79     86   			rm -rf "${workdir}"
    80     87   
    81     88   			mkdir "${workdir}" || exit 1
    82     89   			cd "${workdir}" || exit 1
    83     90   
    84         -			wget -O "tmp-tk.tar.gz" "http://core.tcl.tk/tk/tarball/tk-fossil.tar.gz?uuid=${FOSSILTAG}" || rm -f 'tmp-tk.tar.gz'
           91  +			download "http://core.tcl.tk/tk/tarball/tk-fossil.tar.gz?uuid=${FOSSILTAG}" "tmp-tk.tar.gz" - || rm -f 'tmp-tk.tar.gz'
    85     92   			gzip -dc "tmp-tk.tar.gz" | tar -xf - || rm -f 'tmp-tk.tar.gz'
    86     93   
    87     94   			if [ ! -s 'tmp-tk.tar.gz' ]; then
    88         -				wget -O "tmp-tk.tar.gz" "http://core.tcl.tk/tk/tarball/tk-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f 'tmp-tk.tar.gz'
           95  +				download "http://core.tcl.tk/tk/tarball/tk-fossil.tar.gz?uuid=${FOSSILDATE}" "tmp-tk.tar.gz" - || rm -f 'tmp-tk.tar.gz'
    89     96   				gzip -dc "tmp-tk.tar.gz" | tar -xf -
    90     97   			fi
    91     98   
    92     99   			mv "tk-fossil" "tk${TCLVERS}"
    93    100                           
    94    101   			tar -cf - "tk${TCLVERS}" | gzip -c > "../../${SRC}"
    95    102   
    96    103   			cd ..
    97    104   			rm -rf "${workdir}"
    98    105   		)
    99    106   	else
   100    107   		if [ ! -d 'buildsrc' ]; then
   101         -			rm -f "${SRC}.tmp"
   102         -			wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
   103         -			mv "${SRC}.tmp" "${SRC}"
          108  +			download "${SRCURL}" "${SRC}" "${SRCHASH}" || exit 1
   104    109   		fi
   105    110   	fi
   106    111   fi
   107    112   
   108    113   (
   109    114   	cd 'build' || exit 1
   110    115   

Modified tls/build.sh from [eaa77b3a1b] to [caf2415988].

    10     10   
    11     11   	exit 1
    12     12   fi
    13     13   
    14     14   TLSVERS="1.6.7"
    15     15   SRC="src/tls-${TLSVERS}.tar.gz"
    16     16   SRCURL="http://sourceforge.net/projects/tls/files/tls/${TLSVERS}/tls${TLSVERS}-src.tar.gz"
           17  +SRCHASH='5119de3e5470359b97a8a00d861c9c48433571ee0167af0a952de66c99d3a3b8'
    17     18   BUILDDIR="$(pwd)/build/tls${TLSVERS}"
    18     19   OUTDIR="$(pwd)/out"
    19     20   INSTDIR="$(pwd)/inst"
    20     21   PATCHDIR="$(pwd)/patches"
    21     22   export TLSVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHDIR
    22     23   
    23     24   # Set configure options for this sub-project
................................................................................
    36     37   fi
    37     38   export TCL_VERSION
    38     39   
    39     40   if [ ! -f "${SRC}" ]; then
    40     41   	mkdir 'src' >/dev/null 2>/dev/null
    41     42   
    42     43   	if [ ! -d 'buildsrc' ]; then
    43         -		rm -f "${SRC}.tmp"
    44         -		wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
    45         -		mv "${SRC}.tmp" "${SRC}"
           44  +		download "${SRCURL}" "${SRC}" "${SRCHASH}" || exit 1
    46     45   	fi
    47     46   fi
    48     47   
    49     48   (
    50     49   	cd 'build' || exit 1
    51     50   
    52     51   	if [ ! -d '../buildsrc' ]; then
................................................................................
    53     52   		gzip -dc "../${SRC}" | tar -xf -
    54     53   	else    
    55     54   		cp -rp ../buildsrc/* './'
    56     55   	fi
    57     56   
    58     57   	# Determine SSL directory
    59     58   	if [ -z "${CPP}" ]; then
    60         -		CPP="${CC} -E"
           59  +		CPP="${CC:-cc} -E"
    61     60   	fi
    62     61   
    63     62   	if [ -n "${KC_TLS_SSLDIR}" ]; then
    64     63   		SSLDIR="${KC_TLS_SSLDIR}"
    65     64   	else
    66     65   		SSLDIR="$(echo '#include <openssl/ssl.h>' 2>/dev/null | ${CPP} - | awk '/# 1 "\/.*\/ssl\.h/{ print $3; exit }' | sed 's@^"@@;s@"$@@;s@/include/openssl/ssl\.h$@@')"
    67     66   		if [ -z "${SSLDIR}" ]; then

Modified udp/build.sh from [0751b83164] to [9534382755].

    10     10   
    11     11   	exit 1
    12     12   fi
    13     13   
    14     14   TCLUDPVERS="1.0.11"
    15     15   SRC="src/tcludp-${TCLUDPVERS}.tar.gz"
    16     16   SRCURL="http://sourceforge.net/projects/tcludp/files/tcludp/${TCLUDPVERS}/tcludp-${TCLUDPVERS}.tar.gz"
           17  +SRCHASH='a8a29d55a718eb90aada643841b3e0715216d27cea2e2df243e184edb780aa9d'
    17     18   BUILDDIR="$(pwd)/build/tcludp"
    18     19   OUTDIR="$(pwd)/out"
    19     20   INSTDIR="$(pwd)/inst"
    20     21   PATCHDIR="$(pwd)/patches"
    21     22   export TCLUDPVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHDIR
    22     23   
    23     24   # Set configure options for this sub-project
................................................................................
    36     37   fi
    37     38   export TCL_VERSION
    38     39   
    39     40   if [ ! -f "${SRC}" ]; then
    40     41   	mkdir 'src' >/dev/null 2>/dev/null
    41     42   
    42     43   	if [ ! -d 'buildsrc' ]; then
    43         -		rm -f "${SRC}.tmp"
    44         -		wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
    45         -		mv "${SRC}.tmp" "${SRC}"
           44  +		download "${SRCURL}" "${SRC}" "${SRCHASH}" || exit 1
    46     45   	fi
    47     46   fi
    48     47   
    49     48   (
    50     49   	cd 'build' || exit 1
    51     50   
    52     51   	if [ ! -d '../buildsrc' ]; then

Modified yajltcl/build.sh from [4f55cc724b] to [efe0f47413].

    12     12   fi
    13     13   
    14     14   YAJLTCLVERS="1.5"
    15     15   YAJLVERS='2.1.0'
    16     16   SRC="src/yajltcl-${YAJLTCLVERS}.tar.gz"
    17     17   YAJLSRC="src/yajl-${YAJLVERS}.tar.gz"
    18     18   SRCURL="https://github.com/flightaware/yajl-tcl/archive/v${YAJLTCLVERS}.tar.gz"
           19  +SRCHASH='-'
    19     20   YAJLSRCURL="http://github.com/lloyd/yajl/tarball/${YAJLVERS}"
           21  +YAJLSRCHASH='-'
    20     22   BUILDDIR="$(pwd)/build/yajl-tcl-${YAJLTCLVERS}"
    21     23   YAJLBUILDDIR="$(pwd)/build/lloyd-yajl-66cb08c"
    22     24   OUTDIR="$(pwd)/out"
    23     25   INSTDIR="$(pwd)/inst"
    24     26   PATCHDIR="$(pwd)/patches"
    25     27   export YAJLTCLVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHDIR
    26     28   
................................................................................
    34     36   rm -rf 'build' 'out' 'inst'
    35     37   mkdir 'build' 'out' 'inst' || exit 1
    36     38   
    37     39   if [ ! -d 'buildsrc' ]; then
    38     40   	mkdir 'src' >/dev/null 2>/dev/null
    39     41   
    40     42   	if [ ! -f "${SRC}" ]; then
    41         -		rm -f "${SRC}.tmp"
    42         -		wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
    43         -		mv "${SRC}.tmp" "${SRC}"
           43  +		download "${SRCURL}" "${SRC}" "${SRCHASH}" || exit 1
    44     44   	fi
    45     45   
    46     46   	if [ ! -f "${YAJLSRC}" ]; then
    47         -		rm -f "${YAJLSRC}.tmp"
    48         -		wget -O "${YAJLSRC}.tmp" "${YAJLSRCURL}" || exit 1
    49         -		mv "${YAJLSRC}.tmp" "${YAJLSRC}"
           47  +		download "${YAJLSRCURL}" "${YAJLSRC}" "${YAJLSRCHASH}" || exit 1
    50     48   	fi
    51     49   fi
    52     50   
    53     51   (
    54     52   	cd 'build' || exit 1
    55     53   
    56     54   	if [ ! -d '../buildsrc' ]; then

Modified zlib/build.sh from [e9c0794475] to [9b9da94e1d].

    10     10   
    11     11   	exit 1
    12     12   fi
    13     13   
    14     14   ZLIBVERS="1.2.8"
    15     15   SRC="src/zlib-${ZLIBVERS}.tar.gz"
    16     16   SRCURL="http://sourceforge.net/projects/libpng/files/zlib/${ZLIBVERS}/zlib-${ZLIBVERS}.tar.gz/download"
           17  +SRCHASH='36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d'
    17     18   BUILDDIR="$(pwd)/build/zlib-${ZLIBVERS}"
    18     19   OUTDIR="$(pwd)/out"
    19     20   INSTDIR="$(pwd)/inst"
    20     21   export ZLIBVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR
    21     22   
    22     23   # Set configure options for this sub-project
    23     24   LDFLAGS="${LDFLAGS} ${KC_ZLIB_LDFLAGS}"
................................................................................
    29     30   rm -rf 'build' 'out' 'inst'
    30     31   mkdir 'build' 'out' 'inst' || exit 1
    31     32   
    32     33   if [ ! -f "${SRC}" ]; then
    33     34   	mkdir 'src' >/dev/null 2>/dev/null
    34     35   
    35     36   	if [ ! -d 'buildsrc' ]; then
    36         -		rm -f "${SRC}.tmp"
    37         -		wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
    38         -		mv "${SRC}.tmp" "${SRC}"
           37  +		download "${SRCURL}" "${SRC}" "${SRCHASH}" || exit 1
    39     38   	fi
    40     39   fi
    41     40   
    42     41   (
    43     42   	cd 'build' || exit 1
    44     43   
    45     44   	if [ ! -d '../buildsrc' ]; then