Fixed tabbing problems with emacs caused by the mode header.
authorcls%seawood.org
Mon, 29 Nov 1999 02:15:22 +0000
changeset 970 9a0d6aaeac13d5c639e462fabf96e8b21844421a
parent 968 7105aa282b3924f4d56538089c5f38bcff190cda
child 971 29227fdc9a1516dc508a23a38520aba2ca1f5f26
push idunknown
push userunknown
push dateunknown
Fixed tabbing problems with emacs caused by the mode header. Added preliminary autoconf support for aix, dgux, freebsd and hpux. All untested.
config/autoconf.mk.in
configure
configure.in
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -24,28 +24,35 @@ AS		= @AS@
 CC		= @CC@
 CCC		= @CXX@
 AR		= @AR@
 AR_FLAGS	= @AR_FLAGS@
 RANLIB		= @RANLIB@
 PERL		= @PERL@
 DLLTOOL		= @DLLTOOL@
 WINDRES		= @WINDRES@
-MKSHLIB		= @MKSHLIB@
 RC		= $(WINDRES)
 
 OS_CFLAGS	= @CFLAGS@
 OS_CXXFLAGS	= @CXXFLAGS@
 OS_LIBS         = @OS_LIBS@
 
+MKSHLIB		= @MKSHLIB@
+DSO_CFLAGS	= @DSO_CFLAGS@
+DSO_LDOPTS	= @DSO_LDOPTS@
+DSO_LDFLAGS	= @DSO_LDFLAGS@
+
 EXTRA_LIBS      = @EXTRA_LIBS@
 
 HOST_CC		= @HOST_CC@
 HOST_CFLAGS	= @HOST_CFLAGS@
 
 DEFINES		= @DEFINES@ @DEFS@
 
 MDCPUCFG_H	= @MDCPUCFG_H@
 MOZ_TARGET	= @MOZ_TARGET@
 PR_MD_CSRCS	= @PR_MD_CSRCS@
 PR_MD_ASFILES	= @PR_MD_ASFILES@
 PR_MD_ARCH_DIR	= @PR_MD_ARCH_DIR@
 
+NOSUCHFILE	= @NOSUCHFILE@
+AIX_LINK_OPTS	= @AIX_LINK_OPTS@
+MOZ_OBJFORMAT	= @MOZ_OBJFORMAT@
--- a/configure
+++ b/configure
@@ -8,32 +8,32 @@
 # gives unlimited permission to copy, distribute and modify it.
 
 # Defaults:
 ac_help=
 ac_default_prefix=/usr/local
 # Any additions from configure.in:
 ac_default_prefix=\${MOD_DEPTH}/dist
 ac_help="$ac_help
+  --with-mozilla          Compile NSPR with Mozilla support"
+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
   --disable-shared        Do not compile into shared libraries"
 ac_help="$ac_help
   --enable-target=\$t      Turn on features for target \$t when build has multiple targets"
 ac_help="$ac_help
   --enable-n32            Enable n32 support (IRIX only)"
 ac_help="$ac_help
   --enable-64bit          Enable 64-bit support (on certain platforms)"
 ac_help="$ac_help
   --enable-mdupdate       Enable use of certain compilers' mdupdate feature"
 ac_help="$ac_help
-  --with-mozilla          Compile NSPR with Mozilla support"
-ac_help="$ac_help
   --with-pthreads         Use system pthreads library as thread subsystem"
 ac_help="$ac_help
   --enable-user-pthreads  Build using userland pthreads"
 ac_help="$ac_help
   --enable-nspr-threads   Build using classic nspr threads"
 ac_help="$ac_help
   --with-bthreads         Use system bthreads library as thread subsystem (BeOS only)"
 ac_help="$ac_help
@@ -696,41 +696,65 @@ EOF
 NSPR_VERSION=3
 NSPR_MODNAME=nspr20
 _HAVE_PTHREADS=
 USE_PTHREADS=
 USE_USER_PTHREADS=
 USE_NSPR_THREADS=
 USE_N32=
 USE_64=
+USE_CPLUS=
+USE_IPV6=
 USE_MDUPDATE=
 _OPTIMIZE_FLAGS=-O
 _DEBUG_FLAGS=-g
 MOZ_DEBUG=1
 MOZ_OPTIMIZE=
 
 CFLAGS="${CFLAGS=}"
 CXXFLAGS="${CXXFLAGS=}"
 LDFLAGS="${LDFLAGS=}"
 HOST_CFLAGS="${HOST_CFLAGS=}"
 HOST_LDFLAGS="${HOST_LDFLAGS=}"
 
+# Check whether --with-mozilla or --without-mozilla was given.
+if test "${with_mozilla+set}" = set; then
+  withval="$with_mozilla"
+     if test "$withval" = "yes"; then
+            cat >> confdefs.h <<\EOF
+#define MOZILLA_CLIENT 1
+EOF
+
+            MOZILLA_CLIENT=1
+	    else
+	        MOZILLA_CLIENT=
+	    fi
+else
+  	if test -n "$MOZILLA_CLIENT"; then
+	        cat >> confdefs.h <<\EOF
+#define MOZILLA_CLIENT 1
+EOF
+
+	    fi
+fi
+
+
 # Check whether --enable-optimize or --disable-optimize was given.
 if test "${enable_optimize+set}" = set; then
   enableval="$enable_optimize"
   MOZ_OPTIMIZE=1
 fi
 
 
 # Check whether --enable-debug or --disable-debug was given.
 if test "${enable_debug+set}" = set; then
   enableval="$enable_debug"
   	if test "$enableval" = "no"; then
     	    MOZ_DEBUG=
-	fi
+	    fi
 fi
 
 
 # Check whether --enable-shared or --disable-shared was given.
 if test "${enable_shared+set}" = set; then
   enableval="$enable_shared"
   :
 fi
@@ -753,34 +777,34 @@ if test "${enable_n32+set}" = set; then
     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 
+	    USE_64=1
+      fi 
 fi
 
 
 # Check whether --enable-mdupdate or --disable-mdupdate was given.
 if test "${enable_mdupdate+set}" = set; then
   enableval="$enable_mdupdate"
    if test "$enableval" = "yes"; then
-	USE_MDUPDATE=1
-    fi 
+	    USE_MDUPDATE=1
+      fi 
 fi
 
 
 # Extract the first word of "whoami", so it can be a program name with args.
 set dummy whoami; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:779: checking for $ac_word" >&5
+echo "configure:803: 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.
   ;;
   ?:/*)			 
@@ -830,24 +854,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:839: checking for $host compiler" >&5
+echo "configure:863: checking for $host compiler" >&5
     if test -z "$HOST_CC"; then
-	for ac_prog in gcc cc /usr/ucb/cc
+	    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:846: checking for $ac_word" >&5
+echo "configure:870: 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"
@@ -867,64 +891,64 @@ if test -n "$HOST_CC"; then
 else
   echo "$ac_t""no" 1>&6
 fi
 
 test -n "$HOST_CC" && break
 done
 test -n "$HOST_CC" || HOST_CC=""""
 
-	if test -z "$HOST_CC"; then
-	    { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-	fi
+	    if test -z "$HOST_CC"; then
+	        { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+	    fi
     fi
     echo "$ac_t""$HOST_CC" 1>&6
     if test -z "$HOST_CFLAGS"; then
-	HOST_CFLAGS="$CFLAGS"
+	    HOST_CFLAGS="$CFLAGS"
     fi
     if test -z "$HOST_LDFLAGS"; then
-	HOST_LDFLAGS="$LDFLAGS"
+	    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:893: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
+echo "configure:917: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
     cat > conftest.$ac_ext <<EOF
-#line 895 "configure"
+#line 919 "configure"
 #include "confdefs.h"
 
 int main() {
 return(0);
 ; return 0; }
 EOF
-if { (eval echo configure:902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:926: \"$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
 rm -f conftest*
     
     CC=$_SAVE_CC
     CFLAGS=$_SAVE_CFLAGS
     LDFLAGS=$_SAVE_LDFLAGS
 
     if test -z "$CC"; then
-	for ac_prog in "${target_alias}-gcc" "${target}-gcc"
+	    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:923: checking for $ac_word" >&5
+echo "configure:947: 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"
@@ -949,17 +973,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:958: checking for $ac_word" >&5
+echo "configure:982: 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"
@@ -979,17 +1003,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:988: checking for $ac_word" >&5
+echo "configure:1012: 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
@@ -1030,17 +1054,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:1039: checking for $ac_word" >&5
+echo "configure:1063: 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"
@@ -1062,33 +1086,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:1071: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1095: 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 1082 "configure"
+#line 1106 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:1087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1111: \"$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
@@ -1104,31 +1128,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:1113: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1137: 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:1118: checking whether we are using GNU C" >&5
+echo "configure:1142: 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:1127: \"$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:1151: \"$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
 
@@ -1137,17 +1161,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:1146: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1170: 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
@@ -1169,22 +1193,22 @@ else
   if test "$GCC" = yes; then
     CFLAGS="-O2"
   else
     CFLAGS=
   fi
 fi
 
     if test -z "$CXX"; then
-	for ac_prog in "${target_alias}-g++" "${target}-g++"
+	    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:1183: checking for $ac_word" >&5
+echo "configure:1207: 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"
@@ -1211,17 +1235,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:1220: checking for $ac_word" >&5
+echo "configure:1244: 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"
@@ -1243,33 +1267,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:1252: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:1276: 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 1263 "configure"
+#line 1287 "configure"
 #include "confdefs.h"
 
 int main(){return(0);}
 EOF
-if { (eval echo configure:1268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1292: \"$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
@@ -1285,31 +1309,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:1294: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1318: 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:1299: checking whether we are using GNU C++" >&5
+echo "configure:1323: 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:1308: \"$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:1332: \"$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
 
@@ -1318,17 +1342,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:1327: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1351: 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
@@ -1350,22 +1374,22 @@ else
   if test "$GXX" = yes; then
     CXXFLAGS="-O2"
   else
     CXXFLAGS=
   fi
 fi
 
     if test -z "$RANLIB"; then
-	for ac_prog in "${target_alias}-ranlib" "${target}-ranlib"
+	    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:1364: checking for $ac_word" >&5
+echo "configure:1388: 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"
@@ -1387,22 +1411,22 @@ else
 fi
 
 test -n "$RANLIB" && break
 done
 test -n "$RANLIB" || RANLIB=":"
 
     fi
     if test -z "$AR"; then
-	for ac_prog in "${target_alias}-ar" "${target}-ar"
+	    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:1401: checking for $ac_word" >&5
+echo "configure:1425: 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"
@@ -1424,22 +1448,22 @@ else
 fi
 
 test -n "$AR" && break
 done
 test -n "$AR" || AR=":"
 
     fi
     if test -z "$AS"; then
-	for ac_prog in "${target_alias}-as" "${target}-as"
+	    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:1438: checking for $ac_word" >&5
+echo "configure:1462: 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"
@@ -1461,22 +1485,22 @@ else
 fi
 
 test -n "$AS" && break
 done
 test -n "$AS" || AS=":"
 
     fi
     if test -z "$DLLTOOL"; then
-	for ac_prog in "${target_alias}-dlltool" "${target}-dlltool"
+	    for ac_prog in "${target_alias}-dlltool" "${target}-dlltool"
 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:1475: checking for $ac_word" >&5
+echo "configure:1499: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$DLLTOOL"; then
   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1498,22 +1522,22 @@ else
 fi
 
 test -n "$DLLTOOL" && break
 done
 test -n "$DLLTOOL" || DLLTOOL=":"
 
     fi
     if test -z "$WINDRES"; then
-	for ac_prog in "${target_alias}-windres" "${target}-windres"
+	    for ac_prog in "${target_alias}-windres" "${target}-windres"
 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:1512: checking for $ac_word" >&5
+echo "configure:1536: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$WINDRES"; then
   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1538,17 +1562,17 @@ test -n "$WINDRES" && break
 done
 test -n "$WINDRES" || WINDRES=":"
 
     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:1547: checking for $ac_word" >&5
+echo "configure:1571: 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"
@@ -1568,17 +1592,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:1577: checking for $ac_word" >&5
+echo "configure:1601: 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
@@ -1619,17 +1643,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:1628: checking for $ac_word" >&5
+echo "configure:1652: 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"
@@ -1651,33 +1675,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:1660: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1684: 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 1671 "configure"
+#line 1695 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:1676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1700: \"$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
@@ -1693,31 +1717,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:1702: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1726: 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:1707: checking whether we are using GNU C" >&5
+echo "configure:1731: 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:1716: \"$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:1740: \"$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
 
@@ -1726,17 +1750,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:1735: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1759: 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
@@ -1762,17 +1786,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:1771: checking for $ac_word" >&5
+echo "configure:1795: 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"
@@ -1794,33 +1818,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:1803: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:1827: 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 1814 "configure"
+#line 1838 "configure"
 #include "confdefs.h"
 
 int main(){return(0);}
 EOF
-if { (eval echo configure:1819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1843: \"$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
@@ -1836,31 +1860,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:1845: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1869: 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:1850: checking whether we are using GNU C++" >&5
+echo "configure:1874: 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:1859: \"$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:1883: \"$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
 
@@ -1869,17 +1893,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:1878: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1902: 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
@@ -1903,17 +1927,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:1912: checking for $ac_word" >&5
+echo "configure:1936: 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"
@@ -1935,17 +1959,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:1944: checking for $ac_word" >&5
+echo "configure:1968: 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.
   ;;
   ?:/*)			 
@@ -1976,17 +2000,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:1985: checking for $ac_word" >&5
+echo "configure:2009: 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.
   ;;
   ?:/*)			 
@@ -2017,17 +2041,17 @@ test -n "$AR" && break
 done
 test -n "$AR" || AR=":"
 
     for ac_prog in dlltool
 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:2026: checking for $ac_word" >&5
+echo "configure:2050: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_DLLTOOL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$DLLTOOL" in
   /*)
   ac_cv_path_DLLTOOL="$DLLTOOL" # Let the user override the test with a path.
   ;;
   ?:/*)			 
@@ -2058,17 +2082,17 @@ test -n "$DLLTOOL" && break
 done
 test -n "$DLLTOOL" || DLLTOOL=":"
 
     for ac_prog in windres
 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:2067: checking for $ac_word" >&5
+echo "configure:2091: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_WINDRES'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$WINDRES" in
   /*)
   ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a path.
   ;;
   ?:/*)			 
@@ -2095,20 +2119,20 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
 test -n "$WINDRES" && break
 done
 test -n "$WINDRES" || WINDRES=":"
 
     if test -z "$HOST_CC"; then
-	HOST_CC="$CC"
+	    HOST_CC="$CC"
     fi
     if test -z "$HOST_CFLAGS"; then
-	HOST_CFLAGS="$CFLAGS"
+	    HOST_CFLAGS="$CFLAGS"
     fi
 fi
 
 if test "$GCC" = "yes"; then
     GNU_CC=1
 fi
 
 # Find a good install program.  We prefer a C program (faster),
@@ -2118,17 +2142,17 @@ fi
 # SunOS /usr/etc/install
 # IRIX /sbin/install
 # AIX /bin/install
 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2127: checking for a BSD compatible install" >&5
+echo "configure:2151: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
     IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
   for ac_dir in $PATH; do
     # Account for people who put trailing slashes in PATH elements.
     case "$ac_dir/" in
@@ -2171,17 +2195,17 @@ echo "$ac_t""$INSTALL" 1>&6
 # It thinks the first close brace ends the variable substitution.
 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
 
 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:2180: checking whether ln -s works" >&5
+echo "configure:2204: checking whether ln -s works" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   rm -f conftestdata
 if ln -s X conftestdata 2>/dev/null
 then
   rm -f conftestdata
   ac_cv_prog_LN_S="ln -s"
@@ -2196,17 +2220,17 @@ else
   echo "$ac_t""no" 1>&6
 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:2205: checking for $ac_word" >&5
+echo "configure:2229: 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.
   ;;
   ?:/*)			 
@@ -2239,73 +2263,356 @@ test -n "$PERL" || PERL=":"
 
 
 OBJ_SUFFIX=o
 LIB_SUFFIX=a
 DLL_SUFFIX=so
 MKSHLIB='$(CCC) -shared -o $@'
 PR_MD_ASFILES=
 PR_MD_CSRCS=
+PR_MD_ARCH_DIR=unix
 AR_FLAGS='cr $@'
 
 case "$host" in
 *-mingw*)
     ;;
 *)
     HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
     ;;
 esac
 
 case "$target" in
 
-*-nto*)
+*-aix*)
     cat >> confdefs.h <<\EOF
 #define XP_UNIX 1
 EOF
 
-    MDCPUCFG_H=_nto.cfg
-    PR_MD_CSRCS=nto.c
-    PR_MD_ARCH_DIR=unix
-    MKSHLIB='qcc -Vgcc_ntox86 -shared -Wl,-h$(@:$(OBJDIR)/%.so=%.so) -o $(@:$(OBJDIR)/%.so=%.so)'
-    CFLAGS="$CFLAGS -Wc,-Wall -Wc,-Wno-parentheses -DNTO -D_QNX_SOURCE -DHAVE_POINTER_LOCALTIME_R -shared"
-    OS_LIBS="-lsocket"
-    _OPTIMIZE_FLAGS="-O2"
-    _DEBUG_FLAGS="-O2 -gdwarf-2"
-    COMPILER_TAG="_qcc"
-    CC="qcc -Vgcc_ntox86 -w"
-    CXX="QCC -Vgcc_ntox86 -w"
-    CPP="qcc -Vgcc_ntox86 -w"
-    LD="qcc -Vgcc_ntox86 -nostdlib"
-    AR="qcc -Vgcc_ntox86 -M -a "
-    AR_FLAGS="$@"
-	;;
-
+    cat >> confdefs.h <<\EOF
+#define AIX 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define SYSV 1
+EOF
+
+    DSO_LDOPTS='-brtl -bM:SRE -bnoentry -bexpall'
+    MKSHLIB='$(LD) $(DSO_LDOPTS)'
+    case "${target_os}" in
+    aix3.2*)
+        USE_NSPR_THREADS=1
+        cat >> confdefs.h <<\EOF
+#define _PR_LOCAL_THREADS_ONLY 1
+EOF
+
+        cat >> confdefs.h <<\EOF
+#define AIX_RENAME_SELECT 1
+EOF
+
+        cat >> confdefs.h <<\EOF
+#define _PR_NO_LARGE_FILES 1
+EOF
+
+        AIX_LINK_OPTS='-bnso -berok'
+        ;;
+    aix4.1*)
+        cat >> confdefs.h <<\EOF
+#define AIX_RENAME_SELECT 1
+EOF
+
+        cat >> confdefs.h <<\EOF
+#define AIX_HAVE_ATOMIC_OP_H 1
+EOF
+
+        cat >> confdefs.h <<\EOF
+#define AIX_TIMERS 1
+EOF
+
+        cat >> confdefs.h <<\EOF
+#define _PR_NO_LARGE_FILES 1
+EOF
+
+        cat >> confdefs.h <<\EOF
+#define AIX4_1 1
+EOF
+
+        MKSHLIB=
+        DSO_LDOPTS=
+        AIX_LINK_OPTS='-bnso -berok'
+        ;;
+    aix4.3*)
+        cat >> confdefs.h <<\EOF
+#define AIX_HAVE_ATOMIC_OP_H 1
+EOF
+
+        cat >> confdefs.h <<\EOF
+#define AIX_TIMERS 1
+EOF
+
+        cat >> confdefs.h <<\EOF
+#define _PR_HAVE_OFF64_T 1
+EOF
+
+        cat >> confdefs.h <<\EOF
+#define AIX4_3 1
+EOF
+
+        cat >> confdefs.h <<\EOF
+#define HAVE_SOCKLEN_T 1
+EOF
+
+        USE_IPV6=1
+        AIX_LINK_OPTS='-brtl -bnso -berok'
+        ;;
+    *)
+        cat >> confdefs.h <<\EOF
+#define AIX_HAVE_ATOMIC_OP_H 1
+EOF
+
+        cat >> confdefs.h <<\EOF
+#define AIX_TIMERS 1
+EOF
+
+        cat >> confdefs.h <<\EOF
+#define _PR_HAVE_OFF64_T 1
+EOF
+
+        AIX_LINK_OPTS='-brtl -bnso -berok'
+        ;;
+    esac
+    CFLAGS="$CFLAGS -qro -qroconst"
+    if test `grep -c xlC_r $CC`; then
+        CFLAGS="$CFLAGS -qarch=com"
+    fi
+    AIX_WRAP='$(DIST)/lib/aixwrap.o'
+    AIX_TMP='./_aix_tmp.o'
+    ;;
+        
 *-beos*)
     cat >> confdefs.h <<\EOF
 #define XP_BEOS 1
 EOF
 
     cat >> confdefs.h <<\EOF
 #define BeOS 1
 EOF
 
     cat >> confdefs.h <<\EOF
 #define BEOS 1
 EOF
 
     ;;
 
-*-linux*)
+*-dgux*)
     cat >> confdefs.h <<\EOF
 #define XP_UNIX 1
 EOF
 
-    MDCPUCFG_H=_linux.cfg
-    PR_MD_CSRCS=linux.c
-    PR_MD_ARCH_DIR=unix
+    cat >> confdefs.h <<\EOF
+#define _PR_LOCAL_THREADS_ONLY 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define SVR4 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define SYSV 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define DGUX 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define _DGUX_SOURCE 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define _POSIX4A_DRAFT6_SOURCE 1
+EOF
+
+    MKSHLIB='$(LD) $(DSO_LDOPTS)'
+    DSO_LDOPTS=-G
+    NOSUCHFILE=/no-such-file
+    _OPTIMIZE_FLAGS=-O2
+    _DEBUG_FLAGS=
+    ;;
+
+*-freebsd*)
+    if test "${target_cpu}" != "alpha"; then
+        cat >> confdefs.h <<\EOF
+#define i386 1
+EOF
+
+    fi
+    cat >> confdefs.h <<\EOF
+#define FREEBSD 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_BSD_FLOCK 1
+EOF
+
+    CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall -pipe"
+    MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+    if test "$MOZ_OBJFORMAT" = "elf"; then
+        DLL_SUFFIX=so
+    else
+        DLL_SUFFIX=so.1.0
+    fi
+    DSO_CFLAGS=-fPIC
+    DSO_LDOPTS=-Bshareable
+    DSO_LDFLAGS=
+    MKSHLIB='$(LD) $(DSO_LDOPTS)'
+    ;;
+
+*-hpux*)
+    cat >> confdefs.h <<\EOF
+#define HPUX 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define _HPUX_SOURCE 1
+EOF
+
+    DEFINES="$DEFINES -D${target_cpu}"
+    DLL_SUFFIX=sl
+    MKSHLIB='$(LD) $(DSO_LDOPTS)'
+    DSO_LDOPTS='-b +h $(notdir $@)'
+    DSO_LDFLAGS=
+    if test -z "$GNU_CC"; then
+        CC="$CC -Ae"
+        CXX="$CXX -ext"
+        CFLAGS="$CFLAGS +ESlit"
+        CXXFLAGS="$CXXFLAGS +ESlit"
+        DSO_CFLAGS=+Z
+    else
+        DSO_CFLAGS=-fPIC
+    fi
+    if test -n "$MOZILLA_CLIENT"; then
+        USE_NSPR_THREADS=1
+    fi
+    case "${target_os}" in
+    hpuxA.09*)
+        cat >> confdefs.h <<\EOF
+#define HPUX9 1
+EOF
+
+        cat >> confdefs.h <<\EOF
+#define _PR_NEED_H_ERRNO 1
+EOF
+
+        cat >> confdefs.h <<\EOF
+#define _PR_NO_LARGE_FILES 1
+EOF
+
+        ;;
+    hpuxB.10.01*)
+        cat >> confdefs.h <<\EOF
+#define HPUX10 1
+EOF
+
+        ;;
+    hpuxB.10.10*)
+        cat >> confdefs.h <<\EOF
+#define HPUX10 1
+EOF
+
+        cat >> confdefs.h <<\EOF
+#define HPUX10_10 1
+EOF
+
+        cat >> confdefs.h <<\EOF
+#define HAVE_INT_LOCALTIME_R 1
+EOF
+
+        USE_PTHREADS=1
+        USE_NSPR_THREADS=
+        ;;
+    hpuxB.10.20*)
+        cat >> confdefs.h <<\EOF
+#define HPUX10 1
+EOF
+
+        cat >> confdefs.h <<\EOF
+#define HPUX10_20 1
+EOF
+
+        cat >> confdefs.h <<\EOF
+#define HAVE_INT_LOCALTIME_R 1
+EOF
+
+        if test -z "$GNU_CC"; then
+            CFLAGS="$CFLAGS +DAportable +DS1.1"
+            CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
+        fi
+        USE_PTHREADS=1
+        USE_NSPR_THREADS=
+        ;;
+    hpuxB.10.30*)
+        cat >> confdefs.h <<\EOF
+#define HAVE_POINTER_LOCALTIME_R 1
+EOF
+
+        if test -z "$GNU_CC"; then
+            CFLAGS="$CFLAGS +DAportable +DS1.1"
+            CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
+        fi
+        USE_PTHREADS=1
+        USE_NSPR_THREADS=
+        ;;
+    hpuxB.11.00*)
+        cat >> confdefs.h <<\EOF
+#define HPUX10 1
+EOF
+
+        cat >> confdefs.h <<\EOF
+#define HPUX11 1
+EOF
+
+        cat >> confdefs.h <<\EOF
+#define _LARGEFILE64_SOURCE 1
+EOF
+
+        cat >> confdefs.h <<\EOF
+#define _PR_HAVE_OFF64_T 1
+EOF
+
+        cat >> confdefs.h <<\EOF
+#define HAVE_POINTER_LOCALTIME_R 1
+EOF
+
+        if test -z "$GNU_CC"; then
+            if test -z "$USE_64"; then
+                CFLAGS="$CFLAGS +DAportable +DS2.0"
+                CXXFLAGS="$CXXFLAGS +DAportable +DS2.0"
+            else
+                CFLAGS="$CFLAGS +DA2.0W +DS2.0"
+                CXXFLAGS="$CXXFLAGS +DA2.0W +DS2.0"
+            fi
+        fi
+        USE_PTHREADS=1
+        USE_NSPR_THREADS=
+        ;;
+    esac
+    case "${target_os}" in
+    hpuxB.10*)
+        cat >> confdefs.h <<\EOF
+#define _PR_NO_LARGE_FILES 1
+EOF
+
+        ;;
+    esac
+    if test -n "$USE_NSPR_THREADS"; then
+        cat >> confdefs.h <<\EOF
+#define _PR_LOCAL_THREADS_ONLY 1
+EOF
+
+    fi
     ;;
 
 *-irix*)
     cat >> confdefs.h <<\EOF
 #define XP_UNIX 1
 EOF
 
     cat >> confdefs.h <<\EOF
@@ -2322,66 +2629,66 @@ EOF
 
     MDCPUCFG_H=_irix32.cfg
     PR_MD_CSRCS=irix.c
     PR_MD_ASFILES=os_Irix.s
     PR_MD_ARCH_DIR=unix
     MKSHLIB='$(LD) $(SHLIB_LD_OPTS) -rdata_shared -shared -soname $(notdir $@)'
     DSO_LDOPTS='-elf -shared -all'
     case "${target_os}" in
-	irix5*)
+    irix5*)
 	   USE_NSPR_THREADS=1
 	   ;;
-	*)
+    *)
 	   USE_N32=1
 	   USE_PTHREADS=1
 	   ;;
  	esac
     if test "$GNU_CC"; then
-	AS='$(CC) -x assembler-with-cpp -D_ASM -mips2'
-	CFLAGS="$CFLAGS -Wall -Wno-format"
-	_OPTIMIZE_FLAGS="-O6"
+	    AS='$(CC) -x assembler-with-cpp -D_ASM -mips2'
+	    CFLAGS="$CFLAGS -Wall -Wno-format"
+	    _OPTIMIZE_FLAGS="-O6"
     else
-	AS="as -D_ASM $(INCLUDES) -n32"
-	CFLAGS="$CFLAGS -fullwarn -xansi"
-	if test "$USE_N32"; then
-	    _OPTIMIZE_FLAGS="-O -OPT:Olimit=4000"
-	else
-	    _OPTIMIZE_FLAGS="-O -Olimit 4000"
-	fi
-	if test "$USE_MDUPDATE"; then
-	    $CFLAGS="$CFLAGS -MDupdate"
-	fi
-	case "$target}" in
-	*-irix6.*)
-	    CFLAGS="$CFLAGS -multigot"
-	    SHLIB_LD_OPTS="-no_unresolved"
-	    if test "USE_N32"; then
-		CFLAGS="$CFLAGS -n32 -woff 1209"
-		LDFLAGS="$LDFLAGS -n32"
-		SHLIB_LD_OPTS="$SHLIB_LD_OPTS -n32"
-		if test "${target_os}" = "irix6.2"; then
-		    LDFLAGS="$LDFLAGS -Wl,-woff,85"
-		    SHLIB_LD_OPTS="$SHLIB_LD_OPTS -woff 85"
-		fi
+	    AS="as -D_ASM $(INCLUDES) -n32"
+	    CFLAGS="$CFLAGS -fullwarn -xansi"
+	    if test "$USE_N32"; then
+	        _OPTIMIZE_FLAGS="-O -OPT:Olimit=4000"
 	    else
-		if test "$USE_64"; then
-		    CFLAGS="$CFLAGS -64"
-		else
-		    CFLAGS="$CFLAGS -32"
-		fi
+	        _OPTIMIZE_FLAGS="-O -Olimit 4000"
+	    fi
+	    if test "$USE_MDUPDATE"; then
+	        $CFLAGS="$CFLAGS -MDupdate"
 	    fi
-	    ;;
-	*)
-	    CFLAGS="$CFLAGS -xgot"
-	    ;;
-	esac
+	    case "$target}" in
+	    *-irix6.*)
+	        CFLAGS="$CFLAGS -multigot"
+	        SHLIB_LD_OPTS="-no_unresolved"
+	        if test "USE_N32"; then
+		        CFLAGS="$CFLAGS -n32 -woff 1209"
+		        LDFLAGS="$LDFLAGS -n32"
+		        SHLIB_LD_OPTS="$SHLIB_LD_OPTS -n32"
+		        if test "${target_os}" = "irix6.2"; then
+		            LDFLAGS="$LDFLAGS -Wl,-woff,85"
+		            SHLIB_LD_OPTS="$SHLIB_LD_OPTS -woff 85"
+		        fi
+	        else
+		        if test "$USE_64"; then
+		            CFLAGS="$CFLAGS -64"
+		        else
+		            CFLAGS="$CFLAGS -32"
+		        fi
+	        fi
+	        ;;
+	    *)
+	        CFLAGS="$CFLAGS -xgot"
+	        ;;
+	    esac
     fi
     if test "${target_os}" = "irix5.3"; then
-	cat >> confdefs.h <<\EOF
+	    cat >> confdefs.h <<\EOF
 #define IRIX5_3 1
 EOF
 
     fi
     case "${target_os}" in
 	irix5*)
 	    ;;
 	*)
@@ -2391,167 +2698,207 @@ EOF
 
 	    ;;
 	esac
     case "${target_os}" in
 	irix6.5*)
 	    ;;
 	*)
 	    if test -z "$GNU_CC"; then
-		CFLAGS="$CFLAGS -mips3"
+		    CFLAGS="$CFLAGS -mips3"
 	    fi
 	    cat >> confdefs.h <<\EOF
 #define _PR_HAVE_GETPROTO_R 1
 EOF
 
 	    cat >> confdefs.h <<\EOF
 #define _PR_HAVE_GETPROTO_R_POINTER 1
 EOF
 
 	    ;;
 	esac
     case "${target_cpu}" in
     alpha*)
-	cat >> confdefs.h <<\EOF
+	    cat >> confdefs.h <<\EOF
 #define _POSIX_SOURCE 1
 EOF
 
-	cat >> confdefs.h <<\EOF
+	    cat >> confdefs.h <<\EOF
 #define _BSD_SOURCE 1
 EOF
 
-	;;
+	    ;;
     esac
     ;;
 
+*-linux*)
+    cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+    CFLAGS="$CFLAGS -pipe"
+    CXXFLAGS="$CXXFLAGS -pipe"
+    MDCPUCFG_H=_linux.cfg
+    PR_MD_CSRCS=linux.c
+    PR_MD_ARCH_DIR=unix
+    ;;
+
 *-mingw*)
     cat >> confdefs.h <<\EOF
 #define XP_PC 1
 EOF
 
     PR_MD_ARCH_DIR=windows
     if test -z "$GNU_CC"; then
-	OBJ_SUFFIX=obj
-	LIB_SUFFIX=lib
-	DLL_SUFFIX=dll
+	    OBJ_SUFFIX=obj
+	    LIB_SUFFIX=lib
+	    DLL_SUFFIX=dll
     fi
     MKSHLIB='$(DLLTOOL) --as=$(AS) -k --dllname $*.dll --output-lib $@'
 
     case "$MOZ_TARGET" in
     WINNT)
-	DEFINES="$DEFINES -DWIN32 -DWINNT -DWin32_Winsock"
-	MDCPUCFG_H=_winnt.cfg
-	;;
+	    DEFINES="$DEFINES -DWIN32 -DWINNT -DWin32_Winsock"
+	    MDCPUCFG_H=_winnt.cfg
+	    ;;
     WIN95)
-	DEFINES="$DEFINES -UWINNT -DWIN32 -DWIN95 -DWin32_Winsock -D_PR_GLOBAL_THREADS_ONLY"
-	MDCPUCFG_H=_win95.cfg
-	;;
+	    DEFINES="$DEFINES -UWINNT -DWIN32 -DWIN95 -DWin32_Winsock -D_PR_GLOBAL_THREADS_ONLY"
+	    MDCPUCFG_H=_win95.cfg
+	    ;;
     WIN16)
-	DEFINES="$DEFINES -UWINNT"
-	MDCPUCFG_H=_win16.cfg
-	;;
+	    DEFINES="$DEFINES -UWINNT"
+	    MDCPUCFG_H=_win16.cfg
+	    ;;
     *)
-	{ echo "configure: error: Missing MOZ_TARGET for ${target}.  Use --enable-target to set." 1>&2; exit 1; }
+	    { echo "configure: error: Missing MOZ_TARGET for ${target}.  Use --enable-target to set." 1>&2; exit 1; }
    	;;
     esac
 
     case "$target" in
     i?86-*)
-	cat >> confdefs.h <<\EOF
+	    cat >> confdefs.h <<\EOF
 #define _X86_ 1
 EOF
 
         ;;
     alpha-*)
-	cat >> confdefs.h <<\EOF
+	    cat >> confdefs.h <<\EOF
 #define _ALPHA_ 1
 EOF
 
-   	;;
+   	    ;;
     mips-*)
-	cat >> confdefs.h <<\EOF
+	    cat >> confdefs.h <<\EOF
 #define _MIPS_ 1
 EOF
 
-	;;
+	    ;;
     *)
-	cat >> confdefs.h <<\EOF
+	    cat >> confdefs.h <<\EOF
 #define _CPU_ARCH_NOT_DEFINED 1
 EOF
 
-	;;
+	    ;;
     esac
     ;;
 
+*-nto*)
+    cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+    MDCPUCFG_H=_nto.cfg
+    PR_MD_CSRCS=nto.c
+    MKSHLIB='qcc -Vgcc_ntox86 -shared -Wl,-h$(@:$(OBJDIR)/%.so=%.so) -o $(@:$(OBJDIR)/%.so=%.so)'
+    CFLAGS="$CFLAGS -Wc,-Wall -Wc,-Wno-parentheses -DNTO -D_QNX_SOURCE -DHAVE_POINTER_LOCALTIME_R -shared"
+    OS_LIBS="-lsocket"
+    _OPTIMIZE_FLAGS="-O2"
+    _DEBUG_FLAGS="-O2 -gdwarf-2"
+    COMPILER_TAG="_qcc"
+    CC="qcc -Vgcc_ntox86 -w"
+    CXX="QCC -Vgcc_ntox86 -w"
+    CPP="qcc -Vgcc_ntox86 -w"
+    LD="qcc -Vgcc_ntox86 -nostdlib"
+    AR="qcc -Vgcc_ntox86 -M -a "
+    AR_FLAGS="$@"
+	;;
+
+*)
+    cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+    ;;
+   
 esac
 
 if test "$enable_shared" = no; then
     MKSHLIB=
 fi
 
 
 
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2495: checking how to run the C preprocessor" >&5
+echo "configure:2842: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
     # This must be in double quotes, not single quotes, because CPP may get
   # substituted into the Makefile and "${CC-cc}" will confuse make.
   CPP="${CC-cc} -E"
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 2510 "configure"
+#line 2857 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 2527 "configure"
+#line 2874 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 2544 "configure"
+#line 2891 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
@@ -2567,23 +2914,23 @@ fi
   CPP="$ac_cv_prog_CPP"
 else
   ac_cv_prog_CPP="$CPP"
 fi
 echo "$ac_t""$CPP" 1>&6
 
 if test $ac_cv_prog_gcc = yes; then
     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:2576: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:2923: checking whether ${CC-cc} needs -traditional" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
     ac_pattern="Autoconf.*'x'"
   cat > conftest.$ac_ext <<EOF
-#line 2582 "configure"
+#line 2929 "configure"
 #include "confdefs.h"
 #include <sgtty.h>
 Autoconf TIOCGETP
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   egrep "$ac_pattern" >/dev/null 2>&1; then
   rm -rf conftest*
   ac_cv_prog_gcc_traditional=yes
@@ -2591,17 +2938,17 @@ else
   rm -rf conftest*
   ac_cv_prog_gcc_traditional=no
 fi
 rm -f conftest*
 
 
   if test $ac_cv_prog_gcc_traditional = no; then
     cat > conftest.$ac_ext <<EOF
-#line 2600 "configure"
+#line 2947 "configure"
 #include "confdefs.h"
 #include <termio.h>
 Autoconf TCGETA
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   egrep "$ac_pattern" >/dev/null 2>&1; then
   rm -rf conftest*
   ac_cv_prog_gcc_traditional=yes
@@ -2615,22 +2962,22 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional
   if test $ac_cv_prog_gcc_traditional = yes; then
     CC="$CC -traditional"
   fi
 fi
 
 for ac_func in lchown strerror
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2624: checking for $ac_func" >&5
+echo "configure:2971: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2629 "configure"
+#line 2976 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char $ac_func();
@@ -2643,17 +2990,17 @@ int main() {
 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
 $ac_func();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:2652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=no"
 fi
@@ -2672,58 +3019,37 @@ else
 fi
 done
 
 
 
 
 OS_LIBS=
 
-# Check whether --with-mozilla or --without-mozilla was given.
-if test "${with_mozilla+set}" = set; then
-  withval="$with_mozilla"
-  	if test "$withval" = "yes"; then
-	    cat >> confdefs.h <<\EOF
-#define MOZILLA_CLIENT 1
-EOF
-
-	else
-	    MOZILLA_CLIENT=
-	fi
-else
-  	if test -n "$MOZILLA_CLIENT"; then
-	    cat >> confdefs.h <<\EOF
-#define MOZILLA_CLIENT 1
-EOF
-
-	fi
-fi
-
-
 echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6
-echo "configure:2703: checking for pthread_attr_init in -lpthread" >&5
+echo "configure:3029: checking for pthread_attr_init in -lpthread" >&5
 ac_lib_var=`echo pthread'_'pthread_attr_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2711 "configure"
+#line 3037 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char pthread_attr_init();
 
 int main() {
 pthread_attr_init()
 ; return 0; }
 EOF
-if { (eval echo configure:2722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
@@ -2732,36 +3058,36 @@ LIBS="$ac_save_LIBS"
 
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread"
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for pthread_attr_init in -lc_r""... $ac_c" 1>&6
-echo "configure:2741: checking for pthread_attr_init in -lc_r" >&5
+echo "configure:3067: checking for pthread_attr_init in -lc_r" >&5
 ac_lib_var=`echo c_r'_'pthread_attr_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
 LIBS="-lc_r  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2749 "configure"
+#line 3075 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char pthread_attr_init();
 
 int main() {
 pthread_attr_init()
 ; return 0; }
 EOF
-if { (eval echo configure:2760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
@@ -2770,36 +3096,36 @@ LIBS="$ac_save_LIBS"
 
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r"
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for pthread_attr_init in -lc""... $ac_c" 1>&6
-echo "configure:2779: checking for pthread_attr_init in -lc" >&5
+echo "configure:3105: checking for pthread_attr_init in -lc" >&5
 ac_lib_var=`echo c'_'pthread_attr_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
 LIBS="-lc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2787 "configure"
+#line 3113 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char pthread_attr_init();
 
 int main() {
 pthread_attr_init()
 ; return 0; }
 EOF
-if { (eval echo configure:2798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
@@ -2819,169 +3145,193 @@ fi
 
     
 fi
 
 
 # Check whether --with-pthreads or --without-pthreads was given.
 if test "${with_pthreads+set}" = set; then
   withval="$with_pthreads"
-  	if test "$withval" = "yes"; then
+   if test "$withval" = "yes"; then
 	    if test -n "$_HAVE_PTHREADS"; then
-		USE_PTHREADS=1 
-		USE_USER_PTHREADS=
-		USE_NSPR_THREADS=
+		    USE_PTHREADS=1 
+		    USE_USER_PTHREADS=
+		    USE_NSPR_THREADS=
 	    else
-		{ echo "configure: error:  --with-pthreads specified for a system without pthread support " 1>&2; exit 1; };
+		    { echo "configure: error:  --with-pthreads specified for a system without pthread support " 1>&2; exit 1; };
 	    fi
-	else
+	  else
 	    USE_PTHREADS=
 	    _PTHREAD_LDFLAGS=
-	fi
+	  fi
 else
-   if test -n "$_HAVE_PTHREADS"; then
+   if test -n "$_HAVE_PTHREADS" && test -z "$USE_USER_PTHREADS" && test -z "$USER_NSPR_THREADS"; then
 	    USE_PTHREADS=1
 	    USE_USER_PTHREADS=
 	    USE_NSPR_THREADS=
 	  fi
 fi
 
 
 # Check whether --enable-user-pthreads or --disable-user-pthreads was given.
 if test "${enable_user_pthreads+set}" = set; then
   enableval="$enable_user_pthreads"
-  	if test "$enableval" = "yes"; then
-	    if test -n "$_HAVE_PTHREADS"; then
-		USE_PTHREADS=
-		USE_USER_PTHREADS=1
-		USE_NSPR_THREADS=
+   if test "$enableval" = "yes"; then
+        if test -n "$_HAVE_PTHREADS"; then
+		    USE_PTHREADS=
+		    USE_USER_PTHREADS=1
+		    USE_NSPR_THREADS=
 	    else
-		{ echo "configure: error:  --enable-user-pthreads specified for a system without pthread support " 1>&2; exit 1; };
+		    { echo "configure: error:  --enable-user-pthreads specified for a system without pthread support " 1>&2; exit 1; };
 	    fi
-	fi
+	  fi
 fi
 
 
 # Check whether --enable-nspr-threads or --disable-nspr-threads was given.
 if test "${enable_nspr_threads+set}" = set; then
   enableval="$enable_nspr_threads"
-  	if test "$enableval" = "yes"; then
+   if test "$enableval" = "yes"; then
 	    USE_PTHREADS=
 	    USE_USER_PTHREADS=
 	    USE_NSPR_THREADS=1
-	fi
+	  fi
 fi
 
 
 case "$target" in
 *-beos*)
     # Check whether --with-bthreads or --without-bthreads was given.
 if test "${with_bthreads+set}" = set; then
   withval="$with_bthreads"
   	if test "$withval" = "yes"; then
     	    USE_BTHREADS=1
-	    USE_USER_PTHREADS=
-	    USE_PTHREADS=
-	fi
+	        USE_USER_PTHREADS=
+	        USE_PTHREADS=
+	    fi
 fi
 
     ;;
 
 *-solaris*)
     # Check whether --with-native-threads or --without-native-threads was given.
 if test "${with_native_threads+set}" = set; then
   withval="$with_native_threads"
-  	if test "$withval" = "yes"; then
+   if test "$withval" = "yes"; then
 	    USE_NATIVE_THREADS=1
 	    USE_USER_PTHREADS=
 	    USE_PTHREADS=
-	fi
+	  fi
 fi
 
     ;;
 esac
 
-USE_CPLUS=
 # Check whether --enable-cplus or --disable-cplus was given.
 if test "${enable_cplus+set}" = set; then
   enableval="$enable_cplus"
    if test "$enableval" = "yes"; then
-	USE_CPLUS=1
+	    USE_CPLUS=1
       fi
 fi
  
 
-USE_IPV6=
 # Check whether --enable-ipv6 or --disable-ipv6 was given.
 if test "${enable_ipv6+set}" = set; then
   enableval="$enable_ipv6"
    if test "$enableval" = "yes"; then
-	USE_IPV6=1
+	    USE_IPV6=1
       fi
 fi
 
 
 if test -n "$USE_PTHREADS"; then
       rm -f conftest*
    ac_cv_have_dash_pthread=no
    echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
-echo "configure:2927: checking whether ${CC-cc} accepts -pthread" >&5
+echo "configure:3251: checking whether ${CC-cc} accepts -pthread" >&5
    echo 'int main() { return 0; }' | cat > conftest.c
    ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
    if test $? -eq 0; then
 	if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
 	    ac_cv_have_dash_pthread=yes
 	    CFLAGS="$CFLAGS -pthread"
 	    CXXFLAGS="$CXXFLAGS -pthread"
 	fi
     fi
     rm -f conftest*
     echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6
 
     case "$target" in
     *-mingw*|*-cygwin*|*-uwin*)
-	;;
+	    ;;
     *-solaris*)
-	cat >> confdefs.h <<\EOF
+	    cat >> confdefs.h <<\EOF
 #define _REENTRANT 1
 EOF
 
-	if test -n "$GNU_CC"; then
-	    CFLAGS="$CFLAGS -mt"
-	    CXXFLAGS="$CXXFLAGS -mt"
-	fi
-	;;
+	    if test -n "$GNU_CC"; then
+	        CFLAGS="$CFLAGS -mt"
+	        CXXFLAGS="$CXXFLAGS -mt"
+	    fi
+	    ;;
     *-freebsd*)
-	cat >> confdefs.h <<\EOF
+	    cat >> confdefs.h <<\EOF
+#define _REENTRANT 1
+EOF
+
+	    cat >> confdefs.h <<\EOF
+#define _THREAD_SAFE 1
+EOF
+
+	    	    if test "$ac_cv_have_dash_pthread" = "yes"; then
+	        PTHREAD_LDFLAGS=
+	    fi
+	    ;;
+    *-hpuxB.10.10*)
+        cat >> confdefs.h <<\EOF
 #define _REENTRANT 1
 EOF
 
-	cat >> confdefs.h <<\EOF
-#define _THREAD_SAFE 1
+        cat >> confdefs.h <<\EOF
+#define _PR_DCETHREADS 1
 EOF
 
-	 	if test "$ac_cv_have_dash_pthread" = "yes"; then
-	    PTHREAD_LDFLAGS=
-	fi
-	;;
-    *)
-	cat >> confdefs.h <<\EOF
+        ;;
+    *-hpuxB.10.20*)
+        cat >> confdefs.h <<\EOF
 #define _REENTRANT 1
 EOF
 
-	;;
+        cat >> confdefs.h <<\EOF
+#define _PR_DCETHREADS 1
+EOF
+
+        ;;
+    *-hpux*)
+        cat >> confdefs.h <<\EOF
+#define _POSIX_C_SOURCE=199506L 1
+EOF
+
+        ;;
+    *)
+	    cat >> confdefs.h <<\EOF
+#define _REENTRANT 1
+EOF
+
+	    ;;
     esac
 
     echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
-echo "configure:2975: checking for pthread_create" >&5
+echo "configure:3325: checking for pthread_create" >&5
 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2980 "configure"
+#line 3330 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char pthread_create(); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char pthread_create();
@@ -2994,17 +3344,17 @@ int main() {
 #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
 choke me
 #else
 pthread_create();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:3003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_pthread_create=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_func_pthread_create=no"
 fi
@@ -3013,36 +3363,36 @@ fi
 
 if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   :
 else
   echo "$ac_t""no" 1>&6
 
        echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:3022: checking for pthread_create in -lpthread" >&5
+echo "configure:3372: checking for pthread_create in -lpthread" >&5
 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3030 "configure"
+#line 3380 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char pthread_create();
 
 int main() {
 pthread_create()
 ; return 0; }
 EOF
-if { (eval echo configure:3041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
@@ -3058,52 +3408,75 @@ else
 fi
 
     
 fi
 
 
 else 
     if test -n "$USE_USER_PTHREADS"; then
-	USE_PTHREADS=
-	USE_NSPR_THREADS=
+	    USE_PTHREADS=
+	    USE_NSPR_THREADS=
+        case "${target}" in
+        *-hpux*)
+            cat >> confdefs.h <<\EOF
+#define _POSIX_C_SOURCE=199506L 1
+EOF
+
+            ;;
+        esac
     else
-	USE_NSPR_THREADS=1
-	    fi
+	    USE_NSPR_THREADS=1
+	        fi
 fi
 
 case "$target" in
-    *-mingw*|*-cygwin*|*-uwin*)
-	# win32 does not use pthreads
-	USE_PTHREADS=
-	PTHREAD_LDFLAGS=
-	USE_USER_PTHREADS=
-	;;
-    *-solaris*)
-	if test -n "$USE_NATIVE_THREADS"; then
-	    cat >> confdefs.h <<\EOF
+*-aix4.1*)
+    if test -z "$USE_PTHREADS"; then
+        cat >> confdefs.h <<\EOF
+#define AIX_RENAME_SELECT 1
+EOF
+
+    fi
+    ;;
+*-aix4.23*)
+    if test -z "$USE_NSPR_THREADS"; then
+        cat >> confdefs.h <<\EOF
+#define HAVE_POINTER_LOCALTIME_R 1
+EOF
+
+    fi
+    ;;
+*-mingw*|*-cygwin*|*-uwin*)
+        USE_PTHREADS=
+    PTHREAD_LDFLAGS=
+    USE_USER_PTHREADS=
+    ;;
+*-solaris*)
+    if test -n "$USE_NATIVE_THREADS"; then
+        cat >> confdefs.h <<\EOF
 #define _PR_GLOBAL_THREADS_ONLY 1
 EOF
 
-	else
-	    cat >> confdefs.h <<\EOF
+    else
+        cat >> confdefs.h <<\EOF
 #define _PR_LOCAL_THREADS_ONLY 1
 EOF
 
-	fi
-	;;
+    fi
+    ;;
 esac
 
 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "configure:3097: checking for dlopen" >&5
+echo "configure:3470: checking for dlopen" >&5
 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3102 "configure"
+#line 3475 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dlopen(); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char dlopen();
@@ -3116,17 +3489,17 @@ int main() {
 #if defined (__stub_dlopen) || defined (__stub___dlopen)
 choke me
 #else
 dlopen();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:3125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_dlopen=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_func_dlopen=no"
 fi
@@ -3135,36 +3508,36 @@ fi
 
 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   :
 else
   echo "$ac_t""no" 1>&6
 
     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:3144: checking for dlopen in -ldl" >&5
+echo "configure:3517: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3152 "configure"
+#line 3525 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char dlopen();
 
 int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:3163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
@@ -3238,16 +3611,22 @@ fi
 
 
 
 
 
 
 
 
+
+
+
+
+
+
 trap '' 1 2 15
 cat > confcache <<\EOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
 # scripts and configure runs.  It is not useful on other systems.
 # If it contains results you don't want to keep, you may remove or edit it.
 #
 # By default, configure uses ./config.cache as the cache file,
@@ -3479,20 +3858,26 @@ s%@MDCPUCFG_H@%$MDCPUCFG_H%g
 s%@MOZ_TARGET@%$MOZ_TARGET%g
 s%@PR_MD_CSRCS@%$PR_MD_CSRCS%g
 s%@PR_MD_ASFILES@%$PR_MD_ASFILES%g
 s%@PR_MD_ARCH_DIR@%$PR_MD_ARCH_DIR%g
 s%@OBJ_SUFFIX@%$OBJ_SUFFIX%g
 s%@LIB_SUFFIX@%$LIB_SUFFIX%g
 s%@DLL_SUFFIX@%$DLL_SUFFIX%g
 s%@MKSHLIB@%$MKSHLIB%g
+s%@DSO_CFLAGS@%$DSO_CFLAGS%g
+s%@DSO_LDOPTS@%$DSO_LDOPTS%g
+s%@DSO_LDFLAGS@%$DSO_LDFLAGS%g
 s%@DEFINES@%$DEFINES%g
 s%@AR_FLAGS@%$AR_FLAGS%g
 s%@OS_LIBS@%$OS_LIBS%g
 s%@EXTRA_LIBS@%$EXTRA_LIBS%g
+s%@AIX_LINK_OPTS@%$AIX_LINK_OPTS%g
+s%@NOSUCHFILE@%$NOSUCHFILE%g
+s%@MOZ_OBJFORMAT@%$MOZ_OBJFORMAT%g
 
 CEOF
 EOF
 
 cat >> $CONFIG_STATUS <<\EOF
 
 # Split the substitutions into bite-sized pieces for seds with
 # small command number limits, like on Digital OSF/1 and HP-UX.
--- a/configure.in
+++ b/configure.in
@@ -43,16 +43,18 @@ dnl ====================================
 NSPR_VERSION=3
 NSPR_MODNAME=nspr20
 _HAVE_PTHREADS=
 USE_PTHREADS=
 USE_USER_PTHREADS=
 USE_NSPR_THREADS=
 USE_N32=
 USE_64=
+USE_CPLUS=
+USE_IPV6=
 USE_MDUPDATE=
 _OPTIMIZE_FLAGS=-O
 _DEBUG_FLAGS=-g
 MOZ_DEBUG=1
 MOZ_OPTIMIZE=
 
 dnl ========================================================
 dnl =
@@ -67,25 +69,40 @@ LDFLAGS="${LDFLAGS=}"
 HOST_CFLAGS="${HOST_CFLAGS=}"
 HOST_LDFLAGS="${HOST_LDFLAGS=}"
 
 dnl ========================================================
 dnl =
 dnl = Check options that may affect the compiler
 dnl =
 dnl ========================================================
+dnl Check if NSPR is being compiled for Mozilla
+dnl Let --with-arg override environment setting
+dnl
+AC_ARG_WITH(mozilla,
+    [  --with-mozilla          Compile NSPR with Mozilla support],
+    [   if test "$withval" = "yes"; then
+            AC_DEFINE(MOZILLA_CLIENT)
+            MOZILLA_CLIENT=1
+	    else
+	        MOZILLA_CLIENT=
+	    fi],
+    [	if test -n "$MOZILLA_CLIENT"; then
+	        AC_DEFINE(MOZILLA_CLIENT)
+	    fi])
+
 AC_ARG_ENABLE(optimize,
     [  --enable-optimize       Enable code optimizations],
     MOZ_OPTIMIZE=1)
 
 AC_ARG_ENABLE(debug,
     [  --disable-debug         Do not compile in debugging symbols],
     [	if test "$enableval" = "no"; then
     	    MOZ_DEBUG=
-	fi])
+	    fi])
 
 AC_ARG_ENABLE(shared,
     [  --disable-shared        Do not compile into shared libraries])
 
 AC_ARG_ENABLE(target,
     [  --enable-target=\$t      Turn on features for target \$t when build has multiple targets],
     MOZ_TARGET=`echo $enableval | tr a-z A-Z`,
     MOZ_TARGET=)
@@ -94,24 +111,24 @@ AC_ARG_ENABLE(n32,
     [  --enable-n32            Enable n32 support (IRIX only)],
     [ if test "$enableval" = "yes"; then
 	USE_N32=1
     fi ])
 
 AC_ARG_ENABLE(64bit,
     [  --enable-64bit          Enable 64-bit support (on certain platforms)],
     [ if test "$enableval" = "yes"; then
-	USE_64=1
-    fi ])
+	    USE_64=1
+      fi ])
 
 AC_ARG_ENABLE(mdupdate,
     [  --enable-mdupdate       Enable use of certain compilers' mdupdate feature],
     [ if test "$enableval" = "yes"; then
-	USE_MDUPDATE=1
-    fi ])
+	    USE_MDUPDATE=1
+      fi ])
 
 AC_PATH_PROG(WHOAMI, whoami, :)
 if test -n "$MOZ_DEBUG"; then
     AC_DEFINE(DEBUG)
     AC_DEFINE_UNQUOTED(DEBUG_`$WHOAMI`)
     DEFINES="$DEFINES -UNDEBUG"
 else
     AC_DEFINE(NDEBUG)
@@ -126,80 +143,80 @@ if test "$target" != "$host"; then
     cross_compiling=yes
 
     _SAVE_CC="$CC"
     _SAVE_CFLAGS="$CFLAGS"
     _SAVE_LDFLAGS="$LDFLAGS"
 
     AC_MSG_CHECKING([for $host compiler])
     if test -z "$HOST_CC"; then
-	AC_CHECK_PROGS(HOST_CC, gcc cc /usr/ucb/cc, "")
-	if test -z "$HOST_CC"; then
-	    AC_MSG_ERROR([no acceptable cc found in \$PATH])
-	fi
+	    AC_CHECK_PROGS(HOST_CC, gcc cc /usr/ucb/cc, "")
+	    if test -z "$HOST_CC"; then
+	        AC_MSG_ERROR([no acceptable cc found in \$PATH])
+	    fi
     fi
     AC_MSG_RESULT([$HOST_CC])
     if test -z "$HOST_CFLAGS"; then
-	HOST_CFLAGS="$CFLAGS"
+	    HOST_CFLAGS="$CFLAGS"
     fi
     if test -z "$HOST_LDFLAGS"; then
-	HOST_LDFLAGS="$LDFLAGS"
+	    HOST_LDFLAGS="$LDFLAGS"
     fi
 
     CC="$HOST_CC"
     CFLAGS="$HOST_CFLAGS"
     LDFLAGS="$HOST_LDFLAGS"
 
     AC_MSG_CHECKING([whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works])
     AC_TRY_COMPILE([], [return(0);], 
 	[ac_cv_prog_host_cc_works=1 AC_MSG_RESULT([yes])],
 	AC_MSG_ERROR([installation or configuration problem: $host compiler $HOST_CC cannot create executables.]) )
     
     CC=$_SAVE_CC
     CFLAGS=$_SAVE_CFLAGS
     LDFLAGS=$_SAVE_LDFLAGS
 
     if test -z "$CC"; then
-	AC_CHECK_PROGS(CC, "${target_alias}-gcc" "${target}-gcc", :)
+	    AC_CHECK_PROGS(CC, "${target_alias}-gcc" "${target}-gcc", :)
     fi
     unset ac_cv_prog_CC
     AC_PROG_CC
     if test -z "$CXX"; then
-	AC_CHECK_PROGS(CXX, "${target_alias}-g++" "${target}-g++", :)
+	    AC_CHECK_PROGS(CXX, "${target_alias}-g++" "${target}-g++", :)
     fi
     unset ac_cv_prog_CXX
     AC_PROG_CXX
     if test -z "$RANLIB"; then
-	AC_CHECK_PROGS(RANLIB, "${target_alias}-ranlib" "${target}-ranlib", :)
+	    AC_CHECK_PROGS(RANLIB, "${target_alias}-ranlib" "${target}-ranlib", :)
     fi
     if test -z "$AR"; then
-	AC_CHECK_PROGS(AR, "${target_alias}-ar" "${target}-ar", :)
+	    AC_CHECK_PROGS(AR, "${target_alias}-ar" "${target}-ar", :)
     fi
     if test -z "$AS"; then
-	AC_CHECK_PROGS(AS, "${target_alias}-as" "${target}-as", :)
+	    AC_CHECK_PROGS(AS, "${target_alias}-as" "${target}-as", :)
     fi
     if test -z "$DLLTOOL"; then
-	AC_CHECK_PROGS(DLLTOOL, "${target_alias}-dlltool" "${target}-dlltool", :)
+	    AC_CHECK_PROGS(DLLTOOL, "${target_alias}-dlltool" "${target}-dlltool", :)
     fi
     if test -z "$WINDRES"; then
-	AC_CHECK_PROGS(WINDRES, "${target_alias}-windres" "${target}-windres", :)
+	    AC_CHECK_PROGS(WINDRES, "${target_alias}-windres" "${target}-windres", :)
     fi
 else
     AC_PROG_CC
     AC_PROG_CXX
     AC_PROG_RANLIB
     AC_PATH_PROGS(AS, as, $CC)
     AC_PATH_PROGS(AR, ar, :)
     AC_PATH_PROGS(DLLTOOL, dlltool, :)
     AC_PATH_PROGS(WINDRES, windres, :)
     if test -z "$HOST_CC"; then
-	HOST_CC="$CC"
+	    HOST_CC="$CC"
     fi
     if test -z "$HOST_CFLAGS"; then
-	HOST_CFLAGS="$CFLAGS"
+	    HOST_CFLAGS="$CFLAGS"
     fi
 fi
 
 if test "$GCC" = "yes"; then
     GNU_CC=1
 fi
 
 dnl ========================================================
@@ -213,16 +230,17 @@ dnl ====================================
 dnl Default platform specific options
 dnl ========================================================
 OBJ_SUFFIX=o
 LIB_SUFFIX=a
 DLL_SUFFIX=so
 MKSHLIB='$(CCC) -shared -o $@'
 PR_MD_ASFILES=
 PR_MD_CSRCS=
+PR_MD_ARCH_DIR=unix
 AR_FLAGS='cr $@'
 
 dnl ========================================================
 dnl Override of system specific host options
 dnl ========================================================
 case "$host" in
 *-mingw*)
     ;;
@@ -231,181 +249,353 @@ case "$host" in
     ;;
 esac
 
 dnl ========================================================
 dnl Override of system specific target options
 dnl ========================================================
 case "$target" in
 
-*-nto*)
+*-aix*)
     AC_DEFINE(XP_UNIX)
-    MDCPUCFG_H=_nto.cfg
-    PR_MD_CSRCS=nto.c
-    PR_MD_ARCH_DIR=unix
-    MKSHLIB='qcc -Vgcc_ntox86 -shared -Wl,-h$(@:$(OBJDIR)/%.so=%.so) -o $(@:$(OBJDIR)/%.so=%.so)'
-    CFLAGS="$CFLAGS -Wc,-Wall -Wc,-Wno-parentheses -DNTO -D_QNX_SOURCE -DHAVE_POINTER_LOCALTIME_R -shared"
-    OS_LIBS="-lsocket"
-    _OPTIMIZE_FLAGS="-O2"
-    _DEBUG_FLAGS="-O2 -gdwarf-2"
-    COMPILER_TAG="_qcc"
-    CC="qcc -Vgcc_ntox86 -w"
-    CXX="QCC -Vgcc_ntox86 -w"
-    CPP="qcc -Vgcc_ntox86 -w"
-    LD="qcc -Vgcc_ntox86 -nostdlib"
-    AR="qcc -Vgcc_ntox86 -M -a "
-    AR_FLAGS="$@"
-	;;
-
+    AC_DEFINE(AIX)
+    AC_DEFINE(SYSV)
+    DSO_LDOPTS='-brtl -bM:SRE -bnoentry -bexpall'
+    MKSHLIB='$(LD) $(DSO_LDOPTS)'
+    case "${target_os}" in
+    aix3.2*)
+        USE_NSPR_THREADS=1
+        AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
+        AC_DEFINE(AIX_RENAME_SELECT)
+        AC_DEFINE(_PR_NO_LARGE_FILES)
+        AIX_LINK_OPTS='-bnso -berok'
+        ;;
+    aix4.1*)
+        AC_DEFINE(AIX_RENAME_SELECT)
+        AC_DEFINE(AIX_HAVE_ATOMIC_OP_H)
+        AC_DEFINE(AIX_TIMERS)
+        AC_DEFINE(_PR_NO_LARGE_FILES)
+        AC_DEFINE(AIX4_1)
+        MKSHLIB=
+        DSO_LDOPTS=
+        AIX_LINK_OPTS='-bnso -berok'
+        ;;
+    aix4.3*)
+        AC_DEFINE(AIX_HAVE_ATOMIC_OP_H)
+        AC_DEFINE(AIX_TIMERS)
+        AC_DEFINE(_PR_HAVE_OFF64_T)
+        AC_DEFINE(AIX4_3)
+        AC_DEFINE(HAVE_SOCKLEN_T)
+        USE_IPV6=1
+        AIX_LINK_OPTS='-brtl -bnso -berok'
+        ;;
+    *)
+        AC_DEFINE(AIX_HAVE_ATOMIC_OP_H)
+        AC_DEFINE(AIX_TIMERS)
+        AC_DEFINE(_PR_HAVE_OFF64_T)
+        AIX_LINK_OPTS='-brtl -bnso -berok'
+        ;;
+    esac
+    CFLAGS="$CFLAGS -qro -qroconst"
+    if test `grep -c xlC_r $CC`; then
+        CFLAGS="$CFLAGS -qarch=com"
+    fi
+    AIX_WRAP='$(DIST)/lib/aixwrap.o'
+    AIX_TMP='./_aix_tmp.o'
+    ;;
+        
 *-beos*)
     AC_DEFINE(XP_BEOS)
     AC_DEFINE(BeOS)
     AC_DEFINE(BEOS)
     ;;
 
-*-linux*)
+*-dgux*)
     AC_DEFINE(XP_UNIX)
-    MDCPUCFG_H=_linux.cfg
-    PR_MD_CSRCS=linux.c
-    PR_MD_ARCH_DIR=unix
+    AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
+    AC_DEFINE(SVR4)
+    AC_DEFINE(SYSV)
+    AC_DEFINE(DGUX)
+    AC_DEFINE(_DGUX_SOURCE)
+    AC_DEFINE(_POSIX4A_DRAFT6_SOURCE)
+    MKSHLIB='$(LD) $(DSO_LDOPTS)'
+    DSO_LDOPTS=-G
+    NOSUCHFILE=/no-such-file
+    _OPTIMIZE_FLAGS=-O2
+    _DEBUG_FLAGS=
+    ;;
+
+*-freebsd*)
+    if test "${target_cpu}" != "alpha"; then
+        AC_DEFINE(i386)
+    fi
+    AC_DEFINE(FREEBSD)
+    AC_DEFINE(HAVE_BSD_FLOCK)
+    CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall -pipe"
+    MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+    if test "$MOZ_OBJFORMAT" = "elf"; then
+        DLL_SUFFIX=so
+    else
+        DLL_SUFFIX=so.1.0
+    fi
+    DSO_CFLAGS=-fPIC
+    DSO_LDOPTS=-Bshareable
+    DSO_LDFLAGS=
+    MKSHLIB='$(LD) $(DSO_LDOPTS)'
+    ;;
+
+*-hpux*)
+    AC_DEFINE(HPUX)
+    AC_DEFINE(_HPUX_SOURCE)
+    DEFINES="$DEFINES -D${target_cpu}"
+    DLL_SUFFIX=sl
+    MKSHLIB='$(LD) $(DSO_LDOPTS)'
+    DSO_LDOPTS='-b +h $(notdir $@)'
+    DSO_LDFLAGS=
+    if test -z "$GNU_CC"; then
+        CC="$CC -Ae"
+        CXX="$CXX -ext"
+        CFLAGS="$CFLAGS +ESlit"
+        CXXFLAGS="$CXXFLAGS +ESlit"
+        DSO_CFLAGS=+Z
+    else
+        DSO_CFLAGS=-fPIC
+    fi
+    if test -n "$MOZILLA_CLIENT"; then
+        USE_NSPR_THREADS=1
+    fi
+    case "${target_os}" in
+    hpuxA.09*)
+        AC_DEFINE(HPUX9)
+        AC_DEFINE(_PR_NEED_H_ERRNO)
+        AC_DEFINE(_PR_NO_LARGE_FILES)
+        ;;
+    hpuxB.10.01*)
+        AC_DEFINE(HPUX10)
+        ;;
+    hpuxB.10.10*)
+        AC_DEFINE(HPUX10)
+        AC_DEFINE(HPUX10_10)
+        AC_DEFINE(HAVE_INT_LOCALTIME_R)
+        USE_PTHREADS=1
+        USE_NSPR_THREADS=
+        ;;
+    hpuxB.10.20*)
+        AC_DEFINE(HPUX10)
+        AC_DEFINE(HPUX10_20)
+        AC_DEFINE(HAVE_INT_LOCALTIME_R)
+        if test -z "$GNU_CC"; then
+            CFLAGS="$CFLAGS +DAportable +DS1.1"
+            CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
+        fi
+        USE_PTHREADS=1
+        USE_NSPR_THREADS=
+        ;;
+    hpuxB.10.30*)
+        AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
+        if test -z "$GNU_CC"; then
+            CFLAGS="$CFLAGS +DAportable +DS1.1"
+            CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
+        fi
+        USE_PTHREADS=1
+        USE_NSPR_THREADS=
+        ;;
+    hpuxB.11.00*)
+        AC_DEFINE(HPUX10)
+        AC_DEFINE(HPUX11)
+        AC_DEFINE(_LARGEFILE64_SOURCE)
+        AC_DEFINE(_PR_HAVE_OFF64_T)
+        AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
+        if test -z "$GNU_CC"; then
+            if test -z "$USE_64"; then
+                CFLAGS="$CFLAGS +DAportable +DS2.0"
+                CXXFLAGS="$CXXFLAGS +DAportable +DS2.0"
+            else
+                CFLAGS="$CFLAGS +DA2.0W +DS2.0"
+                CXXFLAGS="$CXXFLAGS +DA2.0W +DS2.0"
+            fi
+        fi
+        USE_PTHREADS=1
+        USE_NSPR_THREADS=
+        ;;
+    esac
+    case "${target_os}" in
+    hpuxB.10*)
+        AC_DEFINE(_PR_NO_LARGE_FILES)
+        ;;
+    esac
+    if test -n "$USE_NSPR_THREADS"; then
+        AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
+    fi
     ;;
 
 *-irix*)
     AC_DEFINE(XP_UNIX)
     AC_DEFINE(IRIX)
     AC_DEFINE(SVR4)
     AC_DEFINE(_SGI_MP_SOURCE)
     MDCPUCFG_H=_irix32.cfg
     PR_MD_CSRCS=irix.c
     PR_MD_ASFILES=os_Irix.s
     PR_MD_ARCH_DIR=unix
     MKSHLIB='$(LD) $(SHLIB_LD_OPTS) -rdata_shared -shared -soname $(notdir $@)'
     DSO_LDOPTS='-elf -shared -all'
     case "${target_os}" in
-	irix5*)
+    irix5*)
 	   USE_NSPR_THREADS=1
 	   ;;
-	*)
+    *)
 	   USE_N32=1
 	   USE_PTHREADS=1
 	   ;;
  	esac
     if test "$GNU_CC"; then
-	AS='$(CC) -x assembler-with-cpp -D_ASM -mips2'
-	CFLAGS="$CFLAGS -Wall -Wno-format"
-	_OPTIMIZE_FLAGS="-O6"
+	    AS='$(CC) -x assembler-with-cpp -D_ASM -mips2'
+	    CFLAGS="$CFLAGS -Wall -Wno-format"
+	    _OPTIMIZE_FLAGS="-O6"
     else
-	AS="as -D_ASM $(INCLUDES) -n32"
-	CFLAGS="$CFLAGS -fullwarn -xansi"
-	if test "$USE_N32"; then
-	    _OPTIMIZE_FLAGS="-O -OPT:Olimit=4000"
-	else
-	    _OPTIMIZE_FLAGS="-O -Olimit 4000"
-	fi
-	if test "$USE_MDUPDATE"; then
-	    $CFLAGS="$CFLAGS -MDupdate"
-	fi
-	case "$target}" in
-	*-irix6.*)
-	    CFLAGS="$CFLAGS -multigot"
-	    SHLIB_LD_OPTS="-no_unresolved"
-	    if test "USE_N32"; then
-		CFLAGS="$CFLAGS -n32 -woff 1209"
-		LDFLAGS="$LDFLAGS -n32"
-		SHLIB_LD_OPTS="$SHLIB_LD_OPTS -n32"
-		if test "${target_os}" = "irix6.2"; then
-		    LDFLAGS="$LDFLAGS -Wl,-woff,85"
-		    SHLIB_LD_OPTS="$SHLIB_LD_OPTS -woff 85"
-		fi
+	    AS="as -D_ASM $(INCLUDES) -n32"
+	    CFLAGS="$CFLAGS -fullwarn -xansi"
+	    if test "$USE_N32"; then
+	        _OPTIMIZE_FLAGS="-O -OPT:Olimit=4000"
 	    else
-		if test "$USE_64"; then
-		    CFLAGS="$CFLAGS -64"
-		else
-		    CFLAGS="$CFLAGS -32"
-		fi
+	        _OPTIMIZE_FLAGS="-O -Olimit 4000"
+	    fi
+	    if test "$USE_MDUPDATE"; then
+	        $CFLAGS="$CFLAGS -MDupdate"
 	    fi
-	    ;;
-	*)
-	    CFLAGS="$CFLAGS -xgot"
-	    ;;
-	esac
+	    case "$target}" in
+	    *-irix6.*)
+	        CFLAGS="$CFLAGS -multigot"
+	        SHLIB_LD_OPTS="-no_unresolved"
+	        if test "USE_N32"; then
+		        CFLAGS="$CFLAGS -n32 -woff 1209"
+		        LDFLAGS="$LDFLAGS -n32"
+		        SHLIB_LD_OPTS="$SHLIB_LD_OPTS -n32"
+		        if test "${target_os}" = "irix6.2"; then
+		            LDFLAGS="$LDFLAGS -Wl,-woff,85"
+		            SHLIB_LD_OPTS="$SHLIB_LD_OPTS -woff 85"
+		        fi
+	        else
+		        if test "$USE_64"; then
+		            CFLAGS="$CFLAGS -64"
+		        else
+		            CFLAGS="$CFLAGS -32"
+		        fi
+	        fi
+	        ;;
+	    *)
+	        CFLAGS="$CFLAGS -xgot"
+	        ;;
+	    esac
     fi
     if test "${target_os}" = "irix5.3"; then
-	AC_DEFINE(IRIX5_3)
+	    AC_DEFINE(IRIX5_3)
     fi
     case "${target_os}" in
 	irix5*)
 	    ;;
 	*)
 	    AC_DEFINE(_PR_HAVE_SGI_PRDA_PROCMASK)
 	    ;;
 	esac
     case "${target_os}" in
 	irix6.5*)
 	    ;;
 	*)
 	    if test -z "$GNU_CC"; then
-		CFLAGS="$CFLAGS -mips3"
+		    CFLAGS="$CFLAGS -mips3"
 	    fi
 	    AC_DEFINE(_PR_HAVE_GETPROTO_R)
 	    AC_DEFINE(_PR_HAVE_GETPROTO_R_POINTER)
 	    ;;
 	esac
     case "${target_cpu}" in
     alpha*)
-	AC_DEFINE(_POSIX_SOURCE)
-	AC_DEFINE(_BSD_SOURCE)
-	;;
+	    AC_DEFINE(_POSIX_SOURCE)
+	    AC_DEFINE(_BSD_SOURCE)
+	    ;;
     esac
     ;;
 
+*-linux*)
+    AC_DEFINE(XP_UNIX)
+    CFLAGS="$CFLAGS -pipe"
+    CXXFLAGS="$CXXFLAGS -pipe"
+    MDCPUCFG_H=_linux.cfg
+    PR_MD_CSRCS=linux.c
+    PR_MD_ARCH_DIR=unix
+    ;;
+
 *-mingw*)
     AC_DEFINE(XP_PC)
     PR_MD_ARCH_DIR=windows
     if test -z "$GNU_CC"; then
-	OBJ_SUFFIX=obj
-	LIB_SUFFIX=lib
-	DLL_SUFFIX=dll
+	    OBJ_SUFFIX=obj
+	    LIB_SUFFIX=lib
+	    DLL_SUFFIX=dll
     fi
     MKSHLIB='$(DLLTOOL) --as=$(AS) -k --dllname $*.dll --output-lib $@'
 
     case "$MOZ_TARGET" in
     WINNT)
-	DEFINES="$DEFINES -DWIN32 -DWINNT -DWin32_Winsock"
-	MDCPUCFG_H=_winnt.cfg
-	;;
+	    DEFINES="$DEFINES -DWIN32 -DWINNT -DWin32_Winsock"
+	    MDCPUCFG_H=_winnt.cfg
+	    ;;
     WIN95)
-	DEFINES="$DEFINES -UWINNT -DWIN32 -DWIN95 -DWin32_Winsock -D_PR_GLOBAL_THREADS_ONLY"
-	MDCPUCFG_H=_win95.cfg
-	;;
+	    DEFINES="$DEFINES -UWINNT -DWIN32 -DWIN95 -DWin32_Winsock -D_PR_GLOBAL_THREADS_ONLY"
+	    MDCPUCFG_H=_win95.cfg
+	    ;;
     WIN16)
-	DEFINES="$DEFINES -UWINNT"
-	MDCPUCFG_H=_win16.cfg
-	;;
+	    DEFINES="$DEFINES -UWINNT"
+	    MDCPUCFG_H=_win16.cfg
+	    ;;
     *)
-	AC_MSG_ERROR([Missing MOZ_TARGET for ${target}.  Use --enable-target to set.])
+	    AC_MSG_ERROR([Missing MOZ_TARGET for ${target}.  Use --enable-target to set.])
    	;;
     esac
 
     case "$target" in
     i?86-*)
-	AC_DEFINE(_X86_)
+	    AC_DEFINE(_X86_)
         ;;
     alpha-*)
-	AC_DEFINE(_ALPHA_)
-   	;;
+	    AC_DEFINE(_ALPHA_)
+   	    ;;
     mips-*)
-	AC_DEFINE(_MIPS_)
-	;;
+	    AC_DEFINE(_MIPS_)
+	    ;;
     *)
-	AC_DEFINE(_CPU_ARCH_NOT_DEFINED)
-	;;
+	    AC_DEFINE(_CPU_ARCH_NOT_DEFINED)
+	    ;;
     esac
     ;;
 
+*-nto*)
+    AC_DEFINE(XP_UNIX)
+    MDCPUCFG_H=_nto.cfg
+    PR_MD_CSRCS=nto.c
+    MKSHLIB='qcc -Vgcc_ntox86 -shared -Wl,-h$(@:$(OBJDIR)/%.so=%.so) -o $(@:$(OBJDIR)/%.so=%.so)'
+    CFLAGS="$CFLAGS -Wc,-Wall -Wc,-Wno-parentheses -DNTO -D_QNX_SOURCE -DHAVE_POINTER_LOCALTIME_R -shared"
+    OS_LIBS="-lsocket"
+    _OPTIMIZE_FLAGS="-O2"
+    _DEBUG_FLAGS="-O2 -gdwarf-2"
+    COMPILER_TAG="_qcc"
+    CC="qcc -Vgcc_ntox86 -w"
+    CXX="QCC -Vgcc_ntox86 -w"
+    CPP="qcc -Vgcc_ntox86 -w"
+    LD="qcc -Vgcc_ntox86 -nostdlib"
+    AR="qcc -Vgcc_ntox86 -M -a "
+    AR_FLAGS="$@"
+	;;
+
+*)
+    AC_DEFINE(XP_UNIX)
+    ;;
+   
 esac
 
 dnl Turn off shared libraries if asked to do so.
 if test "$enable_shared" = no; then
     MKSHLIB=
 fi
 
 dnl ========================================================
@@ -474,113 +664,97 @@ dnl AC_FUNC_VPRINTF
 dnl AC_CHECK_FUNCS(ftime getcwd gethostname gettimeofday getwd mkdir mktime putenv rmdir select socket strdup strerror strstr strtol strtoul uname)
 
 dnl ========================================================
 dnl Check options
 dnl ========================================================
 
 OS_LIBS=
 
-dnl Check if NSPR is being compiled for Mozilla
-dnl Let --with-arg override environment setting
-dnl
-AC_ARG_WITH(mozilla,
-    [  --with-mozilla          Compile NSPR with Mozilla support],
-    [	if test "$withval" = "yes"; then
-	    AC_DEFINE(MOZILLA_CLIENT)
-	else
-	    MOZILLA_CLIENT=
-	fi],
-    [	if test -n "$MOZILLA_CLIENT"; then
-	    AC_DEFINE(MOZILLA_CLIENT)
-	fi])
-
 AC_CHECK_LIB(pthread, pthread_attr_init, 
              _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread",
     AC_CHECK_LIB(c_r, pthread_attr_init,
         _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r",
         AC_CHECK_LIB(c, pthread_attr_init,
             _HAVE_PTHREADS=1 )
         )
     )
 
 AC_ARG_WITH(pthreads,
     [  --with-pthreads         Use system pthreads library as thread subsystem],
-    [	if test "$withval" = "yes"; then
+    [ if test "$withval" = "yes"; then
 	    if test -n "$_HAVE_PTHREADS"; then
-		USE_PTHREADS=1 
-		USE_USER_PTHREADS=
-		USE_NSPR_THREADS=
+		    USE_PTHREADS=1 
+		    USE_USER_PTHREADS=
+		    USE_NSPR_THREADS=
 	    else
-		AC_MSG_ERROR([ --with-pthreads specified for a system without pthread support ]);
+		    AC_MSG_ERROR([ --with-pthreads specified for a system without pthread support ]);
 	    fi
-	else
+	  else
 	    USE_PTHREADS=
 	    _PTHREAD_LDFLAGS=
-	fi],
-	[ if test -n "$_HAVE_PTHREADS"; then
+	  fi],
+	[ if test -n "$_HAVE_PTHREADS" && test -z "$USE_USER_PTHREADS" && test -z "$USER_NSPR_THREADS"; then
 	    USE_PTHREADS=1
 	    USE_USER_PTHREADS=
 	    USE_NSPR_THREADS=
 	  fi])
 
 AC_ARG_ENABLE(user-pthreads,
     [  --enable-user-pthreads  Build using userland pthreads],
-    [	if test "$enableval" = "yes"; then
-	    if test -n "$_HAVE_PTHREADS"; then
-		USE_PTHREADS=
-		USE_USER_PTHREADS=1
-		USE_NSPR_THREADS=
+    [ if test "$enableval" = "yes"; then
+        if test -n "$_HAVE_PTHREADS"; then
+		    USE_PTHREADS=
+		    USE_USER_PTHREADS=1
+		    USE_NSPR_THREADS=
 	    else
-		AC_MSG_ERROR([ --enable-user-pthreads specified for a system without pthread support ]);
+		    AC_MSG_ERROR([ --enable-user-pthreads specified for a system without pthread support ]);
 	    fi
-	fi])
+	  fi])
 
 AC_ARG_ENABLE(nspr-threads,
     [  --enable-nspr-threads   Build using classic nspr threads],
-    [	if test "$enableval" = "yes"; then
+    [ if test "$enableval" = "yes"; then
 	    USE_PTHREADS=
 	    USE_USER_PTHREADS=
 	    USE_NSPR_THREADS=1
-	fi])
+	  fi])
 
 case "$target" in
 *-beos*)
     AC_ARG_WITH(bthreads,
     [  --with-bthreads         Use system bthreads library as thread subsystem (BeOS only)],
     [	if test "$withval" = "yes"; then
     	    USE_BTHREADS=1
-	    USE_USER_PTHREADS=
-	    USE_PTHREADS=
-	fi])
+	        USE_USER_PTHREADS=
+	        USE_PTHREADS=
+	    fi])
     ;;
 
 *-solaris*)
     AC_ARG_WITH(native-threads,
     [  --with-native-threads   Use native system threads as thread subsystem (Solaris only)],
-    [	if test "$withval" = "yes"; then
+    [ if test "$withval" = "yes"; then
 	    USE_NATIVE_THREADS=1
 	    USE_USER_PTHREADS=
 	    USE_PTHREADS=
-	fi])
+	  fi])
     ;;
 esac
 
-USE_CPLUS=
 AC_ARG_ENABLE(cplus,
     [  --enable-cplus          Use cplus for whatever reason],
     [ if test "$enableval" = "yes"; then
-	USE_CPLUS=1
+	    USE_CPLUS=1
       fi]) 
 
-USE_IPV6=
 AC_ARG_ENABLE(ipv6,
     [  --enable-ipv6           Compile ipv6 support],
     [ if test "$enableval" = "yes"; then
-	USE_IPV6=1
+	    USE_IPV6=1
       fi])
 
 if test -n "$USE_PTHREADS"; then
    dnl See if -pthread is supported.
    rm -f conftest*
    ac_cv_have_dash_pthread=no
    AC_MSG_CHECKING(whether ${CC-cc} accepts -pthread)
    echo 'int main() { return 0; }' | cat > conftest.c
@@ -592,66 +766,92 @@ if test -n "$USE_PTHREADS"; then
 	    CXXFLAGS="$CXXFLAGS -pthread"
 	fi
     fi
     rm -f conftest*
     AC_MSG_RESULT($ac_cv_have_dash_pthread)
 
     case "$target" in
     *-mingw*|*-cygwin*|*-uwin*)
-	;;
+	    ;;
     *-solaris*)
-	AC_DEFINE(_REENTRANT)
-	if test -n "$GNU_CC"; then
-	    CFLAGS="$CFLAGS -mt"
-	    CXXFLAGS="$CXXFLAGS -mt"
-	fi
-	;;
+	    AC_DEFINE(_REENTRANT)
+	    if test -n "$GNU_CC"; then
+	        CFLAGS="$CFLAGS -mt"
+	        CXXFLAGS="$CXXFLAGS -mt"
+	    fi
+	    ;;
     *-freebsd*)
-	AC_DEFINE(_REENTRANT)
-	AC_DEFINE(_THREAD_SAFE)
-	 dnl -pthread links in -lc_r, so don't specify it explicitly.
-	if test "$ac_cv_have_dash_pthread" = "yes"; then
-	    PTHREAD_LDFLAGS=
-	fi
-	;;
+	    AC_DEFINE(_REENTRANT)
+	    AC_DEFINE(_THREAD_SAFE)
+	    dnl -pthread links in -lc_r, so don't specify it explicitly.
+	    if test "$ac_cv_have_dash_pthread" = "yes"; then
+	        PTHREAD_LDFLAGS=
+	    fi
+	    ;;
+    *-hpuxB.10.10*)
+        AC_DEFINE(_REENTRANT)
+        AC_DEFINE(_PR_DCETHREADS)
+        ;;
+    *-hpuxB.10.20*)
+        AC_DEFINE(_REENTRANT)
+        AC_DEFINE(_PR_DCETHREADS)
+        ;;
+    *-hpux*)
+        AC_DEFINE(_POSIX_C_SOURCE=199506L)
+        ;;
     *)
-	AC_DEFINE(_REENTRANT)
-	;;
+	    AC_DEFINE(_REENTRANT)
+	    ;;
     esac
 
     AC_CHECK_FUNC(pthread_create,,[
        AC_CHECK_LIB(pthread, pthread_create, [OS_LIBS="-lpthread $OS_LIBS"])
     ])
 
 else 
     if test -n "$USE_USER_PTHREADS"; then
-	USE_PTHREADS=
-	USE_NSPR_THREADS=
+	    USE_PTHREADS=
+	    USE_NSPR_THREADS=
+        case "${target}" in
+        *-hpux*)
+            AC_DEFINE(_POSIX_C_SOURCE=199506L)
+            ;;
+        esac
     else
-	USE_NSPR_THREADS=1
-	dnl AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
+	    USE_NSPR_THREADS=1
+	    dnl AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
     fi
 fi
 dnl Special thread exceptions
 
 case "$target" in
-    *-mingw*|*-cygwin*|*-uwin*)
-	# win32 does not use pthreads
-	USE_PTHREADS=
-	PTHREAD_LDFLAGS=
-	USE_USER_PTHREADS=
-	;;
-    *-solaris*)
-	if test -n "$USE_NATIVE_THREADS"; then
-	    AC_DEFINE(_PR_GLOBAL_THREADS_ONLY)
-	else
-	    AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
-	fi
-	;;
+*-aix4.1*)
+    if test -z "$USE_PTHREADS"; then
+        AC_DEFINE(AIX_RENAME_SELECT)
+    fi
+    ;;
+*-aix4.[23]*)
+    if test -z "$USE_NSPR_THREADS"; then
+        AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
+    fi
+    ;;
+*-mingw*|*-cygwin*|*-uwin*)
+    dnl win32 does not use pthreads
+    USE_PTHREADS=
+    PTHREAD_LDFLAGS=
+    USE_USER_PTHREADS=
+    ;;
+*-solaris*)
+    if test -n "$USE_NATIVE_THREADS"; then
+        AC_DEFINE(_PR_GLOBAL_THREADS_ONLY)
+    else
+        AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
+    fi
+    ;;
 esac
 
 AC_CHECK_FUNC(dlopen,,[
     AC_CHECK_LIB(dl, dlopen, [OS_LIBS="-ldl $OS_LIBS"])
 ])
 
 EXTRA_LIBS=
 if test "$enable_shared" = no; then
@@ -698,28 +898,34 @@ AC_SUBST(MOZ_TARGET)
 AC_SUBST(PR_MD_CSRCS)
 AC_SUBST(PR_MD_ASFILES)
 AC_SUBST(PR_MD_ARCH_DIR)
 
 AC_SUBST(OBJ_SUFFIX)
 AC_SUBST(LIB_SUFFIX)
 AC_SUBST(DLL_SUFFIX)
 AC_SUBST(MKSHLIB)
+AC_SUBST(DSO_CFLAGS)
+AC_SUBST(DSO_LDOPTS)
+AC_SUBST(DSO_LDFLAGS)
 
 AC_SUBST(DEFINES)
 AC_SUBST(DEFS)
 AC_SUBST(AR)
 AC_SUBST(AR_FLAGS)
 AC_SUBST(DLLTOOL)
 AC_SUBST(WINDRES)
 AC_SUBST(RANLIB)
 AC_SUBST(PERL)
 
 AC_SUBST(OS_LIBS)
 AC_SUBST(EXTRA_LIBS)
+AC_SUBST(AIX_LINK_OPTS)
+AC_SUBST(NOSUCHFILE)
+AC_SUBST(MOZ_OBJFORMAT)
 
 dnl ========================================================
 dnl Generate output files.
 dnl ========================================================
 AC_OUTPUT([
 Makefile 
 config/Makefile
 config/autoconf.mk