fixup commit for branch 'FOLDER_OUTLINER_20010531_BRANCH' FOLDER_OUTLINER_20010531_BRANCH FOLDER_OUTLINER_20010531_BASE
authorcvs2hg
Thu, 24 May 2001 22:03:21 +0000
branchFOLDER_OUTLINER_20010531_BRANCH
changeset 1556 92d982ae73d10b31b796c9d92c92140d7e5e7984
parent 1431 663f2e9dee6c796a4343f8f3ea9aa565418a13a3
child 13870 cbadab816f249494c866306a35f66eac9c450df3
push idunknown
push userunknown
push dateunknown
fixup commit for branch 'FOLDER_OUTLINER_20010531_BRANCH'
security/coreconf/autoconf.mk.in
security/coreconf/command.mk
security/coreconf/location.mk
security/nss/Makefile.in
security/nss/build/autoconf/config.guess
security/nss/build/autoconf/config.sub
security/nss/configure
security/nss/configure.in
security/nss/gmakefile.win
security/nss/lib/freebl/Makefile.in
security/nss/lib/nss/config.mk
security/nss/lib/smime/config.mk
security/nss/lib/ssl/config.mk
security/nss/lib/ssl/sslsock.c
security/nss/makefile.win
--- a/security/coreconf/autoconf.mk.in
+++ b/security/coreconf/autoconf.mk.in
@@ -1,11 +1,12 @@
 USE_AUTOCONF	= 1
 NO_MDUPDATE	= 1
 OBJDIR_NAME	= .
+OBJDIR		= .
 
 prefix		= @prefix@
 exec_prefix	= @exec_prefix@
 bindir		= @bindir@
 includedir	= @includedir@
 libdir		= @libdir@
 datadir		= @datadir@
 
--- a/security/coreconf/command.mk
+++ b/security/coreconf/command.mk
@@ -32,16 +32,17 @@
 #
 
 #######################################################################
 # Master "Core Components" default command macros;                    #
 # can be overridden in <arch>.mk                                      #
 #######################################################################
 
 CCF           = $(CC) $(CFLAGS)
+LINK          = $(LD)
 LINK_DLL      = $(LINK) $(OS_DLLFLAGS) $(DLLFLAGS)
 LINK_EXE      = $(LINK) $(OS_LFLAGS) $(LFLAGS)
 NFSPWD        = $(NSINSTALL_DIR)/nfspwd
 CFLAGS       += $(OPTIMIZER) $(OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \
 		$(XCFLAGS)
 CXXFLAGS       += $(DEFINES) $(INCLUDES) $(XCFLAGS)
 TAR           = /bin/tar
 
--- a/security/coreconf/location.mk
+++ b/security/coreconf/location.mk
@@ -35,17 +35,17 @@
 # Master "Core Components" macros to figure out binary code location  #
 #######################################################################
 
 #
 # Figure out where the binary code lives.
 #
 
 BUILD         = $(PLATFORM)
-OBJDIR        = $(PLATFORM)
+OBJDIR        = .
 
 DEPENDENCIES  = $(PLATFORM)/.md
 MKDEPEND_DIR = $(MOD_DEPTH)/coreconf/mkdepend
 MKDEPEND_SRCDIR = $(CORECONF_SOURCE)/mkdepend
 MKDEPEND = $(MKDEPEND_DIR)/mkdepend
 MKDEPENDENCIES = depend.mk
 NSINSTALL_DIR = $(MOD_DEPTH)/coreconf/nsinstall
 
--- a/security/nss/Makefile.in
+++ b/security/nss/Makefile.in
@@ -88,23 +88,25 @@ include $(CORECONF_SOURCE)/rules.mk
 
 
 #######################################################################
 # (7) Execute "local" rules. (OPTIONAL).                              #
 #######################################################################
 
 moz_import::
 ifeq ($(OS_ARCH),WINNT)
+ifeq (0,1)
 	cp $(DIST)/../include/* $(DIST)/include
 ifdef BUILD_OPT
 	cp $(DIST)/../WIN32_O.OBJ/lib/* $(DIST)/lib
 else
 	cp $(DIST)/../WIN32_D.OBJ/lib/* $(DIST)/lib
 endif
 	mv $(DIST)/lib/dbm32.lib $(DIST)/lib/dbm.lib
+endif
 else
 ifeq ($(OS_ARCH),OS2)
 	cp -rf $(DIST)/../include $(DIST)
 	cp -rf $(DIST)/../lib $(DIST)
 	cp -f $(DIST)/lib/libmozdbm_s.$(LIB_SUFFIX) $(DIST)/lib/libdbm.$(LIB_SUFFIX)
 else
 	if [ ! -f $(DIST)/lib/libdbm.$(LIB_SUFFIX) ]; then \
 		cp -du $(DIST)/lib/libmozdbm_s.a $(DIST)/lib/libdbm.$(LIB_SUFFIX) ; \
--- a/security/nss/build/autoconf/config.guess
+++ b/security/nss/build/autoconf/config.guess
@@ -1,13 +1,15 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
 #   Free Software Foundation, Inc.
-#
+
+timestamp='2001-03-30'
+
 # 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
 # (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -25,83 +27,148 @@
 # Written by Per Bothner <bothner@cygnus.com>.
 # Please send patches to <config-patches@gnu.org>.
 #
 # 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 <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
+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."
 
-# Use $HOST_CC if defined. $CC may point to a cross-compiler
-if test x"$CC_FOR_BUILD" = x; then
-  if test x"$HOST_CC" != x; then
-    CC_FOR_BUILD="$HOST_CC"
-  else
-    if test x"$CC" != x; then
-      CC_FOR_BUILD="$CC"
-    else
-      CC_FOR_BUILD=cc
-    fi
-  fi
+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
 
 
+dummy=dummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script.
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int dummy(){}" > $dummy.c
+	for c in cc gcc c89 ; do
+	  ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1
+	  if test $? = 0 ; then
+	     CC_FOR_BUILD="$c"; break
+	  fi
+	done
+	rm -f $dummy.c $dummy.o $dummy.rel
+	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.)
 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
 
-dummy=dummy-$$
-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.
 	# Determine the machine/vendor (is the vendor relevant).
 	case "${UNAME_MACHINE}" in
-	    amiga) machine=m68k-cbm ;;
+	    amiga) machine=m68k-unknown ;;
 	    arm32) machine=arm-unknown ;;
 	    atari*) machine=m68k-atari ;;
 	    sun3*) machine=m68k-sun ;;
 	    mac68k) machine=m68k-apple ;;
 	    macppc) machine=powerpc-apple ;;
 	    hp3[0-9][05]) machine=m68k-hp ;;
 	    ibmrt|romp-ibm) machine=romp-ibm ;;
 	    *) machine=${UNAME_MACHINE}-unknown ;;
 	esac
-	# The Operating System including object format.
-	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
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE}" in
+	    i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
+		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
 	release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
 	# 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 ;;
     alpha:OSF1:*:*)
@@ -168,17 +235,17 @@ EOF
 	# 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:OpenBSD:*:*)
 	echo m68k-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
     *:[Aa]miga[Oo][Ss]:*:*)
 	echo ${UNAME_MACHINE}-unknown-amigaos
 	exit 0 ;;
     arc64:OpenBSD:*:*)
@@ -200,17 +267,17 @@ EOF
 	echo mipsel-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
     *:OS/390:*:*)
 	echo i370-ibm-openedition
 	exit 0 ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
 	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*:*:*)
 	# 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
 	else
 		echo pyramid-pyramid-bsd
@@ -336,17 +403,17 @@ EOF
 	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
 	#endif
 	#endif
 	  exit (-1);
 	}
 EOF
 	$CC_FOR_BUILD $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 && exit 0
 	rm -f $dummy.c $dummy
 	echo mips-mips-riscos${UNAME_RELEASE}
 	exit 0 ;;
     Night_Hawk:Power_UNIX:*:*)
 	echo powerpc-harris-powerunix
 	exit 0 ;;
     m88k:CX/UX:7*:*)
 	echo m88k-harris-cxux7
@@ -355,17 +422,17 @@ EOF
 	echo m88k-motorola-sysv4
 	exit 0 ;;
     m88k:*:3*:R3*)
 	echo m88k-motorola-sysv3
 	exit 0 ;;
     AViiON:dgux:*:*)
         # DG/UX returns AViiON for all architectures
         UNAME_PROCESSOR=`/usr/bin/uname -p`
-	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110]
+	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
 		echo m88k-dg-dguxbcs${UNAME_RELEASE}
 	    fi
@@ -390,49 +457,57 @@ EOF
 	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
 	exit 0 ;;
     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
 	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
 	exit 0 ;;              # Note that: echo "'`uname -s`'" gives '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
 		#include <sys/systemcfg.h>
 
 		main()
 			{
 			if (!__power_pc())
 				exit(1);
 			puts("powerpc-ibm-aix3.2.5");
 			exit(0);
 			}
 EOF
-		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
 		rm -f $dummy.c $dummy
 		echo rs6000-ibm-aix3.2.5
 	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
 		echo rs6000-ibm-aix3.2.4
 	else
 		echo rs6000-ibm-aix3.2
 	fi
 	exit 0 ;;
-    *:AIX:*:4)
+    *:AIX:*:[45])
 	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
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
 		IBM_ARCH=rs6000
 	else
 		IBM_ARCH=powerpc
 	fi
 	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 ;;
     *:AIX:*:*)
 	echo rs6000-ibm-aix
 	exit 0 ;;
     ibmrt:4.4BSD:*|romp-ibm:BSD:*)
 	echo romp-ibm-bsd4.4
@@ -448,21 +523,41 @@ EOF
 	exit 0 ;;
     9000/[34]??:4.3bsd:1.*:*)
 	echo m68k-hp-bsd
 	exit 0 ;;
     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
 	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/[678][0-9][0-9])
+              case "${HPUX_REV}" in
+                11.[0-9][0-9])
+                  if [ -x /usr/bin/getconf ]; then
+                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    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" ;;
+                        esac ;;
+                    esac
+                  fi ;;
+              esac
+              if [ "${HP_ARCH}" = "" ]; then
               sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
               #include <stdlib.h>
               #include <unistd.h>
 
               int main ()
               {
               #if defined(_SC_KERNEL_BITS)
                   long bits = sysconf(_SC_KERNEL_BITS);
               #endif
@@ -484,20 +579,25 @@ EOF
               	    puts ("hppa2.0"); break;
               #endif
               	default: puts ("hppa1.0"); break;
               	}
                   exit (0);
               }
 EOF
 	(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
+	if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
 	rm -f $dummy.c $dummy
+	fi ;;
 	esac
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit 0 ;;
+    ia64:HP-UX:*:*)
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	echo ia64-hp-hpux${HPUX_REV}
 	exit 0 ;;
     3050*:HI-UX:*:*)
 	sed 's/^	//' << EOF >$dummy.c
 	#include <unistd.h>
 	int
 	main ()
 	{
 	  long cpu = sysconf (_SC_CPU_VERSION);
@@ -515,17 +615,17 @@ EOF
 		}
 	    }
 	  else if (CPU_IS_HP_MC68K (cpu))
 	    puts ("m68k-hitachi-hiuxwe2");
 	  else puts ("unknown-hitachi-hiuxwe2");
 	  exit (0);
 	}
 EOF
-	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
 	rm -f $dummy.c $dummy
 	echo unknown-hitachi-hiuxwe2
 	exit 0 ;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
 	echo hppa1.1-hp-bsd
 	exit 0 ;;
     9000/8??:4.3bsd:*:*)
 	echo hppa1.0-hp-bsd
@@ -579,63 +679,67 @@ EOF
     CRAY*[A-Z]90:*:*:*)
 	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
 	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
 	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
 	exit 0 ;;
     CRAY*TS:*:*:*)
 	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit 0 ;;
+    CRAY*T3D:*:*:*)
+	echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
     CRAY*T3E:*:*:*)
-	echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	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 ;;
     CRAY-2:*:*:*)
 	echo cray2-cray-unicos
         exit 0 ;;
-    F300:UNIX_System_V:*:*)
+    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 ;;
     hp300:OpenBSD:*:*)
 	echo m68k-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
     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 ;;
     *:BSD/OS:*:*)
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
 	exit 0 ;;
     *:FreeBSD:*:*)
-	if test -x /usr/bin/objformat; then
-	    if test "elf" = "`/usr/bin/objformat`"; then
-		echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
-		exit 0
-	    fi
-	fi
 	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 	exit 0 ;;
     *:OpenBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
 	exit 0 ;;
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
 	exit 0 ;;
     i*:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
 	exit 0 ;;
+#### MozillaHack 
+# Netscape's hacked uname
+    xx:WINNT:* | xx:WIN95:*)
+	echo i586-pc-msvc
+	exit 0 ;;
+###  End MozillaHack
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	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 i386-pc-interix
 	exit 0 ;;
     i*:UWIN*:*)
 	echo ${UNAME_MACHINE}-pc-uwin
@@ -644,193 +748,184 @@ EOF
 	echo powerpcle-unknown-cygwin
 	exit 0 ;;
     prep*:SunOS:5.*:*)
 	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit 0 ;;
     *:GNU:*:*)
 	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
 	exit 0 ;;
-    *:Linux:*:*)
-
-	# The BFD linker knows what the default object file format is, so
-	# first see if it will tell us. cd to the root directory to prevent
-	# problems with other programs or directories called `ld' in the path.
-	ld_help_string=`cd /; ld --help 2>&1`
-	ld_supported_emulations=`echo $ld_help_string \
-			 | sed -ne '/supported emulations:/!d
-				    s/[ 	][ 	]*/ /g
-				    s/.*supported emulations: *//
-				    s/ .*//
-				    p'`
-        case "$ld_supported_emulations" in
-	  *ia64)
-		echo "${UNAME_MACHINE}-unknown-linux"
-		exit 0
-		;;
-	  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
-		;;
-	  elf32arm*)
-		echo "${UNAME_MACHINE}-unknown-linux-gnuoldld"
-		exit 0
-		;;
-	  armelf_linux*)
-		echo "${UNAME_MACHINE}-unknown-linux-gnu"
-		exit 0
-		;;
-	  m68klinux)
-		echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
-		exit 0
-		;;
-	  elf32ppc | elf32ppclinux)
-		# Determine Lib Version
-		cat >$dummy.c <<EOF
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit 0 ;;
+    arm*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux
+	exit 0 ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    mips:Linux:*:*)
+	cat >$dummy.c <<EOF
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+int main (int argc, char *argv[]) {
+#else
+int main (argc, argv) int argc; char *argv[]; {
+#endif
+#ifdef __MIPSEB__
+  printf ("%s-unknown-linux-gnu\n", argv[1]);
+#endif
+#ifdef __MIPSEL__
+  printf ("%sel-unknown-linux-gnu\n", argv[1]);
+#endif
+  return 0;
+}
+EOF
+	$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
+	rm -f $dummy.c $dummy
+	;;
+    ppc:Linux:*:*)
+	# Determine Lib Version
+	cat >$dummy.c <<EOF
 #include <features.h>
 #if defined(__GLIBC__)
 extern char __libc_version[];
 extern char __libc_release[];
 #endif
 main(argc, argv)
      int argc;
      char *argv[];
 {
 #if defined(__GLIBC__)
   printf("%s %s\n", __libc_version, __libc_release);
 #else
-  printf("unkown\n");
+  printf("unknown\n");
 #endif
   return 0;
 }
 EOF
-		LIBC=""
-		$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
+	LIBC=""
+	$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
+	if test "$?" = 0 ; then
+		./$dummy | grep 1\.99 > /dev/null
+		if test "$?" = 0 ; then LIBC="libc1" ; fi
+	fi
+	rm -f $dummy.c $dummy
+	echo powerpc-unknown-linux-gnu${LIBC}
+	exit 0 ;;
+    alpha:Linux:*:*)
+	cat <<EOF >$dummy.s
+	  .data
+	  \$Lformat:
+		.byte 37,100,45,37,120,10,0	# "%d-%x\n"
+	   .text
+		.globl main
+		.align 4
+		.ent main
+	    main:
+		.frame \$30,16,\$26,0
+		ldgp \$29,0(\$27)
+		.prologue 1
+		.long 0x47e03d80 # implver \$0
+		lda \$2,-1
+		.long 0x47e20c21 # amask \$2,\$1
+		lda \$16,\$Lformat
+		mov \$0,\$17
+		not \$1,\$18
+		jsr \$26,printf
+		ldgp \$29,0(\$26)
+		mov 0,\$16
+		jsr \$26,exit
+		.end main
+EOF
+	LIBC=""
+	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+	if test "$?" = 0 ; then
+		case `./$dummy` in
+		0-0)	UNAME_MACHINE="alpha" ;;
+		1-0)	UNAME_MACHINE="alphaev5" ;;
+		1-1)    UNAME_MACHINE="alphaev56" ;;
+		1-101)	UNAME_MACHINE="alphapca56" ;;
+		2-303)	UNAME_MACHINE="alphaev6" ;;
+		2-307)	UNAME_MACHINE="alphaev67" ;;
+		esac
+		objdump --private-headers $dummy | \
+		  grep ld.so.1 > /dev/null
 		if test "$?" = 0 ; then
-			./$dummy | grep 1\.99 > /dev/null
-			if test "$?" = 0 ; then
-				LIBC="libc1"
-			fi
+			LIBC="libc1"
 		fi
-		rm -f $dummy.c $dummy
-		echo powerpc-unknown-linux-gnu${LIBC}
+	fi
+	rm -f $dummy.s $dummy
+	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 ;;
+    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. cd to the root directory to prevent
+	# problems with other programs or directories called `ld' in the path.
+	ld_supported_emulations=`cd /; ld --help 2>&1 \
+			 | sed -ne '/supported emulations:/!d
+				    s/[ 	][ 	]*/ /g
+				    s/.*supported emulations: *//
+				    s/ .*//
+				    p'`
+        case "$ld_supported_emulations" in
+	  i?86linux)
+		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+		exit 0
+		;;
+	  elf_i?86)
+		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+		;;
+	  i?86coff)
+		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
 		exit 0
 		;;
 	esac
-
-	if test "${UNAME_MACHINE}" = "alpha" ; then
-		cat <<EOF >$dummy.s
-			.data
-		\$Lformat:
-			.byte 37,100,45,37,120,10,0	# "%d-%x\n"
-
-			.text
-			.globl main
-			.align 4
-			.ent main
-		main:
-			.frame \$30,16,\$26,0
-			ldgp \$29,0(\$27)
-			.prologue 1
-			.long 0x47e03d80 # implver \$0
-			lda \$2,-1
-			.long 0x47e20c21 # amask \$2,\$1
-			lda \$16,\$Lformat
-			mov \$0,\$17
-			not \$1,\$18
-			jsr \$26,printf
-			ldgp \$29,0(\$26)
-			mov 0,\$16
-			jsr \$26,exit
-			.end main
-EOF
-		LIBC=""
-		$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
-		if test "$?" = 0 ; then
-			case `./$dummy` in
-			0-0)
-				UNAME_MACHINE="alpha"
-				;;
-			1-0)
-				UNAME_MACHINE="alphaev5"
-				;;
-			1-1)
-				UNAME_MACHINE="alphaev56"
-				;;
-			1-101)
-				UNAME_MACHINE="alphapca56"
-				;;
-			2-303)
-				UNAME_MACHINE="alphaev6"
-				;;
-			2-307)
-				UNAME_MACHINE="alphaev67"
-				;;
-			esac
-
-			objdump --private-headers $dummy | \
-			  grep ld.so.1 > /dev/null
-			if test "$?" = 0 ; then
-				LIBC="libc1"
-			fi
-		fi
-		rm -f $dummy.s $dummy
-		echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
-	elif test "${UNAME_MACHINE}" = "mips" ; then
-	  cat >$dummy.c <<EOF
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-	int main (int argc, char *argv[]) {
-#else
-	int main (argc, argv) int argc; char *argv[]; {
-#endif
-#ifdef __MIPSEB__
-  printf ("%s-unknown-linux-gnu\n", argv[1]);
-#endif
-#ifdef __MIPSEL__
-  printf ("%sel-unknown-linux-gnu\n", argv[1]);
-#endif
-  return 0;
-}
-EOF
-	  $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
-	  rm -f $dummy.c $dummy
-	elif test "${UNAME_MACHINE}" = "s390"; then
-	  echo s390-ibm-linux && exit 0
-	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 <<EOF
+	# Either a pre-BFD a.out linker (linux-gnuoldld)
+	# or one that does not give us useful --help.
+	# GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
+	# If ld does not provide *any* "supported emulations:"
+	# that means it is gnuoldld.
+	test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+	case "${UNAME_MACHINE}" in
+	i?86)
+	  VENDOR=pc;
+	  ;;
+	*)
+	  VENDOR=unknown;
+	  ;;
+	esac
+	# Determine whether the default compiler is a.out or elf
+	cat >$dummy.c <<EOF
 #include <features.h>
 #ifdef __cplusplus
 #include <stdio.h>  /* for printf() prototype */
 	int main (int argc, char *argv[]) {
 #else
 	int main (argc, argv) int argc; char *argv[]; {
 #endif
 #ifdef __ELF__
@@ -844,19 +939,20 @@ EOF
    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
 # endif
 #else
   printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
 #endif
   return 0;
 }
 EOF
-	  $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
-	  rm -f $dummy.c $dummy
-	fi ;;
+	$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
+	rm -f $dummy.c $dummy
+	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+	;;
 # 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*:*)
 	echo i386-sequent-sysv4
 	exit 0 ;;
     i?86:UNIX_SV:4.2MP:2.*)
         # Unixware is an offshoot of SVR4, but it has its own version
         # number series starting with 2...
@@ -923,42 +1019,45 @@ EOF
 	fi
 	exit 0 ;;
     mini*:CTIX:SYS*5:*)
 	# "miniframe"
 	echo m68010-convergent-sysv
 	exit 0 ;;
     M68*:*:R3V[567]*:*)
 	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
 	OS_REL=''
 	test -r /etc/.relid \
 	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
 	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
 	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
           && echo i486-ncr-sysv4 && exit 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.*:* | i?86:LynxOS:3.[01]*:*)
+    i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:* | i?86:LynxOS:4.0*:*)
 	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
@@ -970,37 +1069,39 @@ EOF
 	else
 		echo ns32k-sni-sysv
 	fi
 	exit 0 ;;
     PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
                            # says <Richard.M.Bartel@ccMail.Census.GOV>
         echo i586-unisys-sysv4
         exit 0 ;;
+#### MozillaHack 
     *:*OpenVMS*:*:*)
-	case "${UNAME_SYSTEM}" in
-	    POSIX_for_OpenVMS_AXP) echo alpha-dec-openvmsposix ;;
-	    POSIX_for_OpenVMS_VAX) echo vax-dec-openvmsposix ;;
-	    OpenVMS) echo alpha-dec-openvms ;;
-	    *) echo unknown-dec-openvms ;;
-	esac
-	exit 0 ;;
+        case "${UNAME_SYSTEM}" in
+            POSIX_for_OpenVMS_AXP) echo alpha-dec-openvmsposix ;;
+            POSIX_for_OpenVMS_VAX) echo vax-dec-openvmsposix ;;
+            OpenVMS) echo alpha-dec-openvms ;;
+            *) echo unknown-dec-openvms ;;
+        esac
+        exit 0 ;;
+#### End MozillaHack 
     *:UNIX_System_V:4*:FTX*)
 	# From Gerald Hewes <hewes@openmarket.com>.
 	# How about differentiating between stratus architectures? -djm
 	echo hppa1.1-stratus-sysv4
 	exit 0 ;;
     *:*:*:FTX*)
 	# From seanf@swdc.stratus.com.
 	echo i860-stratus-sysv4
 	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 ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
 	if [ -d /usr/nec ]; then
 	        echo mips-nec-sysv${UNAME_RELEASE}
 	else
 	        echo mips-unknown-sysv${UNAME_RELEASE}
 	fi
@@ -1021,41 +1122,81 @@ EOF
 	echo sx5-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 ;;
-    Power*:Mac*OS:*:*)
-	echo powerpc-apple-macos${UNAME_RELEASE}
-	exit 0 ;;
-    *:Mac*OS:*:*)
-	echo ${UNAME_MACHINE}-apple-macos${UNAME_RELEASE}
+    *:Darwin:*:*)
+	echo `uname -p`-apple-darwin${UNAME_RELEASE}
 	exit 0 ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
 	if test "${UNAME_MACHINE}" = "x86pc"; then
 		UNAME_MACHINE=pc
 	fi
 	echo `uname -p`-${UNAME_MACHINE}-nto-qnx
-	exit 0;;
+	exit 0 ;;
     *:QNX:*:4*)
 	echo i386-pc-qnx
 	exit 0 ;;
-    NSR-W:NONSTOP_KERNEL:*:*)
+    NSR-[KW]:NONSTOP_KERNEL:*:*)
 	echo nsr-tandem-nsk${UNAME_RELEASE}
 	exit 0 ;;
-    *:OS/2:*:*)
-	if test "$VACPP" = "yes"; then
+    *: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 ;;
+    i?86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	# echo ${UNAME_MACHINE}-pc-os2-emx
+#### MozillaHack 
+ 	if test "$VACPP" = "yes"; then
 		echo "i386-pc-os2_vacpp"
 	else
 		echo "i386-pc-os2_emx"
 	fi
-    exit 0;;
+#### End MozillaHack 
+	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 ;;
 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 <<EOF
 #ifdef _SEQUENT_
 # include <sys/types.h>
@@ -1137,32 +1278,45 @@ main ()
     if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
 	printf ("i386-sequent-ptx1\n"); exit (0);
     }
     printf ("i386-sequent-ptx\n"); exit (0);
 
 #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 <sys/param.h>
+#  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)
   printf ("i860-alliant-bsd\n"); exit (0);
 #endif
 
   exit (1);
 }
 EOF
 
-$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
 rm -f $dummy.c $dummy
 
 # Apollos put the system type in the environment.
 
 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
 
 # Convex versions that predate uname can use getsysinfo(1)
 
@@ -1185,11 +1339,53 @@ then
 	echo c38-convex-bsd
 	exit 0 ;;
     c4*)
 	echo c4-convex-bsd
 	exit 0 ;;
     esac
 fi
 
-#echo '(Unable to guess system type)' 1>&2
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+    ftp://ftp.gnu.org/pub/gnu/config/
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> 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:
--- a/security/nss/build/autoconf/config.sub
+++ b/security/nss/build/autoconf/config.sub
@@ -1,13 +1,15 @@
 #! /bin/sh
-# Configuration validation subroutine script, version 1.1.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
 #   Free Software Foundation, Inc.
-#
+
+timestamp='2001-03-30'
+
 # 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.
 #
 # 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
 # (at your option) any later version.
@@ -22,17 +24,16 @@
 # Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
-# Written by Per Bothner <bothner@cygnus.com>.
 # Please send patches to <config-patches@gnu.org>.
 #
 # 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.
 # Otherwise, we print the canonical config type on stdout and succeed.
 
 # This file is supposed to be the same for all GNU packages
@@ -45,40 +46,83 @@
 
 # The goal of this file is to map all the various variations of a given
 # machine specification into a single specification in the form:
 #	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
 # or in some cases, the newer four-part form:
 #	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,.*/,,'`
+
+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 <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+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."
 
-# First pass through any local machine types.
-case $1 in
-	*local*)
-		echo $1
-		exit 0
-		;;
-	*)
-	;;
+# 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
-  nto-qnx* | linux-gnu*)
+  nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
   *)
     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
     if [ $basic_machine != $1 ]
     then os=`echo $1 | sed 's/.*-/-/'`
     else os=; fi
@@ -94,17 +138,17 @@ case $os in
 		# Prevent following clause from handling this invalid input.
 		;;
 	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
 	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
 	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
 	-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)
 		os=
 		basic_machine=$1
 		;;
 	-sim | -cisco | -oki | -wec | -winbond)
 		os=
 		basic_machine=$1
 		;;
 	-scout)
@@ -166,67 +210,81 @@ case $os in
 		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 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
-		| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
+	tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
+	        | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
+		| pyramid | mn10200 | mn10300 | tron | a29k \
 		| 580 | i960 | h8300 \
-		| x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \
+		| x86 | ppcbe | mipsbe | mipsle | shbe | shle \
 		| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
+		| hppa64 \
 		| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
 		| alphaev6[78] \
-		| we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
-		| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
+		| we32k | ns16k | clipper | i370 | sh | sh[34] \
+		| powerpc | powerpcle \
+		| 1750a | dsp16xx | pdp10 | pdp11 \
+		| mips16 | mips64 | mipsel | mips64el \
 		| mips64orion | mips64orionel | mipstx39 | mipstx39el \
 		| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
-		| mips64vr5000 | miprs64vr5000el | mcore \
+		| mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \
 		| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
-		| thumb | d10v | fr30 | avr)
+		| thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \
+		| pj | pjl | h8500)
 		basic_machine=$basic_machine-unknown
 		;;
-	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
+	m6811 | m68hc11 | m6812 | m68hc12)
+		# Motorola 68HC11/12.
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | w65)
 		;;
 
 	# 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[234567]86 | x86_64)
 	  basic_machine=$basic_machine-pc
 	  ;;
 	# Object if more than one company name word.
 	*-*-*)
 		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
 		exit 1
 		;;
 	# Recognize the basic CPU types with company name.
 	# FIXME: clean up the formatting here.
-	vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
-	      | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
+	vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
+	      | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
+	      | arm-*  | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
 	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
 	      | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
 	      | xmp-* | ymp-* \
-	      | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \
-	      | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
+	      | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
+	      | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
+	      | hppa2.0n-* | hppa64-* \
 	      | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
 	      | alphaev6[78]-* \
 	      | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
 	      | clipper-* | orion-* \
-	      | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+	      | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
 	      | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
 	      | mips64el-* | mips64orion-* | mips64orionel-* \
 	      | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
 	      | mipstx39-* | mipstx39el-* | mcore-* \
-	      | f301-* | armv*-* | s390-* | sv1-* | t3e-* \
+	      | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \
+	      | [cjt]90-* \
 	      | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
-	      | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* )
+	      | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \
+	      | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*)
 		;;
 	# 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)
@@ -253,24 +311,24 @@ case $basic_machine in
 		basic_machine=a29k-none
 		os=-bsd
 		;;
 	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
@@ -307,23 +365,26 @@ case $basic_machine in
 	cray | ymp)
 		basic_machine=ymp-cray
 		os=-unicos
 		;;
 	cray2)
 		basic_machine=cray2-cray
 		os=-unicos
 		;;
-	[ctj]90-cray)
-		basic_machine=c90-cray
+	[cjt]90)
+		basic_machine=${basic_machine}-cray
 		os=-unicos
 		;;
 	crds | unos)
 		basic_machine=m68k-crds
 		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
 	da30 | da30-*)
 		basic_machine=m68k-da30
 		;;
 	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
 		basic_machine=mips-dec
 		;;
 	delta | 3300 | motorola-3300 | motorola-delta \
 	      | 3300-motorola | delta-motorola)
@@ -361,16 +422,20 @@ case $basic_machine in
 		;;
 	genix)
 		basic_machine=ns32k-ns
 		;;
 	gmicro)
 		basic_machine=tron-gmicro
 		os=-sysv
 		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
 	h3050r* | hiux*)
 		basic_machine=hppa1.1-hitachi
 		os=-hiuxwe2
 		;;
 	h8300hms)
 		basic_machine=h8300-hitachi
 		os=-hms
 		;;
@@ -460,24 +525,16 @@ case $basic_machine in
 	i386mach)
 		basic_machine=i386-mach
 		os=-mach
 		;;
 	i386-vsta | vsta)
 		basic_machine=i386-unknown
 		os=-vsta
 		;;
-	i386-go32 | go32)
-		basic_machine=i386-unknown
-		os=-go32
-		;;
-	i386-mingw32 | mingw32)
-		basic_machine=i386-unknown
-		os=-mingw32
-		;;
 	iris | iris4d)
 		basic_machine=mips-sgi
 		case $os in
 		    -irix*)
 			;;
 		    *)
 			os=-irix4
 			;;
@@ -493,16 +550,26 @@ case $basic_machine in
 	magnum | m3230)
 		basic_machine=mips-mips
 		os=-sysv
 		;;
 	merlin)
 		basic_machine=ns32k-utek
 		os=-sysv
 		;;
+	mingw32)
+		basic_machine=i386-pc
+		os=-mingw32
+		;;
+#### MozillaHack 
+	i386-msvc | msvc)
+		basic_machine=i386-pc
+		os=-msvc
+		;;
+#### End MozillaHack 
 	miniframe)
 		basic_machine=m68000-convergent
 		;;
 	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
 		basic_machine=m68k-atari
 		os=-mint
 		;;
 	mipsel*-linux*)
@@ -523,17 +590,17 @@ case $basic_machine in
 		basic_machine=mmix-knuth
 		os=-mmixware
 		;;
 	monitor)
 		basic_machine=m68k-rom68k
 		os=-coff
 		;;
 	msdos)
-		basic_machine=i386-unknown
+		basic_machine=i386-pc
 		os=-msdos
 		;;
 	mvs)
 		basic_machine=i370-ibm
 		os=-mvs
 		;;
 	ncr3000)
 		basic_machine=i486-ncr
@@ -587,16 +654,20 @@ case $basic_machine in
 	nindy960)
 		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
@@ -622,52 +693,56 @@ case $basic_machine in
 		basic_machine=sparc-tti
 		;;
 	pbb)
 		basic_machine=m68k-tti
 		;;
         pc532 | pc532-*)
 		basic_machine=ns32k-pc532
 		;;
-	pentium | p5 | k5 | k6 | nexen)
+	pentium | p5 | k5 | k6 | nexgen)
 		basic_machine=i586-pc
 		;;
-	pentiumpro | p6 | 6x86)
+	pentiumpro | p6 | 6x86 | athlon)
 		basic_machine=i686-pc
 		;;
 	pentiumii | pentium2)
-		basic_machine=i786-pc
+		basic_machine=i686-pc
 		;;
-	pentium-* | p5-* | k5-* | k6-* | nexen-*)
+	pentium-* | p5-* | k5-* | k6-* | nexgen-*)
 		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
-	pentiumpro-* | p6-* | 6x86-*)
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
 		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	pentiumii-* | pentium2-*)
-		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		basic_machine=i686-`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/^[^-]*-//'`
 		;;
 	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-*)
@@ -749,16 +824,20 @@ case $basic_machine in
 	symmetry)
 		basic_machine=i386-sequent
 		os=-dynix
 		;;
 	t3e)
 		basic_machine=t3e-cray
 		os=-unicos
 		;;
+	tic54x | c54x*)
+		basic_machine=tic54x-unknown
+		os=-coff
+		;;
 	tx39)
 		basic_machine=mipstx39-unknown
 		;;
 	tx39el)
 		basic_machine=mipstx39el-unknown
 		;;
 	tower | tower-32)
 		basic_machine=m68k-ncr
@@ -844,22 +923,29 @@ case $basic_machine in
 		basic_machine=romp-ibm
 		;;
 	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
 		;;
+	sh3 | sh4)
+		basic_machine=sh-unknown
+		;;
 	sparc | sparcv9)
 		basic_machine=sparc-sun
 		;;
         cydra)
 		basic_machine=cydra-cydrome
 		;;
 	orion)
 		basic_machine=orion-highlevel
@@ -872,16 +958,19 @@ case $basic_machine in
 		;;
 	pmac | pmac-mpw)
 		basic_machine=powerpc-apple
 		;;
 	c4x*)
 		basic_machine=c4x-none
 		os=-coff
 		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
 	*)
 		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
 		exit 1
 		;;
 esac
 
 # Here we canonicalize certain aliases for manufacturers.
 case $basic_machine in
@@ -913,20 +1002,22 @@ case $os in
 		os=-sysv4
 		;;
 	-unixware*)
 		os=-sysv4.2uw
 		;;
 	-gnu/linux*)
 		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
 		;;
+#### MozillaHack 
 	-os2_emx)
 		;;
 	-os2_vacpp)
 		;;
+#### End MozillaHack 
 	# First accept the basic system types.
 	# The portable systems comes first.
 	# Each alternative MUST END IN A *, to match a version number.
 	# -sysv* is not here because it comes later, after sysvr4.
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
 	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
@@ -934,17 +1025,20 @@ case $os in
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
 	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
 	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
 	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
 	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
-	      | -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*)
+	      | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
+	      | -msvc* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
 		case $basic_machine in
 		    x86-* | i[34567]86-*)
 			;;
 		    *)
 			os=-nto$os
@@ -995,17 +1089,17 @@ case $os in
 		os=-bsd
 		;;
 	-ctix* | -uts*)
 		os=-sysv
 		;;
 	-ns2 )
 	        os=-nextstep2
 		;;
-	-nsk)
+	-nsk*)
 		os=-nsk
 		;;
 	# Preserve the version number of sinix5.
 	-sinix5.*)
 		os=`echo $os | sed -e 's|sinix|sysv|'`
 		;;
 	-sinix*)
 		os=-sysv4
@@ -1032,17 +1126,17 @@ case $os in
 		os=-ose
 		;;
 	-es1800*)
 		os=-ose
 		;;
 	-xenix)
 		os=-xenix
 		;;
-        -*mint | -*MiNT)
+        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
 	        os=-mint
 		;;
 	-none)
 		;;
 	*)
 		# Get rid of the `-' at the beginning of $os.
 		os=`echo $os | sed 's/[^-]*-//'`
 		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
@@ -1066,16 +1160,19 @@ case $basic_machine in
 		os=-riscix1.2
 		;;
 	arm*-rebel)
 		os=-linux
 		;;
 	arm*-semi)
 		os=-aout
 		;;
+	pdp10-*)
+		os=-tops20
+		;;
         pdp11-*)
 		os=-none
 		;;
 	*-dec | vax-*)
 		os=-ultrix4.2
 		;;
 	m68*-apollo)
 		os=-domain
@@ -1174,17 +1271,17 @@ case $basic_machine in
 		os=-irix
 		;;
         *-siemens)
 		os=-sysv4
 		;;
 	*-masscomp)
 		os=-rtu
 		;;
-	f301-fujitsu)
+	f30[01]-fujitsu | f700-fujitsu)
 		os=-uxpv
 		;;
 	*-rom68k)
 		os=-coff
 		;;
 	*-*bug)
 		os=-coff
 		;;
@@ -1252,17 +1349,25 @@ case $basic_machine in
 				vendor=apple
 				;;
 			-hms*)
 				vendor=hitachi
 				;;
 			-mpw* | -macos*)
 				vendor=apple
 				;;
-			-*mint | -*MiNT)
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
 				vendor=atari
 				;;
 		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:
--- a/security/nss/configure
+++ b/security/nss/configure
@@ -29,16 +29,20 @@ ac_help="$ac_help
   --with-dbm-libdir       Location of dbm libs"
 ac_help="$ac_help
   --with-mozilla          Compile for Mozilla tree"
 ac_help="$ac_help
   --enable-optimize       Enable code optimizations"
 ac_help="$ac_help
   --disable-debug         Do not compile in debugging symbols"
 ac_help="$ac_help
+  --enable-n32            Enable n32 ABI support (IRIX only)"
+ac_help="$ac_help
+  --enable-64bit          Enable 64-bit support (on certain platforms)"
+ac_help="$ac_help
   --disable-cmd           Don't build command-line tools"
 ac_help="$ac_help
   --with-nspr-prefix=PFX  Prefix where NSPR is installed"
 ac_help="$ac_help
   --with-nspr-exec-prefix=PFX
                           Exec prefix where NSPR is installed"
 ac_help="$ac_help
   --disable-md            Do not use compiler-based dependencies "
@@ -595,17 +599,17 @@ esac
 
 
 # Make sure we can run config.sub.
 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:604: checking host system type" >&5
+echo "configure:608: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
 NONE)
   case $nonopt in
   NONE)
     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
@@ -616,17 +620,17 @@ esac
 
 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:625: checking target system type" >&5
+echo "configure:629: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
 NONE)
   case $nonopt in
   NONE) target_alias=$host_alias ;;
   *) target_alias=$nonopt ;;
   esac ;;
@@ -634,17 +638,17 @@ esac
 
 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$target" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:643: checking build system type" >&5
+echo "configure:647: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
 NONE)
   case $nonopt in
   NONE) build_alias=$host_alias ;;
   *) build_alias=$nonopt ;;
   esac ;;
@@ -665,16 +669,17 @@ test "$host_alias" != "$target_alias" &&
 CORECONF_SOURCE='$(topsrcdir)/../coreconf'
 
 cat >> confdefs.h <<\EOF
 #define USE_AUTOCONF 1
 EOF
 
 
 USE_PTHREADS=
+USE_64=
 ENABLE_CMD=1
 MOZILLA_CLIENT=
 _OPTIMIZE_FLAGS=-O
 _DEBUG_FLAGS=-g
 MOZ_DEBUG=1
 MOZ_OPTIMIZE=
 
 CFLAGS="${CFLAGS=}"
@@ -811,32 +816,53 @@ fi
 if test "${enable_debug+set}" = set; then
   enableval="$enable_debug"
   	if test "$enableval" = "no"; then
     	    MOZ_DEBUG=
 	    fi
 fi
 
 
+# Check whether --enable-n32 or --disable-n32 was given.
+if test "${enable_n32+set}" = set; then
+  enableval="$enable_n32"
+   if test "$enableval" = "yes"; then
+	USE_N32=1
+      else if test "$enableval" = "no"; then
+	USE_N32=
+      fi
+    fi 
+fi
+
+
+# Check whether --enable-64bit or --disable-64bit was given.
+if test "${enable_64bit+set}" = set; then
+  enableval="$enable_64bit"
+   if test "$enableval" = "yes"; then
+	    USE_64=1
+      fi 
+fi
+
+
 
 
 # Check whether --enable-cmd or --disable-cmd was given.
 if test "${enable_cmd+set}" = set; then
   enableval="$enable_cmd"
     if test "$enableval" = "no"; then
            ENABLE_CMD=
            fi
 fi
 
 
 if test -z "$SKIP_PATH_CHECKS"; then
     # Extract the first word of "$WHOAMI whoami", so it can be a program name with args.
 set dummy $WHOAMI whoami; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:835: checking for $ac_word" >&5
+echo "configure:861: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_WHOAMI'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$WHOAMI" in
   /*)
   ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a path.
   ;;
   ?:/*)			 
@@ -892,24 +918,24 @@ if test "$target" != "$host"; then
     echo "cross compiling from $host to $target"
     cross_compiling=yes
         
     _SAVE_CC="$CC"
     _SAVE_CFLAGS="$CFLAGS"   
     _SAVE_LDFLAGS="$LDFLAGS"
     
     echo $ac_n "checking for $host compiler""... $ac_c" 1>&6
-echo "configure:901: checking for $host compiler" >&5
+echo "configure:927: checking for $host compiler" >&5
     if test -z "$HOST_CC"; then
             for ac_prog in gcc cc /usr/ucb/cc
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:908: checking for $ac_word" >&5
+echo "configure:934: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$HOST_CC"; then
   ac_cv_prog_HOST_CC="$HOST_CC" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -946,26 +972,26 @@ test -n "$HOST_CC" || HOST_CC=""""
             HOST_LDFLAGS="$LDFLAGS"
     fi
                 
     CC="$HOST_CC"
     CFLAGS="$HOST_CFLAGS"
     LDFLAGS="$HOST_LDFLAGS"
     
     echo $ac_n "checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:955: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
+echo "configure:981: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
     cat > conftest.$ac_ext <<EOF
-#line 957 "configure"
+#line 983 "configure"
 #include "confdefs.h"
 
 int main() {
 return(0);
 ; return 0; }
 EOF
-if { (eval echo configure:964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_prog_host_cc_works=1 echo "$ac_t""yes" 1>&6
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   { echo "configure: error: installation or configuration problem: $host compiler $HOST_CC cannot create executables." 1>&2; exit 1; } 
 fi
@@ -976,17 +1002,17 @@ rm -f conftest*
     LDFLAGS=$_SAVE_LDFLAGS
 
     if test -z "$CC"; then
             for ac_prog in "${target_alias}-gcc" "${target}-gcc"
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:985: checking for $ac_word" >&5
+echo "configure:1011: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1011,17 +1037,17 @@ test -n "$CC" && break
 done
 test -n "$CC" || CC=":"
 
     fi
     unset ac_cv_prog_CC
     # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1020: checking for $ac_word" >&5
+echo "configure:1046: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1041,17 +1067,17 @@ if test -n "$CC"; then
 else
   echo "$ac_t""no" 1>&6
 fi
 
 if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1050: checking for $ac_word" >&5
+echo "configure:1076: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_prog_rejected=no
@@ -1092,17 +1118,17 @@ else
 fi
 
   if test -z "$CC"; then
     case "`uname -s`" in
     *win32* | *WIN32*)
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1101: checking for $ac_word" >&5
+echo "configure:1127: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1124,33 +1150,33 @@ else
 fi
  ;;
     esac
   fi
   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1133: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1159: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 1144 "configure"
+#line 1170 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:1149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
     ac_cv_prog_cc_cross=no
   else
     ac_cv_prog_cc_cross=yes
   fi
 else
@@ -1166,31 +1192,31 @@ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAG
 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
 if test $ac_cv_prog_cc_works = no; then
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1175: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1201: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1180: checking whether we are using GNU C" >&5
+echo "configure:1206: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.c <<EOF
 #ifdef __GNUC__
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
 fi
 fi
 
 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
 
@@ -1199,17 +1225,17 @@ if test $ac_cv_prog_gcc = yes; then
 else
   GCC=
 fi
 
 ac_test_CFLAGS="${CFLAGS+set}"
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1208: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1234: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
   ac_cv_prog_cc_g=yes
 else
   ac_cv_prog_cc_g=no
@@ -1236,17 +1262,17 @@ else
 fi
    
     if test -z "$CXX"; then
             for ac_prog in "${target_alias}-g++" "${target}-g++"
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1245: checking for $ac_word" >&5
+echo "configure:1271: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$CXX"; then
   ac_cv_prog_CXX="$CXX" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1273,17 +1299,17 @@ test -n "$CXX" || CXX=":"
 
     fi
     unset ac_cv_prog_CXX
     for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1282: checking for $ac_word" >&5
+echo "configure:1308: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$CXX"; then
   ac_cv_prog_CXX="$CXX" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1305,33 +1331,33 @@ else
 fi
 
 test -n "$CXX" && break
 done
 test -n "$CXX" || CXX="gcc"
 
 
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1314: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:1340: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
 
 ac_ext=C
 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cxx_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 1325 "configure"
+#line 1351 "configure"
 #include "confdefs.h"
 
 int main(){return(0);}
 EOF
-if { (eval echo configure:1330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cxx_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
     ac_cv_prog_cxx_cross=no
   else
     ac_cv_prog_cxx_cross=yes
   fi
 else
@@ -1347,31 +1373,31 @@ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAG
 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
 if test $ac_cv_prog_cxx_works = no; then
   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1356: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1382: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
 cross_compiling=$ac_cv_prog_cxx_cross
 
 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:1361: checking whether we are using GNU C++" >&5
+echo "configure:1387: checking whether we are using GNU C++" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.C <<EOF
 #ifdef __GNUC__
   yes;
 #endif
 EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gxx=yes
 else
   ac_cv_prog_gxx=no
 fi
 fi
 
 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
 
@@ -1380,17 +1406,17 @@ if test $ac_cv_prog_gxx = yes; then
 else
   GXX=
 fi
 
 ac_test_CXXFLAGS="${CXXFLAGS+set}"
 ac_save_CXXFLAGS="$CXXFLAGS"
 CXXFLAGS=
 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:1389: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1415: checking whether ${CXX-g++} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   echo 'void f(){}' > conftest.cc
 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
   ac_cv_prog_cxx_g=yes
 else
   ac_cv_prog_cxx_g=no
@@ -1417,17 +1443,17 @@ else
 fi
 
     if test -z "$RANLIB"; then
             for ac_prog in "${target_alias}-ranlib" "${target}-ranlib"
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1426: checking for $ac_word" >&5
+echo "configure:1452: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1454,17 +1480,17 @@ test -n "$RANLIB" || RANLIB=":"
 
     fi
     if test -z "$AR"; then
             for ac_prog in "${target_alias}-ar" "${target}-ar"
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1463: checking for $ac_word" >&5
+echo "configure:1489: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$AR"; then
   ac_cv_prog_AR="$AR" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1491,17 +1517,17 @@ test -n "$AR" || AR=":"
 
     fi
     if test -z "$AS"; then
             for ac_prog in "${target_alias}-as" "${target}-as"
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1500: checking for $ac_word" >&5
+echo "configure:1526: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$AS"; then
   ac_cv_prog_AS="$AS" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1528,17 +1554,17 @@ test -n "$AS" || AS=":"
 
     fi
     if test -z "$LD"; then
             for ac_prog in "${target_alias}-ld" "${target}-ld"
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1537: checking for $ac_word" >&5
+echo "configure:1563: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$LD"; then
   ac_cv_prog_LD="$LD" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1564,17 +1590,17 @@ done
 test -n "$LD" || LD=":"
 
     fi
 
 else
     # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1573: checking for $ac_word" >&5
+echo "configure:1599: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1594,17 +1620,17 @@ if test -n "$CC"; then
 else
   echo "$ac_t""no" 1>&6
 fi
 
 if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1603: checking for $ac_word" >&5
+echo "configure:1629: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_prog_rejected=no
@@ -1645,17 +1671,17 @@ else
 fi
 
   if test -z "$CC"; then
     case "`uname -s`" in
     *win32* | *WIN32*)
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1654: checking for $ac_word" >&5
+echo "configure:1680: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1677,33 +1703,33 @@ else
 fi
  ;;
     esac
   fi
   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1686: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1712: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 1697 "configure"
+#line 1723 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:1702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
     ac_cv_prog_cc_cross=no
   else
     ac_cv_prog_cc_cross=yes
   fi
 else
@@ -1719,31 +1745,31 @@ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAG
 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
 if test $ac_cv_prog_cc_works = no; then
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1754: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1733: checking whether we are using GNU C" >&5
+echo "configure:1759: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.c <<EOF
 #ifdef __GNUC__
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
 fi
 fi
 
 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
 
@@ -1752,17 +1778,17 @@ if test $ac_cv_prog_gcc = yes; then
 else
   GCC=
 fi
 
 ac_test_CFLAGS="${CFLAGS+set}"
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1761: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1787: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
   ac_cv_prog_cc_g=yes
 else
   ac_cv_prog_cc_g=no
@@ -1788,17 +1814,17 @@ else
   fi
 fi
 
     for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1797: checking for $ac_word" >&5
+echo "configure:1823: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$CXX"; then
   ac_cv_prog_CXX="$CXX" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1820,33 +1846,33 @@ else
 fi
 
 test -n "$CXX" && break
 done
 test -n "$CXX" || CXX="gcc"
 
 
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1829: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:1855: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
 
 ac_ext=C
 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cxx_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 1840 "configure"
+#line 1866 "configure"
 #include "confdefs.h"
 
 int main(){return(0);}
 EOF
-if { (eval echo configure:1845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cxx_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
     ac_cv_prog_cxx_cross=no
   else
     ac_cv_prog_cxx_cross=yes
   fi
 else
@@ -1862,31 +1888,31 @@ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAG
 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
 if test $ac_cv_prog_cxx_works = no; then
   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1871: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1897: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
 cross_compiling=$ac_cv_prog_cxx_cross
 
 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:1876: checking whether we are using GNU C++" >&5
+echo "configure:1902: checking whether we are using GNU C++" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.C <<EOF
 #ifdef __GNUC__
   yes;
 #endif
 EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gxx=yes
 else
   ac_cv_prog_gxx=no
 fi
 fi
 
 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
 
@@ -1895,17 +1921,17 @@ if test $ac_cv_prog_gxx = yes; then
 else
   GXX=
 fi
 
 ac_test_CXXFLAGS="${CXXFLAGS+set}"
 ac_save_CXXFLAGS="$CXXFLAGS"
 CXXFLAGS=
 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:1904: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1930: checking whether ${CXX-g++} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   echo 'void f(){}' > conftest.cc
 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
   ac_cv_prog_cxx_g=yes
 else
   ac_cv_prog_cxx_g=no
@@ -1929,17 +1955,17 @@ else
   else
     CXXFLAGS=
   fi
 fi
 
     # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1938: checking for $ac_word" >&5
+echo "configure:1964: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1961,17 +1987,17 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
     for ac_prog in as
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1970: checking for $ac_word" >&5
+echo "configure:1996: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$AS" in
   /*)
   ac_cv_path_AS="$AS" # Let the user override the test with a path.
   ;;
   ?:/*)			 
@@ -2002,17 +2028,17 @@ test -n "$AS" && break
 done
 test -n "$AS" || AS="$CC"
 
     for ac_prog in ar
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2011: checking for $ac_word" >&5
+echo "configure:2037: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$AR" in
   /*)
   ac_cv_path_AR="$AR" # Let the user override the test with a path.
   ;;
   ?:/*)			 
@@ -2043,17 +2069,17 @@ test -n "$AR" && break
 done
 test -n "$AR" || AR=":"
 
     for ac_prog in ld
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2052: checking for $ac_word" >&5
+echo "configure:2078: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$LD" in
   /*)
   ac_cv_path_LD="$LD" # Let the user override the test with a path.
   ;;
   ?:/*)			 
@@ -2113,17 +2139,17 @@ fi # SKIP_COMPILER_CHECKS
 
 if test -z "$SKIP_PATH_CHECKS"; then
 
 for ac_prog in gawk mawk nawk awk
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2122: checking for $ac_word" >&5
+echo "configure:2148: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$AWK"; then
   ac_cv_prog_AWK="$AWK" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -2147,17 +2173,17 @@ fi
 test -n "$AWK" && break
 done
 
 for ac_prog in gmake make
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2156: checking for $ac_word" >&5
+echo "configure:2182: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MAKE'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$MAKE" in
   /*)
   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
   ;;
   ?:/*)			 
@@ -2203,17 +2229,17 @@ then
         echo "*** Found GNU Make 3.77.  This version is known to have problems with the"
         echo "*** wildcard function in certain circumstances.  You may experience infinite"
         echo "*** looping while building NSS with 3.77.  If this happens, you can"
         echo "*** either downgrade to 3.76.1 or try configuring with --disable-md."
         echo
 fi
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2212: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:2238: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftestmake <<\EOF
 all:
 	@echo 'ac_maketemp="${MAKE}"'
 EOF
@@ -2234,17 +2260,17 @@ else
   SET_MAKE="MAKE=${MAKE-make}"
 fi
 
 for ac_prog in perl5 perl
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2243: checking for $ac_word" >&5
+echo "configure:2269: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$PERL" in
   /*)
   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
   ;;
   ?:/*)			 
@@ -2277,17 +2303,17 @@ test -n "$PERL" || PERL=":"
 
 if test -z "$PERL" || test "$PERL" = ":"; then
     { echo "configure: error: perl not found in \$PATH" 1>&2; exit 1; }
 fi
 
 # Extract the first word of "xargs", so it can be a program name with args.
 set dummy xargs; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2286: checking for $ac_word" >&5
+echo "configure:2312: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_XARGS'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$XARGS" in
   /*)
   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
   ;;
   ?:/*)			 
@@ -2523,43 +2549,151 @@ if test "${OS_TARGET}" = "WIN95"; then
 fi
 
 
 HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
 HOST_CXXFLAGS="$HOST_CXXFLAGS -DXP_UNIX"
 
 case "$target" in
 
+*-aix*)
+    cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define AIX 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define SYSV 1
+EOF
+
+    CPU_ARCH=rs6000
+    if test -z "$GNU_CC"; then
+        CFLAGS="$CFLAGS -qarch=com"
+    fi
+    AIX_WRAP='$(DIST)/lib/aixwrap.o'
+    AIX_TMP='./_aix_tmp.o'
+    OS_LIBS="$OS_LIBS -lsvld"
+
+    case "${target_os}" in
+        aix4.1*)
+            LDFLAGS="$LDFLAGS -bnso -berok"
+            DLL_SUFFIX=a
+            ;;
+        aix4.2*)
+            cat >> confdefs.h <<\EOF
+#define AIX4_2 1
+EOF
+
+            DSO_LDOPTS='-brtl -bM:SRE -bnoentry $(EXPORT_RULES)'
+            MKSHLIB='$(LD) $(DSO_LDOPTS) -lsvld -L/usr/lpp/xlC/lib -lc -lm'
+            OS_LIBS="$OS_LIBS -L/usr/lpp/xlC/lib -lc -lm"
+            EXPORT_RULES=-bexpall
+            ;;
+        aix4.3*)
+            if test -n "$USE_64"; then
+                cat >> confdefs.h <<\EOF
+#define AIX_64BIT 1
+EOF
+
+                OBJECT_MODE=64
+            fi
+            ;;
+    esac
+    ;;
+    
+*-beos*)
+    cat >> confdefs.h <<\EOF
+#define XP_BEOS 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define BEOS 1
+EOF
+
+    MKSHLIB='$(CC) -nostart -Wl,-soname -Wl,$(notdir $@)'
+    OS_LIBS="${OS_LIBS} -lbe"
+    ;;
+
+*-bsdi*)
+    cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define BSD_OS 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define BSDI 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_STRERROR 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_BSD_FLOCK 1
+EOF
+
+    DSO_CFLAGS='-fPIC -DPIC'
+    DSO_LDOPTS='-shared -Wl,-soname,lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)'
+    MKSHLIB='$(CC) $(DSO_LDOPTS)'
+    
+    if test "$OS_TEST" = "i386"; then
+        cat >> confdefs.h <<\EOF
+#define __i386__ 1
+EOF
+
+        CPU_ARCH=x86
+    elif test "$OS_TEST" = "ppc"; then
+        cat >> confdefs.h <<\EOF
+#define __ppc__ 1
+EOF
+
+        CPU_ARCH=ppc
+    elif test "$OS_TEST" = "sparc" || test "$OS_TEST" = "sparc_v9"; then
+        cat >> confdefs.h <<\EOF
+#define __sparc__ 1
+EOF
+
+        CPU_ARCH=sparc
+    fi
+
+    if test -n "$LIBRUNPATH"; then
+        DSO_LDOPTS="$DSO_LDOPTS -Wl,-R\$(LIBRUNPATH)"
+    fi
+    CFLAGS="$CFLAGS -I/usr/X11R6/include -I/usr/include/g++"
+    ;;
+
 *-cygwin*|*-msvc*)
     cat >> confdefs.h <<\EOF
 #define XP_PC 1
 EOF
 
     cat >> confdefs.h <<\EOF
 #define WIN32 1
 EOF
 
     cat >> confdefs.h <<\EOF
 #define _WINDOWS 1
 EOF
 
 
-    if test -n "$MOZILLA_CLIENT"; then
-        CFLAGS="$CFLAGS -I\$(SOURCE_XP_DIR)/include"
-    fi
-
     AWK=awk
     PERL=perl
     XARGS=xargs
-    NSPR_CFLAGS='-I$(DIST)/include/nspr'
 
     CC=cl
-    CCC=cl
-    LINK=link
+    CXX=cl
+    LD=link
     AR='lib -NOLOGO -OUT:"$@"'
+    AR_FLAGS=
     RANLIB=echo
     BSDECHO=echo
     AS=ml.exe
     ASFLAGS='-Cp -Sn -Zi -coff $(INCLUDES)'
     LIB_SUFFIX=lib
     DLL_SUFFIX=dll
     RC=rc.exe
     DLLFLAGS='-OUT:"$@"'
@@ -2572,16 +2706,333 @@ EOF
         fi
         _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Od -Z7"
         DLLFLAGS="$DLLFLAGS -DEBUG -DEBUGTYPE:CV"
         LDFLAGS="$LDFLAGS -DEBUG -DEBUGTYPE:CV"
     else
         CFLAGS="$CFLAGS -MD"
         _OPTIMIZE_FLAGS=-O2
     fi
+    if test -n "$MOZILLA_CLIENT"; then
+        CFLAGS="$CFLAGS -I\$(SOURCE_XP_DIR)/include"
+    fi
+    NSPR_CFLAGS='-I$(SOURCE_XP_DIR)/include/nspr'
+    if test -n "$MOZILLA_CLIENT"; then
+        DBM_LIBS="\${DIST}/lib/dbm.\${LIB_SUFFIX}"
+        NSPR_LIBS="\${DIST}/lib/plc4.\${LIB_SUFFIX} \${DIST}/lib/plds4.\${LIB_SUFFIX} \${DIST}/lib/nspr4.\${LIB_SUFFIX}"
+    fi
+
+    PROCESSOR=`uname -p`
+    case "${PROCESSOR}" in
+    I386)
+        cat >> confdefs.h <<\EOF
+#define _X86_ 1
+EOF
+
+        CFLAGS="$CFLAGS -W3 -nologo"
+        CPU_ARCH=x386
+        ;;
+    MIPS)
+        cat >> confdefs.h <<\EOF
+#define _MIPS_ 1
+EOF
+
+        CFLAGS="$CFLAGS -W3 -nologo"
+        CPU_ARCH=MIPS
+        ;;
+    ALPHA)
+        cat >> confdefs.h <<\EOF
+#define _ALPHA_ 1
+EOF
+
+        CFLAGS="$CFLAGS -W3 -nologo"
+        CPU_ARCH=ALPHA
+        ;;
+    *)
+        CPU_ARCH='processor_is_undefined'
+    esac
+
+    case "${OS_TARGET}" in
+    WIN95)
+        cat >> confdefs.h <<\EOF
+#define WIN95 1
+EOF
+
+        DLLFLAGS="$DLLFLAGS -nologo -DLL -SUBSYSTEM:WINDOWS -PDB:NONE"
+        ;;
+    WINNT)
+        cat >> confdefs.h <<\EOF
+#define WINNT 1
+EOF
+
+        CFLAGS="CFLAGS -GT"
+        DLLFLAGS="$DLLFLAGS -nologo -DLL -PDB:NONE -SUBSYSTEM:WINDOWS"
+        ;;
+    esac
+    ;;
+
+*-freebsd*)
+    cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define FREEBSD 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_STRERROR 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_BSD_FLOCK 1
+EOF
+
+    CFLAGS="$CFLAGS -fPIC -ansi -Wall -pipe -I/usr/include/g++ -I/usr/X11R6/include"
+    DSO_LDOPTS=-Bshareable
+    MKSHLIB='$(LD) $(DSO_LDOPTS)'
+
+    if test "$OS_TEST" = "alpha"; then
+        CPU_ARCH=alpha
+    else
+        CPU_ARCH=x86
+        cat >> confdefs.h <<\EOF
+#define i386 1
+EOF
+
+    fi
+
+    if test -z "$CLASSIC_NSPR"; then
+        USE_PTHREADS=1
+        cat >> confdefs.h <<\EOF
+#define _THREAD_SAFE 1
+EOF
+
+        CFLAGS="$CFLAGS -pthread"
+    fi
+
+    MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+    if test "$MOZ_OBJFORMAT" != "elf"; then
+        DLL_SUFFIX=so.1.0
+    fi
+    ;;
+
+*-hpux*)
+    cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HPUX 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define hppa 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define _HPUX_SOURCE 1
+EOF
+
+    CPU_ARCH=hppa
+    DLL_SUFFIX=sl
+    CFLAGS="$CFLAGS -Ae +Z"
+    LDFLAGS="$LDFLAGS -z -Wl,+s"
+    MKSHLIB='$(LD) $(DSO_LDOPTS)'
+    DSO_LDOPTS='-b +h $(notdir $@)'
+
+    if echo "$OS_RELEASE" | grep ^A.09 >/dev/null; then
+        cat >> confdefs.h <<\EOF
+#define HPUX9 1
+EOF
+
+        if echo "$OS_RELEASE" | egrep '^A.09.(03|07)' >/dev/null; then
+            DEFAULT_IMPL_STRATEGY=_CLASSIC
+        fi
+    elif echo "$OS_RELEASE" | grep ^B.10 >/dev/null; then
+        cat >> confdefs.h <<\EOF
+#define HPUX10 1
+EOF
+
+        OS_LIBS="$OS_LIBS -lpthread -lm"
+        if echo "$OS_RELEASE" | grep '^B.10.01' >/dev/null; then
+            DEFAULT_IMPL_STRATEGY=_CLASSIC
+        elif echo "$OS_RELEASE" | grep '^B.10.10' >/dev/null; then
+            cat >> confdefs.h <<\EOF
+#define HPUX10_10 1
+EOF
+
+            DEFAULT_IMPL_STRATEGY=_PTH
+        elif echo "$OS_RELEASE" | grep '^B.10.20' >/dev/null; then
+            cat >> confdefs.h <<\EOF
+#define HPUX10_20 1
+EOF
+
+            DEFAULT_IMPL_STRATEGY=_PTH
+        elif echo "$OS_RELEASE" | grep '^B.10.30' >/dev/null; then
+            cat >> confdefs.h <<\EOF
+#define HPUX10_30 1
+EOF
+
+            DEFAULT_IMPL_STRATEGY=_PTH
+        fi
+    elif echo "$OS_RELEASE" | grep ^B.11 >/dev/null; then
+        cat >> confdefs.h <<\EOF
+#define HPUX11 1
+EOF
+
+        OS_LIBS="$OS_LIBS -lpthread -lm -lrt"
+        HPUX=1
+        if test -n "$USE_LONG_LONGS"; then
+            USE_HYBRID=1
+        fi
+        if test -z "$GNU_CC"; then
+            if test "$USE_64"; then
+                CFLAGS="$CFLAGS -Ae +e +DA2.0W +DS2.0 +DChpux"
+            else
+                if test -n "$USE_HYBRID"; then
+                    CFLAGS="$CFLAGS -Aa +e +DA2.0 +DS2.0"
+                else
+                    CFLAGS="$CFLAGS +DAportable +DS2.0"
+                fi
+            fi
+        fi
+    fi
+
+    if test "$DEFAULT_IMPL_STRATEGY" = "_PTH"; then
+        USE_PTHREADS=1
+        if test -n "$CLASSIC_NSPR"; then
+            USE_PTHREADS=
+            IMPL_STRATEGY=_CLASSIC
+        fi
+        if test -n "$PTHREADS_USER"; then
+            USE_PTHREADS=
+            IMPL_STRATEGY=_PTH_USER
+        fi
+    fi
+
+    if test -n "$PTHREADS_USER"; then
+        cat >> confdefs.h <<\EOF
+#define _POSIX_C_SOURCE 199506L
+EOF
+
+    fi
+
+    if test -n "$USE_PTHREADS"; then
+        if echo "$OS_RELEASE" | egrep '^B.10.(10|20)' >/dev/null; then
+            cat >> confdefs.h <<\EOF
+#define _REENTRANT 1
+EOF
+
+        elif echo "$OS_RELEASE" | grep '^B.10.30' >/dev/null; then
+            cat >> confdefs.h <<\EOF
+#define _POSIX_C_SOURCE 199506L
+EOF
+
+        fi
+    fi
+    ;;
+
+*-irix*)
+    cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define IRIX 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define SVR4 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define _SGI_MP_SOURCE 1
+EOF
+
+    CPU_ARCH=mips
+    RANLIB=/bin/true
+    MKSHLIB='$(LD) $(DSO_LDOPTS) -shared -soname $(@:$(OBJDIR)/%.so=%.so)'
+    DSO_LDOPTS='-elf -shared -all'
+    if test "$USE_N32"; then
+        DSO_LDOPTS="$DSO_LDOPTS -n32 -mips3"
+    fi
+    if test "$DSO_BACKEND"; then
+        DSO_LDOPTS="$DSO_LDOPTS -soname \$(DSO_NAME)"
+    fi
+
+    case "$target_os" in
+    irix5.3*)
+        cat >> confdefs.h <<\EOF
+#define IRIX5_3 1
+EOF
+
+        ;;
+    irix6.2*)
+        cat >> confdefs.h <<\EOF
+#define IRIX6_2 1
+EOF
+
+        DSO_LDOPTS="$DSO_LDOPTS -no_unresolved"
+        ;;
+    irix6.3*)
+        cat >> confdefs.h <<\EOF
+#define IRIX6_3 1
+EOF
+
+        DSO_LDOPTS="$DSO_LDOPTS -no_unresolved"
+        ;;
+    irix6.5*)
+        cat >> confdefs.h <<\EOF
+#define IRIX6_5 1
+EOF
+
+        DSO_LDOPTS="$DSO_LDOPTS -no_unresolved"
+        ;;
+    esac
+
+
+    if test -n "$USE_PTHREADS"; then
+        if test "$USE_N32"; then
+            IMPL_STRATEGY=_n32_PTH
+        else
+            IMPL_STRATEGY=_PTH
+        fi
+        case "$target_os" in
+        irix6*)
+            OS_LIBS="$OS_LIBS -lpthread"
+            ;;
+        esac
+    fi
+
+    if test -n "$GNU_CC"; then
+        AS='$(CC) -x assembler-with-cpp'
+        CFLAGS="$CFLAGS -Wall -Wno-format"
+        _OPTIMIZE_FLAGS=-O6
+    else
+        CFLAGS="$CFLAGS -fullwarn -xansi"
+        if test "$USE_N32"; then
+            _OPTIMIZE_FLAGS='-O -OPT:Olimit=4000'
+        else
+            _OPTIMIZE_FLAGS='-O -Olimit 4000'
+        fi
+        if echo "$OS_RELEASE" | grep ^6. >/dev/null; then
+            if test "$USE_N32"; then
+                CFLAGS="$CFLAGS -n32 -mips3 -exceptions"
+            else
+                CFLAGS="$CFLAGS -32"
+            fi
+            CFLAGS="$CFLAGS -multigot"
+        else
+            CFLAGS="$CFLAGS -xgot"
+        fi
+        if test "$USE_N32"; then
+            CFLAGS="$CFLAGS -dollar"
+        fi
+    fi
     ;;
 
 *-linux*)
     USE_PTHREADS=1
     cat >> confdefs.h <<\EOF
 #define XP_UNIX 1
 EOF
 
@@ -2851,17 +3302,17 @@ fi
 			NSPR_CONFIG=$nspr_config_prefix/bin/nspr-config
 		fi
 	fi
 
 	unset ac_cv_path_NSPR_CONFIG
 	# Extract the first word of "nspr-config", so it can be a program name with args.
 set dummy nspr-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2860: checking for $ac_word" >&5
+echo "configure:3311: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_NSPR_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$NSPR_CONFIG" in
   /*)
   ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)			 
@@ -2886,17 +3337,17 @@ NSPR_CONFIG="$ac_cv_path_NSPR_CONFIG"
 if test -n "$NSPR_CONFIG"; then
   echo "$ac_t""$NSPR_CONFIG" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
 	min_nspr_version=4.0.0
 	echo $ac_n "checking for NSPR - version >= $min_nspr_version (skipping)""... $ac_c" 1>&6
-echo "configure:2895: checking for NSPR - version >= $min_nspr_version (skipping)" >&5
+echo "configure:3346: checking for NSPR - version >= $min_nspr_version (skipping)" >&5
 
 	no_nspr=""
 	if test "$NSPR_CONFIG" = "no"; then
 		no_nspr="yes"
 	else
 		NSPR_CFLAGS=`$NSPR_CONFIG $nspr_config_args --cflags`
 		NSPR_LIBS=`$NSPR_CONFIG $nspr_config_args --libs`
 
--- a/security/nss/configure.in
+++ b/security/nss/configure.in
@@ -31,16 +31,17 @@ CORECONF_SOURCE='$(topsrcdir)/../corecon
 
 dnl Set this define to make fixes w/o breaking anything else.
 AC_DEFINE(USE_AUTOCONF)
 
 dnl ========================================================
 dnl = Defaults
 dnl ========================================================
 USE_PTHREADS=
+USE_64=
 ENABLE_CMD=1
 MOZILLA_CLIENT=
 _OPTIMIZE_FLAGS=-O
 _DEBUG_FLAGS=-g
 MOZ_DEBUG=1
 MOZ_OPTIMIZE=
 
 dnl ========================================================
@@ -164,16 +165,31 @@ AC_ARG_ENABLE(optimize,
     MOZ_OPTIMIZE=1)
 
 AC_ARG_ENABLE(debug,
     [  --disable-debug         Do not compile in debugging symbols],
     [	if test "$enableval" = "no"; then
     	    MOZ_DEBUG=
 	    fi])
 
+AC_ARG_ENABLE(n32,
+    [  --enable-n32            Enable n32 ABI support (IRIX only)],
+    [ if test "$enableval" = "yes"; then
+	USE_N32=1
+      else if test "$enableval" = "no"; then
+	USE_N32=
+      fi
+    fi ])
+
+AC_ARG_ENABLE(64bit,
+    [  --enable-64bit          Enable 64-bit support (on certain platforms)],
+    [ if test "$enableval" = "yes"; then
+	    USE_64=1
+      fi ])
+
 dnl AC_ARG_ENABLE(shared,
 dnl    [  --disable-shared        Do not compile into shared libraries])
 
 dnl AC_ARG_ENABLE(target,
 dnl    [  --enable-target=\$t      Turn on features for target \$t when build has multiple targets],
 dnl    MOZ_TARGET=`echo $enableval | tr a-z A-Z`,
 dnl    MOZ_TARGET=)
 
@@ -564,34 +580,97 @@ dnl ====================================
 HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
 HOST_CXXFLAGS="$HOST_CXXFLAGS -DXP_UNIX"
 
 dnl ========================================================
 dnl Override of system specific target options
 dnl ========================================================
 case "$target" in
 
+*-aix*)
+    AC_DEFINE(XP_UNIX)
+    AC_DEFINE(AIX)
+    AC_DEFINE(SYSV)
+    CPU_ARCH=rs6000
+    if test -z "$GNU_CC"; then
+        CFLAGS="$CFLAGS -qarch=com"
+    fi
+    AIX_WRAP='$(DIST)/lib/aixwrap.o'
+    AIX_TMP='./_aix_tmp.o'
+    OS_LIBS="$OS_LIBS -lsvld"
+
+    case "${target_os}" in
+        aix4.1*)
+            LDFLAGS="$LDFLAGS -bnso -berok"
+            DLL_SUFFIX=a
+            ;;
+        aix4.2*)
+            AC_DEFINE(AIX4_2)
+            DSO_LDOPTS='-brtl -bM:SRE -bnoentry $(EXPORT_RULES)'
+            MKSHLIB='$(LD) $(DSO_LDOPTS) -lsvld -L/usr/lpp/xlC/lib -lc -lm'
+            OS_LIBS="$OS_LIBS -L/usr/lpp/xlC/lib -lc -lm"
+            EXPORT_RULES=-bexpall
+            ;;
+        aix4.3*)
+            if test -n "$USE_64"; then
+                AC_DEFINE(AIX_64BIT)
+                OBJECT_MODE=64
+            fi
+            ;;
+    esac
+    ;;
+    
+*-beos*)
+    AC_DEFINE(XP_BEOS)
+    AC_DEFINE(BEOS)
+    MKSHLIB='$(CC) -nostart -Wl,-soname -Wl,$(notdir $@)'
+    OS_LIBS="${OS_LIBS} -lbe"
+    ;;
+
+*-bsdi*)
+    AC_DEFINE(XP_UNIX)
+    AC_DEFINE(BSD_OS)
+    AC_DEFINE(BSDI)
+    AC_DEFINE(HAVE_STRERROR)
+    AC_DEFINE(HAVE_BSD_FLOCK)
+    DSO_CFLAGS='-fPIC -DPIC'
+    DSO_LDOPTS='-shared -Wl,-soname,lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)'
+    MKSHLIB='$(CC) $(DSO_LDOPTS)'
+    
+    if test "$OS_TEST" = "i386"; then
+        AC_DEFINE(__i386__)
+        CPU_ARCH=x86
+    elif test "$OS_TEST" = "ppc"; then
+        AC_DEFINE(__ppc__)
+        CPU_ARCH=ppc
+    elif test "$OS_TEST" = "sparc" || test "$OS_TEST" = "sparc_v9"; then
+        AC_DEFINE(__sparc__)
+        CPU_ARCH=sparc
+    fi
+
+    if test -n "$LIBRUNPATH"; then
+        DSO_LDOPTS="$DSO_LDOPTS -Wl,-R\$(LIBRUNPATH)"
+    fi
+    CFLAGS="$CFLAGS -I/usr/X11R6/include -I/usr/include/g++"
+    ;;
+
 *-cygwin*|*-msvc*)
     AC_DEFINE(XP_PC)
     AC_DEFINE(WIN32)
     AC_DEFINE(_WINDOWS)
 
-    if test -n "$MOZILLA_CLIENT"; then
-        CFLAGS="$CFLAGS -I\$(SOURCE_XP_DIR)/include"
-    fi
-
     AWK=awk
     PERL=perl
     XARGS=xargs
-    NSPR_CFLAGS='-I$(DIST)/include/nspr'
 
     CC=cl
-    CCC=cl
-    LINK=link
+    CXX=cl
+    LD=link
     AR='lib -NOLOGO -OUT:"$@"'
+    AR_FLAGS=
     RANLIB=echo
     BSDECHO=echo
     AS=ml.exe
     ASFLAGS='-Cp -Sn -Zi -coff $(INCLUDES)'
     LIB_SUFFIX=lib
     DLL_SUFFIX=dll
     RC=rc.exe
     DLLFLAGS='-OUT:"$@"'
@@ -604,16 +683,237 @@ case "$target" in
         fi
         _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Od -Z7"
         DLLFLAGS="$DLLFLAGS -DEBUG -DEBUGTYPE:CV"
         LDFLAGS="$LDFLAGS -DEBUG -DEBUGTYPE:CV"
     else
         CFLAGS="$CFLAGS -MD"
         _OPTIMIZE_FLAGS=-O2
     fi
+    if test -n "$MOZILLA_CLIENT"; then
+        CFLAGS="$CFLAGS -I\$(SOURCE_XP_DIR)/include"
+    fi
+    NSPR_CFLAGS='-I$(SOURCE_XP_DIR)/include/nspr'
+    if test -n "$MOZILLA_CLIENT"; then
+        DBM_LIBS="\${DIST}/lib/dbm.\${LIB_SUFFIX}"
+        NSPR_LIBS="\${DIST}/lib/plc4.\${LIB_SUFFIX} \${DIST}/lib/plds4.\${LIB_SUFFIX} \${DIST}/lib/nspr4.\${LIB_SUFFIX}"
+    fi
+
+    PROCESSOR=`uname -p`
+    case "${PROCESSOR}" in
+    I386)
+        AC_DEFINE(_X86_)
+        CFLAGS="$CFLAGS -W3 -nologo"
+        CPU_ARCH=x386
+        ;;
+    MIPS)
+        AC_DEFINE(_MIPS_)
+        CFLAGS="$CFLAGS -W3 -nologo"
+        CPU_ARCH=MIPS
+        ;;
+    ALPHA)
+        AC_DEFINE(_ALPHA_)
+        CFLAGS="$CFLAGS -W3 -nologo"
+        CPU_ARCH=ALPHA
+        ;;
+    *)
+        CPU_ARCH='processor_is_undefined'
+    esac
+
+    case "${OS_TARGET}" in
+    WIN95)
+        AC_DEFINE(WIN95)
+        DLLFLAGS="$DLLFLAGS -nologo -DLL -SUBSYSTEM:WINDOWS -PDB:NONE"
+        ;;
+    WINNT)
+        AC_DEFINE(WINNT)
+        CFLAGS="CFLAGS -GT"
+        DLLFLAGS="$DLLFLAGS -nologo -DLL -PDB:NONE -SUBSYSTEM:WINDOWS"
+        ;;
+    esac
+    ;;
+
+*-freebsd*)
+    AC_DEFINE(XP_UNIX)
+    AC_DEFINE(FREEBSD)
+    AC_DEFINE(HAVE_STRERROR)
+    AC_DEFINE(HAVE_BSD_FLOCK)
+    CFLAGS="$CFLAGS -fPIC -ansi -Wall -pipe -I/usr/include/g++ -I/usr/X11R6/include"
+    DSO_LDOPTS=-Bshareable
+    MKSHLIB='$(LD) $(DSO_LDOPTS)'
+
+    if test "$OS_TEST" = "alpha"; then
+        CPU_ARCH=alpha
+    else
+        CPU_ARCH=x86
+        AC_DEFINE(i386)
+    fi
+
+    if test -z "$CLASSIC_NSPR"; then
+        USE_PTHREADS=1
+        AC_DEFINE(_THREAD_SAFE)
+        CFLAGS="$CFLAGS -pthread"
+    fi
+
+    MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+    if test "$MOZ_OBJFORMAT" != "elf"; then
+        DLL_SUFFIX=so.1.0
+    fi
+    ;;
+
+*-hpux*)
+    AC_DEFINE(XP_UNIX)
+    AC_DEFINE(HPUX)
+    AC_DEFINE(hppa)
+    AC_DEFINE(_HPUX_SOURCE)
+    CPU_ARCH=hppa
+    DLL_SUFFIX=sl
+    CFLAGS="$CFLAGS -Ae +Z"
+    LDFLAGS="$LDFLAGS -z -Wl,+s"
+    MKSHLIB='$(LD) $(DSO_LDOPTS)'
+    DSO_LDOPTS='-b +h $(notdir $@)'
+
+    if echo "$OS_RELEASE" | grep ^A.09 >/dev/null; then
+        AC_DEFINE(HPUX9)
+        if echo "$OS_RELEASE" | egrep '^A.09.(03|07)' >/dev/null; then
+            DEFAULT_IMPL_STRATEGY=_CLASSIC
+        fi
+    elif echo "$OS_RELEASE" | grep ^B.10 >/dev/null; then
+        AC_DEFINE(HPUX10)
+        OS_LIBS="$OS_LIBS -lpthread -lm"
+        if echo "$OS_RELEASE" | grep '^B.10.01' >/dev/null; then
+            DEFAULT_IMPL_STRATEGY=_CLASSIC
+        elif echo "$OS_RELEASE" | grep '^B.10.10' >/dev/null; then
+            AC_DEFINE(HPUX10_10)
+            DEFAULT_IMPL_STRATEGY=_PTH
+        elif echo "$OS_RELEASE" | grep '^B.10.20' >/dev/null; then
+            AC_DEFINE(HPUX10_20)
+            DEFAULT_IMPL_STRATEGY=_PTH
+        elif echo "$OS_RELEASE" | grep '^B.10.30' >/dev/null; then
+            AC_DEFINE(HPUX10_30)
+            DEFAULT_IMPL_STRATEGY=_PTH
+        fi
+    elif echo "$OS_RELEASE" | grep ^B.11 >/dev/null; then
+        AC_DEFINE(HPUX11)
+        OS_LIBS="$OS_LIBS -lpthread -lm -lrt"
+        HPUX=1
+        if test -n "$USE_LONG_LONGS"; then
+            USE_HYBRID=1
+        fi
+        if test -z "$GNU_CC"; then
+            if test "$USE_64"; then
+                CFLAGS="$CFLAGS -Ae +e +DA2.0W +DS2.0 +DChpux"
+            else
+                if test -n "$USE_HYBRID"; then
+                    CFLAGS="$CFLAGS -Aa +e +DA2.0 +DS2.0"
+                else
+                    CFLAGS="$CFLAGS +DAportable +DS2.0"
+                fi
+            fi
+        fi
+    fi
+
+    if test "$DEFAULT_IMPL_STRATEGY" = "_PTH"; then
+        USE_PTHREADS=1
+        if test -n "$CLASSIC_NSPR"; then
+            USE_PTHREADS=
+            IMPL_STRATEGY=_CLASSIC
+        fi
+        if test -n "$PTHREADS_USER"; then
+            USE_PTHREADS=
+            IMPL_STRATEGY=_PTH_USER
+        fi
+    fi
+
+    if test -n "$PTHREADS_USER"; then
+        AC_DEFINE(_POSIX_C_SOURCE,199506L)
+    fi
+
+    if test -n "$USE_PTHREADS"; then
+        if echo "$OS_RELEASE" | egrep '^B.10.(10|20)' >/dev/null; then
+            AC_DEFINE(_REENTRANT)
+        elif echo "$OS_RELEASE" | grep '^B.10.30' >/dev/null; then
+            AC_DEFINE(_POSIX_C_SOURCE,199506L)
+        fi
+    fi
+    ;;
+
+*-irix*)
+    AC_DEFINE(XP_UNIX)
+    AC_DEFINE(IRIX)
+    AC_DEFINE(SVR4)
+    AC_DEFINE(_SGI_MP_SOURCE)
+    CPU_ARCH=mips
+    RANLIB=/bin/true
+    MKSHLIB='$(LD) $(DSO_LDOPTS) -shared -soname $(@:$(OBJDIR)/%.so=%.so)'
+    DSO_LDOPTS='-elf -shared -all'
+    if test "$USE_N32"; then
+        DSO_LDOPTS="$DSO_LDOPTS -n32 -mips3"
+    fi
+    if test "$DSO_BACKEND"; then
+        DSO_LDOPTS="$DSO_LDOPTS -soname \$(DSO_NAME)"
+    fi
+
+    case "$target_os" in
+    irix5.3*)
+        AC_DEFINE(IRIX5_3)
+        ;;
+    irix6.2*)
+        AC_DEFINE(IRIX6_2)
+        DSO_LDOPTS="$DSO_LDOPTS -no_unresolved"
+        ;;
+    irix6.3*)
+        AC_DEFINE(IRIX6_3)
+        DSO_LDOPTS="$DSO_LDOPTS -no_unresolved"
+        ;;
+    irix6.5*)
+        AC_DEFINE(IRIX6_5)
+        DSO_LDOPTS="$DSO_LDOPTS -no_unresolved"
+        ;;
+    esac
+
+
+    if test -n "$USE_PTHREADS"; then
+        if test "$USE_N32"; then
+            IMPL_STRATEGY=_n32_PTH
+        else
+            IMPL_STRATEGY=_PTH
+        fi
+        case "$target_os" in
+        irix6*)
+            OS_LIBS="$OS_LIBS -lpthread"
+            ;;
+        esac
+    fi
+
+    if test -n "$GNU_CC"; then
+        AS='$(CC) -x assembler-with-cpp'
+        CFLAGS="$CFLAGS -Wall -Wno-format"
+        _OPTIMIZE_FLAGS=-O6
+    else
+        CFLAGS="$CFLAGS -fullwarn -xansi"
+        if test "$USE_N32"; then
+            _OPTIMIZE_FLAGS='-O -OPT:Olimit=4000'
+        else
+            _OPTIMIZE_FLAGS='-O -Olimit 4000'
+        fi
+        if echo "$OS_RELEASE" | grep ^6. >/dev/null; then
+            if test "$USE_N32"; then
+                CFLAGS="$CFLAGS -n32 -mips3 -exceptions"
+            else
+                CFLAGS="$CFLAGS -32"
+            fi
+            CFLAGS="$CFLAGS -multigot"
+        else
+            CFLAGS="$CFLAGS -xgot"
+        fi
+        if test "$USE_N32"; then
+            CFLAGS="$CFLAGS -dollar"
+        fi
+    fi
     ;;
 
 *-linux*)
     USE_PTHREADS=1
     AC_DEFINE(XP_UNIX)
     AC_DEFINE(LINUX)
     AC_DEFINE(linux)
     AC_DEFINE(_POSIX_SOURCE)
--- a/security/nss/gmakefile.win
+++ b/security/nss/gmakefile.win
@@ -42,49 +42,40 @@ ifdef MOZ_DEBUG
 ifndef MOZ_NO_DEBUG_RTL
 USE_DEBUG_RTL=1
 endif
 endif
 
 NSS_CONFIGURE := ../configure \
 		--with-mozilla \
 		--disable-cmd \
-		--with-dist-prefix=$(MOZ_DIST_FLIPPED) \
-		--with-dist-bindir=$(MOZ_DIST_FLIPPED)/$(MOZ_OBJDIR)/bin \
-		--with-dist-libdir=$(MOZ_DIST_FLIPPED)/$(MOZ_OBJDIR)/lib
+		--with-dist-prefix=$(MOZ_DIST_FLIPPED)/$(MOZ_OBJDIR)
 
 ifeq (,$(MOZ_DEBUG))
 NSS_CONFIGURE := $(NSS_CONFIGURE) --enable-optimize --disable-debug
 endif
 
+GMAKE_FLAGS := $(GMAKE_FLAGS) SOURCE_XP_DIR=$(MOZ_DIST_FLIPPED)
+
 define MAKE_OBJDIR
 if test ! -d $(@D) ; then rm -rf $(@D) ; nsinstall -D $(@D) ; fi
 endef
 
-
 all:: export libs install
 
 # Argh.  nmake keeps the cwd from cmd to cmd and gmake does not
 # Furthermore, shmsdos doesn't support '&&' so there's a chance the
 # 'cd' could fail and configure would be run in the wrong dir
 #
-$(MOZ_OBJDIR)/config.status: configure configure.in
+$(MOZ_OBJDIR)/config.status: gmakefile.win configure configure.in ..\coreconf\autoconf.mk.in
 	@$(MAKE_OBJDIR) 
-	cd $(MOZ_OBJDIR)/ ; \
-		sh $(NSS_CONFIGURE)
+	cd $(MOZ_OBJDIR)/ ; sh $(NSS_CONFIGURE)
 
-export:: $(MOZ_OBJDIR)/config.status
-	gmake $(GMAKE_FLAGS) -C $(MOZ_OBJDIR)/lib $@
-libs:: $(MOZ_OBJDIR)/config.status
-	gmake $(GMAKE_FLAGS) -C $(MOZ_OBJDIR)/lib $@
-install:: $(MOZ_OBJDIR)/config.status
-	gmake $(GMAKE_FLAGS) -C $(MOZ_OBJDIR)/lib $@
-clean:: $(MOZ_OBJDIR)/config.status
-	gmake $(GMAKE_FLAGS) -C $(MOZ_OBJDIR)/lib $@
-clobber:: $(MOZ_OBJDIR)/config.status
-	gmake $(GMAKE_FLAGS) -C $(MOZ_OBJDIR)/lib $@
-clobber_all:: $(MOZ_OBJDIR)/config.status
-	gmake $(GMAKE_FLAGS) -C $(MOZ_OBJDIR)/lib $@
+libs install export: $(MOZ_OBJDIR)/config.status
+	gmake $(GMAKE_FLAGS) -C $(MOZ_OBJDIR) $@
 
-###export libs install clobber clobber_all clean::
-distclean:
+clean clobber clobber_all:
+	rm -rf $(MOZ_OBJDIR)
+
+ distclean:
 	rm -rf WIN32_D.OBJ WIN32_O.OBJ
 
+
--- a/security/nss/lib/freebl/Makefile.in
+++ b/security/nss/lib/freebl/Makefile.in
@@ -89,19 +89,22 @@ ifneq ($(OS_TARGET),WIN16)
     DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE -DMP_ASSEMBLY_DIV_2DX1D
 endif
 endif
 
 
 ifeq ($(OS_ARCH),IRIX)
 ifeq ($(USE_N32),1)
     ASFILES  = mpi_mips.s
+    DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE -DMP_USE_UINT_DIGIT
+ifeq ($(GNU_CC),1)
+    ASFLAGS = -Wp,-P -Wp,-traditional -O -mips3
+else
     ASFLAGS = -O -OPT:Olimit=4000 -dollar -fullwarn -xansi -n32 -mips3
-    DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE -DMP_USE_UINT_DIGIT
-else
+endif
 endif
 endif
 
 ifeq ($(OS_TARGET),Linux)
 ifeq ($(CPU_ARCH),x86)
     ASFILES  = mpi_x86.s
     DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE -DMP_ASSEMBLY_DIV_2DX1D
 endif
--- a/security/nss/lib/nss/config.mk
+++ b/security/nss/lib/nss/config.mk
@@ -43,17 +43,17 @@
 
 # can't do this in manifest.mn because OS_ARCH isn't defined there.
 ifeq ($(OS_ARCH), WINNT)
 
 # don't want the 32 in the shared library name
 SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).dll
 IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).lib
 
-DLLFLAGS += -DEF:nss.def
+DLLFLAGS += -DEF:$(srcdir)/nss.def
 RES = $(OBJDIR)/nss.res
 RESNAME = nss.rc
 
 # $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS)
 CRYPTOLIB=$(DIST)/lib/freebl.lib
 CRYPTODIR=../freebl
 ifdef MOZILLA_SECURITY_BUILD
 	CRYPTOLIB=$(DIST)/lib/crypto.lib
--- a/security/nss/lib/smime/config.mk
+++ b/security/nss/lib/smime/config.mk
@@ -44,17 +44,17 @@
 RELEASE_LIBS = $(TARGETS)
 
 ifeq ($(OS_ARCH), WINNT)
 
 # don't want the 32 in the shared library name
 SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).dll
 IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).lib
 
-DLLFLAGS += -DEF:smime.def
+DLLFLAGS += -DEF:$(srcdir)/smime.def
 RES = $(OBJDIR)/smime.res
 RESNAME = smime.rc
 
 SHARED_LIBRARY_LIBS = \
 	$(DIST)/lib/pkcs12.lib \
 	$(DIST)/lib/pkcs7.lib \
 	$(NULL)
 
@@ -117,10 +117,10 @@ endif
 
 ifeq ($(OS_ARCH),Linux)
 MAPFILE = $(OBJDIR)/smimemap.linux
 ALL_TRASH += $(MAPFILE)
 MKSHLIB += -Wl,--version-script,$(MAPFILE)
 endif
 
 
-	
 
+
--- a/security/nss/lib/ssl/config.mk
+++ b/security/nss/lib/ssl/config.mk
@@ -42,17 +42,17 @@
 #PROGRAM        =
 
 ifeq ($(OS_ARCH), WINNT)
 
 # don't want the 32 in the shared library name
 SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).dll
 IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).lib
 
-DLLFLAGS += -DEF:ssl.def
+DLLFLAGS += -DEF:$(srcdir)/ssl.def
 RES = $(OBJDIR)/ssl.res
 RESNAME = ssl.rc
 
 EXTRA_SHARED_LIBS += \
 	$(DIST)/lib/nss3.lib \
 	$(DIST)/lib/$(NSPR31_LIB_PREFIX)plc4.lib \
 	$(DIST)/lib/$(NSPR31_LIB_PREFIX)plds4.lib \
 	$(DIST)/lib/$(NSPR31_LIB_PREFIX)nspr4.lib \
@@ -96,10 +96,10 @@ endif
 
 ifeq ($(OS_ARCH),Linux)
 MAPFILE = $(OBJDIR)/sslmap.linux
 ALL_TRASH += $(MAPFILE)
 MKSHLIB += -Wl,--version-script,$(MAPFILE)
 endif
 
 
-	
 
+
--- a/security/nss/lib/ssl/sslsock.c
+++ b/security/nss/lib/ssl/sslsock.c
@@ -1301,18 +1301,22 @@ ssl_Poll(PRFileDesc *fd, PRInt16 how_fla
 	 * to read, so tell NSPR NOT to poll on write.
 	 */
 	ret_flags ^=  PR_POLL_WRITE;	/* don't select on write. */
 	ret_flags |=  PR_POLL_READ;	/* do    select on read. */
     }
 
     if ((ret_flags & PR_POLL_READ) && (SSL_DataPending(fd) > 0)) {
 	*out_flags = PR_POLL_READ;	/* it's ready already. */
-
-    } else if (ret_flags && (fd->lower->methods->poll != NULL)) {
+	return ret_flags;
+    } 
+    if ((ret_flags & PR_POLL_READ) && (ss->pendingBuf.len != 0)) {
+	ret_flags |= PR_POLL_WRITE;
+    } 
+    if (ret_flags && (fd->lower->methods->poll != NULL)) {
         ret_flags = fd->lower->methods->poll(fd->lower, ret_flags, out_flags);
     }
 
     return ret_flags;
 }
 
 
 PRBool
--- a/security/nss/makefile.win
+++ b/security/nss/makefile.win
@@ -52,16 +52,16 @@ MOZ_SRC_FLIPPED = $(MOZ_SRC:\=/)
 #
 
 all:: export libs install
 
 install:: moz_import install_roots
 
 depend::
 
-export libs install clobber clobber_all clean::
+export libs install clobber clobber_all clean distclean::
 	$(GMAKE) -f gmakefile.win $@ MOZ_SRC_FLIPPED=$(MOZ_SRC_FLIPPED)
 
 moz_import::
 	copy $(DIST)\lib\dbm32.lib $(DIST)\lib\dbm.lib
 
 install_roots::
 	$(MAKE_INSTALL) $(DIST)\lib\nssckbi.dll $(DIST)\bin