From 3364be574e999a92fa66f1194fe8265078a3d2ae Mon Sep 17 00:00:00 2001 From: Mike Kelly Date: Wed, 5 Jul 2006 01:50:53 +0000 Subject: net-im/zephyr: New ebuild for zephyr, from bug #112194 svn path=/sunrise/; revision=478 --- net-im/zephyr/ChangeLog | 7 + net-im/zephyr/Manifest | 20 + net-im/zephyr/files/digest-zephyr-2.1.20010518.15 | 3 + .../files/zephyr-2.1.20010518.15-debian.patch | 4756 ++++++++++++++++++++ net-im/zephyr/metadata.xml | 5 + net-im/zephyr/zephyr-2.1.20010518.15.ebuild | 53 + 6 files changed, 4844 insertions(+) create mode 100644 net-im/zephyr/ChangeLog create mode 100644 net-im/zephyr/Manifest create mode 100644 net-im/zephyr/files/digest-zephyr-2.1.20010518.15 create mode 100644 net-im/zephyr/files/zephyr-2.1.20010518.15-debian.patch create mode 100644 net-im/zephyr/metadata.xml create mode 100644 net-im/zephyr/zephyr-2.1.20010518.15.ebuild (limited to 'net-im') diff --git a/net-im/zephyr/ChangeLog b/net-im/zephyr/ChangeLog new file mode 100644 index 000000000..f6a741bf7 --- /dev/null +++ b/net-im/zephyr/ChangeLog @@ -0,0 +1,7 @@ +# ChangeLog for net-im/zephyr +# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + + 05 Jul 2006; Mike Kelly ChangeLog: + New ebuild for zephyr, from bug #112194 + diff --git a/net-im/zephyr/Manifest b/net-im/zephyr/Manifest new file mode 100644 index 000000000..d50a38391 --- /dev/null +++ b/net-im/zephyr/Manifest @@ -0,0 +1,20 @@ +AUX zephyr-2.1.20010518.15-debian.patch 142746 RMD160 2784a328c414a226a5071d28232327c18a9c2dc0 SHA1 5dcee029087cec0d1e31d1c2da83b714807f7f2b SHA256 c14ae38a081c06937f582c6b192e7ce73398ae9f82d0f8233fb9568e9e119b20 +MD5 803e517a12da7b3c48aa9e6248b95173 files/zephyr-2.1.20010518.15-debian.patch 142746 +RMD160 2784a328c414a226a5071d28232327c18a9c2dc0 files/zephyr-2.1.20010518.15-debian.patch 142746 +SHA256 c14ae38a081c06937f582c6b192e7ce73398ae9f82d0f8233fb9568e9e119b20 files/zephyr-2.1.20010518.15-debian.patch 142746 +DIST zephyr_2.1.20010518.SNAPSHOT.orig.tar.gz 342259 RMD160 1082db0df40e4ac1007e4b2b4f8adc15cf8a8ab0 SHA1 cd2fca9c2f0bfaa8e69c94813bedc87d66d3ac1c SHA256 b123ba876e0d74e351a66519a70b037fb6faf544711dfe000b0c90a9127c1e94 +EBUILD zephyr-2.1.20010518.15.ebuild 1055 RMD160 b9e56b5a7295690f4c46305eeab74702fba1250a SHA1 9fad7207df098280bd572fb2d5d3f99de5e7c0a8 SHA256 acc1465856ebd8ba8a28a90ef12941b16731d9a5efddac138c59b336271cb40c +MD5 8d479588bd0de7fc082cb758a019de24 zephyr-2.1.20010518.15.ebuild 1055 +RMD160 b9e56b5a7295690f4c46305eeab74702fba1250a zephyr-2.1.20010518.15.ebuild 1055 +SHA256 acc1465856ebd8ba8a28a90ef12941b16731d9a5efddac138c59b336271cb40c zephyr-2.1.20010518.15.ebuild 1055 +MISC ChangeLog 212 RMD160 6bfff7637cd44e4d1c2537374f5a523116e4d19d SHA1 b446a3c42aaa67d4e9463e0d2dbb0e181ccb9b57 SHA256 e762ab169989cff12cfc971a197a94f1dde851bf0b850a01aabab20760b38e91 +MD5 9ad9fae663209d02e1122dd802eee3d7 ChangeLog 212 +RMD160 6bfff7637cd44e4d1c2537374f5a523116e4d19d ChangeLog 212 +SHA256 e762ab169989cff12cfc971a197a94f1dde851bf0b850a01aabab20760b38e91 ChangeLog 212 +MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42 +MD5 1e678929a9fec6632e227bdf2262e9a1 metadata.xml 170 +RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 metadata.xml 170 +SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42 metadata.xml 170 +MD5 542701920f0398d3138fb531dc07df9d files/digest-zephyr-2.1.20010518.15 301 +RMD160 036b86cbcb38070a0350b604e869cc11a0e031f7 files/digest-zephyr-2.1.20010518.15 301 +SHA256 067bc62a48fe70fefe7fea47c14bf861bb5f3909307b0ca2a87d80291e53b4cc files/digest-zephyr-2.1.20010518.15 301 diff --git a/net-im/zephyr/files/digest-zephyr-2.1.20010518.15 b/net-im/zephyr/files/digest-zephyr-2.1.20010518.15 new file mode 100644 index 000000000..aad8b7561 --- /dev/null +++ b/net-im/zephyr/files/digest-zephyr-2.1.20010518.15 @@ -0,0 +1,3 @@ +MD5 b7ffa0e8bbb4957337a53def9e2f5e6a zephyr_2.1.20010518.SNAPSHOT.orig.tar.gz 342259 +RMD160 1082db0df40e4ac1007e4b2b4f8adc15cf8a8ab0 zephyr_2.1.20010518.SNAPSHOT.orig.tar.gz 342259 +SHA256 b123ba876e0d74e351a66519a70b037fb6faf544711dfe000b0c90a9127c1e94 zephyr_2.1.20010518.SNAPSHOT.orig.tar.gz 342259 diff --git a/net-im/zephyr/files/zephyr-2.1.20010518.15-debian.patch b/net-im/zephyr/files/zephyr-2.1.20010518.15-debian.patch new file mode 100644 index 000000000..4bad9c598 --- /dev/null +++ b/net-im/zephyr/files/zephyr-2.1.20010518.15-debian.patch @@ -0,0 +1,4756 @@ +diff -Naur zephyr.orig/Makefile.in zephyr.patched-15/Makefile.in +--- zephyr.orig/Makefile.in 1998-06-11 15:10:02.000000000 -0400 ++++ zephyr.patched-15/Makefile.in 2006-02-16 03:51:37.000000000 -0500 +@@ -7,7 +7,7 @@ + sbindir=@sbindir@ + + includedir=${prefix}/include +-mandir=${prefix}/man ++mandir=@mandir@ + bindir=${exec_prefix}/bin + libdir=${exec_prefix}/lib + +diff -Naur zephyr.orig/aclocal.m4 zephyr.patched-15/aclocal.m4 +--- zephyr.orig/aclocal.m4 2001-05-18 16:41:37.000000000 -0400 ++++ zephyr.patched-15/aclocal.m4 2006-02-16 03:51:37.000000000 -0500 +@@ -274,7 +274,7 @@ + LDFLAGS="$LDFLAGS -L$hesiod/lib" + fi + AC_CHECK_LIB(hesiod, hes_resolve, :, +- [AC_MSG_ERROR(Hesiod library not found)])]) ++ [AC_MSG_ERROR(Hesiod library not found)],$LIBS)]) + + AC_DEFUN(ATHENA_HESIOD, + [AC_ARG_WITH(hesiod, +diff -Naur zephyr.orig/clients/xzwrite/Makefile.in zephyr.patched-15/clients/xzwrite/Makefile.in +--- zephyr.orig/clients/xzwrite/Makefile.in 1999-05-26 12:22:09.000000000 -0400 ++++ zephyr.patched-15/clients/xzwrite/Makefile.in 2006-02-16 03:51:36.000000000 -0500 +@@ -8,7 +8,7 @@ + lsbindir=@lsbindir@ + + includedir=${prefix}/include +-mandir=${prefix}/man ++mandir=@mandir@ + libdir=${exec_prefix}/lib + bindir=${exec_prefix}/bin + +diff -Naur zephyr.orig/clients/zaway/Makefile.in zephyr.patched-15/clients/zaway/Makefile.in +--- zephyr.orig/clients/zaway/Makefile.in 1998-02-02 17:35:34.000000000 -0500 ++++ zephyr.patched-15/clients/zaway/Makefile.in 2006-02-16 03:51:36.000000000 -0500 +@@ -8,7 +8,7 @@ + lsbindir=@lsbindir@ + + includedir=${prefix}/include +-mandir=${prefix}/man ++mandir=@mandir@ + libdir=${exec_prefix}/lib + bindir=${exec_prefix}/bin + +diff -Naur zephyr.orig/clients/zctl/Makefile.in zephyr.patched-15/clients/zctl/Makefile.in +--- zephyr.orig/clients/zctl/Makefile.in 1999-05-06 18:02:04.000000000 -0400 ++++ zephyr.patched-15/clients/zctl/Makefile.in 2006-02-16 03:51:36.000000000 -0500 +@@ -8,7 +8,7 @@ + lsbindir=@lsbindir@ + + includedir=${prefix}/include +-mandir=${prefix}/man ++mandir=@mandir@ + libdir=${exec_prefix}/lib + bindir=${exec_prefix}/bin + +diff -Naur zephyr.orig/clients/zleave/Makefile.in zephyr.patched-15/clients/zleave/Makefile.in +--- zephyr.orig/clients/zleave/Makefile.in 1998-02-02 17:35:39.000000000 -0500 ++++ zephyr.patched-15/clients/zleave/Makefile.in 2006-02-16 03:51:36.000000000 -0500 +@@ -8,7 +8,7 @@ + lsbindir=@lsbindir@ + + includedir=${prefix}/include +-mandir=${prefix}/man ++mandir=@mandir@ + libdir=${exec_prefix}/lib + bindir=${exec_prefix}/bin + +diff -Naur zephyr.orig/clients/zlocate/Makefile.in zephyr.patched-15/clients/zlocate/Makefile.in +--- zephyr.orig/clients/zlocate/Makefile.in 1998-02-02 17:35:42.000000000 -0500 ++++ zephyr.patched-15/clients/zlocate/Makefile.in 2006-02-16 03:51:36.000000000 -0500 +@@ -8,7 +8,7 @@ + lsbindir=@lsbindir@ + + includedir=${prefix}/include +-mandir=${prefix}/man ++mandir=@mandir@ + libdir=${exec_prefix}/lib + bindir=${exec_prefix}/bin + +diff -Naur zephyr.orig/clients/zmailnotify/Makefile.in zephyr.patched-15/clients/zmailnotify/Makefile.in +--- zephyr.orig/clients/zmailnotify/Makefile.in 1998-02-02 17:35:46.000000000 -0500 ++++ zephyr.patched-15/clients/zmailnotify/Makefile.in 2006-02-16 03:51:36.000000000 -0500 +@@ -8,7 +8,7 @@ + lsbindir=@lsbindir@ + + includedir=${prefix}/include +-mandir=${prefix}/man ++mandir=@mandir@ + libdir=${exec_prefix}/lib + bindir=${exec_prefix}/bin + +diff -Naur zephyr.orig/clients/znol/Makefile.in zephyr.patched-15/clients/znol/Makefile.in +--- zephyr.orig/clients/znol/Makefile.in 1998-02-02 17:35:49.000000000 -0500 ++++ zephyr.patched-15/clients/znol/Makefile.in 2006-02-16 03:51:36.000000000 -0500 +@@ -8,7 +8,7 @@ + lsbindir=@lsbindir@ + + includedir=${prefix}/include +-mandir=${prefix}/man ++mandir=@mandir@ + libdir=${exec_prefix}/lib + bindir=${exec_prefix}/bin + +diff -Naur zephyr.orig/clients/zpopnotify/Makefile.in zephyr.patched-15/clients/zpopnotify/Makefile.in +--- zephyr.orig/clients/zpopnotify/Makefile.in 1998-02-02 17:35:51.000000000 -0500 ++++ zephyr.patched-15/clients/zpopnotify/Makefile.in 2006-02-16 03:51:36.000000000 -0500 +@@ -8,7 +8,7 @@ + lsbindir=@lsbindir@ + + includedir=${prefix}/include +-mandir=${prefix}/man ++mandir=@mandir@ + libdir=${exec_prefix}/lib + bindir=${exec_prefix}/bin + +diff -Naur zephyr.orig/clients/zshutdown_notify/Makefile.in zephyr.patched-15/clients/zshutdown_notify/Makefile.in +--- zephyr.orig/clients/zshutdown_notify/Makefile.in 1998-02-02 17:35:54.000000000 -0500 ++++ zephyr.patched-15/clients/zshutdown_notify/Makefile.in 2006-02-16 03:51:36.000000000 -0500 +@@ -8,7 +8,7 @@ + lsbindir=@lsbindir@ + + includedir=${prefix}/include +-mandir=${prefix}/man ++mandir=@mandir@ + libdir=${exec_prefix}/lib + bindir=${exec_prefix}/bin + +diff -Naur zephyr.orig/clients/zstat/Makefile.in zephyr.patched-15/clients/zstat/Makefile.in +--- zephyr.orig/clients/zstat/Makefile.in 1998-02-02 17:35:56.000000000 -0500 ++++ zephyr.patched-15/clients/zstat/Makefile.in 2006-02-16 03:51:36.000000000 -0500 +@@ -8,7 +8,7 @@ + lsbindir=@lsbindir@ + + includedir=${prefix}/include +-mandir=${prefix}/man ++mandir=@mandir@ + libdir=${exec_prefix}/lib + bindir=${exec_prefix}/bin + +diff -Naur zephyr.orig/clients/zwrite/Makefile.in zephyr.patched-15/clients/zwrite/Makefile.in +--- zephyr.orig/clients/zwrite/Makefile.in 1998-02-02 17:35:58.000000000 -0500 ++++ zephyr.patched-15/clients/zwrite/Makefile.in 2006-02-16 03:51:36.000000000 -0500 +@@ -8,7 +8,7 @@ + lsbindir=@lsbindir@ + + includedir=${prefix}/include +-mandir=${prefix}/man ++mandir=@mandir@ + libdir=${exec_prefix}/lib + bindir=${exec_prefix}/bin + +diff -Naur zephyr.orig/config.guess zephyr.patched-15/config.guess +--- zephyr.orig/config.guess 2001-05-18 16:41:37.000000000 -0400 ++++ zephyr.patched-15/config.guess 2006-02-16 03:51:37.000000000 -0500 +@@ -1,7 +1,10 @@ + #! /bin/sh + # Attempt to guess a canonical system name. +-# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. +-# ++# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ++# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ++ ++timestamp='2005-03-24' ++ + # This file is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2 of the License, or +@@ -21,128 +24,314 @@ + # configuration script generated by Autoconf, you may include it under + # the same distribution terms that you use for the rest of that program. + +-# Written by Per Bothner . +-# The master version of this file is at the FSF in /home/gd/gnu/lib. ++# Originally written by Per Bothner . ++# Please send patches to . Submit a context ++# diff and a properly formatted ChangeLog entry. + # + # This script attempts to guess a canonical system name similar to + # config.sub. If it succeeds, it prints the system name on stdout, and + # exits with 0. Otherwise, it exits with 1. + # + # The plan is that this can be called by configure scripts if you +-# don't specify an explicit system type (host/target name). +-# +-# Only a few systems have been added to this list; please add others +-# (but try to keep the structure clean). +-# ++# don't specify an explicit build system type. ++ ++me=`echo "$0" | sed -e 's,.*/,,'` ++ ++usage="\ ++Usage: $0 [OPTION] ++ ++Output the configuration name of the system \`$me' is run on. ++ ++Operation modes: ++ -h, --help print this help, then exit ++ -t, --time-stamp print date of last modification, then exit ++ -v, --version print version number, then exit ++ ++Report bugs and patches to ." ++ ++version="\ ++GNU config.guess ($timestamp) ++ ++Originally written by Per Bothner. ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 ++Free Software Foundation, Inc. ++ ++This is free software; see the source for copying conditions. There is NO ++warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." ++ ++help=" ++Try \`$me --help' for more information." ++ ++# Parse command line ++while test $# -gt 0 ; do ++ case $1 in ++ --time-stamp | --time* | -t ) ++ echo "$timestamp" ; exit 0 ;; ++ --version | -v ) ++ echo "$version" ; exit 0 ;; ++ --help | --h* | -h ) ++ echo "$usage"; exit 0 ;; ++ -- ) # Stop option processing ++ shift; break ;; ++ - ) # Use stdin as input. ++ break ;; ++ -* ) ++ echo "$me: invalid option $1$help" >&2 ++ exit 1 ;; ++ * ) ++ break ;; ++ esac ++done ++ ++if test $# != 0; then ++ echo "$me: too many arguments$help" >&2 ++ exit 1 ++fi ++ ++trap 'exit 1' 1 2 15 ++ ++# CC_FOR_BUILD -- compiler used by this script. Note that the use of a ++# compiler to aid in system detection is discouraged as it requires ++# temporary files to be created and, as you can see below, it is a ++# headache to deal with in a portable fashion. ++ ++# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still ++# use `HOST_CC' if defined, but it is deprecated. ++ ++# Portable tmp directory creation inspired by the Autoconf team. ++ ++set_cc_for_build=' ++trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; ++trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; ++: ${TMPDIR=/tmp} ; ++ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || ++ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || ++ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || ++ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; ++dummy=$tmp/dummy ; ++tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; ++case $CC_FOR_BUILD,$HOST_CC,$CC in ++ ,,) echo "int x;" > $dummy.c ; ++ for c in cc gcc c89 c99 ; do ++ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then ++ CC_FOR_BUILD="$c"; break ; ++ fi ; ++ done ; ++ if test x"$CC_FOR_BUILD" = x ; then ++ CC_FOR_BUILD=no_compiler_found ; ++ fi ++ ;; ++ ,,*) CC_FOR_BUILD=$CC ;; ++ ,*,*) CC_FOR_BUILD=$HOST_CC ;; ++esac ;' + + # This is needed to find uname on a Pyramid OSx when run in the BSD universe. +-# (ghazi@noc.rutgers.edu 8/24/94.) ++# (ghazi@noc.rutgers.edu 1994-08-24) + if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH + fi + + UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown + UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown ++UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown + UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +-trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 +- + # Note: order is significant - the case branches are not exclusive. + + case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ++ *:NetBSD:*:*) ++ # NetBSD (nbsd) targets should (where applicable) match one or ++ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, ++ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently ++ # switched to ELF, *-*-netbsd* would select the old ++ # object file format. This provides both forward ++ # compatibility and a consistent mechanism for selecting the ++ # object file format. ++ # ++ # Note: NetBSD doesn't particularly care about the vendor ++ # portion of the name. We always set it to "unknown". ++ sysctl="sysctl -n hw.machine_arch" ++ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ ++ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` ++ case "${UNAME_MACHINE_ARCH}" in ++ armeb) machine=armeb-unknown ;; ++ arm*) machine=arm-unknown ;; ++ sh3el) machine=shl-unknown ;; ++ sh3eb) machine=sh-unknown ;; ++ *) machine=${UNAME_MACHINE_ARCH}-unknown ;; ++ esac ++ # The Operating System including object format, if it has switched ++ # to ELF recently, or will in the future. ++ case "${UNAME_MACHINE_ARCH}" in ++ arm*|i386|m68k|ns32k|sh3*|sparc|vax) ++ eval $set_cc_for_build ++ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ ++ | grep __ELF__ >/dev/null ++ then ++ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). ++ # Return netbsd for either. FIX? ++ os=netbsd ++ else ++ os=netbsdelf ++ fi ++ ;; ++ *) ++ os=netbsd ++ ;; ++ esac ++ # The OS release ++ # Debian GNU/NetBSD machines have a different userland, and ++ # thus, need a distinct triplet. However, they do not need ++ # kernel version information, so it can be replaced with a ++ # suitable tag, in the style of linux-gnu. ++ case "${UNAME_VERSION}" in ++ Debian*) ++ release='-gnu' ++ ;; ++ *) ++ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ++ ;; ++ esac ++ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: ++ # contains redundant information, the shorter form: ++ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. ++ echo "${machine}-${os}${release}" ++ exit 0 ;; ++ amd64:OpenBSD:*:*) ++ echo x86_64-unknown-openbsd${UNAME_RELEASE} ++ exit 0 ;; ++ amiga:OpenBSD:*:*) ++ echo m68k-unknown-openbsd${UNAME_RELEASE} ++ exit 0 ;; ++ cats:OpenBSD:*:*) ++ echo arm-unknown-openbsd${UNAME_RELEASE} ++ exit 0 ;; ++ hp300:OpenBSD:*:*) ++ echo m68k-unknown-openbsd${UNAME_RELEASE} ++ exit 0 ;; ++ luna88k:OpenBSD:*:*) ++ echo m88k-unknown-openbsd${UNAME_RELEASE} ++ exit 0 ;; ++ mac68k:OpenBSD:*:*) ++ echo m68k-unknown-openbsd${UNAME_RELEASE} ++ exit 0 ;; ++ macppc:OpenBSD:*:*) ++ echo powerpc-unknown-openbsd${UNAME_RELEASE} ++ exit 0 ;; ++ mvme68k:OpenBSD:*:*) ++ echo m68k-unknown-openbsd${UNAME_RELEASE} ++ exit 0 ;; ++ mvme88k:OpenBSD:*:*) ++ echo m88k-unknown-openbsd${UNAME_RELEASE} ++ exit 0 ;; ++ mvmeppc:OpenBSD:*:*) ++ echo powerpc-unknown-openbsd${UNAME_RELEASE} ++ exit 0 ;; ++ sgi:OpenBSD:*:*) ++ echo mips64-unknown-openbsd${UNAME_RELEASE} ++ exit 0 ;; ++ sun3:OpenBSD:*:*) ++ echo m68k-unknown-openbsd${UNAME_RELEASE} ++ exit 0 ;; ++ *:OpenBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} ++ exit 0 ;; ++ *:ekkoBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} ++ exit 0 ;; ++ macppc:MirBSD:*:*) ++ echo powerppc-unknown-mirbsd${UNAME_RELEASE} ++ exit 0 ;; ++ *:MirBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} ++ exit 0 ;; + alpha:OSF1:*:*) +- if test $UNAME_RELEASE = "V4.0"; then ++ case $UNAME_RELEASE in ++ *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` +- fi ++ ;; ++ *5.*) ++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ++ ;; ++ esac ++ # According to Compaq, /usr/sbin/psrinfo has been available on ++ # OSF/1 and Tru64 systems produced since 1995. I hope that ++ # covers most systems running today. This code pipes the CPU ++ # types through head -n 1, so we only detect the type of CPU 0. ++ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` ++ case "$ALPHA_CPU_TYPE" in ++ "EV4 (21064)") ++ UNAME_MACHINE="alpha" ;; ++ "EV4.5 (21064)") ++ UNAME_MACHINE="alpha" ;; ++ "LCA4 (21066/21068)") ++ UNAME_MACHINE="alpha" ;; ++ "EV5 (21164)") ++ UNAME_MACHINE="alphaev5" ;; ++ "EV5.6 (21164A)") ++ UNAME_MACHINE="alphaev56" ;; ++ "EV5.6 (21164PC)") ++ UNAME_MACHINE="alphapca56" ;; ++ "EV5.7 (21164PC)") ++ UNAME_MACHINE="alphapca57" ;; ++ "EV6 (21264)") ++ UNAME_MACHINE="alphaev6" ;; ++ "EV6.7 (21264A)") ++ UNAME_MACHINE="alphaev67" ;; ++ "EV6.8CB (21264C)") ++ UNAME_MACHINE="alphaev68" ;; ++ "EV6.8AL (21264B)") ++ UNAME_MACHINE="alphaev68" ;; ++ "EV6.8CX (21264D)") ++ UNAME_MACHINE="alphaev68" ;; ++ "EV6.9A (21264/EV69A)") ++ UNAME_MACHINE="alphaev69" ;; ++ "EV7 (21364)") ++ UNAME_MACHINE="alphaev7" ;; ++ "EV7.9 (21364A)") ++ UNAME_MACHINE="alphaev79" ;; ++ esac ++ # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. +- cat <dummy.s +- .globl main +- .ent main +-main: +- .frame \$30,0,\$26,0 +- .prologue 0 +- .long 0x47e03d80 # implver $0 +- lda \$2,259 +- .long 0x47e20c21 # amask $2,$1 +- srl \$1,8,\$2 +- sll \$2,2,\$2 +- sll \$0,3,\$0 +- addl \$1,\$0,\$0 +- addl \$2,\$0,\$0 +- ret \$31,(\$26),1 +- .end main +-EOF +- ${CC-cc} dummy.s -o dummy 2>/dev/null +- if test "$?" = 0 ; then +- ./dummy +- case "$?" in +- 7) +- UNAME_MACHINE="alpha" +- ;; +- 15) +- UNAME_MACHINE="alphaev5" +- ;; +- 14) +- UNAME_MACHINE="alphaev56" +- ;; +- 10) +- UNAME_MACHINE="alphapca56" +- ;; +- 16) +- UNAME_MACHINE="alphaev6" +- ;; +- esac +- fi +- rm -f dummy.s dummy +- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` ++ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` ++ exit 0 ;; ++ Alpha\ *:Windows_NT*:*) ++ # How do we know it's Interix rather than the generic POSIX subsystem? ++ # Should we change UNAME_MACHINE based on the output of uname instead ++ # of the specific Alpha model? ++ echo alpha-pc-interix + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) +- echo m68k-cbm-sysv4 ++ echo m68k-unknown-sysv4 + exit 0;; +- amiga:NetBSD:*:*) +- echo m68k-cbm-netbsd${UNAME_RELEASE} +- exit 0 ;; +- amiga:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; +- arc64:OpenBSD:*:*) +- echo mips64el-unknown-openbsd${UNAME_RELEASE} ++ *:[Mm]orph[Oo][Ss]:*:*) ++ echo ${UNAME_MACHINE}-unknown-morphos + exit 0 ;; +- arc:OpenBSD:*:*) +- echo mipsel-unknown-openbsd${UNAME_RELEASE} ++ *:OS/390:*:*) ++ echo i370-ibm-openedition + exit 0 ;; +- hkmips:OpenBSD:*:*) +- echo mips-unknown-openbsd${UNAME_RELEASE} ++ *:z/VM:*:*) ++ echo s390-ibm-zvmoe + exit 0 ;; +- pmax:OpenBSD:*:*) +- echo mipsel-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- sgi:OpenBSD:*:*) +- echo mips-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- wgrisc:OpenBSD:*:*) +- echo mipsel-unknown-openbsd${UNAME_RELEASE} ++ *:OS400:*:*) ++ echo powerpc-ibm-os400 + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; +- arm32:NetBSD:*:*) +- echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` +- exit 0 ;; +- SR2?01:HI-UX/MPP:*:*) ++ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; +- Pyramid*:OSx*:*:*|MIS*:OSx*:*:*|MIS*:SMP_DC-OSx*:*:*) ++ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 +@@ -150,9 +339,16 @@ + echo pyramid-pyramid-bsd + fi + exit 0 ;; +- NILE:*:*:dcosx) ++ NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; ++ DRS?6000:unix:4.0:6*) ++ echo sparc-icl-nx6 ++ exit 0 ;; ++ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) ++ case `/usr/bin/uname -p` in ++ sparc) echo sparc-icl-nx7 && exit 0 ;; ++ esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; +@@ -181,7 +377,7 @@ + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) +- UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` ++ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) +@@ -195,36 +391,38 @@ + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; +- atari*:NetBSD:*:*) +- echo m68k-atari-netbsd${UNAME_RELEASE} ++ # The situation for MiNT is a little confusing. The machine name ++ # can be virtually everything (everything which is not ++ # "atarist" or "atariste" at least should have a processor ++ # > m68000). The system name ranges from "MiNT" over "FreeMiNT" ++ # to the lowercase version "mint" (or "freemint"). Finally ++ # the system name "TOS" denotes a system which is actually not ++ # MiNT. But MiNT is downward compatible to TOS, so this should ++ # be no problem. ++ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) ++ echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; +- atari*:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- sun3*:NetBSD:*:*) +- echo m68k-sun-netbsd${UNAME_RELEASE} +- exit 0 ;; +- sun3*:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mac68k:NetBSD:*:*) +- echo m68k-apple-netbsd${UNAME_RELEASE} +- exit 0 ;; +- mac68k:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvme68k:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} ++ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) ++ echo m68k-atari-mint${UNAME_RELEASE} ++ exit 0 ;; ++ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) ++ echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; +- mvme88k:OpenBSD:*:*) +- echo m88k-unknown-openbsd${UNAME_RELEASE} ++ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) ++ echo m68k-milan-mint${UNAME_RELEASE} ++ exit 0 ;; ++ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) ++ echo m68k-hades-mint${UNAME_RELEASE} ++ exit 0 ;; ++ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) ++ echo m68k-unknown-mint${UNAME_RELEASE} ++ exit 0 ;; ++ m68k:machten:*:*) ++ echo m68k-apple-machten${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; +- macppc:NetBSD:*:*) +- echo powerpc-apple-netbsd${UNAME_RELEASE} +- exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; +@@ -234,12 +432,18 @@ + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; +- 2020:CLIX:*:*) ++ 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) +- sed 's/^ //' << EOF >dummy.c +- int main (argc, argv) int argc; char **argv; { ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c ++#ifdef __cplusplus ++#include /* for printf() prototype */ ++ int main (int argc, char *argv[]) { ++#else ++ int main (argc, argv) int argc; char *argv[]; { ++#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); +@@ -254,12 +458,20 @@ + exit (-1); + } + EOF +- ${CC-cc} dummy.c -o dummy \ +- && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ +- && rm dummy.c dummy && exit 0 +- rm -f dummy.c dummy ++ $CC_FOR_BUILD -o $dummy $dummy.c \ ++ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ ++ && exit 0 + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; ++ Motorola:PowerMAX_OS:*:*) ++ echo powerpc-motorola-powermax ++ exit 0 ;; ++ Motorola:*:4.3:PL8-*) ++ echo powerpc-harris-powermax ++ exit 0 ;; ++ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) ++ echo powerpc-harris-powermax ++ exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; +@@ -275,15 +487,18 @@ + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` +- if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then +- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ +- -o ${TARGET_BINARY_INTERFACE}x = x ] ; then ++ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] ++ then ++ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ ++ [ ${TARGET_BINARY_INTERFACE}x = x ] ++ then + echo m88k-dg-dgux${UNAME_RELEASE} +- else ++ else + echo m88k-dg-dguxbcs${UNAME_RELEASE} ++ fi ++ else ++ echo i586-dg-dgux${UNAME_RELEASE} + fi +- else echo i586-dg-dgux${UNAME_RELEASE} +- fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 +@@ -304,12 +519,21 @@ + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' +- i?86:AIX:*:*) ++ i*86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; ++ ia64:AIX:*:*) ++ if [ -x /usr/bin/oslevel ] ; then ++ IBM_REV=`/usr/bin/oslevel` ++ else ++ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} ++ fi ++ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} ++ exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then +- sed 's/^ //' << EOF >dummy.c ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c + #include + + main() +@@ -320,8 +544,7 @@ + exit(0); + } + EOF +- ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 +- rm -f dummy.c dummy ++ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 +@@ -329,9 +552,9 @@ + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; +- *:AIX:*:4) +- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` +- if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then ++ *:AIX:*:[45]) ++ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` ++ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc +@@ -339,7 +562,7 @@ + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else +- IBM_REV=4.${UNAME_RELEASE} ++ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; +@@ -349,7 +572,7 @@ + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; +- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and ++ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) +@@ -365,28 +588,47 @@ + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) ++ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; +- 9000/6?? | 9000/7?? | 9000/80[24] | 9000/8?[13679] | 9000/892 ) +- sed 's/^ //' << EOF >dummy.c ++ 9000/[678][0-9][0-9]) ++ if [ -x /usr/bin/getconf ]; then ++ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` ++ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` ++ case "${sc_cpu_version}" in ++ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 ++ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 ++ 532) # CPU_PA_RISC2_0 ++ case "${sc_kernel_bits}" in ++ 32) HP_ARCH="hppa2.0n" ;; ++ 64) HP_ARCH="hppa2.0w" ;; ++ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 ++ esac ;; ++ esac ++ fi ++ if [ "${HP_ARCH}" = "" ]; then ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c ++ ++ #define _HPUX_SOURCE + #include + #include +- ++ + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); +- #endif ++ #endif + long cpu = sysconf (_SC_CPU_VERSION); +- +- switch (cpu) ++ ++ switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; +- case CPU_PA_RISC2_0: ++ case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) +- switch (bits) ++ switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; +@@ -394,20 +636,36 @@ + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; +- #endif ++ #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } + EOF +- (${CC-cc} dummy.c -o dummy 2>/dev/null ) && HP_ARCH=`./dummy` +- rm -f dummy.c dummy ++ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` ++ test -z "$HP_ARCH" && HP_ARCH=hppa ++ fi ;; + esac +- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` ++ if [ ${HP_ARCH} = "hppa2.0w" ] ++ then ++ # avoid double evaluation of $set_cc_for_build ++ test -n "$CC_FOR_BUILD" || eval $set_cc_for_build ++ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null ++ then ++ HP_ARCH="hppa2.0w" ++ else ++ HP_ARCH="hppa64" ++ fi ++ fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; ++ ia64:HP-UX:*:*) ++ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` ++ echo ia64-hp-hpux${HPUX_REV} ++ exit 0 ;; + 3050*:HI-UX:*:*) +- sed 's/^ //' << EOF >dummy.c ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c + #include + int + main () +@@ -432,8 +690,7 @@ + exit (0); + } + EOF +- ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 +- rm -f dummy.c dummy ++ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) +@@ -442,13 +699,16 @@ + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; ++ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) ++ echo hppa1.0-hp-mpeix ++ exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; +- i?86:OSF1:*:*) ++ i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else +@@ -476,58 +736,77 @@ + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; +- CRAY*X-MP:*:*:*) +- echo xmp-cray-unicos +- exit 0 ;; + CRAY*Y-MP:*:*:*) +- echo ymp-cray-unicos${UNAME_RELEASE} ++ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ +- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ ++ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ ++ -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*TS:*:*:*) +- echo t90-cray-unicos${UNAME_RELEASE} ++ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; +- CRAY-2:*:*:*) +- echo cray2-cray-unicos +- exit 0 ;; +- F300:UNIX_System_V:*:*) +- FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` ++ CRAY*T3E:*:*:*) ++ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' ++ exit 0 ;; ++ CRAY*SV1:*:*:*) ++ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' ++ exit 0 ;; ++ *:UNICOS/mp:*:*) ++ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' ++ exit 0 ;; ++ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) ++ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` ++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` +- echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" ++ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; +- F301:UNIX_System_V:*:*) +- echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` +- exit 0 ;; +- hp3[0-9][05]:NetBSD:*:*) +- echo m68k-hp-netbsd${UNAME_RELEASE} ++ 5000:UNIX_System_V:4.*:*) ++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` ++ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` ++ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; +- hp300:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} ++ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) ++ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; +- i?86:BSD/386:*:* | *:BSD/OS:*:*) +- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} ++ *:BSD/OS:*:*) ++ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; +- *:NetBSD:*:*) +- echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` +- exit 0 ;; +- *:OpenBSD:*:*) +- echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` +- exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; ++ i*:PW*:*) ++ echo ${UNAME_MACHINE}-pc-pw32 ++ exit 0 ;; ++ x86:Interix*:[34]*) ++ echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' ++ exit 0 ;; ++ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) ++ echo i${UNAME_MACHINE}-pc-mks ++ exit 0 ;; ++ i*:Windows_NT*:* | Pentium*:Windows_NT*:*) ++ # How do we know it's Interix rather than the generic POSIX subsystem? ++ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we ++ # UNAME_MACHINE based on the output of uname instead of i386? ++ echo i586-pc-interix ++ exit 0 ;; ++ i*:UWIN*:*) ++ echo ${UNAME_MACHINE}-pc-uwin ++ exit 0 ;; ++ amd64:CYGWIN*:*:*) ++ echo x86_64-unknown-cygwin ++ exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; +@@ -535,147 +814,184 @@ + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) ++ # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; +- *:Linux:*:*) +- # uname on the ARM produces all sorts of strangeness, and we need to +- # filter it out. +- case "$UNAME_MACHINE" in +- arm* | sa110*) UNAME_MACHINE="arm" ;; ++ *:GNU/*:*:*) ++ # other systems with GNU libc and userland ++ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu ++ exit 0 ;; ++ i*86:Minix:*:*) ++ echo ${UNAME_MACHINE}-pc-minix ++ exit 0 ;; ++ arm*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit 0 ;; ++ cris:Linux:*:*) ++ echo cris-axis-linux-gnu ++ exit 0 ;; ++ crisv32:Linux:*:*) ++ echo crisv32-axis-linux-gnu ++ exit 0 ;; ++ frv:Linux:*:*) ++ echo frv-unknown-linux-gnu ++ exit 0 ;; ++ ia64:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit 0 ;; ++ m32r*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit 0 ;; ++ m68*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit 0 ;; ++ mips:Linux:*:*) ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c ++ #undef CPU ++ #undef mips ++ #undef mipsel ++ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) ++ CPU=mipsel ++ #else ++ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) ++ CPU=mips ++ #else ++ CPU= ++ #endif ++ #endif ++EOF ++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` ++ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ++ ;; ++ mips64:Linux:*:*) ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c ++ #undef CPU ++ #undef mips64 ++ #undef mips64el ++ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) ++ CPU=mips64el ++ #else ++ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) ++ CPU=mips64 ++ #else ++ CPU= ++ #endif ++ #endif ++EOF ++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` ++ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ++ ;; ++ ppc:Linux:*:*) ++ echo powerpc-unknown-linux-gnu ++ exit 0 ;; ++ ppc64:Linux:*:*) ++ echo powerpc64-unknown-linux-gnu ++ exit 0 ;; ++ alpha:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ EV5) UNAME_MACHINE=alphaev5 ;; ++ EV56) UNAME_MACHINE=alphaev56 ;; ++ PCA56) UNAME_MACHINE=alphapca56 ;; ++ PCA57) UNAME_MACHINE=alphapca56 ;; ++ EV6) UNAME_MACHINE=alphaev6 ;; ++ EV67) UNAME_MACHINE=alphaev67 ;; ++ EV68*) UNAME_MACHINE=alphaev68 ;; ++ esac ++ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null ++ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi ++ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ++ exit 0 ;; ++ parisc:Linux:*:* | hppa:Linux:*:*) ++ # Look for CPU level ++ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in ++ PA7*) echo hppa1.1-unknown-linux-gnu ;; ++ PA8*) echo hppa2.0-unknown-linux-gnu ;; ++ *) echo hppa-unknown-linux-gnu ;; + esac +- ++ exit 0 ;; ++ parisc64:Linux:*:* | hppa64:Linux:*:*) ++ echo hppa64-unknown-linux-gnu ++ exit 0 ;; ++ s390:Linux:*:* | s390x:Linux:*:*) ++ echo ${UNAME_MACHINE}-ibm-linux ++ exit 0 ;; ++ sh64*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit 0 ;; ++ sh*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit 0 ;; ++ sparc:Linux:*:* | sparc64:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit 0 ;; ++ x86_64:Linux:*:*) ++ echo x86_64-unknown-linux-gnu ++ exit 0 ;; ++ i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so +- # first see if it will tell us. +- ld_help_string=`ld --help 2>&1` +- ld_supported_emulations=`echo $ld_help_string \ +- | sed -ne '/supported emulations:/!d ++ # first see if it will tell us. cd to the root directory to prevent ++ # problems with other programs or directories called `ld' in the path. ++ # Set LC_ALL=C to ensure ld outputs messages in English. ++ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ ++ | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g +- s/.*supported emulations: *// ++ s/.*supported targets: *// + s/ .*// + p'` +- case "$ld_supported_emulations" in +- i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; +- i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; +- sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; +- armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; +- m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; +- elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; +- esac +- +- if test "${UNAME_MACHINE}" = "alpha" ; then +- sed 's/^ //' <dummy.s +- .globl main +- .ent main +- main: +- .frame \$30,0,\$26,0 +- .prologue 0 +- .long 0x47e03d80 # implver $0 +- lda \$2,259 +- .long 0x47e20c21 # amask $2,$1 +- srl \$1,8,\$2 +- sll \$2,2,\$2 +- sll \$0,3,\$0 +- addl \$1,\$0,\$0 +- addl \$2,\$0,\$0 +- ret \$31,(\$26),1 +- .end main +-EOF +- LIBC="" +- ${CC-cc} dummy.s -o dummy 2>/dev/null +- if test "$?" = 0 ; then +- ./dummy +- case "$?" in +- 7) +- UNAME_MACHINE="alpha" +- ;; +- 15) +- UNAME_MACHINE="alphaev5" +- ;; +- 14) +- UNAME_MACHINE="alphaev56" +- ;; +- 10) +- UNAME_MACHINE="alphapca56" +- ;; +- 16) +- UNAME_MACHINE="alphaev6" +- ;; +- esac +- +- objdump --private-headers dummy | \ +- grep ld.so.1 > /dev/null +- if test "$?" = 0 ; then +- LIBC="libc1" +- fi +- fi +- rm -f dummy.s dummy +- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 +- elif test "${UNAME_MACHINE}" = "mips" ; then +- cat >dummy.c </dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 +- rm -f dummy.c dummy +- else +- # Either a pre-BFD a.out linker (linux-gnuoldld) +- # or one that does not give us useful --help. +- # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. +- # If ld does not provide *any* "supported emulations:" +- # that means it is gnuoldld. +- echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" +- test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 +- +- case "${UNAME_MACHINE}" in +- i?86) +- VENDOR=pc; +- ;; +- *) +- VENDOR=unknown; +- ;; +- esac +- # Determine whether the default compiler is a.out or elf +- cat >dummy.c < +-main(argc, argv) +- int argc; +- char *argv[]; +-{ +-#ifdef __ELF__ +-# ifdef __GLIBC__ +-# if __GLIBC__ >= 2 +- printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); +-# else +- printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +-# endif +-# else +- printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +-# endif +-#else +- printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); +-#endif +- return 0; +-} ++ case "$ld_supported_targets" in ++ elf32-i386) ++ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ++ ;; ++ a.out-i386-linux) ++ echo "${UNAME_MACHINE}-pc-linux-gnuaout" ++ exit 0 ;; ++ coff-i386) ++ echo "${UNAME_MACHINE}-pc-linux-gnucoff" ++ exit 0 ;; ++ "") ++ # Either a pre-BFD a.out linker (linux-gnuoldld) or ++ # one that does not give us useful --help. ++ echo "${UNAME_MACHINE}-pc-linux-gnuoldld" ++ exit 0 ;; ++ esac ++ # Determine whether the default compiler is a.out or elf ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c ++ #include ++ #ifdef __ELF__ ++ # ifdef __GLIBC__ ++ # if __GLIBC__ >= 2 ++ LIBC=gnu ++ # else ++ LIBC=gnulibc1 ++ # endif ++ # else ++ LIBC=gnulibc1 ++ # endif ++ #else ++ #ifdef __INTEL_COMPILER ++ LIBC=gnu ++ #else ++ LIBC=gnuaout ++ #endif ++ #endif ++ #ifdef __dietlibc__ ++ LIBC=dietlibc ++ #endif + EOF +- ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 +- rm -f dummy.c dummy +- fi ;; +-# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions +-# are messed up and put the nodename in both sysname and nodename. +- i?86:DYNIX/ptx:4*:*) ++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` ++ test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 ++ test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ++ ;; ++ i*86:DYNIX/ptx:4*:*) ++ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. ++ # earlier versions are messed up and put the nodename in both ++ # sysname and nodename. + echo i386-sequent-sysv4 + exit 0 ;; +- i?86:UNIX_SV:4.2MP:2.*) ++ i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, +@@ -683,35 +999,62 @@ + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; +- i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) ++ i*86:OS/2:*:*) ++ # If we were able to find `uname', then EMX Unix compatibility ++ # is probably installed. ++ echo ${UNAME_MACHINE}-pc-os2-emx ++ exit 0 ;; ++ i*86:XTS-300:*:STOP) ++ echo ${UNAME_MACHINE}-unknown-stop ++ exit 0 ;; ++ i*86:atheos:*:*) ++ echo ${UNAME_MACHINE}-unknown-atheos ++ exit 0 ;; ++ i*86:syllable:*:*) ++ echo ${UNAME_MACHINE}-pc-syllable ++ exit 0 ;; ++ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) ++ echo i386-unknown-lynxos${UNAME_RELEASE} ++ exit 0 ;; ++ i*86:*DOS:*:*) ++ echo ${UNAME_MACHINE}-pc-msdosdjgpp ++ exit 0 ;; ++ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) ++ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then +- echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} ++ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else +- echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} ++ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit 0 ;; +- i?86:*:3.2:*) ++ i*86:*:5:[78]*) ++ case `/bin/uname -X | grep "^Machine"` in ++ *486*) UNAME_MACHINE=i486 ;; ++ *Pentium) UNAME_MACHINE=i586 ;; ++ *Pent*|*Celeron) UNAME_MACHINE=i686 ;; ++ esac ++ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} ++ exit 0 ;; ++ i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then +- UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` +- (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 +- (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ ++ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` ++ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 ++ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 ++ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ ++ && UNAME_MACHINE=i686 ++ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ ++ && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; +- i?86:UnixWare:*:*) +- if /bin/uname -X 2>/dev/null >/dev/null ; then +- (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ +- && UNAME_MACHINE=i586 +- fi +- echo ${UNAME_MACHINE}-unixware-${UNAME_RELEASE}-${UNAME_VERSION} +- exit 0 ;; + pc:*:*:*) ++ # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp +@@ -733,9 +1076,15 @@ + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; +- M68*:*:R3V[567]*:*) ++ mc68k:UNIX:SYSTEM5:3.51m) ++ echo m68k-convergent-sysv ++ exit 0 ;; ++ M680?0:D-NIX:5.3:*) ++ echo m68k-diab-dnix ++ exit 0 ;; ++ M68*:*:R3V[5678]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; +- 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) ++ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` +@@ -746,24 +1095,27 @@ + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; +- m68*:LynxOS:2.*:*) ++ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; +- i?86:LynxOS:2.*:*) +- echo i386-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; +- rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) ++ rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; ++ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) ++ echo powerpc-unknown-lynxos${UNAME_RELEASE} ++ exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; ++ RM*:ReliantUNIX-*:*:*) ++ echo mips-sni-sysv4 ++ exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; +@@ -775,8 +1127,8 @@ + echo ns32k-sni-sysv + fi + exit 0 ;; +- PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort +- # says ++ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort ++ # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) +@@ -788,13 +1140,17 @@ + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; ++ *:VOS:*:*) ++ # From Paul.Green@stratus.com. ++ echo hppa1.1-stratus-vos ++ exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; +- news*:NEWS-OS:*:6*) ++ news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit 0 ;; +- R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*) ++ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else +@@ -810,12 +1166,107 @@ + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; ++ SX-4:SUPER-UX:*:*) ++ echo sx4-nec-superux${UNAME_RELEASE} ++ exit 0 ;; ++ SX-5:SUPER-UX:*:*) ++ echo sx5-nec-superux${UNAME_RELEASE} ++ exit 0 ;; ++ SX-6:SUPER-UX:*:*) ++ echo sx6-nec-superux${UNAME_RELEASE} ++ exit 0 ;; ++ Power*:Rhapsody:*:*) ++ echo powerpc-apple-rhapsody${UNAME_RELEASE} ++ exit 0 ;; ++ *:Rhapsody:*:*) ++ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} ++ exit 0 ;; ++ *:Darwin:*:*) ++ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown ++ case $UNAME_PROCESSOR in ++ *86) UNAME_PROCESSOR=i686 ;; ++ unknown) UNAME_PROCESSOR=powerpc ;; ++ esac ++ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} ++ exit 0 ;; ++ *:procnto*:*:* | *:QNX:[0123456789]*:*) ++ UNAME_PROCESSOR=`uname -p` ++ if test "$UNAME_PROCESSOR" = "x86"; then ++ UNAME_PROCESSOR=i386 ++ UNAME_MACHINE=pc ++ fi ++ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} ++ exit 0 ;; ++ *:QNX:*:4*) ++ echo i386-pc-qnx ++ exit 0 ;; ++ NSE-?:NONSTOP_KERNEL:*:*) ++ echo nse-tandem-nsk${UNAME_RELEASE} ++ exit 0 ;; ++ NSR-?:NONSTOP_KERNEL:*:*) ++ echo nsr-tandem-nsk${UNAME_RELEASE} ++ exit 0 ;; ++ *:NonStop-UX:*:*) ++ echo mips-compaq-nonstopux ++ exit 0 ;; ++ BS2000:POSIX*:*:*) ++ echo bs2000-siemens-sysv ++ exit 0 ;; ++ DS/*:UNIX_System_V:*:*) ++ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} ++ exit 0 ;; ++ *:Plan9:*:*) ++ # "uname -m" is not consistent, so use $cputype instead. 386 ++ # is converted to i386 for consistency with other x86 ++ # operating systems. ++ if test "$cputype" = "386"; then ++ UNAME_MACHINE=i386 ++ else ++ UNAME_MACHINE="$cputype" ++ fi ++ echo ${UNAME_MACHINE}-unknown-plan9 ++ exit 0 ;; ++ *:TOPS-10:*:*) ++ echo pdp10-unknown-tops10 ++ exit 0 ;; ++ *:TENEX:*:*) ++ echo pdp10-unknown-tenex ++ exit 0 ;; ++ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) ++ echo pdp10-dec-tops20 ++ exit 0 ;; ++ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) ++ echo pdp10-xkl-tops20 ++ exit 0 ;; ++ *:TOPS-20:*:*) ++ echo pdp10-unknown-tops20 ++ exit 0 ;; ++ *:ITS:*:*) ++ echo pdp10-unknown-its ++ exit 0 ;; ++ SEI:*:*:SEIUX) ++ echo mips-sei-seiux${UNAME_RELEASE} ++ exit 0 ;; ++ *:DragonFly:*:*) ++ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ++ exit 0 ;; ++ *:*VMS:*:*) ++ UNAME_MACHINE=`(uname -p) 2>/dev/null` ++ case "${UNAME_MACHINE}" in ++ A*) echo alpha-dec-vms && exit 0 ;; ++ I*) echo ia64-dec-vms && exit 0 ;; ++ V*) echo vax-dec-vms && exit 0 ;; ++ esac ;; ++ *:XENIX:*:SysV) ++ echo i386-pc-xenix ++ exit 0 ;; + esac + + #echo '(No uname command or uname output not recognized.)' 1>&2 + #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +-cat >dummy.c <$dummy.c < + # include +@@ -853,7 +1304,10 @@ + #endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; +- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); ++ if (version < 4) ++ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); ++ else ++ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); + #endif + +@@ -898,11 +1352,24 @@ + #endif + + #if defined (vax) +-#if !defined (ultrix) +- printf ("vax-dec-bsd\n"); exit (0); +-#else +- printf ("vax-dec-ultrix\n"); exit (0); +-#endif ++# if !defined (ultrix) ++# include ++# if defined (BSD) ++# if BSD == 43 ++ printf ("vax-dec-bsd4.3\n"); exit (0); ++# else ++# if BSD == 199006 ++ printf ("vax-dec-bsd4.3reno\n"); exit (0); ++# else ++ printf ("vax-dec-bsd\n"); exit (0); ++# endif ++# endif ++# else ++ printf ("vax-dec-bsd\n"); exit (0); ++# endif ++# else ++ printf ("vax-dec-ultrix\n"); exit (0); ++# endif + #endif + + #if defined (alliant) && defined (i860) +@@ -913,8 +1380,7 @@ + } + EOF + +-${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 +-rm -f dummy.c dummy ++$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 + + # Apollos put the system type in the environment. + +@@ -946,6 +1412,50 @@ + esac + fi + +-#echo '(Unable to guess system type)' 1>&2 ++cat >&2 < in order to provide the needed ++information to handle your system. ++ ++config.guess timestamp = $timestamp ++ ++uname -m = `(uname -m) 2>/dev/null || echo unknown` ++uname -r = `(uname -r) 2>/dev/null || echo unknown` ++uname -s = `(uname -s) 2>/dev/null || echo unknown` ++uname -v = `(uname -v) 2>/dev/null || echo unknown` ++ ++/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` ++/bin/uname -X = `(/bin/uname -X) 2>/dev/null` ++ ++hostinfo = `(hostinfo) 2>/dev/null` ++/bin/universe = `(/bin/universe) 2>/dev/null` ++/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` ++/bin/arch = `(/bin/arch) 2>/dev/null` ++/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` ++/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` ++ ++UNAME_MACHINE = ${UNAME_MACHINE} ++UNAME_RELEASE = ${UNAME_RELEASE} ++UNAME_SYSTEM = ${UNAME_SYSTEM} ++UNAME_VERSION = ${UNAME_VERSION} ++EOF + + exit 1 ++ ++# Local variables: ++# eval: (add-hook 'write-file-hooks 'time-stamp) ++# time-stamp-start: "timestamp='" ++# time-stamp-format: "%:y-%02m-%02d" ++# time-stamp-end: "'" ++# End: +diff -Naur zephyr.orig/config.sub zephyr.patched-15/config.sub +--- zephyr.orig/config.sub 2001-05-18 16:41:37.000000000 -0400 ++++ zephyr.patched-15/config.sub 2006-02-16 03:51:37.000000000 -0500 +@@ -1,6 +1,10 @@ + #! /bin/sh +-# Configuration validation subroutine script, version 1.1. +-# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc. ++# Configuration validation subroutine script. ++# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ++# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ++ ++timestamp='2005-02-10' ++ + # This file is (in principle) common to ALL GNU software. + # The presence of a machine in this file suggests that SOME GNU software + # can handle that machine. It does not imply ALL GNU software can. +@@ -25,6 +29,9 @@ + # configuration script generated by Autoconf, you may include it under + # the same distribution terms that you use for the rest of that program. + ++# Please send patches to . Submit a context ++# diff and a properly formatted ChangeLog entry. ++# + # Configuration subroutine to validate and canonicalize a configuration type. + # Supply the specified configuration type as an argument. + # If it is invalid, we print an error message on stderr and exit with code 1. +@@ -45,30 +52,74 @@ + # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM + # It is wrong to echo any other type of specification. + +-if [ x$1 = x ] +-then +- echo Configuration name missing. 1>&2 +- echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 +- echo "or $0 ALIAS" 1>&2 +- echo where ALIAS is a recognized configuration type. 1>&2 +- exit 1 +-fi ++me=`echo "$0" | sed -e 's,.*/,,'` + +-# First pass through any local machine types. +-case $1 in +- *local*) +- echo $1 +- exit 0 +- ;; +- *) +- ;; ++usage="\ ++Usage: $0 [OPTION] CPU-MFR-OPSYS ++ $0 [OPTION] ALIAS ++ ++Canonicalize a configuration name. ++ ++Operation modes: ++ -h, --help print this help, then exit ++ -t, --time-stamp print date of last modification, then exit ++ -v, --version print version number, then exit ++ ++Report bugs and patches to ." ++ ++version="\ ++GNU config.sub ($timestamp) ++ ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 ++Free Software Foundation, Inc. ++ ++This is free software; see the source for copying conditions. There is NO ++warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." ++ ++help=" ++Try \`$me --help' for more information." ++ ++# Parse command line ++while test $# -gt 0 ; do ++ case $1 in ++ --time-stamp | --time* | -t ) ++ echo "$timestamp" ; exit 0 ;; ++ --version | -v ) ++ echo "$version" ; exit 0 ;; ++ --help | --h* | -h ) ++ echo "$usage"; exit 0 ;; ++ -- ) # Stop option processing ++ shift; break ;; ++ - ) # Use stdin as input. ++ break ;; ++ -* ) ++ echo "$me: invalid option $1$help" ++ exit 1 ;; ++ ++ *local*) ++ # First pass through any local machine types. ++ echo $1 ++ exit 0;; ++ ++ * ) ++ break ;; ++ esac ++done ++ ++case $# in ++ 0) echo "$me: missing argument$help" >&2 ++ exit 1;; ++ 1) ;; ++ *) echo "$me: too many arguments$help" >&2 ++ exit 1;; + esac + + # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). + # Here we must recognize all the valid KERNEL-OS combinations. + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` + case $maybe_os in +- linux-gnu*) ++ nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ ++ kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; +@@ -94,15 +145,33 @@ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ +- -apple) ++ -apple | -axis | -knuth | -cray) ++ os= ++ basic_machine=$1 ++ ;; ++ -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; ++ -scout) ++ ;; ++ -wrs) ++ os=-vxworks ++ basic_machine=$1 ++ ;; ++ -chorusos*) ++ os=-chorusos ++ basic_machine=$1 ++ ;; ++ -chorusrdb) ++ os=-chorusrdb ++ basic_machine=$1 ++ ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) +- os=sco3.2v5 ++ os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) +@@ -121,6 +190,9 @@ + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; ++ -udk*) ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` +@@ -143,26 +215,74 @@ + -psos*) + os=-psos + ;; ++ -mint | -mint[0-9]*) ++ basic_machine=m68k-atari ++ os=-mint ++ ;; + esac + + # Decode aliases for certain CPU-COMPANY combinations. + case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. +- tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ +- | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ +- | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 | hppa2.0 \ +- | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ +- | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ +- | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ +- | mipstx39 | mipstx39el \ +- | sparc | sparclet | sparclite | sparc64 | v850) ++ 1750a | 580 \ ++ | a29k \ ++ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ ++ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ ++ | am33_2.0 \ ++ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ ++ | c4x | clipper \ ++ | d10v | d30v | dlx | dsp16xx \ ++ | fr30 | frv \ ++ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ ++ | i370 | i860 | i960 | ia64 \ ++ | ip2k | iq2000 \ ++ | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ ++ | mips | mipsbe | mipseb | mipsel | mipsle \ ++ | mips16 \ ++ | mips64 | mips64el \ ++ | mips64vr | mips64vrel \ ++ | mips64orion | mips64orionel \ ++ | mips64vr4100 | mips64vr4100el \ ++ | mips64vr4300 | mips64vr4300el \ ++ | mips64vr5000 | mips64vr5000el \ ++ | mipsisa32 | mipsisa32el \ ++ | mipsisa32r2 | mipsisa32r2el \ ++ | mipsisa64 | mipsisa64el \ ++ | mipsisa64r2 | mipsisa64r2el \ ++ | mipsisa64sb1 | mipsisa64sb1el \ ++ | mipsisa64sr71k | mipsisa64sr71kel \ ++ | mipstx39 | mipstx39el \ ++ | mn10200 | mn10300 \ ++ | msp430 \ ++ | ns16k | ns32k \ ++ | openrisc | or32 \ ++ | pdp10 | pdp11 | pj | pjl \ ++ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ ++ | pyramid \ ++ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ ++ | sh64 | sh64le \ ++ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ ++ | strongarm \ ++ | tahoe | thumb | tic4x | tic80 | tron \ ++ | v850 | v850e \ ++ | we32k \ ++ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ ++ | z8k) + basic_machine=$basic_machine-unknown + ;; ++ m6811 | m68hc11 | m6812 | m68hc12) ++ # Motorola 68HC11/12. ++ basic_machine=$basic_machine-unknown ++ os=-none ++ ;; ++ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ++ ;; ++ + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. +- i[34567]86) ++ i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. +@@ -171,27 +291,86 @@ + exit 1 + ;; + # Recognize the basic CPU types with company name. +- vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ +- | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ +- | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ +- | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ +- | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* \ +- | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ +- | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ +- | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ +- | sparc64-* | mips64-* | mipsel-* \ +- | mips64el-* | mips64orion-* | mips64orionel-* \ +- | mipstx39-* | mipstx39el-* \ +- | f301-*) ++ 580-* \ ++ | a29k-* \ ++ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ ++ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ ++ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ ++ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ ++ | avr-* \ ++ | bs2000-* \ ++ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ ++ | clipper-* | craynv-* | cydra-* \ ++ | d10v-* | d30v-* | dlx-* \ ++ | elxsi-* \ ++ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ ++ | h8300-* | h8500-* \ ++ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ ++ | i*86-* | i860-* | i960-* | ia64-* \ ++ | ip2k-* | iq2000-* \ ++ | m32r-* | m32rle-* \ ++ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ ++ | m88110-* | m88k-* | maxq-* | mcore-* \ ++ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ ++ | mips16-* \ ++ | mips64-* | mips64el-* \ ++ | mips64vr-* | mips64vrel-* \ ++ | mips64orion-* | mips64orionel-* \ ++ | mips64vr4100-* | mips64vr4100el-* \ ++ | mips64vr4300-* | mips64vr4300el-* \ ++ | mips64vr5000-* | mips64vr5000el-* \ ++ | mipsisa32-* | mipsisa32el-* \ ++ | mipsisa32r2-* | mipsisa32r2el-* \ ++ | mipsisa64-* | mipsisa64el-* \ ++ | mipsisa64r2-* | mipsisa64r2el-* \ ++ | mipsisa64sb1-* | mipsisa64sb1el-* \ ++ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ ++ | mipstx39-* | mipstx39el-* \ ++ | mmix-* \ ++ | msp430-* \ ++ | none-* | np1-* | ns16k-* | ns32k-* \ ++ | orion-* \ ++ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ ++ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ ++ | pyramid-* \ ++ | romp-* | rs6000-* \ ++ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ ++ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ ++ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ ++ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ ++ | tahoe-* | thumb-* \ ++ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ ++ | tron-* \ ++ | v850-* | v850e-* | vax-* \ ++ | we32k-* \ ++ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ ++ | xstormy16-* | xtensa-* \ ++ | ymp-* \ ++ | z8k-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. ++ 386bsd) ++ basic_machine=i386-unknown ++ os=-bsd ++ ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; ++ a29khif) ++ basic_machine=a29k-amd ++ os=-udi ++ ;; ++ abacus) ++ basic_machine=abacus-unknown ++ ;; ++ adobe68k) ++ basic_machine=m68010-adobe ++ os=-scout ++ ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; +@@ -202,25 +381,35 @@ + basic_machine=a29k-none + os=-bsd + ;; ++ amd64) ++ basic_machine=x86_64-pc ++ ;; ++ amd64-*) ++ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) +- basic_machine=m68k-cbm ++ basic_machine=m68k-unknown + ;; + amigaos | amigados) +- basic_machine=m68k-cbm ++ basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) +- basic_machine=m68k-cbm ++ basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; ++ apollo68bsd) ++ basic_machine=m68k-apollo ++ os=-bsd ++ ;; + aux) + basic_machine=m68k-apple + os=-aux +@@ -229,6 +418,10 @@ + basic_machine=ns32k-sequent + os=-dynix + ;; ++ c90) ++ basic_machine=c90-cray ++ os=-unicos ++ ;; + convex-c1) + basic_machine=c1-convex + os=-bsd +@@ -249,27 +442,45 @@ + basic_machine=c38-convex + os=-bsd + ;; +- cray | ymp) +- basic_machine=ymp-cray ++ cray | j90) ++ basic_machine=j90-cray + os=-unicos + ;; +- cray2) +- basic_machine=cray2-cray +- os=-unicos +- ;; +- [ctj]90-cray) +- basic_machine=c90-cray +- os=-unicos ++ craynv) ++ basic_machine=craynv-cray ++ os=-unicosmp ++ ;; ++ cr16c) ++ basic_machine=cr16c-unknown ++ os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; ++ crisv32 | crisv32-* | etraxfs*) ++ basic_machine=crisv32-axis ++ ;; ++ cris | cris-* | etrax*) ++ basic_machine=cris-axis ++ ;; ++ crx) ++ basic_machine=crx-unknown ++ os=-elf ++ ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; ++ decsystem10* | dec10*) ++ basic_machine=pdp10-dec ++ os=-tops10 ++ ;; ++ decsystem20* | dec20*) ++ basic_machine=pdp10-dec ++ os=-tops20 ++ ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola +@@ -278,6 +489,10 @@ + basic_machine=m88k-motorola + os=-sysv3 + ;; ++ djgpp) ++ basic_machine=i586-pc ++ os=-msdosdjgpp ++ ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx +@@ -297,6 +512,10 @@ + encore | umax | mmax) + basic_machine=ns32k-encore + ;; ++ es1800 | OSE68k | ose68k | ose | OSE) ++ basic_machine=m68k-ericsson ++ os=-ose ++ ;; + fx2800) + basic_machine=i860-alliant + ;; +@@ -307,6 +526,10 @@ + basic_machine=tron-gmicro + os=-sysv + ;; ++ go32) ++ basic_machine=i386-pc ++ os=-go32 ++ ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 +@@ -315,6 +538,14 @@ + basic_machine=h8300-hitachi + os=-hms + ;; ++ h8300xray) ++ basic_machine=h8300-hitachi ++ os=-xray ++ ;; ++ h8500hms) ++ basic_machine=h8500-hitachi ++ os=-hms ++ ;; + harris) + basic_machine=m88k-harris + os=-sysv3 +@@ -330,13 +561,30 @@ + basic_machine=m68k-hp + os=-hpux + ;; ++ hp3k9[0-9][0-9] | hp9[0-9][0-9]) ++ basic_machine=hppa1.0-hp ++ ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; +- hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) ++ hp9k6[0-9][0-9] | hp6[0-9][0-9]) ++ basic_machine=hppa1.0-hp ++ ;; ++ hp9k7[0-79][0-9] | hp7[0-79][0-9]) ++ basic_machine=hppa1.1-hp ++ ;; ++ hp9k78[0-9] | hp78[0-9]) ++ # FIXME: really hppa2.0-hp ++ basic_machine=hppa1.1-hp ++ ;; ++ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) ++ # FIXME: really hppa2.0-hp ++ basic_machine=hppa1.1-hp ++ ;; ++ hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) +@@ -345,27 +593,42 @@ + hppa-next) + os=-nextstep3 + ;; ++ hppaosf) ++ basic_machine=hppa1.1-hp ++ os=-osf ++ ;; ++ hppro) ++ basic_machine=hppa1.1-hp ++ os=-proelf ++ ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm +- os=-mvs + ;; + # I'm not sure what "Sysv32" means. Should this be sysv3.2? +- i[34567]86v32) ++ i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; +- i[34567]86v4*) ++ i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; +- i[34567]86v) ++ i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; +- i[34567]86sol2) ++ i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; ++ i386mach) ++ basic_machine=i386-mach ++ os=-mach ++ ;; ++ i386-vsta | vsta) ++ basic_machine=i386-unknown ++ os=-vsta ++ ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in +@@ -391,16 +654,16 @@ + basic_machine=ns32k-utek + os=-sysv + ;; ++ mingw32) ++ basic_machine=i386-pc ++ os=-mingw32 ++ ;; + miniframe) + basic_machine=m68000-convergent + ;; +- mipsel*-linux*) +- basic_machine=mipsel-unknown +- os=-linux-gnu +- ;; +- mips*-linux*) +- basic_machine=mips-unknown +- os=-linux-gnu ++ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) ++ basic_machine=m68k-atari ++ os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` +@@ -408,10 +671,34 @@ + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; ++ monitor) ++ basic_machine=m68k-rom68k ++ os=-coff ++ ;; ++ morphos) ++ basic_machine=powerpc-unknown ++ os=-morphos ++ ;; ++ msdos) ++ basic_machine=i386-pc ++ os=-msdos ++ ;; ++ mvs) ++ basic_machine=i370-ibm ++ os=-mvs ++ ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; ++ netbsd386) ++ basic_machine=i386-unknown ++ os=-netbsd ++ ;; ++ netwinder) ++ basic_machine=armv4l-rebel ++ os=-linux ++ ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos +@@ -424,6 +711,10 @@ + basic_machine=mips-sony + os=-newsos + ;; ++ necv70) ++ basic_machine=v70-nec ++ os=-sysv ++ ;; + next | m*-next ) + basic_machine=m68k-next + case $os in +@@ -449,9 +740,40 @@ + basic_machine=i960-intel + os=-nindy + ;; ++ mon960) ++ basic_machine=i960-intel ++ os=-mon960 ++ ;; ++ nonstopux) ++ basic_machine=mips-compaq ++ os=-nonstopux ++ ;; + np1) + basic_machine=np1-gould + ;; ++ nsr-tandem) ++ basic_machine=nsr-tandem ++ ;; ++ op50n-* | op60c-*) ++ basic_machine=hppa1.1-oki ++ os=-proelf ++ ;; ++ or32 | or32-*) ++ basic_machine=or32-unknown ++ os=-coff ++ ;; ++ os400) ++ basic_machine=powerpc-ibm ++ os=-os400 ++ ;; ++ OSE68000 | ose68000) ++ basic_machine=m68000-ericsson ++ os=-ose ++ ;; ++ os68k) ++ basic_machine=m68k-none ++ os=-os68k ++ ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 +@@ -466,51 +788,95 @@ + pbb) + basic_machine=m68k-tti + ;; +- pc532 | pc532-*) ++ pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; +- pentium | p5 | k5 | nexen) ++ pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; +- pentiumpro | p6 | k6 | 6x86) ++ pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; +- pentiumii | pentium2) ++ pentiumii | pentium2 | pentiumiii | pentium3) ++ basic_machine=i686-pc ++ ;; ++ pentium4) + basic_machine=i786-pc + ;; +- pentium-* | p5-* | k5-* | nexen-*) ++ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; +- pentiumpro-* | p6-* | k6-* | 6x86-*) ++ pentiumpro-* | p6-* | 6x86-* | athlon-*) ++ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; +- pentiumii-* | pentium2-*) ++ pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; +- power) basic_machine=rs6000-ibm ++ power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown +- ;; ++ ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown +- ;; ++ ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; ++ ppc64) basic_machine=powerpc64-unknown ++ ;; ++ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ ppc64le | powerpc64little | ppc64-le | powerpc64-little) ++ basic_machine=powerpc64le-unknown ++ ;; ++ ppc64le-* | powerpc64little-*) ++ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; + ps2) + basic_machine=i386-ibm + ;; ++ pw32) ++ basic_machine=i586-unknown ++ os=-pw32 ++ ;; ++ rom68k) ++ basic_machine=m68k-rom68k ++ os=-coff ++ ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; ++ s390 | s390-*) ++ basic_machine=s390-ibm ++ ;; ++ s390x | s390x-*) ++ basic_machine=s390x-ibm ++ ;; ++ sa29200) ++ basic_machine=a29k-amd ++ os=-udi ++ ;; ++ sb1) ++ basic_machine=mipsisa64sb1-unknown ++ ;; ++ sb1el) ++ basic_machine=mipsisa64sb1el-unknown ++ ;; ++ sei) ++ basic_machine=mips-sei ++ os=-seiux ++ ;; + sequent) + basic_machine=i386-sequent + ;; +@@ -518,6 +884,13 @@ + basic_machine=sh-hitachi + os=-hms + ;; ++ sh64) ++ basic_machine=sh64-unknown ++ ;; ++ sparclite-wrs | simso-wrs) ++ basic_machine=sparclite-wrs ++ os=-vxworks ++ ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 +@@ -525,6 +898,13 @@ + spur) + basic_machine=spur-unknown + ;; ++ st2000) ++ basic_machine=m68k-tandem ++ ;; ++ stratus) ++ basic_machine=i860-stratus ++ os=-sysv4 ++ ;; + sun2) + basic_machine=m68000-sun + ;; +@@ -565,19 +945,51 @@ + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; ++ sv1) ++ basic_machine=sv1-cray ++ os=-unicos ++ ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; ++ t3e) ++ basic_machine=alphaev5-cray ++ os=-unicos ++ ;; ++ t90) ++ basic_machine=t90-cray ++ os=-unicos ++ ;; ++ tic54x | c54x*) ++ basic_machine=tic54x-unknown ++ os=-coff ++ ;; ++ tic55x | c55x*) ++ basic_machine=tic55x-unknown ++ os=-coff ++ ;; ++ tic6x | c6x*) ++ basic_machine=tic6x-unknown ++ os=-coff ++ ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; ++ toad1) ++ basic_machine=pdp10-xkl ++ os=-tops20 ++ ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; ++ tpf) ++ basic_machine=s390x-ibm ++ os=-tpf ++ ;; + udi29k) + basic_machine=a29k-amd + os=-udi +@@ -586,6 +998,10 @@ + basic_machine=a29k-nyu + os=-sym1 + ;; ++ v810 | necv810) ++ basic_machine=v810-nec ++ os=-none ++ ;; + vaxv) + basic_machine=vax-dec + os=-sysv +@@ -595,8 +1011,8 @@ + os=-vms + ;; + vpp*|vx|vx-*) +- basic_machine=f301-fujitsu +- ;; ++ basic_machine=f301-fujitsu ++ ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks +@@ -609,13 +1025,29 @@ + basic_machine=a29k-wrs + os=-vxworks + ;; +- xmp) +- basic_machine=xmp-cray +- os=-unicos ++ w65*) ++ basic_machine=w65-wdc ++ os=-none ++ ;; ++ w89k-*) ++ basic_machine=hppa1.1-winbond ++ os=-proelf + ;; +- xps | xps100) ++ xbox) ++ basic_machine=i686-pc ++ os=-mingw32 ++ ;; ++ xps | xps100) + basic_machine=xps100-honeywell + ;; ++ ymp) ++ basic_machine=ymp-cray ++ os=-unicos ++ ;; ++ z8k-*-coff) ++ basic_machine=z8k-unknown ++ os=-sim ++ ;; + none) + basic_machine=none-none + os=-none +@@ -623,32 +1055,47 @@ + + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. +- mips) +- if [ x$os = x-linux-gnu ]; then +- basic_machine=mips-unknown +- else +- basic_machine=mips-mips +- fi ++ w89k) ++ basic_machine=hppa1.1-winbond ++ ;; ++ op50n) ++ basic_machine=hppa1.1-oki ++ ;; ++ op60c) ++ basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; ++ mmix) ++ basic_machine=mmix-knuth ++ ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; ++ pdp10) ++ # there are many clones, so DEC is not a safe bet ++ basic_machine=pdp10-unknown ++ ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; +- sparc) ++ sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) ++ basic_machine=sh-unknown ++ ;; ++ sh64) ++ basic_machine=sh64-unknown ++ ;; ++ sparc | sparcv8 | sparcv9 | sparcv9b) + basic_machine=sparc-sun + ;; +- cydra) ++ cydra) + basic_machine=cydra-cydrome + ;; + orion) +@@ -657,6 +1104,15 @@ + orion105) + basic_machine=clipper-highlevel + ;; ++ mac | mpw | mac-mpw) ++ basic_machine=m68k-apple ++ ;; ++ pmac | pmac-mpw) ++ basic_machine=powerpc-apple ++ ;; ++ *-unknown) ++ # Make sure to match an already-canonicalized machine name. ++ ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 +@@ -709,14 +1165,46 @@ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ +- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ +- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ ++ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ ++ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ ++ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ ++ | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ +- | -mingw32* | -linux-gnu* | -uxpv* | -beos*) ++ | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ ++ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ ++ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ ++ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ ++ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ ++ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ ++ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; ++ -qnx*) ++ case $basic_machine in ++ x86-* | i*86-*) ++ ;; ++ *) ++ os=-nto$os ++ ;; ++ esac ++ ;; ++ -nto-qnx*) ++ ;; ++ -nto*) ++ os=`echo $os | sed -e 's|nto|nto-qnx|'` ++ ;; ++ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ ++ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ ++ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ++ ;; ++ -mac*) ++ os=`echo $os | sed -e 's|mac|macos|'` ++ ;; ++ -linux-dietlibc) ++ os=-linux-dietlibc ++ ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; +@@ -726,6 +1214,15 @@ + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; ++ -opened*) ++ os=-openedition ++ ;; ++ -os400*) ++ os=-os400 ++ ;; ++ -wince*) ++ os=-wince ++ ;; + -osfrose*) + os=-osfrose + ;; +@@ -741,11 +1238,26 @@ + -acis*) + os=-aos + ;; ++ -atheos*) ++ os=-atheos ++ ;; ++ -syllable*) ++ os=-syllable ++ ;; ++ -386bsd) ++ os=-bsd ++ ;; + -ctix* | -uts*) + os=-sysv + ;; ++ -nova*) ++ os=-rtmk-nova ++ ;; + -ns2 ) +- os=-nextstep2 ++ os=-nextstep2 ++ ;; ++ -nsk*) ++ os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) +@@ -754,6 +1266,9 @@ + -sinix*) + os=-sysv4 + ;; ++ -tpf*) ++ os=-tpf ++ ;; + -triton*) + os=-sysv3 + ;; +@@ -772,9 +1287,27 @@ + # This must come after -sysvr4. + -sysv*) + ;; ++ -ose*) ++ os=-ose ++ ;; ++ -es1800*) ++ os=-ose ++ ;; + -xenix) + os=-xenix + ;; ++ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) ++ os=-mint ++ ;; ++ -aros*) ++ os=-aros ++ ;; ++ -kaos*) ++ os=-kaos ++ ;; ++ -zvmoe) ++ os=-zvmoe ++ ;; + -none) + ;; + *) +@@ -800,10 +1333,20 @@ + *-acorn) + os=-riscix1.2 + ;; ++ arm*-rebel) ++ os=-linux ++ ;; + arm*-semi) + os=-aout + ;; +- pdp11-*) ++ c4x-* | tic4x-*) ++ os=-coff ++ ;; ++ # This must come before the *-dec entry. ++ pdp10-*) ++ os=-tops20 ++ ;; ++ pdp11-*) + os=-none + ;; + *-dec | vax-*) +@@ -821,6 +1364,18 @@ + # default. + # os=-sunos4 + ;; ++ m68*-cisco) ++ os=-aout ++ ;; ++ mips*-cisco) ++ os=-elf ++ ;; ++ mips*-*) ++ os=-elf ++ ;; ++ or32-*) ++ os=-coff ++ ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; +@@ -833,6 +1388,18 @@ + *-ibm) + os=-aix + ;; ++ *-knuth) ++ os=-mmixware ++ ;; ++ *-wec) ++ os=-proelf ++ ;; ++ *-winbond) ++ os=-proelf ++ ;; ++ *-oki) ++ os=-proelf ++ ;; + *-hp) + os=-hpux + ;; +@@ -875,27 +1442,39 @@ + *-next) + os=-nextstep3 + ;; +- *-gould) ++ *-gould) + os=-sysv + ;; +- *-highlevel) ++ *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; +- *-sgi) ++ *-sgi) + os=-irix + ;; +- *-siemens) ++ *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; +- f301-fujitsu) ++ f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; ++ *-rom68k) ++ os=-coff ++ ;; ++ *-*bug) ++ os=-coff ++ ;; ++ *-apple) ++ os=-macos ++ ;; ++ *-atari*) ++ os=-mint ++ ;; + *) + os=-none + ;; +@@ -917,9 +1496,15 @@ + -aix*) + vendor=ibm + ;; ++ -beos*) ++ vendor=be ++ ;; + -hpux*) + vendor=hp + ;; ++ -mpeix*) ++ vendor=hp ++ ;; + -hiux*) + vendor=hitachi + ;; +@@ -935,21 +1520,47 @@ + -genix*) + vendor=ns + ;; +- -mvs*) ++ -mvs* | -opened*) ++ vendor=ibm ++ ;; ++ -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; +- -vxsim* | -vxworks*) ++ -tpf*) ++ vendor=ibm ++ ;; ++ -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; ++ -hms*) ++ vendor=hitachi ++ ;; ++ -mpw* | -macos*) ++ vendor=apple ++ ;; ++ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) ++ vendor=atari ++ ;; ++ -vos*) ++ vendor=stratus ++ ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; + esac + + echo $basic_machine$os ++exit 0 ++ ++# Local variables: ++# eval: (add-hook 'write-file-hooks 'time-stamp) ++# time-stamp-start: "timestamp='" ++# time-stamp-format: "%:y-%02m-%02d" ++# time-stamp-end: "'" ++# End: +diff -Naur zephyr.orig/configure zephyr.patched-15/configure +--- zephyr.orig/configure 2001-05-18 16:41:38.000000000 -0400 ++++ zephyr.patched-15/configure 2006-02-16 03:51:37.000000000 -0500 +@@ -2377,6 +2377,7 @@ + #line 2378 "configure" + #include "confdefs.h" + #include ++#include + main() + { + FILE *f=fopen("conftestval", "w"); +@@ -2385,7 +2386,7 @@ + exit(0); + } + EOF +-if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:2390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_short=`cat conftestval` + else +@@ -2405,7 +2406,7 @@ + + + echo $ac_n "checking size of int""... $ac_c" 1>&6 +-echo "configure:2409: checking size of int" >&5 ++echo "configure:2410: checking size of int" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2413,9 +2414,10 @@ + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + else + cat > conftest.$ac_ext < ++#include + main() + { + FILE *f=fopen("conftestval", "w"); +@@ -2424,7 +2426,7 @@ + exit(0); + } + EOF +-if { (eval echo configure:2428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:2430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_int=`cat conftestval` + else +@@ -2444,7 +2446,7 @@ + + + echo $ac_n "checking size of long""... $ac_c" 1>&6 +-echo "configure:2448: checking size of long" >&5 ++echo "configure:2450: checking size of long" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2452,9 +2454,10 @@ + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + else + cat > conftest.$ac_ext < ++#include + main() + { + FILE *f=fopen("conftestval", "w"); +@@ -2463,7 +2466,7 @@ + exit(0); + } + EOF +-if { (eval echo configure:2467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:2470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_long=`cat conftestval` + else +@@ -2483,7 +2486,7 @@ + + + echo $ac_n "checking for 32-bit integer type""... $ac_c" 1>&6 +-echo "configure:2487: checking for 32-bit integer type" >&5 ++echo "configure:2490: checking for 32-bit integer type" >&5 + if test "$ac_cv_sizeof_long" = 4; then + int32=long + elif test "$ac_cv_sizeof_int" = 4; then +@@ -2501,7 +2504,7 @@ + echo "$ac_t""${int32}" 1>&6 + + echo $ac_n "checking for wslen in -lw""... $ac_c" 1>&6 +-echo "configure:2505: checking for wslen in -lw" >&5 ++echo "configure:2508: checking for wslen in -lw" >&5 + ac_lib_var=`echo w'_'wslen | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -2509,7 +2512,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lw $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -2548,7 +2551,7 @@ + fi + + echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +-echo "configure:2552: checking for dlopen in -ldl" >&5 ++echo "configure:2555: checking for dlopen in -ldl" >&5 + ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -2556,7 +2559,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-ldl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -2597,14 +2600,14 @@ + + + echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6 +-echo "configure:2601: checking for library containing gethostbyname" >&5 ++echo "configure:2604: checking for library containing gethostbyname" >&5 + if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_func_search_save_LIBS="$LIBS" + ac_cv_search_gethostbyname="no" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_search_gethostbyname="none required" + else +@@ -2626,7 +2629,7 @@ + test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do + LIBS="-l$i $ac_func_search_save_LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_search_gethostbyname="-l$i" + break +@@ -2659,14 +2662,14 @@ + fi + + echo $ac_n "checking for library containing socket""... $ac_c" 1>&6 +-echo "configure:2663: checking for library containing socket" >&5 ++echo "configure:2666: checking for library containing socket" >&5 + if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_func_search_save_LIBS="$LIBS" + ac_cv_search_socket="no" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_search_socket="none required" + else +@@ -2688,7 +2691,7 @@ + test "$ac_cv_search_socket" = "no" && for i in socket; do + LIBS="-l$i $ac_func_search_save_LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_search_socket="-l$i" + break +@@ -2723,7 +2726,7 @@ + # Hesiod needs -lresolv on Sun systems for res_send. + if test "$hesiod" != "no"; then + echo $ac_n "checking for strerror in -l44bsd""... $ac_c" 1>&6 +-echo "configure:2727: checking for strerror in -l44bsd" >&5 ++echo "configure:2730: checking for strerror in -l44bsd" >&5 + ac_lib_var=`echo 44bsd'_'strerror | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -2731,7 +2734,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l44bsd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -2770,7 +2773,7 @@ + fi + + echo $ac_n "checking for res_send in -lresolv""... $ac_c" 1>&6 +-echo "configure:2774: checking for res_send in -lresolv" >&5 ++echo "configure:2777: checking for res_send in -lresolv" >&5 + ac_lib_var=`echo resolv'_'res_send | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -2778,7 +2781,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lresolv $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \ ++ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` ++ cat >> confdefs.h <&6 ++fi ++ ++ echo $ac_n "checking for __res_send in -lresolv""... $ac_c" 1>&6 ++echo "configure:2824: checking for __res_send in -lresolv" >&5 ++ac_lib_var=`echo resolv'_'__res_send | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lresolv $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -2819,7 +2869,7 @@ + fi + + echo $ac_n "checking for tgetstr in -lcurses""... $ac_c" 1>&6 +-echo "configure:2823: checking for tgetstr in -lcurses" >&5 ++echo "configure:2873: checking for tgetstr in -lcurses" >&5 + ac_lib_var=`echo curses'_'tgetstr | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -2827,7 +2877,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lcurses $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -2860,7 +2910,7 @@ + fi + + echo $ac_n "checking for srcsrpy in -lsrc""... $ac_c" 1>&6 +-echo "configure:2864: checking for srcsrpy in -lsrc" >&5 ++echo "configure:2914: checking for srcsrpy in -lsrc" >&5 + ac_lib_var=`echo src'_'srcsrpy | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -2868,7 +2918,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsrc $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -2916,12 +2966,12 @@ + + if test "$krb4" != no; then + echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 +-echo "configure:2920: checking for gethostbyname" >&5 ++echo "configure:2970: checking for gethostbyname" >&5 + if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_gethostbyname=yes" + else +@@ -2962,7 +3012,7 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 +-echo "configure:2966: checking for gethostbyname in -lnsl" >&5 ++echo "configure:3016: checking for gethostbyname in -lnsl" >&5 + ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -2970,7 +3020,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lnsl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -3011,12 +3061,12 @@ + fi + + echo $ac_n "checking for socket""... $ac_c" 1>&6 +-echo "configure:3015: checking for socket" >&5 ++echo "configure:3065: checking for socket" >&5 + if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_socket=yes" + else +@@ -3057,7 +3107,7 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 +-echo "configure:3061: checking for socket in -lsocket" >&5 ++echo "configure:3111: checking for socket in -lsocket" >&5 + ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -3065,7 +3115,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -3106,7 +3156,7 @@ + fi + + echo $ac_n "checking for compile in -lgen""... $ac_c" 1>&6 +-echo "configure:3110: checking for compile in -lgen" >&5 ++echo "configure:3160: checking for compile in -lgen" >&5 + ac_lib_var=`echo gen'_'compile | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -3114,7 +3164,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgen $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -3160,7 +3210,7 @@ + LDFLAGS="$LDFLAGS -L$krb4/lib" + fi + echo $ac_n "checking for krb_rd_req in -lkrb4""... $ac_c" 1>&6 +-echo "configure:3164: checking for krb_rd_req in -lkrb4" >&5 ++echo "configure:3214: checking for krb_rd_req in -lkrb4" >&5 + ac_lib_var=`echo krb4'_'krb_rd_req | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -3168,7 +3218,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -3198,7 +3248,7 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for krb_rd_req in -lkrb""... $ac_c" 1>&6 +-echo "configure:3202: checking for krb_rd_req in -lkrb" >&5 ++echo "configure:3252: checking for krb_rd_req in -lkrb" >&5 + ac_lib_var=`echo krb'_'krb_rd_req | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -3206,7 +3256,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lkrb -ldes $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -3256,12 +3306,12 @@ + + if test "$hesiod" != no; then + echo $ac_n "checking for res_send""... $ac_c" 1>&6 +-echo "configure:3260: checking for res_send" >&5 ++echo "configure:3310: checking for res_send" >&5 + if eval "test \"`echo '$''{'ac_cv_func_res_send'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_res_send=yes" + else +@@ -3302,7 +3352,7 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for res_send in -lresolv""... $ac_c" 1>&6 +-echo "configure:3306: checking for res_send in -lresolv" >&5 ++echo "configure:3356: checking for res_send in -lresolv" >&5 + ac_lib_var=`echo resolv'_'res_send | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -3310,7 +3360,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lresolv $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -3355,15 +3405,15 @@ + LDFLAGS="$LDFLAGS -L$hesiod/lib" + fi + echo $ac_n "checking for hes_resolve in -lhesiod""... $ac_c" 1>&6 +-echo "configure:3359: checking for hes_resolve in -lhesiod" >&5 ++echo "configure:3409: checking for hes_resolve in -lhesiod" >&5 + ac_lib_var=`echo hesiod'_'hes_resolve | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" +-LIBS="-lhesiod $LIBS" ++LIBS="-lhesiod $LIBS $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -3416,7 +3466,7 @@ + LDFLAGS="$LDFLAGS -L$regex/lib" + fi + echo $ac_n "checking for regcomp in -lregex""... $ac_c" 1>&6 +-echo "configure:3420: checking for regcomp in -lregex" >&5 ++echo "configure:3470: checking for regcomp in -lregex" >&5 + ac_lib_var=`echo regex'_'regcomp | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -3424,7 +3474,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lregex $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -3458,12 +3508,12 @@ + + else + echo $ac_n "checking for regcomp""... $ac_c" 1>&6 +-echo "configure:3462: checking for regcomp" >&5 ++echo "configure:3512: checking for regcomp" >&5 + if eval "test \"`echo '$''{'ac_cv_func_regcomp'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_regcomp=yes" + else +@@ -3518,12 +3568,12 @@ + + if test "$ares" != no; then + echo $ac_n "checking for res_send""... $ac_c" 1>&6 +-echo "configure:3522: checking for res_send" >&5 ++echo "configure:3572: checking for res_send" >&5 + if eval "test \"`echo '$''{'ac_cv_func_res_send'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_res_send=yes" + else +@@ -3564,7 +3614,7 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for res_send in -lresolv""... $ac_c" 1>&6 +-echo "configure:3568: checking for res_send in -lresolv" >&5 ++echo "configure:3618: checking for res_send in -lresolv" >&5 + ac_lib_var=`echo resolv'_'res_send | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -3572,7 +3622,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lresolv $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -3617,7 +3667,7 @@ + LDFLAGS="$LDFLAGS -L$ares/lib" + fi + echo $ac_n "checking for ares_init in -lares""... $ac_c" 1>&6 +-echo "configure:3621: checking for ares_init in -lares" >&5 ++echo "configure:3671: checking for ares_init in -lares" >&5 + ac_lib_var=`echo ares'_'ares_init | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -3625,7 +3675,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lares $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -3678,7 +3728,7 @@ + LDFLAGS="$LDFLAGS -L$com_err/lib" + fi + echo $ac_n "checking for com_err in -lcom_err""... $ac_c" 1>&6 +-echo "configure:3682: checking for com_err in -lcom_err" >&5 ++echo "configure:3732: checking for com_err in -lcom_err" >&5 + ac_lib_var=`echo com_err'_'com_err | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -3686,7 +3736,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lcom_err $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -3735,7 +3785,7 @@ + LDFLAGS="$LDFLAGS -L$ss/lib" + fi + echo $ac_n "checking for ss_perror in -lss""... $ac_c" 1>&6 +-echo "configure:3739: checking for ss_perror in -lss" >&5 ++echo "configure:3789: checking for ss_perror in -lss" >&5 + ac_lib_var=`echo ss'_'ss_perror | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -3743,7 +3793,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lss -lcom_err $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -3782,13 +3832,13 @@ + + if test $ac_cv_prog_gcc = yes; then + echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 +-echo "configure:3786: checking whether ${CC-cc} needs -traditional" >&5 ++echo "configure:3836: checking whether ${CC-cc} needs -traditional" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_pattern="Autoconf.*'x'" + cat > conftest.$ac_ext < + Autoconf TIOCGETP +@@ -3806,7 +3856,7 @@ + + if test $ac_cv_prog_gcc_traditional = no; then + cat > conftest.$ac_ext < + Autoconf TCGETA +@@ -3828,12 +3878,12 @@ + fi + + echo $ac_n "checking for vprintf""... $ac_c" 1>&6 +-echo "configure:3832: checking for vprintf" >&5 ++echo "configure:3882: checking for vprintf" >&5 + if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_vprintf=yes" + else +@@ -3880,12 +3930,12 @@ + + if test "$ac_cv_func_vprintf" != yes; then + echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 +-echo "configure:3884: checking for _doprnt" >&5 ++echo "configure:3934: checking for _doprnt" >&5 + if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func__doprnt=yes" + else +@@ -3933,7 +3983,7 @@ + fi + + echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6 +-echo "configure:3937: checking whether getpgrp takes no argument" >&5 ++echo "configure:3987: checking whether getpgrp takes no argument" >&5 + if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -3941,7 +3991,7 @@ + { echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; } + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:4050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_func_getpgrp_void=yes + else +@@ -4020,7 +4070,7 @@ + fi + + echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 +-echo "configure:4024: checking whether setpgrp takes no argument" >&5 ++echo "configure:4074: checking whether setpgrp takes no argument" >&5 + if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -4028,7 +4078,7 @@ + { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; } + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:4102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_func_setpgrp_void=no + else +@@ -4074,12 +4124,12 @@ + for ac_func in putenv strchr memcpy memmove waitpid getlogin strerror random + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:4078: checking for $ac_func" >&5 ++echo "configure:4128: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:4156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -4129,12 +4179,12 @@ + for ac_func in lrand48 gethostid getsid getpgid krb_get_err_text krb_log + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:4133: checking for $ac_func" >&5 ++echo "configure:4183: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:4211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +diff -Naur zephyr.orig/configure.in zephyr.patched-15/configure.in +--- zephyr.orig/configure.in 2000-04-05 10:51:31.000000000 -0400 ++++ zephyr.patched-15/configure.in 2006-02-16 03:51:37.000000000 -0500 +@@ -75,6 +75,7 @@ + if test "$hesiod" != "no"; then + AC_CHECK_LIB(44bsd, strerror) + AC_CHECK_LIB(resolv, res_send) ++ AC_CHECK_LIB(resolv, __res_send) + fi + + AC_CHECK_LIB(curses, tgetstr, [TLIB=-lcurses], [TLIB=-ltermcap]) +diff -Naur zephyr.orig/h/internal.h zephyr.patched-15/h/internal.h +--- zephyr.orig/h/internal.h 2001-04-10 19:28:42.000000000 -0400 ++++ zephyr.patched-15/h/internal.h 2006-02-16 03:51:36.000000000 -0500 +@@ -97,5 +97,6 @@ + int (*pred) __P((ZNotice_t *, void *)), void *arg, + int timeout)); + ++void Z_gettimeofday(struct _ZTimeval *ztv, struct timezone *tz); + #endif /* __INTERNAL_H__ */ + +diff -Naur zephyr.orig/h/zephyr/zephyr.h zephyr.patched-15/h/zephyr/zephyr.h +--- zephyr.orig/h/zephyr/zephyr.h 1999-01-22 18:18:59.000000000 -0500 ++++ zephyr.patched-15/h/zephyr/zephyr.h 2006-02-16 03:51:36.000000000 -0500 +@@ -62,14 +62,19 @@ + } ZNotice_Kind_t; + extern ZCONST char *ZNoticeKinds[9]; + ++struct _ZTimeval { ++ int tv_sec; ++ int tv_usec; ++}; ++ + /* Unique ID format */ + typedef struct _ZUnique_Id_t { + struct in_addr zuid_addr; +- struct timeval tv; ++ struct _ZTimeval tv; + } ZUnique_Id_t; + + /* Checksum */ +-typedef unsigned long ZChecksum_t; ++typedef unsigned int ZChecksum_t; + + /* Notice definition */ + typedef struct _ZNotice_t { +@@ -78,7 +83,7 @@ + ZNotice_Kind_t z_kind; + ZUnique_Id_t z_uid; + #define z_sender_addr z_uid.zuid_addr +- struct timeval z_time; ++ struct _ZTimeval z_time; + unsigned short z_port; + int z_auth; + int z_checked_auth; +diff -Naur zephyr.orig/h/zephyr/zephyr_err.h zephyr.patched-15/h/zephyr/zephyr_err.h +--- zephyr.orig/h/zephyr/zephyr_err.h 1969-12-31 19:00:00.000000000 -0500 ++++ zephyr.patched-15/h/zephyr/zephyr_err.h 2006-02-16 03:51:36.000000000 -0500 +@@ -0,0 +1,34 @@ ++/* ++ * zephyr_err.h: ++ * This file is automatically generated; please do not edit it. ++ */ ++ ++#define ZERR_PKTLEN (-772103680L) ++#define ZERR_HEADERLEN (-772103679L) ++#define ZERR_ILLVAL (-772103678L) ++#define ZERR_HMPORT (-772103677L) ++#define ZERR_PORTINUSE (-772103676L) ++#define ZERR_BADPKT (-772103675L) ++#define ZERR_VERS (-772103674L) ++#define ZERR_NOPORT (-772103673L) ++#define ZERR_NONOTICE (-772103672L) ++#define ZERR_QLEN (-772103671L) ++#define ZERR_HMDEAD (-772103670L) ++#define ZERR_INTERNAL (-772103669L) ++#define ZERR_NOLOCATIONS (-772103668L) ++#define ZERR_NOMORELOCS (-772103667L) ++#define ZERR_FIELDLEN (-772103666L) ++#define ZERR_BADFIELD (-772103665L) ++#define ZERR_SERVNAK (-772103664L) ++#define ZERR_AUTHFAIL (-772103663L) ++#define ZERR_LOGINFAIL (-772103662L) ++#define ZERR_NOSUBSCRIPTIONS (-772103661L) ++#define ZERR_NOMORESUBSCRIPTIONS (-772103660L) ++#define ZERR_TOOMANYSUBS (-772103659L) ++#define ZERR_EOF (-772103658L) ++extern void initialize_zeph_error_table(void); ++#define ERROR_TABLE_BASE_zeph (-772103680L) ++ ++/* for compatibility with older versions... */ ++#define init_zeph_err_tbl initialize_zeph_error_table ++#define zeph_err_base ERROR_TABLE_BASE_zeph +diff -Naur zephyr.orig/lib/Makefile.in zephyr.patched-15/lib/Makefile.in +--- zephyr.orig/lib/Makefile.in 1998-01-31 18:55:07.000000000 -0500 ++++ zephyr.patched-15/lib/Makefile.in 2006-02-16 03:51:36.000000000 -0500 +@@ -8,8 +8,9 @@ + lsbindir=@lsbindir@ + + includedir=${prefix}/include +-mandir=${prefix}/man ++mandir=@mandir@ + libdir=${exec_prefix}/lib ++LIBS=@LIBS@ + + srcdir=@srcdir@ + top_srcdir=@top_srcdir@ +@@ -18,9 +19,10 @@ + CC=@CC@ + INSTALL=@INSTALL@ + RANLIB=@RANLIB@ +- ++FPIC= ++DEBUG=-O + CPPFLAGS=@CPPFLAGS@ +-CFLAGS=@CFLAGS@ ++CFLAGS=@CFLAGS@ ${DEBUG} ${FPIC} + ALL_CFLAGS=${CFLAGS} -DSYSCONFDIR=\"${sysconfdir}\" -I${top_srcdir}/h \ + -I${BUILDTOP}/h ${CPPFLAGS} + +@@ -34,12 +36,16 @@ + ZSendPkt.o ZSendRaw.o ZSendRLst.o ZSetDest.o ZSetFD.o ZSetSrv.o \ + ZSubs.o ZVariables.o ZWait4Not.o Zinternal.o + +-all: libzephyr.a ++LIBEXT=a ++all: libzephyr.$(LIBEXT) + + libzephyr.a: ${OBJS} + ar cru $@ ${OBJS} + ${RANLIB} $@ + ++libzephyr.so: $(OBJS) ++ gcc -shared -Wl,-soname -Wl,libzephyr.so.$(SONAME) -o libzephyr.so $(OBJS) $(LIBS) -lcom_err ++ + zephyr_err.c ${BUILDTOP}/h/zephyr/zephyr_err.h: zephyr_err.et + compile_et ${srcdir}/zephyr_err.et + mv zephyr_err.h ${BUILDTOP}/h/zephyr +@@ -49,8 +55,10 @@ + + check: + +-install: libzephyr.a +- ${INSTALL} -m 644 libzephyr.a ${DESTDIR}${libdir} ++install: libzephyr.$(LIBEXT) ++ -${INSTALL} -m 644 libzephyr.a ${DESTDIR}${libdir} ++ -$(INSTALL) -m 644 libzephyr.so ${DESTDIR}$(libdir) ++ + ${INSTALL} -m 644 ${srcdir}/zephyr.1 ${DESTDIR}${mandir}/man1 + + clean: +diff -Naur zephyr.orig/lib/ZOpenPort.c zephyr.patched-15/lib/ZOpenPort.c +--- zephyr.orig/lib/ZOpenPort.c 1999-01-22 18:19:17.000000000 -0500 ++++ zephyr.patched-15/lib/ZOpenPort.c 2006-02-16 03:51:36.000000000 -0500 +@@ -22,9 +22,6 @@ + { + struct sockaddr_in bindin; + int len; +-#ifdef SO_BSDCOMPAT +- int on = 1; +-#endif + + (void) ZClosePort(); + +@@ -33,11 +30,6 @@ + return (errno); + } + +-#ifdef SO_BSDCOMPAT +- /* Prevent Linux from giving us socket errors we don't care about. */ +- setsockopt(__Zephyr_fd, SOL_SOCKET, SO_BSDCOMPAT, &on, sizeof(on)); +-#endif +- + bindin.sin_family = AF_INET; + + if (port && *port) +diff -Naur zephyr.orig/lib/ZVariables.c zephyr.patched-15/lib/ZVariables.c +--- zephyr.orig/lib/ZVariables.c 1999-06-03 10:51:42.000000000 -0400 ++++ zephyr.patched-15/lib/ZVariables.c 2006-02-16 03:51:36.000000000 -0500 +@@ -36,7 +36,7 @@ + if ((ret = get_varval(varfile, var)) != ZERR_NONE) + return (ret); + +- sprintf(varfile, "%s/zephyr.vars", SYSCONFDIR); ++ sprintf(varfile, "%s/zephyr/zephyr.vars", SYSCONFDIR); + return (get_varval(varfile, var)); + } + +diff -Naur zephyr.orig/lib/Zinternal.c zephyr.patched-15/lib/Zinternal.c +--- zephyr.orig/lib/Zinternal.c 2000-01-26 22:48:53.000000000 -0500 ++++ zephyr.patched-15/lib/Zinternal.c 2006-02-16 03:51:36.000000000 -0500 +@@ -575,6 +575,14 @@ + return (ZERR_NONE); + } + ++void Z_gettimeofday(struct _ZTimeval *ztv, struct timezone *tz) ++{ ++ struct timeval tv; ++ (void) gettimeofday(&tv, tz); /* yeah, yeah, I know */ ++ ztv->tv_sec=tv.tv_sec; ++ ztv->tv_usec=tv.tv_usec; ++} ++ + Code_t Z_FormatHeader(notice, buffer, buffer_len, len, cert_routine) + ZNotice_t *notice; + char *buffer; +@@ -604,7 +612,7 @@ + + notice->z_multinotice = ""; + +- (void) gettimeofday(¬ice->z_uid.tv, (struct timezone *)0); ++ (void) Z_gettimeofday(¬ice->z_uid.tv, (struct timezone *)0); + notice->z_uid.tv.tv_sec = htonl((u_long) notice->z_uid.tv.tv_sec); + notice->z_uid.tv.tv_usec = htonl((u_long) notice->z_uid.tv.tv_usec); + +@@ -873,8 +881,8 @@ + (void) sprintf(multi, "%d/%d", offset, notice->z_message_len); + partnotice.z_multinotice = multi; + if (offset > 0) { +- (void) gettimeofday(&partnotice.z_uid.tv, +- (struct timezone *)0); ++ (void) Z_gettimeofday(&partnotice.z_uid.tv, ++ (struct timezone *)0); + partnotice.z_uid.tv.tv_sec = + htonl((u_long) partnotice.z_uid.tv.tv_sec); + partnotice.z_uid.tv.tv_usec = +diff -Naur zephyr.orig/libdyn/Makefile.in zephyr.patched-15/libdyn/Makefile.in +--- zephyr.orig/libdyn/Makefile.in 1998-01-31 18:55:08.000000000 -0500 ++++ zephyr.patched-15/libdyn/Makefile.in 2006-02-16 03:51:35.000000000 -0500 +@@ -8,7 +8,7 @@ + lsbindir=@lsbindir@ + + includedir=${prefix}/include +-mandir=${prefix}/man ++mandir=@mandir@ + libdir=${exec_prefix}/lib + + srcdir=@srcdir@ +diff -Naur zephyr.orig/server/Makefile.in zephyr.patched-15/server/Makefile.in +--- zephyr.orig/server/Makefile.in 1999-06-13 17:35:41.000000000 -0400 ++++ zephyr.patched-15/server/Makefile.in 2006-02-16 03:51:36.000000000 -0500 +@@ -8,7 +8,7 @@ + lsbindir=@lsbindir@ + + includedir=${prefix}/include +-mandir=${prefix}/man ++mandir=@mandir@ + libdir=${exec_prefix}/lib + + srcdir=@srcdir@ +diff -Naur zephyr.orig/server/kopt.c zephyr.patched-15/server/kopt.c +--- zephyr.orig/server/kopt.c 2001-02-26 23:48:01.000000000 -0500 ++++ zephyr.patched-15/server/kopt.c 2006-02-16 03:51:36.000000000 -0500 +@@ -36,6 +36,13 @@ + + #define KRB_PROT_VERSION 4 + ++#define swap_u_long(x) {\ ++ unsigned KRB4_32 _krb_swap_tmp[4];\ ++ swab((char *) &x, ((char *) _krb_swap_tmp) +2 ,2); \ ++ swab(((char *) &x) +2,((char *) _krb_swap_tmp),2); \ ++ x = _krb_swap_tmp[0]; \ ++ } ++ + /* Message types , always leave lsb for byte order */ + + #define AUTH_MSG_KDC_REQUEST 1<<1 +@@ -232,11 +239,11 @@ + int + krb_rd_req(authent,service,instance,from_addr,ad,fn) + KTEXT authent; /* The received message */ +- char *service; /* Service name */ +- char *instance; /* Service instance */ +- unsigned KRB_INT32 from_addr; /* Net address of originating host */ +- AUTH_DAT *ad; /* Structure to be filled in */ +- char *fn; /* Filename to get keys from */ ++ char *service; /* Service name */ ++ char *instance; /* Service instance */ ++ unsigned KRB4_32 from_addr; /* Net address of originating host */ ++ AUTH_DAT *ad; /* Structure to be filled in */ ++ char *fn; /* Filename to get keys from */ + { + KTEXT_ST ticket; /* Temp storage for ticket */ + KTEXT tkt = &ticket; +diff -Naur zephyr.orig/server/main.c zephyr.patched-15/server/main.c +--- zephyr.orig/server/main.c 2001-02-26 23:50:08.000000000 -0500 ++++ zephyr.patched-15/server/main.c 2006-02-16 03:51:36.000000000 -0500 +@@ -91,9 +91,7 @@ + char *programname; /* set to the basename of argv[0] */ + char myname[MAXHOSTNAMELEN]; /* my host name */ + +-#ifndef HAVE_HESIOD + char list_file[128]; +-#endif + #ifdef HAVE_KRB4 + char srvtab_file[128]; + char my_realm[REALM_SZ]; +@@ -139,9 +137,7 @@ + extern char *optarg; + extern int optind; + +-#ifndef HAVE_HESIOD + sprintf(list_file, "%s/zephyr/%s", SYSCONFDIR, SERVER_LIST_FILE); +-#endif + #ifdef HAVE_KRB4 + sprintf(srvtab_file, "%s/zephyr/%s", SYSCONFDIR, ZEPHYR_SRVTAB); + sprintf(tkt_file, "%s/zephyr/%s", SYSCONFDIR, ZEPHYR_TKFILE); +diff -Naur zephyr.orig/server/realm.c zephyr.patched-15/server/realm.c +--- zephyr.orig/server/realm.c 2001-02-26 23:51:07.000000000 -0500 ++++ zephyr.patched-15/server/realm.c 2006-02-16 03:51:36.000000000 -0500 +@@ -619,12 +619,14 @@ + zdbug((LOG_DEBUG, "rlm_deathgram: suggesting %s to %s", + (server) ? server->addr_str : "nothing", realm->name)); + ++#ifdef HAVE_KRB4 + if (!ticket_lookup(realm->name)) + if ((retval = ticket_retrieve(realm)) != ZERR_NONE) { + syslog(LOG_WARNING, "rlm_deathgram failed: %s", + error_message(retval)); + return; + } ++#endif + + if ((retval = ZFormatNotice(&snotice, &pack, &packlen, ZAUTH)) + != ZERR_NONE) +@@ -683,12 +685,14 @@ + snotice.z_message = NULL; + snotice.z_message_len = 0; + ++#ifdef HAVE_KRB4 + if (!ticket_lookup(realm->name)) + if ((retval = ticket_retrieve(realm)) != ZERR_NONE) { + syslog(LOG_WARNING, "rlm_wakeup failed: %s", + error_message(retval)); + continue; + } ++#endif + + if ((retval = ZFormatNotice(&snotice, &pack, &packlen, ZAUTH)) + != ZERR_NONE) +@@ -1227,8 +1231,8 @@ + (void) sprintf(multi, "%d/%d", offset+origoffset, origlen); + partnotice.z_multinotice = multi; + if (offset > 0) { +- (void) gettimeofday(&partnotice.z_uid.tv, +- (struct timezone *)0); ++ (void) Z_gettimeofday(&partnotice.z_uid.tv, ++ (struct timezone *)0); + partnotice.z_uid.tv.tv_sec = htonl((u_long) + partnotice.z_uid.tv.tv_sec); + partnotice.z_uid.tv.tv_usec = +diff -Naur zephyr.orig/server/server.c zephyr.patched-15/server/server.c +--- zephyr.orig/server/server.c 2001-02-26 23:51:41.000000000 -0500 ++++ zephyr.patched-15/server/server.c 2006-02-16 03:51:36.000000000 -0500 +@@ -92,10 +92,8 @@ + #endif + + static struct in_addr *get_server_addrs __P((int *number)); +-#ifndef HAVE_HESIOD + static char **get_server_list __P((char *file)); + static void free_server_list __P((char **list)); +-#endif + + static Unacked *srv_nacktab[SRV_NACKTAB_HASHSIZE]; + Server *otherservers; /* points to an array of the known +@@ -981,22 +979,21 @@ + int *number; /* RETURN */ + { + int i; +- char **server_hosts; ++ char **server_hosts = NULL; ++ char **server_hosts_free = NULL; + char **cpp; + struct in_addr *addrs; + struct in_addr *addr; + struct hostent *hp; + ++ server_hosts = get_server_list(list_file); ++ server_hosts_free = server_hosts; + #ifdef HAVE_HESIOD +- /* get the names from Hesiod */ +- server_hosts = hes_resolve("zephyr","sloc"); + if (!server_hosts) +- return NULL; +-#else +- server_hosts = get_server_list(list_file); ++ server_hosts = hes_resolve("zephyr","sloc"); ++#endif + if (!server_hosts) + return NULL; +-#endif + /* count up */ + i = 0; + for (cpp = server_hosts; *cpp; cpp++) +@@ -1015,14 +1012,11 @@ + } + } + *number = i; +-#ifndef HAVE_HESIOD +- free_server_list(server_hosts); +-#endif ++ if (server_hosts_free) ++ free_server_list(server_hosts_free); + return addrs; + } + +-#ifndef HAVE_HESIOD +- + static int nhosts = 0; + + /* +@@ -1090,7 +1084,6 @@ + free(orig_list); + return; + } +-#endif + + /* + * initialize the server structure for address addr, and set a timer +diff -Naur zephyr.orig/server/zserver.h zephyr.patched-15/server/zserver.h +--- zephyr.orig/server/zserver.h 2001-02-26 23:58:14.000000000 -0500 ++++ zephyr.patched-15/server/zserver.h 2006-02-16 03:51:36.000000000 -0500 +@@ -269,8 +269,8 @@ + Sched *check_key_sched_cache __P((des_cblock key)); + void add_to_key_sched_cache __P((des_cblock key, Sched *sched)); + int krb_set_key __P((char *key, int cvt)); +-int krb_rd_req __P((KTEXT authent, char *service, char *instance, +- unsigned KRB_INT32 from_addr, AUTH_DAT *ad, char *fn)); ++/* int krb_rd_req __P((KTEXT authent, char *service, char *instance, ++ unsigned KRB_INT32 from_addr, AUTH_DAT *ad, char *fn)); */ + int krb_find_ticket __P((KTEXT authent, KTEXT ticket)); + int krb_get_lrealm __P((char *r, int n)); + #endif +@@ -354,9 +354,7 @@ + extern int nfds; /* number to look at in select() */ + extern int zdebug; + extern char myname[]; /* domain name of this host */ +-#ifndef HAVE_HESIOD + extern char list_file[]; +-#endif + #ifdef HAVE_KRB4 + extern char srvtab_file[]; + extern char my_realm[]; +diff -Naur zephyr.orig/server/zsrv_conf.h zephyr.patched-15/server/zsrv_conf.h +--- zephyr.orig/server/zsrv_conf.h 1999-01-22 18:19:54.000000000 -0500 ++++ zephyr.patched-15/server/zsrv_conf.h 2006-02-16 03:51:36.000000000 -0500 +@@ -16,9 +16,7 @@ + + /* Path names are relative to CONFDIR, except for the class registry. */ + +-#ifndef HAVE_HESIOD + #define SERVER_LIST_FILE "server.list" +-#endif + #define REALM_LIST_FILE "realm.list" + #ifdef HAVE_KRB4 + #define ZEPHYR_SRVTAB "srvtab" +diff -Naur zephyr.orig/zhm/Makefile.in zephyr.patched-15/zhm/Makefile.in +--- zephyr.orig/zhm/Makefile.in 1998-02-02 17:36:01.000000000 -0500 ++++ zephyr.patched-15/zhm/Makefile.in 2006-02-16 03:51:36.000000000 -0500 +@@ -8,7 +8,7 @@ + lsbindir=@lsbindir@ + + includedir=${prefix}/include +-mandir=${prefix}/man ++mandir=@mandir@ + libdir=${exec_prefix}/lib + + srcdir=@srcdir@ +diff -Naur zephyr.orig/zhm/zhm.c zephyr.patched-15/zhm/zhm.c +--- zephyr.orig/zhm/zhm.c 2000-05-19 19:19:21.000000000 -0400 ++++ zephyr.patched-15/zhm/zhm.c 2006-02-16 03:51:36.000000000 -0500 +@@ -22,7 +22,7 @@ + #define srandom srand48 + #endif + +-#define PIDDIR "/var/athena/" ++#define PIDDIR "/var/run/" + + int hmdebug, rebootflag, noflushflag, errflg, dieflag, inetd, oldpid, nofork; + int no_server = 1, nservchang, nserv, nclt; +diff -Naur zephyr.orig/zwgc/Makefile.in zephyr.patched-15/zwgc/Makefile.in +--- zephyr.orig/zwgc/Makefile.in 1999-05-26 12:22:48.000000000 -0400 ++++ zephyr.patched-15/zwgc/Makefile.in 2006-02-16 03:51:37.000000000 -0500 +@@ -8,7 +8,7 @@ + lsbindir=@lsbindir@ + + includedir=${prefix}/include +-mandir=${prefix}/man ++mandir=@mandir@ + libdir=${exec_prefix}/lib + bindir=${exec_prefix}/bin + +diff -Naur zephyr.orig/zwgc/parser.y zephyr.patched-15/zwgc/parser.y +--- zephyr.orig/zwgc/parser.y 1999-01-22 18:20:30.000000000 -0500 ++++ zephyr.patched-15/zwgc/parser.y 2006-02-16 03:51:37.000000000 -0500 +@@ -230,7 +230,7 @@ + reverse_list_of_nodes($3)); + $$->next = $1; + $$ = reverse_list_of_nodes($$); } +- ++ ; + /* elseifparts needs to be reversed before using... */ + elseifparts : /* empty */ + { $$ = 0; } +diff -Naur zephyr.orig/zwgc/tty_filter.c zephyr.patched-15/zwgc/tty_filter.c +--- zephyr.orig/zwgc/tty_filter.c 1999-08-12 20:19:51.000000000 -0400 ++++ zephyr.patched-15/zwgc/tty_filter.c 2006-02-16 03:51:37.000000000 -0500 +@@ -36,8 +36,10 @@ + + extern int tgetent(); + extern char *tgetstr(),*getenv(); ++#if 0 + short ospeed; + char PC; ++#endif + + /* Dictionary naming convention: + +@@ -91,6 +93,7 @@ + int ex; + string_dictionary_binding *b; + int isrealtty = string_Eq(drivername, "tty"); ++#if 0 + #ifdef HAVE_TERMIOS_H + struct termios tbuf; + +@@ -100,6 +103,7 @@ + + ospeed = (ioctl(0, TIOCGETP, &sgttyb) == 0) ? sgttyb.sg_ospeed : 2400; + #endif ++#endif + + if (termcap_dict == (string_dictionary) NULL) + termcap_dict = string_dictionary_Create(7); +@@ -129,8 +133,10 @@ + /* We cheat here, and ignore the padding (if any) specified for + the mode-change strings (it's a real pain to do "right") */ + ++#if 0 + tmp = tgetstr("pc", &p); + PC = (tmp) ? *tmp : 0; ++#endif + if (tmp = tgetstr("md",&p)) { /* bold ? */ + EXPAND("B.bold"); + tmp = tgetstr("me",&p); +@@ -321,6 +327,7 @@ + + /* Add new block (call it temp) to result: */ + temp = (tty_str_info *)malloc(sizeof(struct _tty_str_info)); ++ *temp = current_mode; + if (last_result_block) { + last_result_block->next = temp; + last_result_block = temp; +@@ -344,13 +351,13 @@ + } + if (desc->code == DT_STR) { + /* just combine string info with current mode: */ +- *temp = current_mode; + temp->str = desc->str; + temp->len = desc->len; + } else if (desc->code == DT_NL) { + /* make the new block a ' ' alignment block with an empty string */ + temp->alignment = ' '; + temp->len = 0; ++ temp->ignore = 0; + } + } + +diff -Naur zephyr.orig/zwgc/zwgc.1 zephyr.patched-15/zwgc/zwgc.1 +--- zephyr.orig/zwgc/zwgc.1 2000-08-10 11:10:52.000000000 -0400 ++++ zephyr.patched-15/zwgc/zwgc.1 2006-02-16 03:51:37.000000000 -0500 +@@ -380,7 +380,7 @@ + .TP + .B break + Exits the innermost if, case, or while block. +-.if n .ll +2in ++.\" .if n .ll +2in + .TP + \fBcase \fIexpr1\fR [ ((\fBmatch \fIexpr\fR [,\fIexpr ...\fR]) | \fBdefault\fR)\fI commands \fR] ... \fBendcase\fR + Evaluates \fIexpr1\fR. Then, each of the match expressions is +@@ -427,7 +427,7 @@ + Completes processing of the current notice. The remainder of the + description file is ignored after execution of this command. + .\" hack because the following line otherwise breaks because it is too long. +-.if n .ll +2in ++.\" .if n .ll +2in + .TP + \fBif \fIexpr1 \fBthen \fIcommands1\fR [\fBelseif \fIexpr2 \fBthen \fIcommands2\fR] ... [\fBelse \fIcommandsn\fR] \fBendif\fR + If \fIexpr1\fR evaluates to true, execute \fIcommands1\fI, etc. [A conditional +@@ -538,16 +538,16 @@ + .\" .TQ 15 + .\" @em + .\" Emphasis. Use underline if available, else reverse video. +-.TQ 15 ++.TP + @roman + Roman (plain) letters (turns off all special modes). +-.TQ ++.TP + @b or @bold + Bold letters. If not available, reverse video, else underline. +-.TQ ++.TP + @i or @italic + Italic letters (underlining, if available). +-.TQ ++.TP + @beep + "bl" termcap entry, else "^G" (beep the terminal); limited to once per + message. +@@ -560,13 +560,13 @@ + .\" .TQ + .\" @u + .\" "us"/"ue" termcap entry. +-.TQ ++.TP + @l or @left + left aligned +-.TQ ++.TP + @c or @center + center aligned +-.TQ ++.TP + @r or @right + right aligned + .RE +@@ -578,34 +578,34 @@ + formatted according to @ commands embedded in the string. Supported + @ commands are: + .RS 10 +-.TQ 15 ++.TP 15 + @roman + turns off @italic and @bold +-.TQ ++.TP + @b or @bold + turns on boldface +-.TQ ++.TP + @i or @italic + turns on italics +-.TQ ++.TP + @l or @left + left aligned +-.TQ ++.TP + @c or @center + center aligned +-.TQ ++.TP + @r or @right + right aligned +-.TQ ++.TP + @large + large type size +-.TQ ++.TP + @medium + medium type size +-.TQ ++.TP + @small + small type size +-.TQ ++.TP + @beep + Ring the X bell (limited to once per message) + .TP +@@ -643,19 +643,19 @@ + .IP + Zwgc variables which the X output device reads are: + .RS 10 +-.TQ 15 ++.TP 15 + default_X_geometry + default geometry for notices, set from resources +-.TQ ++.TP + X_geometry + overrides geometry in resource file, if set +-.TQ ++.TP + default_X_background + default background color for notices, set from resources +-.TQ ++.TP + X_background + overrides bgcolor in resource file, if set +-.TQ ++.TP + style + style, as described above + .RE +@@ -1018,25 +1018,25 @@ + which case you must get new tickets and then run ``zctl load + /dev/null''.) + .SH FILES +-.TQ 15 ++.TP 15 + $HOME/.zwgc.desc + Default location of user's description file +-.TQ ++.TP + /usr/athena/share/zephyr/zwgc.desc + System-wide description file +-.TQ ++.TP + /usr/athena/share/zephyr/zwgc_resources + Default X application resources. +-.TQ ++.TP + $HOME/.zephyr.vars + File containing variable definitions +-.TQ ++.TP + $HOME/.zephyr.subs + Supplementary subscription file +-.TQ ++.TP + $HOME/.Xresources + Standard X resources file +-.TQ ++.TP + $WGFILE or /tmp/wg.\fIuid\fR + File used to store WindowGram port number for other clients + .SH SEE ALSO diff --git a/net-im/zephyr/metadata.xml b/net-im/zephyr/metadata.xml new file mode 100644 index 000000000..7e3286984 --- /dev/null +++ b/net-im/zephyr/metadata.xml @@ -0,0 +1,5 @@ + + + +maintainer-wanted + diff --git a/net-im/zephyr/zephyr-2.1.20010518.15.ebuild b/net-im/zephyr/zephyr-2.1.20010518.15.ebuild new file mode 100644 index 000000000..7d7e9a8e3 --- /dev/null +++ b/net-im/zephyr/zephyr-2.1.20010518.15.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils versionator +DESCRIPTION="The original \"Instant Message\" system client" + +HOMEPAGE="http://packages.debian.org/unstable/source/zephyr" + +MY_PV=$(replace_version_separator 3 '.SNAPSHOT_') +MY_PV=${MY_PV%%_*} + +SRC_URI="http://ftp.debian.org/debian/pool/main/z/zephyr/${PN}_${MY_PV}.orig.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~x86" +IUSE="krb4 X" + +DEPEND="krb4? ( app-crypt/mit-krb5 ) + sys-libs/ncurses + sys-libs/readline + X? || ( + virtual/x11 + ( + x11-libs/libSM + x11-libs/libXau + x11-libs/libXdmcp + x11-libs/libXmu + x11-libs/libXpm + ) + )" + +S=${WORKDIR}/${PN} + +src_unpack() { + unpack ${A} + cd ${S} + + epatch ${FILESDIR}/${P}-debian.patch +} + +src_compile() { + econf $(use_with krb4 krb4=/usr) $(use_with X x) || die "econf failed" + emake || die "emake failed" +} + +src_install() { + emake DESTDIR=${D} install || die "make install failed" + + newinitd ${FILESDIR}/zhm.initd zhm + newconfd ${FILESDIR}/zhm.confd zhm +} -- cgit v1.2.3-65-gdbad