? fulltree.diff
? update.log
Index: Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/Makefile.in,v
retrieving revision 1.299.2.2
diff -u -1 -2 -p -d -r1.299.2.2 Makefile.in
--- Makefile.in	24 Aug 2005 18:26:56 -0000	1.299.2.2
+++ Makefile.in	6 Jan 2006 17:07:07 -0000
@@ -261,24 +261,28 @@ ifdef MOZ_PHOENIX
 #XXXBlake this shell path is a temp hack; toolkit shouldn't depend on browser
 tier_50_dirs    += browser/components/shell/public
 endif
 
 ifdef MOZ_XPINSTALL
 tier_50_dirs     +=  xpinstall
 endif
 
 ifdef MOZ_JSDEBUGGER
 tier_50_dirs += js/jsd
 endif
 
+ifdef MOZ_JAVAXPCOM
+tier_50_dirs += extensions/java
+endif
+
 ifdef MOZ_ENABLE_LIBXUL
 tier_50_dirs += \
 		toolkit/library \
 		xpcom/stub \
 		$(NULL)
 endif
 
 ifdef NS_TRACE_MALLOC
 tier_50_dirs += tools/trace-malloc
 endif
 
 ifdef MOZ_PSM
Index: allmakefiles.sh
===================================================================
RCS file: /cvsroot/mozilla/allmakefiles.sh,v
retrieving revision 1.579.2.4
diff -u -1 -2 -p -d -r1.579.2.4 allmakefiles.sh
--- allmakefiles.sh	23 Oct 2005 15:06:16 -0000	1.579.2.4
+++ allmakefiles.sh	6 Jan 2006 17:07:16 -0000
@@ -1340,24 +1340,35 @@ fi
 if [ "$MOZ_XTF" ]; then
     MAKEFILES_content="$MAKEFILES_content
 	content/xtf/Makefile
 	content/xtf/public/Makefile
 	content/xtf/src/Makefile
 "
     MAKEFILES_layout="$MAKEFILES_layout
 	layout/xtf/Makefile
 	layout/xtf/src/Makefile
 "
 fi
 
+if [ "$MOZ_JAVAXPCOM" ]; then
+    MAKEFILES_javaxpcom="
+        extensions/java/Makefile
+        extensions/java/xpcom/Makefile
+        extensions/java/xpcom/interfaces/Makefile
+        extensions/java/xpcom/src/Makefile
+        extensions/java/xpcom/glue/Makefile
+        extensions/java/xpcom/tools/genifaces/Makefile
+"
+fi
+
 # directory/xpcom
 if [ "$MOZ_LDAP_XPCOM" ]; then
     MAKEFILES_ldap="
 	directory/xpcom/Makefile
 	directory/xpcom/base/Makefile
 	directory/xpcom/base/public/Makefile
 	directory/xpcom/base/src/Makefile
 "
 fi
 
 # embedding/componentlib
 
@@ -1404,31 +1415,24 @@ for extension in $MOZ_EXTENSIONS; do
             extensions/auth/Makefile
             " ;;
         gnomevfs ) MAKEFILES_extensions="$MAKEFILES_extensions
             extensions/gnomevfs/Makefile
             " ;;
         help ) MAKEFILES_extensions="$MAKEFILES_extensions
             extensions/help/Makefile
             extensions/help/resources/Makefile
             " ;;
         inspector ) MAKEFILES_extensions="$MAKEFILES_extensions
             $MAKEFILES_inspector"
             ;;
-        java ) MAKEFILES_extensions="$MAKEFILES_extensions
-            extensions/java/Makefile
-            extensions/java/xpcom/Makefile
-            extensions/java/xpcom/build/Makefile
-            extensions/java/xpcom/tests/Makefile
-            extensions/java/xpcom/tools/genifaces/Makefile
-            " ;;
         spatialnavigation ) MAKEFILES_extensions="$MAKEFILES_extensions
             $MAKEFILES_spatialnavigation"
             ;;
         typeaheadfind ) MAKEFILES_extensions="$MAKEFILES_extensions
             $MAKEFILES_typeaheadfind"
             ;;
         irc ) MAKEFILES_extensions="$MAKEFILES_extensions
             extensions/irc/Makefile
             " ;;
         layout-debug ) MAKEFILES_extensions="$MAKEFILES_extensions
             extensions/layout-debug/Makefile
             extensions/layout-debug/src/Makefile
@@ -1570,25 +1574,25 @@ $MAKEFILES_docshell
 $MAKEFILES_dom
 $MAKEFILES_editor
 $MAKEFILES_codesighs
 $MAKEFILES_composer
 $MAKEFILES_embedding
 $MAKEFILES_expat
 $MAKEFILES_extensions
 $MAKEFILES_gc
 $MAKEFILES_gfx
 $MAKEFILES_accessible
 $MAKEFILES_htmlparser
 $MAKEFILES_intl
-$MAKEFILES_java_supplement
+$MAKEFILES_javaxpcom
 $MAKEFILES_ldap
 $MAKEFILES_leaky
 $MAKEFILES_jpeg
 $MAKEFILES_jprof
 $MAKEFILES_js
 $MAKEFILES_jsdebugger
 $MAKEFILES_l10n
 $MAKEFILES_l10n_lang
 $MAKEFILES_langpacks
 $MAKEFILES_content
 $MAKEFILES_layout
 $MAKEFILES_libart
Index: configure
===================================================================
RCS file: /cvsroot/mozilla/configure,v
retrieving revision 1.1492.2.17.2.1
diff -u -1 -2 -p -d -r1.1492.2.17.2.1 configure
--- configure	5 Jan 2006 15:48:56 -0000	1.1492.2.17.2.1
+++ configure	6 Jan 2006 17:07:27 -0000
@@ -154,24 +154,27 @@ ac_help="$ac_help
 ac_help="$ac_help
   --enable-native-uconv   Enable iconv support"
 ac_help="$ac_help
   --enable-plaintext-editor-only
                           Allow only plaintext editing"
 ac_help="$ac_help
   --disable-composer      Disable building of Composer"
 ac_help="$ac_help
   --disable-xpcom-obsolete           Disable XPCOM Obsolete Library"
 ac_help="$ac_help
   --disable-xtf           Disable XTF (pluggable xml tags) support"
 ac_help="$ac_help
+  --enable-javaxpcom
+                          Enable Java-XPCOM bridge"
+ac_help="$ac_help
   --enable-extensions     Enable extensions"
 ac_help="$ac_help
   --enable-image-decoders[={mod1,mod2,default,all,none}]
                           Enable specific image decoders"
 ac_help="$ac_help
   --enable-ldap-experimental
                           Enable LDAP experimental features"
 ac_help="$ac_help
   --disable-mathml        Disable MathML support"
 ac_help="$ac_help
   --enable-svg            Enable SVG support"
 ac_help="$ac_help
@@ -922,64 +925,64 @@ ac_configure=$ac_aux_dir/configure # Thi
 case $host---$target---$nonopt in
 NONE---*---* | *---NONE---* | *---*---NONE) ;;
 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
 esac
 
 
 # Make sure we can run config.sub.
 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:935: checking host system type" >&5
+echo "configure:938: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
 NONE)
   case $nonopt in
   NONE)
     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
     fi ;;
   *) host_alias=$nonopt ;;
   esac ;;
 esac
 
 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:956: checking target system type" >&5
+echo "configure:959: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
 NONE)
   case $nonopt in
   NONE) target_alias=$host_alias ;;
   *) target_alias=$nonopt ;;
   esac ;;
 esac
 
 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$target" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:974: checking build system type" >&5
+echo "configure:977: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
 NONE)
   case $nonopt in
   NONE) build_alias=$host_alias ;;
   *) build_alias=$nonopt ;;
   esac ;;
 esac
 
 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
@@ -1030,30 +1033,30 @@ QT_VERSION_NUM=320
 LIBART_VERSION=2.3.4
 CAIRO_VERSION=0.3.0
 GTK2_VERSION=1.3.7
 MAKE_VERSION=3.78
 WINDRES_VERSION=2.14.90
 W32API_VERSION=2.4
 GNOMEVFS_VERSION=2.0
 GNOMEUI_VERSION=2.2.0
 GCONF_VERSION=1.2.1
 LIBGNOME_VERSION=2.0
 
 MISSING_X=
-for ac_prog in mawk gawk nawk awk
+for ac_prog in gawk mawk nawk awk
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1048: checking for $ac_word" >&5
+echo "configure:1051: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$AWK"; then
   ac_cv_prog_AWK="$AWK" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_AWK="$ac_prog"
@@ -1133,25 +1136,25 @@ if test "${enable_compile_environment+se
     COMPILE_ENVIRONMENT= 
   else
     { echo "configure: error: Option, compile-environment, does not take an argument ($enableval)." 1>&2; exit 1; }
   fi
 fi
 
 
 for ac_prog in nsinstall 
 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:1146: checking for $ac_word" >&5
+echo "configure:1149: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_NSINSTALL_BIN'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$NSINSTALL_BIN" in
   /*)
   ac_cv_path_NSINSTALL_BIN="$NSINSTALL_BIN" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_NSINSTALL_BIN="$NSINSTALL_BIN" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -1206,31 +1209,31 @@ case "$target" in
     ;;
 esac
 
 if test -n "$CROSS_COMPILE" && 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 c compiler""... $ac_c" 1>&6
-echo "configure:1219: checking for host c compiler" >&5
+echo "configure:1222: checking for host c compiler" >&5
     for ac_prog in $HOST_CC gcc cc /usr/ucb/cc cl icc
 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:1225: checking for $ac_word" >&5
+echo "configure:1228: 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"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_HOST_CC="$ac_prog"
@@ -1247,31 +1250,31 @@ 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 c compiler found in \$PATH" 1>&2; exit 1; }
     fi
     echo "$ac_t""$HOST_CC" 1>&6
     echo $ac_n "checking for host c++ compiler""... $ac_c" 1>&6
-echo "configure:1260: checking for host c++ compiler" >&5
+echo "configure:1263: checking for host c++ compiler" >&5
     for ac_prog in $HOST_CXX $CCC c++ g++ gcc CC cxx cc++ cl icc
 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:1266: checking for $ac_word" >&5
+echo "configure:1269: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_HOST_CXX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$HOST_CXX"; then
   ac_cv_prog_HOST_CXX="$HOST_CXX" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_HOST_CXX="$ac_prog"
@@ -1302,25 +1305,25 @@ test -n "$HOST_CXX" || HOST_CXX=""""
     fi
     if test -z "$HOST_CXXFLAGS"; then
         HOST_CXXFLAGS="$CXXFLAGS"
     fi
     if test -z "$HOST_LDFLAGS"; then
         HOST_LDFLAGS="$LDFLAGS"
     fi
     for ac_prog in $HOST_RANLIB 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:1315: checking for $ac_word" >&5
+echo "configure:1318: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_HOST_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$HOST_RANLIB"; then
   ac_cv_prog_HOST_RANLIB="$HOST_RANLIB" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy=":"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_HOST_RANLIB="$ac_prog"
@@ -1337,25 +1340,25 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
 test -n "$HOST_RANLIB" && break
 done
 test -n "$HOST_RANLIB" || HOST_RANLIB="ranlib"
 
     for ac_prog in $HOST_AR 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:1350: checking for $ac_word" >&5
+echo "configure:1353: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_HOST_AR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$HOST_AR"; then
   ac_cv_prog_HOST_AR="$HOST_AR" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy=":"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_HOST_AR="$ac_prog"
@@ -1372,78 +1375,78 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
 test -n "$HOST_AR" && break
 done
 test -n "$HOST_AR" || HOST_AR="ar"
 
     CC="$HOST_CC"
     CFLAGS="$HOST_CFLAGS"
     LDFLAGS="$HOST_LDFLAGS"
 
     echo $ac_n "checking whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1385: checking whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
+echo "configure:1388: checking whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
     cat > conftest.$ac_ext <<EOF
-#line 1387 "configure"
+#line 1390 "configure"
 #include "confdefs.h"
 
 int main() {
 return(0);
 ; return 0; }
 EOF
-if { (eval echo configure:1394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_prog_hostcc_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="$HOST_CXX"
     CFLAGS="$HOST_CXXFLAGS"
 
     echo $ac_n "checking whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1409: checking whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works" >&5
+echo "configure:1412: checking whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works" >&5
     cat > conftest.$ac_ext <<EOF
-#line 1411 "configure"
+#line 1414 "configure"
 #include "confdefs.h"
 
 int main() {
 return(0);
 ; return 0; }
 EOF
-if { (eval echo configure:1418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_prog_hostcxx_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_CXX cannot create executables." 1>&2; exit 1; } 
 fi
 rm -f conftest*
     
     CC=$_SAVE_CC
     CFLAGS=$_SAVE_CFLAGS
     LDFLAGS=$_SAVE_LDFLAGS
 
     for ac_prog in $CC "${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:1438: checking for $ac_word" >&5
+echo "configure:1441: 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"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_CC="$ac_prog"
@@ -1459,25 +1462,25 @@ if test -n "$CC"; then
 else
   echo "$ac_t""no" 1>&6
 fi
 
 test -n "$CC" && break
 done
 test -n "$CC" || CC=":"
 
     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:1472: checking for $ac_word" >&5
+echo "configure:1475: 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"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_CC="gcc"
@@ -1489,25 +1492,25 @@ fi
 fi
 CC="$ac_cv_prog_CC"
 if test -n "$CC"; then
   echo "$ac_t""$CC" 1>&6
 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:1502: checking for $ac_word" >&5
+echo "configure:1505: 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
   ac_dummy="$PATH"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
@@ -1540,25 +1543,25 @@ CC="$ac_cv_prog_CC"
 if test -n "$CC"; then
   echo "$ac_t""$CC" 1>&6
 else
   echo "$ac_t""no" 1>&6
 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:1553: checking for $ac_word" >&5
+echo "configure:1556: 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"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_CC="cl"
@@ -1572,41 +1575,41 @@ CC="$ac_cv_prog_CC"
 if test -n "$CC"; then
   echo "$ac_t""$CC" 1>&6
 else
   echo "$ac_t""no" 1>&6
 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:1585: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1588: 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 1596 "configure"
+#line 1599 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:1601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1604: \"$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
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   ac_cv_prog_cc_works=no
 fi
@@ -1614,58 +1617,58 @@ rm -fr conftest*
 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
 
 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:1627: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1630: 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:1632: checking whether we are using GNU C" >&5
+echo "configure:1635: 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:1641: \"$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:1644: \"$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
 
 if test $ac_cv_prog_gcc = yes; then
   GCC=yes
 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:1660: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1663: 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
 fi
 rm -f conftest*
 
 fi
@@ -1683,25 +1686,25 @@ else
   if test "$GCC" = yes; then
     CFLAGS="-O2"
   else
     CFLAGS=
   fi
 fi
 
     for ac_prog in $CXX "${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:1696: checking for $ac_word" >&5
+echo "configure:1699: 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"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_CXX="$ac_prog"
@@ -1719,25 +1722,25 @@ else
 fi
 
 test -n "$CXX" && break
 done
 test -n "$CXX" || CXX=":"
 
     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:1732: checking for $ac_word" >&5
+echo "configure:1735: 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"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_CXX="$ac_prog"
@@ -1751,41 +1754,41 @@ CXX="$ac_cv_prog_CXX"
 if test -n "$CXX"; then
   echo "$ac_t""$CXX" 1>&6
 else
   echo "$ac_t""no" 1>&6
 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:1764: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:1767: 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 1775 "configure"
+#line 1778 "configure"
 #include "confdefs.h"
 
 int main(){return(0);}
 EOF
-if { (eval echo configure:1780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1783: \"$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
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   ac_cv_prog_cxx_works=no
 fi
@@ -1793,58 +1796,58 @@ rm -fr conftest*
 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
 
 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:1806: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1809: 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:1811: checking whether we are using GNU C++" >&5
+echo "configure:1814: 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:1820: \"$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:1823: \"$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
 
 if test $ac_cv_prog_gxx = yes; then
   GXX=yes
 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:1839: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1842: 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
 fi
 rm -f conftest*
 
 fi
@@ -1857,30 +1860,81 @@ elif test $ac_cv_prog_cxx_g = yes; then
     CXXFLAGS="-g -O2"
   else
     CXXFLAGS="-g"
   fi
 else
   if test "$GXX" = yes; then
     CXXFLAGS="-O2"
   else
     CXXFLAGS=
   fi
 fi
 
+for ac_declaration in \
+   ''\
+   '#include <stdlib.h>' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat > conftest.$ac_ext <<EOF
+#line 1883 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+$ac_declaration
+int main() {
+exit (42);
+; return 0; }
+EOF
+if { (eval echo configure:1891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  continue
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <<EOF
+#line 1901 "configure"
+#include "confdefs.h"
+$ac_declaration
+int main() {
+exit (42);
+; return 0; }
+EOF
+if { (eval echo configure:1908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  break
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+
     for ac_prog in $RANLIB "${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:1875: checking for $ac_word" >&5
+echo "configure:1929: 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"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_RANLIB="$ac_prog"
@@ -1897,25 +1951,25 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
 test -n "$RANLIB" && break
 done
 test -n "$RANLIB" || RANLIB=":"
 
     for ac_prog in $AR "${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:1910: checking for $ac_word" >&5
+echo "configure:1964: 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"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_AR="$ac_prog"
@@ -1932,25 +1986,25 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
 test -n "$AR" && break
 done
 test -n "$AR" || AR=":"
 
     for ac_prog in $AS "${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:1945: checking for $ac_word" >&5
+echo "configure:1999: 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.
   ;;
   ?:/*)			 
   ac_cv_path_AS="$AS" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -1973,25 +2027,25 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
 test -n "$AS" && break
 done
 test -n "$AS" || AS=":"
 
     for ac_prog in $LD "${target_alias}-ld" "${target}-ld"
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1986: checking for $ac_word" >&5
+echo "configure:2040: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$LD"; then
   ac_cv_prog_LD="$LD" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_LD="$ac_prog"
@@ -2008,25 +2062,25 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
 test -n "$LD" && break
 done
 test -n "$LD" || LD=":"
 
     for ac_prog in $STRIP "${target_alias}-strip" "${target}-strip"
 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:2021: checking for $ac_word" >&5
+echo "configure:2075: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$STRIP"; then
   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_STRIP="$ac_prog"
@@ -2043,25 +2097,25 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
 test -n "$STRIP" && break
 done
 test -n "$STRIP" || STRIP=":"
 
     for ac_prog in $WINDRES "${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:2056: checking for $ac_word" >&5
+echo "configure:2110: 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"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_WINDRES="$ac_prog"
@@ -2081,25 +2135,25 @@ fi
 test -n "$WINDRES" && break
 done
 test -n "$WINDRES" || WINDRES=":"
 
     cat >> confdefs.h <<\EOF
 #define CROSS_COMPILE 1
 EOF
 
 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:2094: checking for $ac_word" >&5
+echo "configure:2148: 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"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_CC="gcc"
@@ -2111,25 +2165,25 @@ fi
 fi
 CC="$ac_cv_prog_CC"
 if test -n "$CC"; then
   echo "$ac_t""$CC" 1>&6
 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:2124: checking for $ac_word" >&5
+echo "configure:2178: 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
   ac_dummy="$PATH"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
@@ -2162,25 +2216,25 @@ CC="$ac_cv_prog_CC"
 if test -n "$CC"; then
   echo "$ac_t""$CC" 1>&6
 else
   echo "$ac_t""no" 1>&6
 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:2175: checking for $ac_word" >&5
+echo "configure:2229: 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"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_CC="cl"
@@ -2194,41 +2248,41 @@ CC="$ac_cv_prog_CC"
 if test -n "$CC"; then
   echo "$ac_t""$CC" 1>&6
 else
   echo "$ac_t""no" 1>&6
 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:2207: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2261: 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 2218 "configure"
+#line 2272 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:2223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2277: \"$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
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   ac_cv_prog_cc_works=no
 fi
@@ -2236,58 +2290,58 @@ rm -fr conftest*
 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
 
 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:2249: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2303: 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:2254: checking whether we are using GNU C" >&5
+echo "configure:2308: 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:2263: \"$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:2317: \"$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
 
 if test $ac_cv_prog_gcc = yes; then
   GCC=yes
 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:2282: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2336: 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
 fi
 rm -f conftest*
 
 fi
@@ -2305,25 +2359,25 @@ else
   if test "$GCC" = yes; then
     CFLAGS="-O2"
   else
     CFLAGS=
   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:2318: checking for $ac_word" >&5
+echo "configure:2372: 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"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_CXX="$ac_prog"
@@ -2337,41 +2391,41 @@ CXX="$ac_cv_prog_CXX"
 if test -n "$CXX"; then
   echo "$ac_t""$CXX" 1>&6
 else
   echo "$ac_t""no" 1>&6
 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:2350: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:2404: 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 2361 "configure"
+#line 2415 "configure"
 #include "confdefs.h"
 
 int main(){return(0);}
 EOF
-if { (eval echo configure:2366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2420: \"$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
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   ac_cv_prog_cxx_works=no
 fi
@@ -2379,58 +2433,58 @@ rm -fr conftest*
 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
 
 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:2392: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2446: 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:2397: checking whether we are using GNU C++" >&5
+echo "configure:2451: 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:2406: \"$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:2460: \"$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
 
 if test $ac_cv_prog_gxx = yes; then
   GXX=yes
 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:2425: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:2479: 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
 fi
 rm -f conftest*
 
 fi
@@ -2443,28 +2497,79 @@ elif test $ac_cv_prog_cxx_g = yes; then
     CXXFLAGS="-g -O2"
   else
     CXXFLAGS="-g"
   fi
 else
   if test "$GXX" = yes; then
     CXXFLAGS="-O2"
   else
     CXXFLAGS=
   fi
 fi
 
+for ac_declaration in \
+   ''\
+   '#include <stdlib.h>' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat > conftest.$ac_ext <<EOF
+#line 2520 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+$ac_declaration
+int main() {
+exit (42);
+; return 0; }
+EOF
+if { (eval echo configure:2528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  continue
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <<EOF
+#line 2538 "configure"
+#include "confdefs.h"
+$ac_declaration
+int main() {
+exit (42);
+; return 0; }
+EOF
+if { (eval echo configure:2545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  break
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+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:2459: checking for $ac_word" >&5
+echo "configure:2564: 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"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_RANLIB="ranlib"
@@ -2478,25 +2583,25 @@ fi
 RANLIB="$ac_cv_prog_RANLIB"
 if test -n "$RANLIB"; then
   echo "$ac_t""$RANLIB" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
     for ac_prog in $AS 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:2491: checking for $ac_word" >&5
+echo "configure:2596: 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.
   ;;
   ?:/*)			 
   ac_cv_path_AS="$AS" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -2519,25 +2624,25 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
 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:2532: checking for $ac_word" >&5
+echo "configure:2637: 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"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_AR="$ac_prog"
@@ -2554,25 +2659,25 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
 test -n "$AR" && break
 done
 test -n "$AR" || AR=":"
 
     for ac_prog in ld
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2567: checking for $ac_word" >&5
+echo "configure:2672: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$LD"; then
   ac_cv_prog_LD="$LD" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_LD="$ac_prog"
@@ -2589,25 +2694,25 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
 test -n "$LD" && break
 done
 test -n "$LD" || LD=":"
 
     for ac_prog in strip
 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:2602: checking for $ac_word" >&5
+echo "configure:2707: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$STRIP"; then
   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_STRIP="$ac_prog"
@@ -2624,25 +2729,25 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
 test -n "$STRIP" && break
 done
 test -n "$STRIP" || STRIP=":"
 
     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:2637: checking for $ac_word" >&5
+echo "configure:2742: 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"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_WINDRES="$ac_prog"
@@ -2713,25 +2818,25 @@ if test "$GNU_CC"; then
 fi
 
 case "$target" in
 *-cygwin*|*-mingw*|*-msvc*|*-mks*|*-wince)
     if test "$GCC" != "yes"; then
         # Check to see if we are really running in a msvc environemnt
         _WIN32_MSVC=1
         for ac_prog in midl
 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:2726: checking for $ac_word" >&5
+echo "configure:2831: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_MIDL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$MIDL"; then
   ac_cv_prog_MIDL="$MIDL" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_MIDL="$ac_prog"
@@ -2755,57 +2860,57 @@ done
         # Make sure compilers are valid
         CFLAGS="$CFLAGS -TC -nologo"
         CXXFLAGS="$CXXFLAGS -TP -nologo"
         
         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 2768 "configure"
+#line 2873 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
  printf("Hello World\n"); 
 ; return 0; }
 EOF
-if { (eval echo configure:2775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   :
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   { echo "configure: error: \$(CC) test failed.  You must have MS VC++ in your path to build." 1>&2; exit 1; } 
 fi
 rm -f conftest*
 
         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 2793 "configure"
+#line 2898 "configure"
 #include "confdefs.h"
 #include <new.h>
 int main() {
  unsigned *test = new unsigned(42); 
 ; return 0; }
 EOF
-if { (eval echo configure:2800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   :
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   { echo "configure: error: \$(CXX) test failed.  You must have MS VC++ in your path to build." 1>&2; exit 1; } 
 fi
 rm -f conftest*
         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'
@@ -2843,77 +2948,77 @@ cross_compiling=$ac_cv_prog_cc_cross
         if test "$_LD_MAJOR_VERSION" != "$_CC_SUITE"; then
             { echo "configure: error: The linker major version, $_LD_FULL_VERSION,  does not match the compiler suite version, $_CC_SUITE." 1>&2; exit 1; }
         fi
         INCREMENTAL_LINKER=1
 
         # Check midl version
         _MIDL_FULL_VERSION=`"${MIDL}" -v 2>&1 | sed -ne "$_MSVC_VER_FILTER"`
         _MIDL_MAJOR_VERSION=`echo ${_MIDL_FULL_VERSION} | $AWK -F\. '{ print $1 }'`
         _MIDL_MINOR_VERSION=`echo ${_MIDL_FULL_VERSION} | $AWK -F\. '{ print $2 }'`
         _MIDL_REV_VERSION=`echo ${_MIDL_FULL_VERSION} | $AWK -F\. '{ print $3 }'`
          # Add flags if necessary
          echo $ac_n "checking for midl flags""... $ac_c" 1>&6
-echo "configure:2856: checking for midl flags" >&5
+echo "configure:2961: checking for midl flags" >&5
          if test \( "$_MIDL_MAJOR_VERSION" -gt "6" \) -o \( "$_MIDL_MAJOR_VERSION" = "6" -a "$_MIDL_MINOR_VERSION" -gt "0" \) -o \( "$_MIDL_MAJOR_VERSION" = "6" -a "$_MIDL_MINOR_VERSION" = "00" -a "$_MIDL_REV_VERSION" -gt "359" \); then
              # Starting with MIDL version 6.0.359, the MIDL compiler
              # generates /Oicf /robust stubs by default, which is not
              # compatible with versions of Windows older than Win2k.
              # This switches us back to the old behaviour. When we drop
              # support for Windows older than Win2k, we should remove
              # this.
              MIDL_FLAGS="${MIDL_FLAGS} -no_robust"
              echo "$ac_t""need -no_robust" 1>&6
          else
              MIDL_FLAGS="${MIDL_FLAGS}"
              echo "$ac_t""none needed" 1>&6
         fi
         
         unset _MSVC_VER_FILTER
         
     else
         # Check w32api version
         _W32API_MAJOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $1 }'`
         _W32API_MINOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $2 }'`
         echo $ac_n "checking for w32api version >= $W32API_VERSION""... $ac_c" 1>&6
-echo "configure:2878: checking for w32api version >= $W32API_VERSION" >&5
+echo "configure:2983: checking for w32api version >= $W32API_VERSION" >&5
         cat > conftest.$ac_ext <<EOF
-#line 2880 "configure"
+#line 2985 "configure"
 #include "confdefs.h"
 #include <w32api.h>
 int main() {
 #if (__W32API_MAJOR_VERSION < $_W32API_MAJOR_VERSION) || \
                 (__W32API_MAJOR_VERSION == $_W32API_MAJOR_VERSION && \
                  __W32API_MINOR_VERSION < $_W32API_MINOR_VERSION)
                 #error "test failed."
             #endif
             
 ; return 0; }
 EOF
-if { (eval echo configure:2892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
    res=yes 
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
    res=no 
 fi
 rm -f conftest*
         echo "$ac_t""$res" 1>&6
         if test "$res" != "yes"; then
             { echo "configure: error: w32api version $W32API_VERSION or higher required." 1>&2; exit 1; }
         fi
         # Check windres version
         echo $ac_n "checking for windres version >= $WINDRES_VERSION""... $ac_c" 1>&6
-echo "configure:2908: checking for windres version >= $WINDRES_VERSION" >&5
+echo "configure:3013: checking for windres version >= $WINDRES_VERSION" >&5
         _WINDRES_VERSION=`${WINDRES} --version 2>&1 | grep -i windres 2>/dev/null | $AWK '{ print $3 }'`
         echo "$ac_t""$_WINDRES_VERSION" 1>&6
         _WINDRES_MAJOR_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $1 }'`
         _WINDRES_MINOR_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $2 }'`
         _WINDRES_RELEASE_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $3 }'`
         WINDRES_MAJOR_VERSION=`echo $WINDRES_VERSION | $AWK -F\. '{ print $1 }'`
         WINDRES_MINOR_VERSION=`echo $WINDRES_VERSION | $AWK -F\. '{ print $2 }'`
         WINDRES_RELEASE_VERSION=`echo $WINDRES_VERSION | $AWK -F\. '{ print $3 }'`
         if test "$_WINDRES_MAJOR_VERSION" -lt "$WINDRES_MAJOR_VERSION" -o \
                 "$_WINDRES_MAJOR_VERSION" -eq "$WINDRES_MAJOR_VERSION" -a \
                 "$_WINDRES_MINOR_VERSION" -lt "$WINDRES_MINOR_VERSION" -o \
                 "$_WINDRES_MAJOR_VERSION" -eq "$WINDRES_MAJOR_VERSION" -a \
@@ -2922,80 +3027,80 @@ echo "configure:2908: checking for windr
         then
             { echo "configure: error: windres version $WINDRES_VERSION or higher is required to build." 1>&2; exit 1; }
         fi
     fi # !GNU_CC
     ;;
 esac
 
 if test -n "$_WIN32_MSVC"; then
     SKIP_PATH_CHECKS=1
     SKIP_COMPILER_CHECKS=1
     SKIP_LIBRARY_CHECKS=1
     echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2935: checking how to run the C preprocessor" >&5
+echo "configure:3040: 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 2950 "configure"
+#line 3055 "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:2956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3061: \"$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 2967 "configure"
+#line 3072 "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:2973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3078: \"$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 2984 "configure"
+#line 3089 "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:2990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3095: \"$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=/lib/cpp
 fi
 rm -f conftest*
 fi
@@ -3005,35 +3110,35 @@ rm -f conftest*
   ac_cv_prog_CPP="$CPP"
 fi
   CPP="$ac_cv_prog_CPP"
 else
   ac_cv_prog_CPP="$CPP"
 fi
 echo "$ac_t""$CPP" 1>&6
 
 for ac_hdr in mmintrin.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3018: checking for $ac_hdr" >&5
+echo "configure:3123: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3023 "configure"
+#line 3128 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3133: \"$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
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
@@ -3046,49 +3151,49 @@ if eval "test \"`echo '$ac_cv_header_'$a
 EOF
  
 else
   echo "$ac_t""no" 1>&6
 fi
 done
 
 fi
 
 if test "$CC" != "icc" -a -z "$_WIN32_MSVC"; then
     if test "x$CC" != xcc; then
   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
-echo "configure:3059: checking whether $CC and cc understand -c and -o together" >&5
+echo "configure:3164: checking whether $CC and cc understand -c and -o together" >&5
 else
   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
-echo "configure:3062: checking whether cc understands -c and -o together" >&5
+echo "configure:3167: checking whether cc understands -c and -o together" >&5
 fi
 set dummy $CC; ac_cc="`echo $2 |
 		       sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   echo 'foo(){}' > conftest.c
 # Make sure it works both with $CC and with simple cc.
 # We do the test twice because some compilers refuse to overwrite an
 # existing .o file with -o, though they will create one.
 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
-if { (eval echo configure:3074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
-   test -f conftest.o && { (eval echo configure:3075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+if { (eval echo configure:3179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+   test -f conftest.o && { (eval echo configure:3180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
 then
   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
   if test "x$CC" != xcc; then
     # Test first that cc exists at all.
-    if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:3080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+    if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:3185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
       ac_try='cc -c conftest.c -o conftest.o 1>&5'
-      if { (eval echo configure:3082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
-	 test -f conftest.o && { (eval echo configure:3083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+      if { (eval echo configure:3187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+	 test -f conftest.o && { (eval echo configure:3188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
       then
         # cc works too.
         :
       else
         # cc exists but doesn't like -o.
         eval ac_cv_prog_cc_${ac_cc}_c_o=no
       fi
     fi
   fi
 else
   eval ac_cv_prog_cc_${ac_cc}_c_o=no
 fi
@@ -3106,123 +3211,123 @@ EOF
 fi
 
     if grep "NO_MINUS_C_MINUS_O 1" ./confdefs.h >/dev/null; then
         USING_HCC=1
         _OLDCC=$CC
         _OLDCXX=$CXX
         CC="${srcdir}/build/hcc '$CC'"
         CXX="${srcdir}/build/hcpp '$CXX'"
     fi
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:3119: checking how to run the C preprocessor" >&5
+echo "configure:3224: 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 3134 "configure"
+#line 3239 "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:3140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3245: \"$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 3151 "configure"
+#line 3256 "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:3157: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3262: \"$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 3168 "configure"
+#line 3273 "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:3174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3279: \"$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=/lib/cpp
 fi
 rm -f conftest*
 fi
 rm -f conftest*
 fi
 rm -f conftest*
   ac_cv_prog_CPP="$CPP"
 fi
   CPP="$ac_cv_prog_CPP"
 else
   ac_cv_prog_CPP="$CPP"
 fi
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
-echo "configure:3199: checking how to run the C++ preprocessor" >&5
+echo "configure:3304: checking how to run the C++ preprocessor" >&5
 if test -z "$CXXCPP"; then
 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   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
   CXXCPP="${CXX-g++} -E"
   cat > conftest.$ac_ext <<EOF
-#line 3212 "configure"
+#line 3317 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3322: \"$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*
   CXXCPP=/lib/cpp
 fi
 rm -f conftest*
   ac_cv_prog_CXXCPP="$CXXCPP"
@@ -3251,25 +3356,25 @@ fi # COMPILE_ENVIRONMENT
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
 # incompatible versions:
 # SysV /etc/install, /usr/sbin/install
 # 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:3264: checking for a BSD compatible install" >&5
+echo "configure:3369: 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
     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
     *)
       # OSF1 and SCO ODT 3.0 have their own names for install.
       # Don't use installbsd from OSF since it installs stuff as root
@@ -3304,50 +3409,50 @@ fi
 fi
 echo "$ac_t""$INSTALL" 1>&6
 
 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
 # 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:3317: checking whether ln -s works" >&5
+echo "configure:3422: 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"
 else
   ac_cv_prog_LN_S=ln
 fi
 fi
 LN_S="$ac_cv_prog_LN_S"
 if test "$ac_cv_prog_LN_S" = "ln -s"; then
   echo "$ac_t""yes" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
 for ac_prog in $PERL 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:3342: checking for $ac_word" >&5
+echo "configure:3447: 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.
   ;;
   ?:/*)			 
   ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -3369,48 +3474,48 @@ if test -n "$PERL"; then
 else
   echo "$ac_t""no" 1>&6
 fi
 
 test -n "$PERL" && break
 done
 
 if test -z "$PERL" || test "$PERL" = ":"; then
     { echo "configure: error: perl not found in \$PATH" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking for minimum required perl version >= $PERL_VERSION""... $ac_c" 1>&6
-echo "configure:3382: checking for minimum required perl version >= $PERL_VERSION" >&5
+echo "configure:3487: checking for minimum required perl version >= $PERL_VERSION" >&5
 _perl_version=`PERL_VERSION=$PERL_VERSION $PERL -e 'print "$]"; if ($] >= $ENV{PERL_VERSION}) { exit(0); } else { exit(1); }' 2>&5`
 _perl_res=$?
 echo "$ac_t""$_perl_version" 1>&6
 
 if test "$_perl_res" != 0; then
     { echo "configure: error: Perl $PERL_VERSION or higher is required." 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking for full perl installation""... $ac_c" 1>&6
-echo "configure:3392: checking for full perl installation" >&5
+echo "configure:3497: checking for full perl installation" >&5
 _perl_archlib=`$PERL -e 'use Config; if ( -d $Config{archlib} ) { exit(0); } else { exit(1); }' 2>&5`
 _perl_res=$?
 if test "$_perl_res" != 0; then
     echo "$ac_t""no" 1>&6
     { echo "configure: error: Cannot find Config.pm or \$Config{archlib}.  A full perl installation is required." 1>&2; exit 1; }
 else
     echo "$ac_t""yes" 1>&6    
 fi
 
 # Extract the first word of "doxygen", so it can be a program name with args.
 set dummy doxygen; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3405: checking for $ac_word" >&5
+echo "configure:3510: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_DOXYGEN'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$DOXYGEN" in
   /*)
   ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -3428,25 +3533,25 @@ else
 esac
 fi
 DOXYGEN="$ac_cv_path_DOXYGEN"
 if test -n "$DOXYGEN"; then
   echo "$ac_t""$DOXYGEN" 1>&6
 else
   echo "$ac_t""no" 1>&6
 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:3441: checking for $ac_word" >&5
+echo "configure:3546: 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.
   ;;
   ?:/*)			 
   ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -3464,25 +3569,25 @@ else
 esac
 fi
 WHOAMI="$ac_cv_path_WHOAMI"
 if test -n "$WHOAMI"; then
   echo "$ac_t""$WHOAMI" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
 # Extract the first word of "autoconf", so it can be a program name with args.
 set dummy autoconf; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3477: checking for $ac_word" >&5
+echo "configure:3582: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_AUTOCONF'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$AUTOCONF" in
   /*)
   ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -3500,25 +3605,25 @@ else
 esac
 fi
 AUTOCONF="$ac_cv_path_AUTOCONF"
 if test -n "$AUTOCONF"; then
   echo "$ac_t""$AUTOCONF" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
 # Extract the first word of "unzip", so it can be a program name with args.
 set dummy unzip; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3513: checking for $ac_word" >&5
+echo "configure:3618: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_UNZIP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$UNZIP" in
   /*)
   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -3538,25 +3643,25 @@ fi
 UNZIP="$ac_cv_path_UNZIP"
 if test -n "$UNZIP"; then
   echo "$ac_t""$UNZIP" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
 for ac_prog in zip
 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:3551: checking for $ac_word" >&5
+echo "configure:3656: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_ZIP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$ZIP" in
   /*)
   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -3579,25 +3684,25 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
 test -n "$ZIP" && break
 done
 
 if test -z "$ZIP" || test "$ZIP" = ":"; then
     { echo "configure: error: zip not found in \$PATH" 1>&2; exit 1; }
 fi
 # Extract the first word of "makedepend", so it can be a program name with args.
 set dummy makedepend; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3592: checking for $ac_word" >&5
+echo "configure:3697: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_SYSTEM_MAKEDEPEND'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$SYSTEM_MAKEDEPEND" in
   /*)
   ac_cv_path_SYSTEM_MAKEDEPEND="$SYSTEM_MAKEDEPEND" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_SYSTEM_MAKEDEPEND="$SYSTEM_MAKEDEPEND" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -3614,25 +3719,25 @@ else
 esac
 fi
 SYSTEM_MAKEDEPEND="$ac_cv_path_SYSTEM_MAKEDEPEND"
 if test -n "$SYSTEM_MAKEDEPEND"; then
   echo "$ac_t""$SYSTEM_MAKEDEPEND" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
 # Extract the first word of "xargs", so it can be a program name with args.
 set dummy xargs; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3627: checking for $ac_word" >&5
+echo "configure:3732: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_XARGS'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$XARGS" in
   /*)
   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -3677,25 +3782,25 @@ darwin*)
 This compiler was supplied with Xcode 2.0, and contains bugs that prevent it
 from building Mozilla.
 Either upgrade to Xcode 2.1 or later, or switch the system's default compiler
 to gcc 3.3 by running \"sudo gcc_select 3.3\"." 1>&2; exit 1; }
         fi
     fi
 
                 for ac_prog in pbbuild xcodebuild pbxbuild
 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:3690: checking for $ac_word" >&5
+echo "configure:3795: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PBBUILD'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$PBBUILD" in
   /*)
   ac_cv_path_PBBUILD="$PBBUILD" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_PBBUILD="$PBBUILD" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -3727,25 +3832,25 @@ done
         
         XCODEBUILD_VERSION=`$PBBUILD -version 2>/dev/null | sed -e 's/.*DevToolsCore-\([0-9]*\).*/\1/'`
         
         if test -n "$XCODEBUILD_VERSION" && test "$XCODEBUILD_VERSION" -ge 620 ; then
           HAS_XCODE_2_1=1;
         fi
       ;;
     esac
 
             # Extract the first word of "sdp", so it can be a program name with args.
 set dummy sdp; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3740: checking for $ac_word" >&5
+echo "configure:3845: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_SDP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$SDP" in
   /*)
   ac_cv_path_SDP="$SDP" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_SDP="$SDP" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -3816,45 +3921,42 @@ tools are selected during the Xcode/Deve
             CFLAGS="$CFLAGS -isysroot ${MACOS_SDK_DIR}"
     CXXFLAGS="$CXXFLAGS -isysroot ${MACOS_SDK_DIR}"
 
         CPP="$CPP -isysroot ${MACOS_SDK_DIR}"
     CXXCPP="$CXXCPP -isysroot ${MACOS_SDK_DIR}"
 
     if test "$GCC_VERSION_FULL" = "4.0.0" ; then
                                     LDFLAGS="$LDFLAGS -Wl,-syslibroot,${MACOS_SDK_DIR}"
     fi
   fi
 
   echo $ac_n "checking for valid compiler/Mac OS X SDK combination""... $ac_c" 1>&6
-echo "configure:3829: checking for valid compiler/Mac OS X SDK combination" >&5
+echo "configure:3934: checking for valid compiler/Mac OS X SDK combination" >&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
 
   if test "$cross_compiling" = yes; then
   result=maybe
 else
   cat > conftest.$ac_ext <<EOF
-#line 3841 "configure"
+#line 3946 "configure"
 #include "confdefs.h"
-#ifdef __cplusplus
-extern "C" void exit(int);
-#endif
 #include <new>
               int main() { return 0; }
 EOF
-if { (eval echo configure:3849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   result=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   result=no
 fi
 rm -fr conftest*
 fi
 
   
@@ -3865,25 +3967,25 @@ fi
   fi
 fi
 
 fi # COMPILE_ENVIRONMENT
 
 case "$host_os" in
 cygwin*|mingw*|mks*|msvc*)
     for ac_prog in $MAKE make gmake
 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:3878: checking for $ac_word" >&5
+echo "configure:3980: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MAKE'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$MAKE" in
   /*)
   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -3908,25 +4010,25 @@ fi
 
 test -n "$MAKE" && break
 done
 test -n "$MAKE" || MAKE=":"
 
     ;;
 *)
     for ac_prog in $MAKE gmake make
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3921: checking for $ac_word" >&5
+echo "configure:4023: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MAKE'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$MAKE" in
   /*)
   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -3976,25 +4078,25 @@ if test "$_MAKE_MAJOR_VERSION" -lt "$MAK
         "$_MAKE_MINOR_VERSION" -lt "$MAKE_MINOR_VERSION"; then
    { echo "configure: error: GNU Make $MAKE_VERSION or higher is required to build Mozilla." 1>&2; exit 1; }
 fi
 
 
 if test "$COMPILE_ENVIRONMENT"; then
 
 # If we find X, set shell vars x_includes and x_libraries to the
 # paths, otherwise set no_x=yes.
 # Uses ac_ vars as temps to allow command line to override cache and checks.
 # --without-x overrides everything else, but does not touch the cache.
 echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:3989: checking for X" >&5
+echo "configure:4091: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
   withval="$with_x"
   :
 fi
 
 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
 if test "x$with_x" = xno; then
   # The user explicitly disabled X.
   have_x=disabled
 else
@@ -4038,30 +4140,30 @@ EOF
     esac
   fi
   cd ..
   rm -fr conftestdir
 fi
 
 if test "$ac_x_includes" = NO; then
   # Guess where to find include files, by looking for this one X11 .h file.
   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 4051 "configure"
+#line 4153 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4158: \"$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
   rm -rf conftest*
   # We can compile using X headers with no special include directory.
 ac_x_includes=
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   # Look for the header file in a standard set of common directories.
 # Check X11 before X11Rn because it is often a symlink to the current release.
@@ -4112,32 +4214,32 @@ fi # $ac_x_includes = NO
 
 if test "$ac_x_libraries" = NO; then
   # Check for the libraries.
 
   test -z "$x_direct_test_library" && x_direct_test_library=Xt
   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
 
   # See if we find them without any special options.
   # Don't add to $LIBS permanently.
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4125 "configure"
+#line 4227 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:4132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
 ac_x_libraries=
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # First see if replacing the include by lib works.
 # Check X11 before X11Rn because it is often a symlink to the current release.
 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
@@ -4225,58 +4327,58 @@ else
   if test -n "$x_includes"; then
     X_CFLAGS="$X_CFLAGS -I$x_includes"
   fi
 
   # It would also be nice to do this for all -L options, not just this one.
   if test -n "$x_libraries"; then
     X_LIBS="$X_LIBS -L$x_libraries"
     # For Solaris; some versions of Sun CC require a space after -R and
     # others require no space.  Words are not sufficient . . . .
     case "`(uname -sr) 2>/dev/null`" in
     "SunOS 5"*)
       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
-echo "configure:4238: checking whether -R must be followed by a space" >&5
+echo "configure:4340: checking whether -R must be followed by a space" >&5
       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
       cat > conftest.$ac_ext <<EOF
-#line 4241 "configure"
+#line 4343 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_R_nospace=no
 fi
 rm -f conftest*
       if test $ac_R_nospace = yes; then
 	echo "$ac_t""no" 1>&6
 	X_LIBS="$X_LIBS -R$x_libraries"
       else
 	LIBS="$ac_xsave_LIBS -R $x_libraries"
 	cat > conftest.$ac_ext <<EOF
-#line 4264 "configure"
+#line 4366 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_space=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_R_space=no
 fi
 rm -f conftest*
 	if test $ac_R_space = yes; then
 	  echo "$ac_t""yes" 1>&6
 	  X_LIBS="$X_LIBS -R $x_libraries"
@@ -4290,91 +4392,91 @@ rm -f conftest*
 
   # Check for system-dependent libraries X programs must link with.
   # Do this before checking for the system-independent R6 libraries
   # (-lICE), since we may need -lsocket or whatever for X linking.
 
   if test "$ISC" = yes; then
     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
   else
     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
     # libraries were built with DECnet support.  And karl@cs.umb.edu says
     # the Alpha needs dnet_stub (dnet does not exist).
     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:4303: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:4405: checking for dnet_ntoa in -ldnet" >&5
 ac_lib_var=`echo dnet'_'dnet_ntoa | 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="-ldnet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4311 "configure"
+#line 4413 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char dnet_ntoa();
 
 int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:4325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
 else
   echo "$ac_t""no" 1>&6
 fi
 
     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:4347: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:4449: checking for dnet_ntoa in -ldnet_stub" >&5
 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | 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="-ldnet_stub  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4355 "configure"
+#line 4457 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char dnet_ntoa();
 
 int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:4369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
@@ -4385,30 +4487,30 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
     fi
 
     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
     # to get the SysV transport functions.
     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
     # needs -lnsl.
     # The nsl library prevents programs from opening the X display
     # on Irix 5.2, according to dickey@clark.net.
     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:4398: checking for gethostbyname" >&5
+echo "configure:4500: checking for gethostbyname" >&5
 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4403 "configure"
+#line 4505 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char gethostbyname();
 
@@ -4416,68 +4518,68 @@ int main() {
 
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
 choke me
 #else
 gethostbyname();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:4429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=no"
 fi
 rm -f conftest*
 fi
 
 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   :
 else
   echo "$ac_t""no" 1>&6
 fi
 
     if test $ac_cv_func_gethostbyname = no; then
       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:4450: checking for gethostbyname in -lnsl" >&5
+echo "configure:4552: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4458 "configure"
+#line 4560 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char gethostbyname();
 
 int main() {
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:4472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
@@ -4489,30 +4591,30 @@ else
 fi
 
     fi
 
     # lieder@skyler.mavd.honeywell.com says without -lsocket,
     # socket/setsockopt and other routines are undefined under SCO ODT
     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
     # on later versions), says simon@lia.di.epfl.ch: it contains
     # gethostby* variants that don't use the nameserver (or something).
     # -lsocket must be given before -lnsl if both are needed.
     # We assume that if connect needs -lnsl, so does gethostbyname.
     echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:4502: checking for connect" >&5
+echo "configure:4604: checking for connect" >&5
 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4507 "configure"
+#line 4609 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char connect();
 
@@ -4520,97 +4622,97 @@ int main() {
 
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_connect) || defined (__stub___connect)
 choke me
 #else
 connect();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:4533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_func_connect=no"
 fi
 rm -f conftest*
 fi
 
 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   :
 else
   echo "$ac_t""no" 1>&6
 fi
 
     if test $ac_cv_func_connect = no; then
       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:4554: checking for connect in -lsocket" >&5
+echo "configure:4656: checking for connect in -lsocket" >&5
 ac_lib_var=`echo socket'_'connect | 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="-lsocket $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4562 "configure"
+#line 4664 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char connect();
 
 int main() {
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:4576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
 else
   echo "$ac_t""no" 1>&6
 fi
 
     fi
 
     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
     echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:4600: checking for remove" >&5
+echo "configure:4702: checking for remove" >&5
 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4605 "configure"
+#line 4707 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char remove();
 
@@ -4618,97 +4720,97 @@ int main() {
 
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_remove) || defined (__stub___remove)
 choke me
 #else
 remove();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:4631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_remove=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_func_remove=no"
 fi
 rm -f conftest*
 fi
 
 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   :
 else
   echo "$ac_t""no" 1>&6
 fi
 
     if test $ac_cv_func_remove = no; then
       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:4652: checking for remove in -lposix" >&5
+echo "configure:4754: checking for remove in -lposix" >&5
 ac_lib_var=`echo posix'_'remove | 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="-lposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4660 "configure"
+#line 4762 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char remove();
 
 int main() {
 remove()
 ; return 0; }
 EOF
-if { (eval echo configure:4674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
 else
   echo "$ac_t""no" 1>&6
 fi
 
     fi
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:4698: checking for shmat" >&5
+echo "configure:4800: checking for shmat" >&5
 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4703 "configure"
+#line 4805 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char shmat();
 
@@ -4716,68 +4818,68 @@ int main() {
 
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_shmat) || defined (__stub___shmat)
 choke me
 #else
 shmat();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:4729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_shmat=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_func_shmat=no"
 fi
 rm -f conftest*
 fi
 
 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   :
 else
   echo "$ac_t""no" 1>&6
 fi
 
     if test $ac_cv_func_shmat = no; then
       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:4750: checking for shmat in -lipc" >&5
+echo "configure:4852: checking for shmat in -lipc" >&5
 ac_lib_var=`echo ipc'_'shmat | 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="-lipc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4758 "configure"
+#line 4860 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char shmat();
 
 int main() {
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:4772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
@@ -4792,47 +4894,47 @@ fi
   fi
 
   # Check for libraries that X11R6 Xt/Xaw programs need.
   ac_save_LDFLAGS="$LDFLAGS"
   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
   # check for ICE first), but we must link in the order -lSM -lICE or
   # we get undefined symbols.  So assume we have SM if we have ICE.
   # These have to be linked with before -lX11, unlike the other
   # libraries we check for below, so use a different variable.
   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-echo "configure:4805: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:4907: checking for IceConnectionNumber in -lICE" >&5
 ac_lib_var=`echo ICE'_'IceConnectionNumber | 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="-lICE $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4813 "configure"
+#line 4915 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char IceConnectionNumber();
 
 int main() {
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:4827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
@@ -5224,49 +5326,49 @@ if test "$GNU_CXX"; then
     _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -include $(DEPTH)/mozilla-config.h'
     _USE_CPP_INCLUDE_FLAG=1
 else
     _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -D_MOZILLA_CONFIG_H_ $(ACDEFINES)'
 fi
 
 MKSHLIB_FORCE_ALL=
 MKSHLIB_UNFORCE_ALL=
 
 if test "$COMPILE_ENVIRONMENT"; then
 if test "$GNU_CC"; then
   echo $ac_n "checking whether ld has archive extraction flags""... $ac_c" 1>&6
-echo "configure:5237: checking whether ld has archive extraction flags" >&5
+echo "configure:5339: checking whether ld has archive extraction flags" >&5
   if eval "test \"`echo '$''{'ac_cv_mkshlib_force_and_unforce'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   _SAVE_LDFLAGS=$LDFLAGS; _SAVE_LIBS=$LIBS
     ac_cv_mkshlib_force_and_unforce="no"
     exec 3<&0 <<LOOP_INPUT
 	force="-Wl,--whole-archive";   unforce="-Wl,--no-whole-archive"
 	force="-Wl,-z -Wl,allextract"; unforce="-Wl,-z -Wl,defaultextract"
 	force="-Wl,-all";              unforce="-Wl,-none"
 LOOP_INPUT
     while read line
     do
       eval $line
       LDFLAGS=$force
       LIBS=$unforce
       cat > conftest.$ac_ext <<EOF
-#line 5254 "configure"
+#line 5356 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_mkshlib_force_and_unforce=$line; break
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
 fi
 rm -f conftest*
     done
     exec 0<&3 3<&-
     LDFLAGS=$_SAVE_LDFLAGS; LIBS=$_SAVE_LIBS
    
 fi
@@ -5283,35 +5385,35 @@ fi # GNU_CC
 fi # COMPILE_ENVIRONMENT
 
 if test "$COMPILE_ENVIRONMENT"; then
 
 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
 
 echo $ac_n "checking for 64-bit OS""... $ac_c" 1>&6
-echo "configure:5296: checking for 64-bit OS" >&5
+echo "configure:5398: checking for 64-bit OS" >&5
 if test "$cross_compiling" = yes; then
   result="maybe" 
 else
   cat > conftest.$ac_ext <<EOF
-#line 5301 "configure"
+#line 5403 "configure"
 #include "confdefs.h"
  int main () {
     if (sizeof(long) == 8) { return 0; } return 1; } 
 EOF
-if { (eval echo configure:5306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   result="yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   result="no"
 fi
 rm -fr conftest*
 fi
 
 echo "$ac_t"""$result"" 1>&6
@@ -5452,36 +5554,36 @@ EOF
         MKSHLIB='$(CXX) $(DSO_LDOPTS) -o $@'
         MKCSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
         if test "$COMPILE_ENVIRONMENT"; then
             
             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
 
             echo $ac_n "checking for VisualAge C++ compiler version >= 5.0.2.0""... $ac_c" 1>&6
-echo "configure:5465: checking for VisualAge C++ compiler version >= 5.0.2.0" >&5
+echo "configure:5567: checking for VisualAge C++ compiler version >= 5.0.2.0" >&5
             cat > conftest.$ac_ext <<EOF
-#line 5467 "configure"
+#line 5569 "configure"
 #include "confdefs.h"
 
 int main() {
 #if (__IBMCPP__ < 502)
                  #error "Bad compiler"
                  #endif
 ; return 0; }
 EOF
-if { (eval echo configure:5476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   _BAD_COMPILER=
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   _BAD_COMPILER=1
 fi
 rm -f conftest*
             if test -n "$_BAD_COMPILER"; then
                 echo "$ac_t""no" 1>&6    
                 { echo "configure: error: VisualAge C++ version 5.0.2.0 or higher is required to build." 1>&2; exit 1; }
@@ -5500,35 +5602,35 @@ cross_compiling=$ac_cv_prog_cxx_cross
         fi
     fi
     case "${target_os}" in
     aix4.1*)
         DLL_SUFFIX='_shr.a'
         ;;
     esac
     if test "$COMPILE_ENVIRONMENT"; then
         for ac_hdr in sys/inttypes.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5513: checking for $ac_hdr" >&5
+echo "configure:5615: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5518 "configure"
+#line 5620 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5625: \"$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
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
@@ -5552,76 +5654,76 @@ EOF
 
     ;;
 
 *-beos*)
     no_x=yes
     MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -o $@'
     _PLATFORM_DEFAULT_TOOLKIT="beos"
     DSO_LDOPTS='-nostart -Wl,-h -Wl,$@'
     TK_LIBS='-lbe -lroot'
     LIBS="$LIBS -lbe"
     if test "$COMPILE_ENVIRONMENT"; then
         echo $ac_n "checking for main in -lbind""... $ac_c" 1>&6
-echo "configure:5565: checking for main in -lbind" >&5
+echo "configure:5667: checking for main in -lbind" >&5
 ac_lib_var=`echo bind'_'main | 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="-lbind  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5573 "configure"
+#line 5675 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   LIBS="$LIBS -lbind"
 else
   echo "$ac_t""no" 1>&6
 fi
 
         echo $ac_n "checking for main in -lzeta""... $ac_c" 1>&6
-echo "configure:5601: checking for main in -lzeta" >&5
+echo "configure:5703: checking for main in -lzeta" >&5
 ac_lib_var=`echo zeta'_'main | 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="-lzeta  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5609 "configure"
+#line 5711 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
@@ -5663,36 +5765,36 @@ fi
     _PEDANTIC=
     CFLAGS="$CFLAGS -fpascal-strings -no-cpp-precomp -fno-common"
     CXXFLAGS="$CXXFLAGS -fpascal-strings -no-cpp-precomp -fno-common"
     DLL_SUFFIX=".dylib"
     DSO_LDOPTS=''
     STRIP="$STRIP -x -S"
     _PLATFORM_DEFAULT_TOOLKIT='mac'
     MOZ_ENABLE_POSTSCRIPT=
     # set MACOSX to generate lib/mac/MoreFiles/Makefile
     MACOSX=1
 
         echo $ac_n "checking for -dead_strip option to ld""... $ac_c" 1>&6
-echo "configure:5676: checking for -dead_strip option to ld" >&5
+echo "configure:5778: checking for -dead_strip option to ld" >&5
     _SAVE_LDFLAGS=$LDFLAGS
     LDFLAGS="$LDFLAGS -Wl,-dead_strip"
     cat > conftest.$ac_ext <<EOF
-#line 5680 "configure"
+#line 5782 "configure"
 #include "confdefs.h"
 
 int main() {
 return 0;
 ; return 0; }
 EOF
-if { (eval echo configure:5687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   _HAVE_DEAD_STRIP=1
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   _HAVE_DEAD_STRIP=
 fi
 rm -f conftest*
     if test -n "$_HAVE_DEAD_STRIP" ; then
         echo "$ac_t""yes" 1>&6
         MOZ_OPTIMIZE_LDFLAGS="-Wl,-dead_strip"
@@ -6521,36 +6623,36 @@ EOF
        DSO_LDOPTS='-G -Qoption ld -z,muldefs -h $@'
        AR_LIST="$AR t"
        AR_EXTRACT="$AR x"
        AR_DELETE="$AR d"
        AR='$(CXX) -xar'
        AR_FLAGS='-o $@'
        AS='/usr/ccs/bin/as'
        ASFLAGS="$ASFLAGS -K PIC -L -P -D_ASM -D__STDC__=0"
        AS_DASH_C_FLAG=''
         CC_VERSION=`$CC -V 2>&1 | grep '^cc:' 2>/dev/null | $AWK -F\: '{ print $2 }'`
         CXX_VERSION=`$CXX -V 2>&1 | grep '^CC:' 2>/dev/null | $AWK -F\: '{ print $2 }'`
        echo $ac_n "checking for Forte compiler version >= WS6U2""... $ac_c" 1>&6
-echo "configure:6534: checking for Forte compiler version >= WS6U2" >&5
+echo "configure:6636: checking for Forte compiler version >= WS6U2" >&5
        cat > conftest.$ac_ext <<EOF
-#line 6536 "configure"
+#line 6638 "configure"
 #include "confdefs.h"
 
 int main() {
 #if (__SUNPRO_C < 0x530)
            #error "Denied"
            #endif
 ; return 0; }
 EOF
-if { (eval echo configure:6545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   _BAD_COMPILER=
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   _BAD_COMPILER=1
 fi
 rm -f conftest*
         if test -n "$_BAD_COMPILER"; then
             _res="no"
             { echo "configure: error: Forte version WS6U2 or higher is required to build. Your compiler version is $CC_VERSION ." 1>&2; exit 1; }
@@ -6654,25 +6756,25 @@ case "$target" in
          if test -z "$GCC_USE_GNU_LD"; then
           MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,-M -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-mapfile'
          else
           MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
          fi
         fi
         ;;
     *-nto*) 
         MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
         ;;
     *-darwin*)
         echo $ac_n "checking for -exported_symbols_list option to ld""... $ac_c" 1>&6
-echo "configure:6667: checking for -exported_symbols_list option to ld" >&5
+echo "configure:6769: checking for -exported_symbols_list option to ld" >&5
         if eval "test \"`echo '$''{'ac_cv_exported_symbols_list'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
            if $LD -exported_symbols_list | grep "argument missing" >/dev/null; then
              ac_cv_exported_symbols_list=true
            else
              ac_cv_exported_symbols_list=false
            fi
          
 fi
 
@@ -6694,134 +6796,134 @@ if test -z "$COMPILE_ENVIRONMENT"; then
     SKIP_COMPILER_CHECKS=1
 fi
 
 if test -z "$SKIP_COMPILER_CHECKS"; then
 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
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:6707: checking for ANSI C header files" >&5
+echo "configure:6809: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6712 "configure"
+#line 6814 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
 #include <string.h>
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6822: \"$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
   rm -rf conftest*
   ac_cv_header_stdc=yes
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_header_stdc=no
 fi
 rm -f conftest*
 
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 6737 "configure"
+#line 6839 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   egrep "memchr" >/dev/null 2>&1; then
   :
 else
   rm -rf conftest*
   ac_cv_header_stdc=no
 fi
 rm -f conftest*
 
 fi
 
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 6755 "configure"
+#line 6857 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   egrep "free" >/dev/null 2>&1; then
   :
 else
   rm -rf conftest*
   ac_cv_header_stdc=no
 fi
 rm -f conftest*
 
 fi
 
 if test $ac_cv_header_stdc = yes; then
   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
 if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 6776 "configure"
+#line 6878 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
 int main () { int i; for (i = 0; i < 256; i++)
 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:6787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   ac_cv_header_stdc=no
 fi
 rm -fr conftest*
 fi
 
 fi
 fi
 
 echo "$ac_t""$ac_cv_header_stdc" 1>&6
 if test $ac_cv_header_stdc = yes; then
   cat >> confdefs.h <<\EOF
 #define STDC_HEADERS 1
 EOF
 
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:6811: checking for working const" >&5
+echo "configure:6913: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6816 "configure"
+#line 6918 "configure"
 #include "confdefs.h"
 
 int main() {
 
 /* Ultrix mips cc rejects this.  */
 typedef int charset[2]; const charset x;
 /* SunOS 4.1.1 cc rejects this.  */
 char const *const *ccp;
 char **p;
 /* NEC SVR4.0.2 mips cc rejects this.  */
 struct point {int x, y;};
 static struct point const zero = {0,0};
@@ -6852,51 +6954,51 @@ ccp = (char const *const *) p;
 }
 { /* AIX XL C 1.02.0.0 rejects this saying
      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
   struct s { int j; const int *ap[3]; };
   struct s *b; b->j = 5;
 }
 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
   const int foo = 10;
 }
 
 ; return 0; }
 EOF
-if { (eval echo configure:6865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_c_const=no
 fi
 rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_c_const" 1>&6
 if test $ac_cv_c_const = no; then
   cat >> confdefs.h <<\EOF
 #define const 
 EOF
 
 fi
 
 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:6886: checking for mode_t" >&5
+echo "configure:6988: checking for mode_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6891 "configure"
+#line 6993 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
 #include <stdlib.h>
 #include <stddef.h>
 #endif
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
   rm -rf conftest*
   ac_cv_type_mode_t=yes
 else
@@ -6906,30 +7008,30 @@ fi
 rm -f conftest*
 
 fi
 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
 if test $ac_cv_type_mode_t = no; then
   cat >> confdefs.h <<\EOF
 #define mode_t int
 EOF
 
 fi
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:6919: checking for off_t" >&5
+echo "configure:7021: checking for off_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6924 "configure"
+#line 7026 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
 #include <stdlib.h>
 #include <stddef.h>
 #endif
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
   rm -rf conftest*
   ac_cv_type_off_t=yes
 else
@@ -6939,30 +7041,30 @@ fi
 rm -f conftest*
 
 fi
 echo "$ac_t""$ac_cv_type_off_t" 1>&6
 if test $ac_cv_type_off_t = no; then
   cat >> confdefs.h <<\EOF
 #define off_t long
 EOF
 
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:6952: checking for pid_t" >&5
+echo "configure:7054: checking for pid_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6957 "configure"
+#line 7059 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
 #include <stdlib.h>
 #include <stddef.h>
 #endif
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
   rm -rf conftest*
   ac_cv_type_pid_t=yes
 else
@@ -6972,30 +7074,30 @@ fi
 rm -f conftest*
 
 fi
 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
 if test $ac_cv_type_pid_t = no; then
   cat >> confdefs.h <<\EOF
 #define pid_t int
 EOF
 
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:6985: checking for size_t" >&5
+echo "configure:7087: checking for size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6990 "configure"
+#line 7092 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
 #include <stdlib.h>
 #include <stddef.h>
 #endif
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
   rm -rf conftest*
   ac_cv_type_size_t=yes
 else
@@ -7005,30 +7107,30 @@ fi
 rm -f conftest*
 
 fi
 echo "$ac_t""$ac_cv_type_size_t" 1>&6
 if test $ac_cv_type_size_t = no; then
   cat >> confdefs.h <<\EOF
 #define size_t unsigned
 EOF
 
 fi
 
 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:7018: checking for uid_t in sys/types.h" >&5
+echo "configure:7120: checking for uid_t in sys/types.h" >&5
 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7023 "configure"
+#line 7125 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   egrep "uid_t" >/dev/null 2>&1; then
   rm -rf conftest*
   ac_cv_type_uid_t=yes
 else
   rm -rf conftest*
   ac_cv_type_uid_t=no
 fi
 rm -f conftest*
@@ -7039,72 +7141,72 @@ echo "$ac_t""$ac_cv_type_uid_t" 1>&6
 if test $ac_cv_type_uid_t = no; then
   cat >> confdefs.h <<\EOF
 #define uid_t int
 EOF
 
   cat >> confdefs.h <<\EOF
 #define gid_t int
 EOF
 
 fi
 
 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
-echo "configure:7052: checking for st_blksize in struct stat" >&5
+echo "configure:7154: checking for st_blksize in struct stat" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7057 "configure"
+#line 7159 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 int main() {
 struct stat s; s.st_blksize;
 ; return 0; }
 EOF
-if { (eval echo configure:7065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_st_blksize=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_struct_st_blksize=no
 fi
 rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
 if test $ac_cv_struct_st_blksize = yes; then
   cat >> confdefs.h <<\EOF
 #define HAVE_ST_BLKSIZE 1
 EOF
 
 fi
 
 echo $ac_n "checking for siginfo_t""... $ac_c" 1>&6
-echo "configure:7086: checking for siginfo_t" >&5
+echo "configure:7188: checking for siginfo_t" >&5
 if eval "test \"`echo '$''{'ac_cv_siginfo_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7091 "configure"
+#line 7193 "configure"
 #include "confdefs.h"
 #define _POSIX_C_SOURCE 199506L
                   #include <signal.h>
 int main() {
 siginfo_t* info;
 ; return 0; }
 EOF
-if { (eval echo configure:7099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_siginfo_t=true
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_siginfo_t=false
 fi
 rm -f conftest*
 fi
 
 if test "$ac_cv_siginfo_t" = true ; then
@@ -7120,248 +7222,248 @@ fi
 if test "$VACPP" = "yes"; then
    cat >> confdefs.h <<\EOF
 #define __size_t 1
 EOF
 
    cat >> confdefs.h <<\EOF
 #define __off_t 1
 EOF
 
 fi
 
 echo $ac_n "checking for int16_t""... $ac_c" 1>&6
-echo "configure:7133: checking for int16_t" >&5
+echo "configure:7235: checking for int16_t" >&5
 if eval "test \"`echo '$''{'ac_cv_int16_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7138 "configure"
+#line 7240 "configure"
 #include "confdefs.h"
 #include <stdio.h>
                   #include <sys/types.h>
 int main() {
 int16_t foo = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:7146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_int16_t=true
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_int16_t=false
 fi
 rm -f conftest*
 fi
 
 if test "$ac_cv_int16_t" = true ; then
   cat >> confdefs.h <<\EOF
 #define HAVE_INT16_T 1
 EOF
 
   echo "$ac_t""yes" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 echo $ac_n "checking for int32_t""... $ac_c" 1>&6
-echo "configure:7168: checking for int32_t" >&5
+echo "configure:7270: checking for int32_t" >&5
 if eval "test \"`echo '$''{'ac_cv_int32_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7173 "configure"
+#line 7275 "configure"
 #include "confdefs.h"
 #include <stdio.h>
                   #include <sys/types.h>
 int main() {
 int32_t foo = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:7181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_int32_t=true
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_int32_t=false
 fi
 rm -f conftest*
 fi
 
 if test "$ac_cv_int32_t" = true ; then
   cat >> confdefs.h <<\EOF
 #define HAVE_INT32_T 1
 EOF
 
   echo "$ac_t""yes" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 echo $ac_n "checking for int64_t""... $ac_c" 1>&6
-echo "configure:7203: checking for int64_t" >&5
+echo "configure:7305: checking for int64_t" >&5
 if eval "test \"`echo '$''{'ac_cv_int64_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7208 "configure"
+#line 7310 "configure"
 #include "confdefs.h"
 #include <stdio.h>
                   #include <sys/types.h>
 int main() {
 int64_t foo = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:7216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_int64_t=true
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_int64_t=false
 fi
 rm -f conftest*
 fi
 
 if test "$ac_cv_int64_t" = true ; then
   cat >> confdefs.h <<\EOF
 #define HAVE_INT64_T 1
 EOF
 
   echo "$ac_t""yes" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 echo $ac_n "checking for int64""... $ac_c" 1>&6
-echo "configure:7238: checking for int64" >&5
+echo "configure:7340: checking for int64" >&5
 if eval "test \"`echo '$''{'ac_cv_int64'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7243 "configure"
+#line 7345 "configure"
 #include "confdefs.h"
 #include <stdio.h>
                   #include <sys/types.h>
 int main() {
 int64 foo = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:7251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_int64=true
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_int64=false
 fi
 rm -f conftest*
 fi
 
 if test "$ac_cv_int64" = true ; then
   cat >> confdefs.h <<\EOF
 #define HAVE_INT64 1
 EOF
 
   echo "$ac_t""yes" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 echo $ac_n "checking for uint""... $ac_c" 1>&6
-echo "configure:7273: checking for uint" >&5
+echo "configure:7375: checking for uint" >&5
 if eval "test \"`echo '$''{'ac_cv_uint'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7278 "configure"
+#line 7380 "configure"
 #include "confdefs.h"
 #include <stdio.h>
                   #include <sys/types.h>
 int main() {
 uint foo = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:7286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_uint=true
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_uint=false
 fi
 rm -f conftest*
 fi
 
 if test "$ac_cv_uint" = true ; then
   cat >> confdefs.h <<\EOF
 #define HAVE_UINT 1
 EOF
 
   echo "$ac_t""yes" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 echo $ac_n "checking for uint_t""... $ac_c" 1>&6
-echo "configure:7308: checking for uint_t" >&5
+echo "configure:7410: checking for uint_t" >&5
 if eval "test \"`echo '$''{'ac_cv_uint_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7313 "configure"
+#line 7415 "configure"
 #include "confdefs.h"
 #include <stdio.h>
                   #include <sys/types.h>
 int main() {
 uint_t foo = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:7321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_uint_t=true
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_uint_t=false
 fi
 rm -f conftest*
 fi
 
 if test "$ac_cv_uint_t" = true ; then
   cat >> confdefs.h <<\EOF
 #define HAVE_UINT_T 1
 EOF
 
   echo "$ac_t""yes" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 echo $ac_n "checking for uint16_t""... $ac_c" 1>&6
-echo "configure:7343: checking for uint16_t" >&5
+echo "configure:7445: checking for uint16_t" >&5
 if eval "test \"`echo '$''{'ac_cv_uint16_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7348 "configure"
+#line 7450 "configure"
 #include "confdefs.h"
 #include <stdio.h>
                   #include <sys/types.h>
 int main() {
 uint16_t foo = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:7356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_uint16_t=true
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_uint16_t=false
 fi
 rm -f conftest*
 fi
 
 if test "$ac_cv_uint16_t" = true ; then
@@ -7374,75 +7476,75 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
 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
 
 
 echo $ac_n "checking for uname.domainname""... $ac_c" 1>&6
-echo "configure:7387: checking for uname.domainname" >&5
+echo "configure:7489: checking for uname.domainname" >&5
 if eval "test \"`echo '$''{'ac_cv_have_uname_domainname_field'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7392 "configure"
+#line 7494 "configure"
 #include "confdefs.h"
 #include <sys/utsname.h>
 int main() {
  struct utsname *res; char *domain; 
             (void)uname(res);  if (res != 0) { domain = res->domainname; } 
 ; return 0; }
 EOF
-if { (eval echo configure:7400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_uname_domainname_field=true
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_have_uname_domainname_field=false
 fi
 rm -f conftest*
 fi
 
 
 if test "$ac_cv_have_uname_domainname_field" = "true"; then
     cat >> confdefs.h <<\EOF
 #define HAVE_UNAME_DOMAINNAME_FIELD 1
 EOF
 
     echo "$ac_t""yes" 1>&6
 else
     echo "$ac_t""no" 1>&6
 fi
 
 echo $ac_n "checking for uname.__domainname""... $ac_c" 1>&6
-echo "configure:7424: checking for uname.__domainname" >&5
+echo "configure:7526: checking for uname.__domainname" >&5
 if eval "test \"`echo '$''{'ac_cv_have_uname_us_domainname_field'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7429 "configure"
+#line 7531 "configure"
 #include "confdefs.h"
 #include <sys/utsname.h>
 int main() {
  struct utsname *res; char *domain; 
             (void)uname(res);  if (res != 0) { domain = res->__domainname; } 
 ; return 0; }
 EOF
-if { (eval echo configure:7437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_uname_us_domainname_field=true
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_have_uname_us_domainname_field=false
 fi
 rm -f conftest*
 fi
 
 
@@ -7457,40 +7559,40 @@ else
 fi
 
 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
 
 
 
 echo $ac_n "checking for usable wchar_t (2 bytes, unsigned)""... $ac_c" 1>&6
-echo "configure:7470: checking for usable wchar_t (2 bytes, unsigned)" >&5
+echo "configure:7572: checking for usable wchar_t (2 bytes, unsigned)" >&5
 if eval "test \"`echo '$''{'ac_cv_have_usable_wchar'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
   ac_cv_have_usable_wchar="maybe"
 else
   cat > conftest.$ac_ext <<EOF
-#line 7478 "configure"
+#line 7580 "configure"
 #include "confdefs.h"
 #include <stddef.h>
                  int main () {
                    return (sizeof(wchar_t) != 2) ||
                           (wchar_t)-1 < (wchar_t) 0 ; } 
 EOF
-if { (eval echo configure:7485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_have_usable_wchar="yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   ac_cv_have_usable_wchar="no"
 fi
 rm -fr conftest*
 fi
 
 fi
@@ -7507,43 +7609,40 @@ else
     
     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
 
     _SAVE_CXXFLAGS=$CXXFLAGS
     CXXFLAGS="$CXXFLAGS -fshort-wchar"
 
     echo $ac_n "checking for compiler -fshort-wchar option""... $ac_c" 1>&6
-echo "configure:7520: checking for compiler -fshort-wchar option" >&5
+echo "configure:7622: checking for compiler -fshort-wchar option" >&5
 if eval "test \"`echo '$''{'ac_cv_have_usable_wchar_option'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
   ac_cv_have_usable_wchar_option="maybe"
 else
   cat > conftest.$ac_ext <<EOF
-#line 7528 "configure"
+#line 7630 "configure"
 #include "confdefs.h"
-#ifdef __cplusplus
-extern "C" void exit(int);
-#endif
 #include <stddef.h>
                      int main () {
                        return (sizeof(wchar_t) != 2) ||
                               (wchar_t)-1 < (wchar_t) 0 ; } 
 EOF
-if { (eval echo configure:7538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_have_usable_wchar_option="yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   ac_cv_have_usable_wchar_option="no"
 fi
 rm -fr conftest*
 fi
 
 fi
@@ -7561,49 +7660,49 @@ EOF
     fi
     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
 
 fi
 
 if test "$GNU_CC"; then
   echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6
-echo "configure:7574: checking for visibility(hidden) attribute" >&5
+echo "configure:7673: checking for visibility(hidden) attribute" >&5
 if eval "test \"`echo '$''{'ac_cv_visibility_hidden'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.c <<EOF
                   int foo __attribute__ ((visibility ("hidden"))) = 1;
 EOF
                   ac_cv_visibility_hidden=no
                   if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
                     if grep '\.hidden.*foo' conftest.s >/dev/null; then
                       ac_cv_visibility_hidden=yes
                     fi
                   fi
                   rm -f conftest.cs
                  
 fi
 
 echo "$ac_t""$ac_cv_visibility_hidden" 1>&6
    if test "$ac_cv_visibility_hidden" = "yes"; then
       cat >> confdefs.h <<\EOF
 #define HAVE_VISIBILITY_HIDDEN_ATTRIBUTE 1
 EOF
 
       echo $ac_n "checking for visibility pragma support""... $ac_c" 1>&6
-echo "configure:7598: checking for visibility pragma support" >&5
+echo "configure:7697: checking for visibility pragma support" >&5
 if eval "test \"`echo '$''{'ac_cv_visibility_pragma'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.c <<EOF
 #pragma GCC visibility push(hidden)
                       int foo_hidden = 1;
 #pragma GCC visibility push(default)
                       int foo_default = 1;
 EOF
                       ac_cv_visibility_pragma=no
                       if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
                         if grep '\.hidden.*foo_hidden' conftest.s >/dev/null; then
@@ -7627,123 +7726,123 @@ EOF
       fi
    fi
 fi     # GNU_CC
 
 
 
 
 ac_header_dirent=no
 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:7640: checking for $ac_hdr that defines DIR" >&5
+echo "configure:7739: checking for $ac_hdr that defines DIR" >&5
 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7645 "configure"
+#line 7744 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
 int main() {
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:7653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=no"
 fi
 rm -f conftest*
 fi
 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
   cat >> confdefs.h <<EOF
 #define $ac_tr_hdr 1
 EOF
  ac_header_dirent=$ac_hdr; break
 else
   echo "$ac_t""no" 1>&6
 fi
 done
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:7678: checking for opendir in -ldir" >&5
+echo "configure:7777: checking for opendir in -ldir" >&5
 ac_lib_var=`echo dir'_'opendir | 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="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7686 "configure"
+#line 7785 "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 opendir();
 
 int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:7697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   LIBS="$LIBS -ldir"
 else
   echo "$ac_t""no" 1>&6
 fi
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:7719: checking for opendir in -lx" >&5
+echo "configure:7818: checking for opendir in -lx" >&5
 ac_lib_var=`echo x'_'opendir | 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="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7727 "configure"
+#line 7826 "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 opendir();
 
 int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:7738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
@@ -7757,35 +7856,35 @@ fi
 fi
 
 case "$target_os" in
 freebsd*)
 # for stuff like -lXshm
     CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}"
     ;;
 esac
 for ac_hdr in sys/byteorder.h compat.h getopt.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7770: checking for $ac_hdr" >&5
+echo "configure:7869: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7775 "configure"
+#line 7874 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7879: \"$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
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
@@ -7797,35 +7896,35 @@ if eval "test \"`echo '$ac_cv_header_'$a
 #define $ac_tr_hdr 1
 EOF
  
 else
   echo "$ac_t""no" 1>&6
 fi
 done
 
 for ac_hdr in sys/bitypes.h memory.h unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7810: checking for $ac_hdr" >&5
+echo "configure:7909: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7815 "configure"
+#line 7914 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7919: \"$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
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
@@ -7837,35 +7936,35 @@ if eval "test \"`echo '$ac_cv_header_'$a
 #define $ac_tr_hdr 1
 EOF
  
 else
   echo "$ac_t""no" 1>&6
 fi
 done
 
 for ac_hdr in gnu/libc-version.h nl_types.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7850: checking for $ac_hdr" >&5
+echo "configure:7949: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7855 "configure"
+#line 7954 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7959: \"$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
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
@@ -7877,35 +7976,35 @@ if eval "test \"`echo '$ac_cv_header_'$a
 #define $ac_tr_hdr 1
 EOF
  
 else
   echo "$ac_t""no" 1>&6
 fi
 done
 
 for ac_hdr in malloc.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7890: checking for $ac_hdr" >&5
+echo "configure:7989: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7895 "configure"
+#line 7994 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7999: \"$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
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
@@ -7917,35 +8016,35 @@ if eval "test \"`echo '$ac_cv_header_'$a
 #define $ac_tr_hdr 1
 EOF
  
 else
   echo "$ac_t""no" 1>&6
 fi
 done
 
 for ac_hdr in X11/XKBlib.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7930: checking for $ac_hdr" >&5
+echo "configure:8029: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7935 "configure"
+#line 8034 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8039: \"$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
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
@@ -7958,35 +8057,35 @@ if eval "test \"`echo '$ac_cv_header_'$a
 EOF
  
 else
   echo "$ac_t""no" 1>&6
 fi
 done
 
 
 for ac_hdr in sys/statvfs.h sys/statfs.h sys/vfs.h sys/mount.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7971: checking for $ac_hdr" >&5
+echo "configure:8070: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7976 "configure"
+#line 8075 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8080: \"$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
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
@@ -7999,35 +8098,35 @@ if eval "test \"`echo '$ac_cv_header_'$a
 EOF
  
 else
   echo "$ac_t""no" 1>&6
 fi
 done
 
 
 for ac_hdr in mmintrin.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:8012: checking for $ac_hdr" >&5
+echo "configure:8111: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8017 "configure"
+#line 8116 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8121: \"$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
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
@@ -8046,35 +8145,35 @@ done
 
 
 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
 
 NEW_H=new.h
 ac_safe=`echo "new" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for new""... $ac_c" 1>&6
-echo "configure:8059: checking for new" >&5
+echo "configure:8158: checking for new" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8064 "configure"
+#line 8163 "configure"
 #include "confdefs.h"
 #include <new>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8168: \"$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
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
@@ -8097,35 +8196,35 @@ 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
 
 
 case $target in
 *-aix4.3*|*-aix5*)
 	;;
 *)
 	for ac_hdr in sys/cdefs.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:8110: checking for $ac_hdr" >&5
+echo "configure:8209: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8115 "configure"
+#line 8214 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8219: \"$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
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
@@ -8141,44 +8240,44 @@ else
   echo "$ac_t""no" 1>&6
 fi
 done
 
 	;;
 esac
 
 case $target in
 *-hpux11.*)
 	;;
 *)
 	echo $ac_n "checking for gethostbyname_r in -lc_r""... $ac_c" 1>&6
-echo "configure:8154: checking for gethostbyname_r in -lc_r" >&5
+echo "configure:8253: checking for gethostbyname_r in -lc_r" >&5
 ac_lib_var=`echo c_r'_'gethostbyname_r | 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 8162 "configure"
+#line 8261 "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 gethostbyname_r();
 
 int main() {
 gethostbyname_r()
 ; return 0; }
 EOF
-if { (eval echo configure:8173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
@@ -8190,44 +8289,44 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l
 #define $ac_tr_lib 1
 EOF
 
   LIBS="-lc_r $LIBS"
 
 else
   echo "$ac_t""no" 1>&6
 fi
 
 	;;
 esac
 echo $ac_n "checking for atan in -lm""... $ac_c" 1>&6
-echo "configure:8203: checking for atan in -lm" >&5
+echo "configure:8302: checking for atan in -lm" >&5
 ac_lib_var=`echo m'_'atan | 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="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8211 "configure"
+#line 8310 "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 atan();
 
 int main() {
 atan()
 ; return 0; }
 EOF
-if { (eval echo configure:8222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
@@ -8243,71 +8342,71 @@ EOF
 
 else
   echo "$ac_t""no" 1>&6
 fi
 
 
 
 case $target in
 *-darwin*)
 	;;
 *)
 	echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:8256: checking for dlopen in -ldl" >&5
+echo "configure:8355: 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 8264 "configure"
+#line 8363 "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:8275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:8292: checking for dlfcn.h" >&5
+echo "configure:8391: checking for dlfcn.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8297 "configure"
+#line 8396 "configure"
 #include "confdefs.h"
 #include <dlfcn.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8401: \"$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
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
@@ -8325,44 +8424,44 @@ fi
 
 else
   echo "$ac_t""no" 1>&6
 fi
 
 	;;
 esac
 if test ! "$GNU_CXX"; then
 
     case $target in
     *-aix*)
 	echo $ac_n "checking for demangle in -lC_r""... $ac_c" 1>&6
-echo "configure:8338: checking for demangle in -lC_r" >&5
+echo "configure:8437: checking for demangle in -lC_r" >&5
 ac_lib_var=`echo C_r'_'demangle | 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 8346 "configure"
+#line 8445 "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 demangle();
 
 int main() {
 demangle()
 ; return 0; }
 EOF
-if { (eval echo configure:8357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
@@ -8374,44 +8473,44 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l
 #define $ac_tr_lib 1
 EOF
 
   LIBS="-lC_r $LIBS"
 
 else
   echo "$ac_t""no" 1>&6
 fi
 
 	;;
      *)
 	echo $ac_n "checking for demangle in -lC""... $ac_c" 1>&6
-echo "configure:8387: checking for demangle in -lC" >&5
+echo "configure:8486: checking for demangle in -lC" >&5
 ac_lib_var=`echo C'_'demangle | 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 8395 "configure"
+#line 8494 "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 demangle();
 
 int main() {
 demangle()
 ; return 0; }
 EOF
-if { (eval echo configure:8406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
@@ -8424,44 +8523,44 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l
 EOF
 
   LIBS="-lC $LIBS"
 
 else
   echo "$ac_t""no" 1>&6
 fi
 
 	;;
      esac
 fi
 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
-echo "configure:8437: checking for socket in -lsocket" >&5
+echo "configure:8536: checking for socket in -lsocket" >&5
 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8445 "configure"
+#line 8544 "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 socket();
 
 int main() {
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:8456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
@@ -8488,248 +8587,248 @@ if test "$no_x" = "yes"; then
 #define NO_X11 1
 EOF
 
 else
     cat >> confdefs.h <<EOF
 #define FUNCPROTO 15
 EOF
 
 	XLIBS="-lX11 $XLIBS"
 	_SAVE_LDFLAGS="$LDFLAGS"
 	LDFLAGS="$XLDFLAGS $LDFLAGS"
 	echo $ac_n "checking for XDrawLines in -lX11""... $ac_c" 1>&6
-echo "configure:8501: checking for XDrawLines in -lX11" >&5
+echo "configure:8600: checking for XDrawLines in -lX11" >&5
 ac_lib_var=`echo X11'_'XDrawLines | 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="-lX11 $XLIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8509 "configure"
+#line 8608 "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 XDrawLines();
 
 int main() {
 XDrawLines()
 ; return 0; }
 EOF
-if { (eval echo configure:8520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   X11_LIBS="-lX11"
 else
   echo "$ac_t""no" 1>&6
 MISSING_X="$MISSING_X -lX11"
 fi
 
 	echo $ac_n "checking for XextAddDisplay in -lXext""... $ac_c" 1>&6
-echo "configure:8542: checking for XextAddDisplay in -lXext" >&5
+echo "configure:8641: checking for XextAddDisplay in -lXext" >&5
 ac_lib_var=`echo Xext'_'XextAddDisplay | 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="-lXext $XLIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8550 "configure"
+#line 8649 "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 XextAddDisplay();
 
 int main() {
 XextAddDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:8561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   XEXT_LIBS="-lXext"
 else
   echo "$ac_t""no" 1>&6
 MISSING_X="$MISSING_X -lXext"
 fi
 
    
      
 	echo $ac_n "checking for XtFree in -lXt""... $ac_c" 1>&6
-echo "configure:8585: checking for XtFree in -lXt" >&5
+echo "configure:8684: checking for XtFree in -lXt" >&5
 ac_lib_var=`echo Xt'_'XtFree | 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="-lXt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8593 "configure"
+#line 8692 "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 XtFree();
 
 int main() {
 XtFree()
 ; return 0; }
 EOF
-if { (eval echo configure:8604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
    XT_LIBS="-lXt"
 else
   echo "$ac_t""no" 1>&6
 
         unset ac_cv_lib_Xt_XtFree
 	    echo $ac_n "checking for IceFlush in -lICE""... $ac_c" 1>&6
-echo "configure:8625: checking for IceFlush in -lICE" >&5
+echo "configure:8724: checking for IceFlush in -lICE" >&5
 ac_lib_var=`echo ICE'_'IceFlush | 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="-lICE $XT_LIBS $XLIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8633 "configure"
+#line 8732 "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 IceFlush();
 
 int main() {
 IceFlush()
 ; return 0; }
 EOF
-if { (eval echo configure:8644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   XT_LIBS="-lICE $XT_LIBS"
 else
   echo "$ac_t""no" 1>&6
 fi
 
 	    echo $ac_n "checking for SmcCloseConnection in -lSM""... $ac_c" 1>&6
-echo "configure:8665: checking for SmcCloseConnection in -lSM" >&5
+echo "configure:8764: checking for SmcCloseConnection in -lSM" >&5
 ac_lib_var=`echo SM'_'SmcCloseConnection | 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="-lSM $XT_LIBS $XLIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8673 "configure"
+#line 8772 "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 SmcCloseConnection();
 
 int main() {
 SmcCloseConnection()
 ; return 0; }
 EOF
-if { (eval echo configure:8684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   XT_LIBS="-lSM $XT_LIBS"
 else
   echo "$ac_t""no" 1>&6
 fi
  
         echo $ac_n "checking for XtFree in -lXt""... $ac_c" 1>&6
-echo "configure:8705: checking for XtFree in -lXt" >&5
+echo "configure:8804: checking for XtFree in -lXt" >&5
 ac_lib_var=`echo Xt'_'XtFree | 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="-lXt $X_PRE_LIBS $XT_LIBS $XLIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8713 "configure"
+#line 8812 "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 XtFree();
 
 int main() {
 XtFree()
 ; return 0; }
 EOF
-if { (eval echo configure:8724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
@@ -8745,150 +8844,150 @@ fi
 fi
 
 
     # AIX needs the motif library linked before libXt to prevent
     # crashes in plugins linked against Motif - Bug #98892
     case "${target_os}" in
     aix*)
         XT_LIBS="-lXm $XT_LIBS"
         ;;
     esac
 
                 echo $ac_n "checking for XineramaIsActive in -lXinerama""... $ac_c" 1>&6
-echo "configure:8758: checking for XineramaIsActive in -lXinerama" >&5
+echo "configure:8857: checking for XineramaIsActive in -lXinerama" >&5
 ac_lib_var=`echo Xinerama'_'XineramaIsActive | 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="-lXinerama $XLIBS $XEXT_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8766 "configure"
+#line 8865 "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 XineramaIsActive();
 
 int main() {
 XineramaIsActive()
 ; return 0; }
 EOF
-if { (eval echo configure:8777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   MOZ_XINERAMA_LIBS="-lXinerama"
 else
   echo "$ac_t""no" 1>&6
 fi
 
     ac_safe=`echo "X11/extensions/Xinerama.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/extensions/Xinerama.h""... $ac_c" 1>&6
-echo "configure:8799: checking for X11/extensions/Xinerama.h" >&5
+echo "configure:8898: checking for X11/extensions/Xinerama.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8804 "configure"
+#line 8903 "configure"
 #include "confdefs.h"
 #include <X11/extensions/Xinerama.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8908: \"$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
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
 fi
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   :
 else
   echo "$ac_t""no" 1>&6
 fi
 
 
                 echo $ac_n "checking for XShmCreateImage in -lXext""... $ac_c" 1>&6
-echo "configure:8832: checking for XShmCreateImage in -lXext" >&5
+echo "configure:8931: checking for XShmCreateImage in -lXext" >&5
 ac_lib_var=`echo Xext'_'XShmCreateImage | 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="-lXext $XLIBS $XEXT_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8840 "configure"
+#line 8939 "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 XShmCreateImage();
 
 int main() {
 XShmCreateImage()
 ; return 0; }
 EOF
-if { (eval echo configure:8851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   _HAVE_XSHM_XEXT=1
 else
   echo "$ac_t""no" 1>&6
 fi
 
     ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
-echo "configure:8873: checking for X11/extensions/XShm.h" >&5
+echo "configure:8972: checking for X11/extensions/XShm.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8878 "configure"
+#line 8977 "configure"
 #include "confdefs.h"
 #include <X11/extensions/XShm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8982: \"$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
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
@@ -8900,76 +8999,76 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
     if test -n "$ac_cv_header_X11_extensions_XShm_h" &&
         test -n "$_HAVE_XSHM_XEXT"; then
         cat >> confdefs.h <<\EOF
 #define HAVE_XSHM 1
 EOF
 
     fi
 
                 echo $ac_n "checking for XieFloGeometry in -lXIE""... $ac_c" 1>&6
-echo "configure:8913: checking for XieFloGeometry in -lXIE" >&5
+echo "configure:9012: checking for XieFloGeometry in -lXIE" >&5
 ac_lib_var=`echo XIE'_'XieFloGeometry | 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="-lXIE $XLIBS $XEXT_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8921 "configure"
+#line 9020 "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 XieFloGeometry();
 
 int main() {
 XieFloGeometry()
 ; return 0; }
 EOF
-if { (eval echo configure:8932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   MOZ_XIE_LIBS="-lXIE"
 else
   echo "$ac_t""no" 1>&6
 fi
 
     ac_safe=`echo "X11/extensions/XIElib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/extensions/XIElib.h""... $ac_c" 1>&6
-echo "configure:8954: checking for X11/extensions/XIElib.h" >&5
+echo "configure:9053: checking for X11/extensions/XIElib.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8959 "configure"
+#line 9058 "configure"
 #include "confdefs.h"
 #include <X11/extensions/XIElib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9063: \"$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
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
@@ -9025,25 +9124,25 @@ if test x$ft_config_exec_prefix != x ; t
     FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config
   fi
 fi
 if test x$ft_config_prefix != x ; then
   ft_config_args="$ft_config_args --prefix=$ft_config_prefix"
   if test x${FT2_CONFIG+set} != xset ; then
     FT2_CONFIG=$ft_config_prefix/bin/freetype-config
   fi
 fi
 # Extract the first word of "freetype-config", so it can be a program name with args.
 set dummy freetype-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:9038: checking for $ac_word" >&5
+echo "configure:9137: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_FT2_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$FT2_CONFIG" in
   /*)
   ac_cv_path_FT2_CONFIG="$FT2_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_FT2_CONFIG="$FT2_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -9061,25 +9160,25 @@ else
 esac
 fi
 FT2_CONFIG="$ac_cv_path_FT2_CONFIG"
 if test -n "$FT2_CONFIG"; then
   echo "$ac_t""$FT2_CONFIG" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
 
 min_ft_version=6.1.0
 echo $ac_n "checking for FreeType - version >= $min_ft_version""... $ac_c" 1>&6
-echo "configure:9074: checking for FreeType - version >= $min_ft_version" >&5
+echo "configure:9173: checking for FreeType - version >= $min_ft_version" >&5
 no_ft=""
 if test "$FT2_CONFIG" = "no" ; then
   no_ft=yes
 else
   FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags`
   FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs`
   ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \
          sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
   ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \
          sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
   ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \
          sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
@@ -9109,25 +9208,25 @@ else
     if test "x$ft_config_is_lt" = "xyes" ; then
       _HAVE_FREETYPE2=
       echo "$ac_t""no" 1>&6
     else
       ac_save_CFLAGS="$CFLAGS"
       ac_save_LIBS="$LIBS"
       CFLAGS="$CFLAGS $FT2_CFLAGS"
       LIBS="$FT2_LIBS $LIBS"
       if test "$cross_compiling" = yes; then
   echo $ac_n "cross compiling; assumed OK... $ac_c"
 else
   cat > conftest.$ac_ext <<EOF
-#line 9122 "configure"
+#line 9221 "configure"
 #include "confdefs.h"
 
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include <stdio.h>
 #include <stdlib.h>
 
 int
 main()
 {
   FT_Library library;
   FT_Error error;
@@ -9135,25 +9234,25 @@ main()
   error = FT_Init_FreeType(&library);
 
   if (error)
     return 1;
   else
   {
     FT_Done_FreeType(library);
     return 0;
   }
 }
 
 EOF
-if { (eval echo configure:9148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   no_ft=yes
 fi
 rm -fr conftest*
 fi
 
       CFLAGS="$ac_save_CFLAGS"
@@ -9187,91 +9286,91 @@ if test "x$ft_config_is_lt" != "xyes" ; 
 fi
 
 
 fi # $no_x
 
 
 
 
 
 
 
 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
-echo "configure:9200: checking for pthread_create in -lpthreads" >&5
+echo "configure:9299: checking for pthread_create in -lpthreads" >&5
 echo "
     #include <pthread.h> 
     void *foo(void *v) { int a = 1;  } 
     int main() { 
         pthread_t t;
         if (!pthread_create(&t, 0, &foo, 0)) {
             pthread_join(t, 0);
         }
         exit(0);
     }" > dummy.c ;
     echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS" 1>&5;
     ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS 2>&5;
     _res=$? ;
     rm -f dummy.c dummy${ac_exeext} ;
     if test "$_res" = "0"; then
         echo "$ac_t""yes" 1>&6
         USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads"
     else
         echo "$ac_t""no" 1>&6
         
 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:9222: checking for pthread_create in -lpthread" >&5
+echo "configure:9321: checking for pthread_create in -lpthread" >&5
 echo "
     #include <pthread.h> 
     void *foo(void *v) { int a = 1;  } 
     int main() { 
         pthread_t t;
         if (!pthread_create(&t, 0, &foo, 0)) {
             pthread_join(t, 0);
         }
         exit(0);
     }" > dummy.c ;
     echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS" 1>&5;
     ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS 2>&5;
     _res=$? ;
     rm -f dummy.c dummy${ac_exeext} ;
     if test "$_res" = "0"; then
         echo "$ac_t""yes" 1>&6
         USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread"
     else
         echo "$ac_t""no" 1>&6
         
 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
-echo "configure:9244: checking for pthread_create in -lc_r" >&5
+echo "configure:9343: checking for pthread_create in -lc_r" >&5
 echo "
     #include <pthread.h> 
     void *foo(void *v) { int a = 1;  } 
     int main() { 
         pthread_t t;
         if (!pthread_create(&t, 0, &foo, 0)) {
             pthread_join(t, 0);
         }
         exit(0);
     }" > dummy.c ;
     echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS" 1>&5;
     ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS 2>&5;
     _res=$? ;
     rm -f dummy.c dummy${ac_exeext} ;
     if test "$_res" = "0"; then
         echo "$ac_t""yes" 1>&6
         USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r"
     else
         echo "$ac_t""no" 1>&6
         
 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
-echo "configure:9266: checking for pthread_create in -lc" >&5
+echo "configure:9365: checking for pthread_create in -lc" >&5
 echo "
     #include <pthread.h> 
     void *foo(void *v) { int a = 1;  } 
     int main() { 
         pthread_t t;
         if (!pthread_create(&t, 0, &foo, 0)) {
             pthread_join(t, 0);
         }
         exit(0);
     }" > dummy.c ;
     echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS" 1>&5;
     ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS 2>&5;
@@ -9309,48 +9408,48 @@ fi
 
   else
     { echo "configure: error: Option, pthreads, does not take an argument ($withval)." 1>&2; exit 1; }
   fi
 fi
 
 
 if test "$USE_PTHREADS"x != x
 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:9322: checking whether ${CC-cc} accepts -pthread" >&5
+echo "configure:9421: 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
 	        case "$target_os" in
 	        freebsd*)
 # Freebsd doesn't use -pthread for compiles, it uses them for linking
                 ;;
 	        *)
 			    CFLAGS="$CFLAGS -pthread"
 			    CXXFLAGS="$CXXFLAGS -pthread"
                 ;;
 	        esac
 		fi
 	fi
 	rm -f conftest*
     echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6
 
 			    ac_cv_have_dash_pthreads=no
     if test "$ac_cv_have_dash_pthread" = "no"; then
 	    echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
-echo "configure:9345: checking whether ${CC-cc} accepts -pthreads" >&5
+echo "configure:9444: checking whether ${CC-cc} accepts -pthreads" >&5
     	echo 'int main() { return 0; }' | cat > conftest.c
 	    ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
     	if test $? -eq 0; then
 	    	if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
 			    ac_cv_have_dash_pthreads=yes
 			    CFLAGS="$CFLAGS -pthreads"
 			    CXXFLAGS="$CXXFLAGS -pthreads"
 		    fi
 	    fi
 	    rm -f conftest*
     	echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6
     fi
@@ -9454,25 +9553,25 @@ case "$target" in
                 ;;
             i*86*)
                                 export MACOSX_DEPLOYMENT_TARGET=10.4
                 ;;
         esac
     fi
     ;;
 esac
 
 
 
 echo $ac_n "checking whether mmap() sees write()s""... $ac_c" 1>&6
-echo "configure:9467: checking whether mmap() sees write()s" >&5
+echo "configure:9566: checking whether mmap() sees write()s" >&5
 
 
 mmap_test_prog='
     #include <stdlib.h>
     #include <unistd.h>
     #include <sys/mman.h>
     #include <sys/types.h>
     #include <sys/stat.h>
     #include <fcntl.h>
 
     char fname[] = "conftest.file";
     char zbuff[1024]; /* Fractional page is probably worst case */
@@ -9493,166 +9592,166 @@ mmap_test_prog='
 	    int rc = write(fd, &fname[i], 1);
 	    if(map[i]!=fname[i]) return 4;
 	}
 	return 0;
     }
 '
 
 
 if test "$cross_compiling" = yes; then
   result="yes"
 else
   cat > conftest.$ac_ext <<EOF
-#line 9506 "configure"
+#line 9605 "configure"
 #include "confdefs.h"
 $mmap_test_prog 
 EOF
-if { (eval echo configure:9510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   result="yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   result="no"
 fi
 rm -fr conftest*
 fi
 
 
 echo "$ac_t"""$result"" 1>&6
 
 if test "$result" = "no"; then
     cat >> confdefs.h <<\EOF
 #define MMAP_MISSES_WRITES 1
 EOF
 
 fi
 
 
 if test $ac_cv_prog_gcc = yes; then
     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:9535: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:9634: 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 9541 "configure"
+#line 9640 "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
 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 9559 "configure"
+#line 9658 "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
 fi
 rm -f conftest*
 
   fi
 fi
 
 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
   if test $ac_cv_prog_gcc_traditional = yes; then
     CC="$CC -traditional"
   fi
 fi
 
 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:9581: checking for 8-bit clean memcmp" >&5
+echo "configure:9680: checking for 8-bit clean memcmp" >&5
 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
   ac_cv_func_memcmp_clean=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 9589 "configure"
+#line 9688 "configure"
 #include "confdefs.h"
 
 main()
 {
   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
 }
 
 EOF
-if { (eval echo configure:9599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_memcmp_clean=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   ac_cv_func_memcmp_clean=no
 fi
 rm -fr conftest*
 fi
 
 fi
 
 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
 
 for ac_func in random strerror lchown fchmod snprintf statvfs memmove rint stat64 lstat64
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9619: checking for $ac_func" >&5
+echo "configure:9718: 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 9624 "configure"
+#line 9723 "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();
 
 int main() {
 
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
 $ac_func();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:9647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9746: \"$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
 rm -f conftest*
 fi
 
 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
@@ -9661,53 +9760,53 @@ if eval "test \"`echo '$ac_cv_func_'$ac_
   cat >> confdefs.h <<EOF
 #define $ac_tr_func 1
 EOF
  
 else
   echo "$ac_t""no" 1>&6
 fi
 done
 
 for ac_func in flockfile getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9674: checking for $ac_func" >&5
+echo "configure:9773: 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 9679 "configure"
+#line 9778 "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();
 
 int main() {
 
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
 $ac_func();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:9702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9801: \"$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
 rm -f conftest*
 fi
 
 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
@@ -9718,53 +9817,53 @@ if eval "test \"`echo '$ac_cv_func_'$ac_
 EOF
  
 else
   echo "$ac_t""no" 1>&6
 fi
 done
 
 
 if test -z "$MACOS_DEPLOYMENT_TARGET" || test "$MACOS_DEPLOYMENT_TARGET" -ge "100200"; then
   for ac_func in localtime_r strtok_r
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9731: checking for $ac_func" >&5
+echo "configure:9830: 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 9736 "configure"
+#line 9835 "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();
 
 int main() {
 
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
 $ac_func();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:9759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9858: \"$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
 rm -f conftest*
 fi
 
 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
@@ -9782,69 +9881,69 @@ done
 fi
 
 if test -z "$MACOS_DEPLOYMENT_TARGET" || test "$MACOS_DEPLOYMENT_TARGET" -ge "100300"; then
 
 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
 
 echo $ac_n "checking for wcrtomb""... $ac_c" 1>&6
-echo "configure:9795: checking for wcrtomb" >&5
+echo "configure:9894: checking for wcrtomb" >&5
 if eval "test \"`echo '$''{'ac_cv_have_wcrtomb'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9800 "configure"
+#line 9899 "configure"
 #include "confdefs.h"
 #include <wchar.h>
 int main() {
 mbstate_t ps={0};wcrtomb(0,'f',&ps);
 ; return 0; }
 EOF
-if { (eval echo configure:9807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_have_wcrtomb="yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_have_wcrtomb="no"
 fi
 rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_have_wcrtomb" 1>&6
 if test "$ac_cv_have_wcrtomb" = "yes"; then
     cat >> confdefs.h <<\EOF
 #define HAVE_WCRTOMB 1
 EOF
 
 fi
 echo $ac_n "checking for mbrtowc""... $ac_c" 1>&6
-echo "configure:9827: checking for mbrtowc" >&5
+echo "configure:9926: checking for mbrtowc" >&5
 if eval "test \"`echo '$''{'ac_cv_have_mbrtowc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9832 "configure"
+#line 9931 "configure"
 #include "confdefs.h"
 #include <wchar.h>
 int main() {
 mbstate_t ps={0};mbrtowc(0,0,0,&ps);
 ; return 0; }
 EOF
-if { (eval echo configure:9839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_have_mbrtowc="yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_have_mbrtowc="no"
 fi
 rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_have_mbrtowc" 1>&6
@@ -9855,42 +9954,42 @@ EOF
 
 fi
 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
 
 fi
 
 echo $ac_n "checking for res_ninit()""... $ac_c" 1>&6
-echo "configure:9868: checking for res_ninit()" >&5
+echo "configure:9967: checking for res_ninit()" >&5
 if eval "test \"`echo '$''{'ac_cv_func_res_ninit'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9873 "configure"
+#line 9972 "configure"
 #include "confdefs.h"
 
         #ifdef linux
         #define _BSD_SOURCE 1
         #endif
         #include <resolv.h>
         
 int main() {
 int foo = res_ninit(&_res);
 ; return 0; }
 EOF
-if { (eval echo configure:9885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_func_res_ninit=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_func_res_ninit=no
 fi
 rm -f conftest*
     
 fi
 
@@ -9902,41 +10001,41 @@ if test "$ac_cv_func_res_ninit" = "yes";
 EOF
 
 fi
 
 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
 
 echo $ac_n "checking for gnu_get_libc_version()""... $ac_c" 1>&6
-echo "configure:9915: checking for gnu_get_libc_version()" >&5
+echo "configure:10014: checking for gnu_get_libc_version()" >&5
 if eval "test \"`echo '$''{'ac_cv_func_gnu_get_libc_version'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9920 "configure"
+#line 10019 "configure"
 #include "confdefs.h"
 
         #ifdef HAVE_GNU_LIBC_VERSION_H
         #include <gnu/libc-version.h>
         #endif
         
 int main() {
 const char *glibc_version = gnu_get_libc_version();
 ; return 0; }
 EOF
-if { (eval echo configure:9931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_func_gnu_get_libc_version=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_func_gnu_get_libc_version=no 
         
 fi
 rm -f conftest*
     
 fi
@@ -9947,129 +10046,129 @@ if test "$ac_cv_func_gnu_get_libc_versio
     cat >> confdefs.h <<\EOF
 #define HAVE_GNU_GET_LIBC_VERSION 1
 EOF
 
 fi
 
 case $target_os in
     os2*|msvc*|mks*|cygwin*|mingw*|darwin*|wince*)
         ;;
     *)
     
 echo $ac_n "checking for iconv in -lc""... $ac_c" 1>&6
-echo "configure:9960: checking for iconv in -lc" >&5
+echo "configure:10059: checking for iconv in -lc" >&5
 ac_lib_var=`echo c'_'iconv | 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 9968 "configure"
+#line 10067 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char iconv();
 
 int main() {
 iconv()
 ; return 0; }
 EOF
-if { (eval echo configure:9982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   _ICONV_LIBS="$_ICONV_LIBS"
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
-echo "configure:10001: checking for iconv in -liconv" >&5
+echo "configure:10100: checking for iconv in -liconv" >&5
 ac_lib_var=`echo iconv'_'iconv | 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="-liconv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10009 "configure"
+#line 10108 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char iconv();
 
 int main() {
 iconv()
 ; return 0; }
 EOF
-if { (eval echo configure:10023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   _ICONV_LIBS="$_ICONV_LIBS -liconv"
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for libiconv in -liconv""... $ac_c" 1>&6
-echo "configure:10042: checking for libiconv in -liconv" >&5
+echo "configure:10141: checking for libiconv in -liconv" >&5
 ac_lib_var=`echo iconv'_'libiconv | 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="-liconv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10050 "configure"
+#line 10149 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char libiconv();
 
 int main() {
 libiconv()
 ; return 0; }
 EOF
-if { (eval echo configure:10064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
@@ -10078,88 +10177,88 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l
   _ICONV_LIBS="$_ICONV_LIBS -liconv"
 else
   echo "$ac_t""no" 1>&6
 fi
 
 fi
 
 fi
 
 _SAVE_LIBS=$LIBS
 LIBS="$LIBS $_ICONV_LIBS"
 echo $ac_n "checking for iconv()""... $ac_c" 1>&6
-echo "configure:10091: checking for iconv()" >&5
+echo "configure:10190: checking for iconv()" >&5
 if eval "test \"`echo '$''{'ac_cv_func_iconv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10096 "configure"
+#line 10195 "configure"
 #include "confdefs.h"
 
         #include <stdlib.h>
         #include <iconv.h>
         
 int main() {
 
             iconv_t h = iconv_open("", "");
             iconv(h, NULL, NULL, NULL, NULL);
             iconv_close(h);
         
 ; return 0; }
 EOF
-if { (eval echo configure:10110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_func_iconv=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_func_iconv=no 
         
 fi
 rm -f conftest*
     
 fi
 
 echo "$ac_t""$ac_cv_func_iconv" 1>&6
 if test "$ac_cv_func_iconv" = "yes"; then
     cat >> confdefs.h <<\EOF
 #define HAVE_ICONV 1
 EOF
 
     DYNAMIC_XPCOM_LIBS="$DYNAMIC_XPCOM_LIBS $_ICONV_LIBS"
     LIBXUL_LIBS="$LIBXUL_LIBS $_ICONV_LIBS"
     LIBICONV="$_ICONV_LIBS"
     echo $ac_n "checking for iconv() with const input""... $ac_c" 1>&6
-echo "configure:10134: checking for iconv() with const input" >&5
+echo "configure:10233: checking for iconv() with const input" >&5
 if eval "test \"`echo '$''{'ac_cv_func_const_iconv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10139 "configure"
+#line 10238 "configure"
 #include "confdefs.h"
 
             #include <stdlib.h>
             #include <iconv.h>
             
 int main() {
 
                 const char *input = "testing";
                 iconv_t h = iconv_open("", "");
                 iconv(h, &input, NULL, NULL, NULL);
                 iconv_close(h);
             
 ; return 0; }
 EOF
-if { (eval echo configure:10154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_func_const_iconv=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_func_const_iconv=no 
             
 fi
 rm -f conftest*
         
 fi
@@ -10170,37 +10269,37 @@ echo "$ac_t""$ac_cv_func_const_iconv" 1>
 #define HAVE_ICONV_WITH_CONST_INPUT 1
 EOF
 
     fi
 fi
 LIBS=$_SAVE_LIBS
 
     ;;
 esac
 
 
   echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
-echo "configure:10183: checking for nl_langinfo and CODESET" >&5
+echo "configure:10282: checking for nl_langinfo and CODESET" >&5
 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10188 "configure"
+#line 10287 "configure"
 #include "confdefs.h"
 #include <langinfo.h>
 int main() {
 char* cs = nl_langinfo(CODESET);
 ; return 0; }
 EOF
-if { (eval echo configure:10195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_langinfo_codeset=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   am_cv_langinfo_codeset=no
 fi
 rm -f conftest*
     
 fi
 
@@ -10214,131 +10313,131 @@ EOF
   fi
 
 
 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
 
 
 echo $ac_n "checking for an implementation of va_copy()""... $ac_c" 1>&6
-echo "configure:10227: checking for an implementation of va_copy()" >&5
+echo "configure:10326: checking for an implementation of va_copy()" >&5
 if eval "test \"`echo '$''{'ac_cv_va_copy'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     if test "$cross_compiling" = yes; then
   ac_cv_va_copy=no
     
 else
   cat > conftest.$ac_ext <<EOF
-#line 10237 "configure"
+#line 10336 "configure"
 #include "confdefs.h"
 
         #include <stdarg.h>
         void f (int i, ...) {
             va_list args1, args2;
             va_start (args1, i);
             va_copy (args2, args1);
             if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
                 exit (1);
             va_end (args1); va_end (args2);
         }
         int main() { f (0, 42); return 0; }
 EOF
-if { (eval echo configure:10251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_va_copy=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   ac_cv_va_copy=no
 fi
 rm -fr conftest*
 fi
 
 
 fi
 
 echo "$ac_t""$ac_cv_va_copy" 1>&6
 echo $ac_n "checking for an implementation of __va_copy()""... $ac_c" 1>&6
-echo "configure:10268: checking for an implementation of __va_copy()" >&5
+echo "configure:10367: checking for an implementation of __va_copy()" >&5
 if eval "test \"`echo '$''{'ac_cv___va_copy'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     if test "$cross_compiling" = yes; then
   ac_cv___va_copy=no
     
 else
   cat > conftest.$ac_ext <<EOF
-#line 10278 "configure"
+#line 10377 "configure"
 #include "confdefs.h"
 
         #include <stdarg.h>
         void f (int i, ...) {
             va_list args1, args2;
             va_start (args1, i);
             __va_copy (args2, args1);
             if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
                 exit (1);
             va_end (args1); va_end (args2);
         }
         int main() { f (0, 42); return 0; }
 EOF
-if { (eval echo configure:10292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv___va_copy=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   ac_cv___va_copy=no
 fi
 rm -fr conftest*
 fi
 
 
 fi
 
 echo "$ac_t""$ac_cv___va_copy" 1>&6
 echo $ac_n "checking whether va_lists can be copied by value""... $ac_c" 1>&6
-echo "configure:10309: checking whether va_lists can be copied by value" >&5
+echo "configure:10408: checking whether va_lists can be copied by value" >&5
 if eval "test \"`echo '$''{'ac_cv_va_val_copy'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     if test "$cross_compiling" = yes; then
   ac_cv_va_val_copy=yes
     
 else
   cat > conftest.$ac_ext <<EOF
-#line 10319 "configure"
+#line 10418 "configure"
 #include "confdefs.h"
 
         #include <stdarg.h>
         void f (int i, ...) {
             va_list args1, args2;
             va_start (args1, i);
             args2 = args1;
             if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
                 exit (1);
             va_end (args1); va_end (args2);
         }
         int main() { f (0, 42); return 0; }
 EOF
-if { (eval echo configure:10333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_va_val_copy=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   ac_cv_va_val_copy=no
 fi
 rm -fr conftest*
 fi
 
 
@@ -10419,25 +10518,25 @@ EOF
 		echo "*** or later.  However, if you choose not to upgrade, the only effect"
 		echo "*** will be excessive memory usage at runtime."
 		echo
 	    fi
 	    cd ${_curdir}
 	    rm -rf conftest* _conftest
 	    	    ;;
 esac
 
 if test "$GNU_CXX"; then
 
   echo $ac_n "checking for C++ exceptions flag""... $ac_c" 1>&6
-echo "configure:10432: checking for C++ exceptions flag" >&5
+echo "configure:10531: checking for C++ exceptions flag" >&5
 
     if eval "test \"`echo '$''{'ac_cv_cxx_exceptions_flags'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   echo "int main() { return 0; }" | cat > conftest.C
 
   ${CXX-g++} ${CXXFLAGS} -c -fno-handle-exceptions conftest.C > conftest.out 2>&1
 
   if egrep "warning.*renamed" conftest.out >/dev/null; then
     ac_cv_cxx_exceptions_flags=${_COMPILER_PREFIX}-fno-exceptions
   else
     ac_cv_cxx_exceptions_flags=${_COMPILER_PREFIX}-fno-handle-exceptions
@@ -10454,365 +10553,365 @@ fi
 
 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
 
 
 HAVE_GCC3_ABI=
 if test "$GNU_CC"; then
   echo $ac_n "checking for gcc 3.0 ABI""... $ac_c" 1>&6
-echo "configure:10467: checking for gcc 3.0 ABI" >&5
+echo "configure:10566: checking for gcc 3.0 ABI" >&5
 if eval "test \"`echo '$''{'ac_cv_gcc_three_abi'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10472 "configure"
+#line 10571 "configure"
 #include "confdefs.h"
 
 int main() {
 
 #if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
   return 0;
 #else
 #error Not gcc3.
 #endif
                       
 ; return 0; }
 EOF
-if { (eval echo configure:10485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_gcc_three_abi="yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_gcc_three_abi="no"
 fi
 rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_gcc_three_abi" 1>&6
   if test "$ac_cv_gcc_three_abi" = "yes"; then
       TARGET_COMPILER_ABI="${TARGET_COMPILER_ABI-gcc3}"
       HAVE_GCC3_ABI=1
   else
       TARGET_COMPILER_ABI="${TARGET_COMPILER_ABI-gcc2}"
   fi
 fi
 
 
 
 echo $ac_n "checking for C++ \"explicit\" keyword""... $ac_c" 1>&6
-echo "configure:10509: checking for C++ \"explicit\" keyword" >&5
+echo "configure:10608: checking for C++ \"explicit\" keyword" >&5
 if eval "test \"`echo '$''{'ac_cv_cpp_explicit'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10514 "configure"
+#line 10613 "configure"
 #include "confdefs.h"
 class X {
                                public: explicit X(int i) : i_(i) {}
                                private: int i_;
                                };
 int main() {
 X x(3);
 ; return 0; }
 EOF
-if { (eval echo configure:10524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cpp_explicit=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_cpp_explicit=no
 fi
 rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_cpp_explicit" 1>&6
 if test "$ac_cv_cpp_explicit" = yes ; then
    cat >> confdefs.h <<\EOF
 #define HAVE_CPP_EXPLICIT 1
 EOF
 
 fi
 
 echo $ac_n "checking for C++ \"typename\" keyword""... $ac_c" 1>&6
-echo "configure:10545: checking for C++ \"typename\" keyword" >&5
+echo "configure:10644: checking for C++ \"typename\" keyword" >&5
 if eval "test \"`echo '$''{'ac_cv_cpp_typename'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10550 "configure"
+#line 10649 "configure"
 #include "confdefs.h"
 class param {
                                public:
                                    typedef unsigned long num_type;
                                };
 
                                template <class T> class tplt {
                                public:
                                    typedef typename T::num_type t_num_type;
                                    t_num_type foo(typename T::num_type num) {
                                        return num;
                                    }
                                };
 int main() {
 tplt<param> A;
                                A.foo(0);
 ; return 0; }
 EOF
-if { (eval echo configure:10569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cpp_typename=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_cpp_typename=no
 fi
 rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_cpp_typename" 1>&6
 if test "$ac_cv_cpp_typename" = yes ; then
    cat >> confdefs.h <<\EOF
 #define HAVE_CPP_TYPENAME 1
 EOF
 
 fi
 
 echo $ac_n "checking for modern C++ template specialization syntax support""... $ac_c" 1>&6
-echo "configure:10590: checking for modern C++ template specialization syntax support" >&5
+echo "configure:10689: checking for modern C++ template specialization syntax support" >&5
 if eval "test \"`echo '$''{'ac_cv_cpp_modern_specialize_template_syntax'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10595 "configure"
+#line 10694 "configure"
 #include "confdefs.h"
 template <class T> struct X { int a; };
                                class Y {};
                                template <> struct X<Y> { double a; };
 int main() {
 X<int> int_x;
                                X<Y> y_x;
 ; return 0; }
 EOF
-if { (eval echo configure:10605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cpp_modern_specialize_template_syntax=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_cpp_modern_specialize_template_syntax=no
 fi
 rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_cpp_modern_specialize_template_syntax" 1>&6
 if test "$ac_cv_cpp_modern_specialize_template_syntax" = yes ; then
   cat >> confdefs.h <<\EOF
 #define HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX 1
 EOF
 
 fi
 
 
 echo $ac_n "checking whether partial template specialization works""... $ac_c" 1>&6
-echo "configure:10627: checking whether partial template specialization works" >&5
+echo "configure:10726: checking whether partial template specialization works" >&5
 if eval "test \"`echo '$''{'ac_cv_cpp_partial_specialization'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10632 "configure"
+#line 10731 "configure"
 #include "confdefs.h"
 template <class T> class Foo {};
                                template <class T> class Foo<T*> {};
 int main() {
 return 0;
 ; return 0; }
 EOF
-if { (eval echo configure:10640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cpp_partial_specialization=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_cpp_partial_specialization=no
 fi
 rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_cpp_partial_specialization" 1>&6
 if test "$ac_cv_cpp_partial_specialization" = yes ; then
   cat >> confdefs.h <<\EOF
 #define HAVE_CPP_PARTIAL_SPECIALIZATION 1
 EOF
 
 fi
 
 echo $ac_n "checking whether operators must be re-defined for templates derived from templates""... $ac_c" 1>&6
-echo "configure:10661: checking whether operators must be re-defined for templates derived from templates" >&5
+echo "configure:10760: checking whether operators must be re-defined for templates derived from templates" >&5
 if eval "test \"`echo '$''{'ac_cv_need_derived_template_operators'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10666 "configure"
+#line 10765 "configure"
 #include "confdefs.h"
 template <class T> class Base { };
                                 template <class T>
                                 Base<T> operator+(const Base<T>& lhs, const Base<T>& rhs) { return lhs; }
                                 template <class T> class Derived : public Base<T> { };
 int main() {
 Derived<char> a, b;
                                 Base<char> c = a + b;
                                 return 0;
 ; return 0; }
 EOF
-if { (eval echo configure:10678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_need_derived_template_operators=no
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_need_derived_template_operators=yes
 fi
 rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_need_derived_template_operators" 1>&6
 if test "$ac_cv_need_derived_template_operators" = yes ; then
   cat >> confdefs.h <<\EOF
 #define NEED_CPP_DERIVED_TEMPLATE_OPERATORS 1
 EOF
 
 fi
 
 
 echo $ac_n "checking whether we need to cast a derived template to pass as its base class""... $ac_c" 1>&6
-echo "configure:10700: checking whether we need to cast a derived template to pass as its base class" >&5
+echo "configure:10799: checking whether we need to cast a derived template to pass as its base class" >&5
 if eval "test \"`echo '$''{'ac_cv_need_cpp_template_cast_to_base'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10705 "configure"
+#line 10804 "configure"
 #include "confdefs.h"
 template <class T> class Base { };
                                 template <class T> class Derived : public Base<T> { };
                                 template <class T> int foo(const Base<T>&) { return 0; }
 int main() {
 Derived<char> bar; return foo(bar);
 ; return 0; }
 EOF
-if { (eval echo configure:10714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_need_cpp_template_cast_to_base=no
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_need_cpp_template_cast_to_base=yes
 fi
 rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_need_cpp_template_cast_to_base" 1>&6
 if test "$ac_cv_need_cpp_template_cast_to_base" = yes ; then
   cat >> confdefs.h <<\EOF
 #define NEED_CPP_TEMPLATE_CAST_TO_BASE 1
 EOF
 
 fi
 
 echo $ac_n "checking whether the compiler can resolve const ambiguities for templates""... $ac_c" 1>&6
-echo "configure:10735: checking whether the compiler can resolve const ambiguities for templates" >&5
+echo "configure:10834: checking whether the compiler can resolve const ambiguities for templates" >&5
 if eval "test \"`echo '$''{'ac_cv_can_resolve_const_ambiguity'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10740 "configure"
+#line 10839 "configure"
 #include "confdefs.h"
 
                                 template <class T> class ptrClass {
                                   public: T* ptr;
                                 };
 
                                 template <class T> T* a(ptrClass<T> *arg) {
                                   return arg->ptr;
                                 }
 
                                 template <class T>
                                 const T* a(const ptrClass<T> *arg) {
                                   return arg->ptr;
                                 }
                                
 int main() {
  ptrClass<int> i;
                                  a(&i); 
 ; return 0; }
 EOF
-if { (eval echo configure:10761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_can_resolve_const_ambiguity=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_can_resolve_const_ambiguity=no
 fi
 rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_can_resolve_const_ambiguity" 1>&6
 if test "$ac_cv_can_resolve_const_ambiguity" = no ; then
   cat >> confdefs.h <<\EOF
 #define CANT_RESOLVE_CPP_CONST_AMBIGUITY 1
 EOF
 
 fi
 
 
 echo $ac_n "checking whether the C++ \"using\" keyword can change access""... $ac_c" 1>&6
-echo "configure:10783: checking whether the C++ \"using\" keyword can change access" >&5
+echo "configure:10882: checking whether the C++ \"using\" keyword can change access" >&5
 if eval "test \"`echo '$''{'ac_cv_cpp_access_changing_using2'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10788 "configure"
+#line 10887 "configure"
 #include "confdefs.h"
 class A { protected: int foo() { return 0; } };
                    class B : public A { public: using A::foo; };
 int main() {
 B b; return b.foo();
 ; return 0; }
 EOF
-if { (eval echo configure:10796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 10799 "configure"
+#line 10898 "configure"
 #include "confdefs.h"
 class A { public: int foo() { return 1; } };
                        class B : public A { private: using A::foo; };
 int main() {
 B b; return b.foo();
 ; return 0; }
 EOF
-if { (eval echo configure:10807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cpp_access_changing_using2=no
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_cpp_access_changing_using2=yes
 fi
 rm -f conftest*
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
@@ -10822,273 +10921,270 @@ fi
 rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_cpp_access_changing_using2" 1>&6
 if test "$ac_cv_cpp_access_changing_using2" = yes ; then
    cat >> confdefs.h <<\EOF
 #define HAVE_CPP_ACCESS_CHANGING_USING 1
 EOF
 
 fi
 
 echo $ac_n "checking whether the C++ \"using\" keyword resolves ambiguity""... $ac_c" 1>&6
-echo "configure:10835: checking whether the C++ \"using\" keyword resolves ambiguity" >&5
+echo "configure:10934: checking whether the C++ \"using\" keyword resolves ambiguity" >&5
 if eval "test \"`echo '$''{'ac_cv_cpp_ambiguity_resolving_using'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10840 "configure"
+#line 10939 "configure"
 #include "confdefs.h"
 class X { 
                                  public: int go(const X&) {return 3;}
                                          int jo(const X&) {return 3;}
                                };
                                class Y : public X {
                                  public:  int go(int) {return 2;}
                                           int jo(int) {return 2;}
                                           using X::jo;
                                  private: using X::go;
                                };
 int main() {
 X x; Y y; y.jo(x);
 ; return 0; }
 EOF
-if { (eval echo configure:10856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cpp_ambiguity_resolving_using=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_cpp_ambiguity_resolving_using=no
 fi
 rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_cpp_ambiguity_resolving_using" 1>&6
 if test "$ac_cv_cpp_ambiguity_resolving_using" = yes ; then
    cat >> confdefs.h <<\EOF
 #define HAVE_CPP_AMBIGUITY_RESOLVING_USING 1
 EOF
 
 fi
 
 echo $ac_n "checking for \"std::\" namespace""... $ac_c" 1>&6
-echo "configure:10877: checking for \"std::\" namespace" >&5
+echo "configure:10976: checking for \"std::\" namespace" >&5
 if eval "test \"`echo '$''{'ac_cv_cpp_namespace_std'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10882 "configure"
+#line 10981 "configure"
 #include "confdefs.h"
 #include <algorithm>
 int main() {
 return std::min(0, 1);
 ; return 0; }
 EOF
-if { (eval echo configure:10889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cpp_namespace_std=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_cpp_namespace_std=no
 fi
 rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_cpp_namespace_std" 1>&6
 if test "$ac_cv_cpp_namespace_std" = yes ; then
    cat >> confdefs.h <<\EOF
 #define HAVE_CPP_NAMESPACE_STD 1
 EOF
 
 fi
 
 echo $ac_n "checking whether standard template operator!=() is ambiguous""... $ac_c" 1>&6
-echo "configure:10910: checking whether standard template operator!=() is ambiguous" >&5
+echo "configure:11009: checking whether standard template operator!=() is ambiguous" >&5
 if eval "test \"`echo '$''{'ac_cv_cpp_unambiguous_std_notequal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10915 "configure"
+#line 11014 "configure"
 #include "confdefs.h"
 #include <algorithm>
                                 struct T1 {};
                                 int operator==(const T1&, const T1&) { return 0; }
                                 int operator!=(const T1&, const T1&) { return 0; }
 int main() {
 T1 a,b; return a != b;
 ; return 0; }
 EOF
-if { (eval echo configure:10925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cpp_unambiguous_std_notequal=unambiguous
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_cpp_unambiguous_std_notequal=ambiguous
 fi
 rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_cpp_unambiguous_std_notequal" 1>&6
 if test "$ac_cv_cpp_unambiguous_std_notequal" = unambiguous ; then
   cat >> confdefs.h <<\EOF
 #define HAVE_CPP_UNAMBIGUOUS_STD_NOTEQUAL 1
 EOF
 
 fi
 
 
 echo $ac_n "checking for C++ reinterpret_cast""... $ac_c" 1>&6
-echo "configure:10947: checking for C++ reinterpret_cast" >&5
+echo "configure:11046: checking for C++ reinterpret_cast" >&5
 if eval "test \"`echo '$''{'ac_cv_cpp_reinterpret_cast'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10952 "configure"
+#line 11051 "configure"
 #include "confdefs.h"
 struct X { int i; };
                                struct Y { int i; };
 int main() {
 X x; X*const z = &x;Y*y = reinterpret_cast<Y*>(z);
 ; return 0; }
 EOF
-if { (eval echo configure:10960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cpp_reinterpret_cast=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_cpp_reinterpret_cast=no
 fi
 rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_cpp_reinterpret_cast" 1>&6
 if test "$ac_cv_cpp_reinterpret_cast" = yes ; then
    cat >> confdefs.h <<\EOF
 #define HAVE_CPP_NEW_CASTS 1
 EOF
 
 fi
 
 echo $ac_n "checking for C++ dynamic_cast to void*""... $ac_c" 1>&6
-echo "configure:10981: checking for C++ dynamic_cast to void*" >&5
+echo "configure:11080: checking for C++ dynamic_cast to void*" >&5
 if eval "test \"`echo '$''{'ac_cv_cpp_dynamic_cast_void_ptr'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
   ac_cv_cpp_dynamic_cast_void_ptr=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 10989 "configure"
+#line 11088 "configure"
 #include "confdefs.h"
-#ifdef __cplusplus
-extern "C" void exit(int);
-#endif
 class X { int i; public: virtual ~X() { } };
                             class Y { int j; public: virtual ~Y() { } };
                             class Z : public X, public Y { int k; };
 
                             int main() {
                                  Z mdo;
                                  X *subx = (X*)&mdo;
                                  Y *suby = (Y*)&mdo;
                                  return !((((void*)&mdo != (void*)subx) &&
                                            ((void*)&mdo == dynamic_cast<void*>(subx))) ||
                                           (((void*)&mdo != (void*)suby) &&
                                            ((void*)&mdo == dynamic_cast<void*>(suby))));
                             }
 EOF
-if { (eval echo configure:11008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_cpp_dynamic_cast_void_ptr=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   ac_cv_cpp_dynamic_cast_void_ptr=no
 fi
 rm -fr conftest*
 fi
 
 fi
 
 echo "$ac_t""$ac_cv_cpp_dynamic_cast_void_ptr" 1>&6
 if test "$ac_cv_cpp_dynamic_cast_void_ptr" = yes ; then
    cat >> confdefs.h <<\EOF
 #define HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR 1
 EOF
 
 fi
 
 
 echo $ac_n "checking whether C++ requires implementation of unused virtual methods""... $ac_c" 1>&6
-echo "configure:11032: checking whether C++ requires implementation of unused virtual methods" >&5
+echo "configure:11128: checking whether C++ requires implementation of unused virtual methods" >&5
 if eval "test \"`echo '$''{'ac_cv_cpp_unused_required'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 11037 "configure"
+#line 11133 "configure"
 #include "confdefs.h"
 class X {private: virtual void never_called();};
 int main() {
 X x;
 ; return 0; }
 EOF
-if { (eval echo configure:11044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_cpp_unused_required=no
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_cpp_unused_required=yes
 fi
 rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_cpp_unused_required" 1>&6
 if test "$ac_cv_cpp_unused_required" = yes ; then
    cat >> confdefs.h <<\EOF
 #define NEED_CPP_UNUSED_IMPLEMENTATIONS 1
 EOF
 
 fi
 
 
 
 echo $ac_n "checking for trouble comparing to zero near std::operator!=()""... $ac_c" 1>&6
-echo "configure:11067: checking for trouble comparing to zero near std::operator!=()" >&5
+echo "configure:11163: checking for trouble comparing to zero near std::operator!=()" >&5
 if eval "test \"`echo '$''{'ac_cv_trouble_comparing_to_zero'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 11072 "configure"
+#line 11168 "configure"
 #include "confdefs.h"
 #include <algorithm>
                                 template <class T> class Foo {};
                                 class T2;
                                 template <class T> int operator==(const T2*, const T&) { return 0; }
                                 template <class T> int operator!=(const T2*, const T&) { return 0; }
 int main() {
 Foo<int> f; return (0 != f);
 ; return 0; }
 EOF
-if { (eval echo configure:11083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_trouble_comparing_to_zero=no
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_trouble_comparing_to_zero=yes
 fi
 rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_trouble_comparing_to_zero" 1>&6
@@ -11102,37 +11198,37 @@ fi
 
 
 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
 
 
 
 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:11115: checking for LC_MESSAGES" >&5
+echo "configure:11211: checking for LC_MESSAGES" >&5
 if eval "test \"`echo '$''{'ac_cv_i18n_lc_messages'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 11120 "configure"
+#line 11216 "configure"
 #include "confdefs.h"
 #include <locale.h>
 int main() {
 int category = LC_MESSAGES;
 ; return 0; }
 EOF
-if { (eval echo configure:11127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_i18n_lc_messages=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_i18n_lc_messages=no
 fi
 rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_i18n_lc_messages" 1>&6
@@ -11195,25 +11291,25 @@ fi
 	fi
 	if test -n "$nspr_config_prefix"; then
 		nspr_config_args="$nspr_config_args --prefix=$nspr_config_prefix"
 		if test -z "$NSPR_CONFIG"; then
 			NSPR_CONFIG=$nspr_config_prefix/bin/nspr-config
 		fi
 	fi
 
 	unset ac_cv_path_NSPR_CONFIG
 	# Extract the first word of "nspr-config", so it can be a program name with args.
 set dummy nspr-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:11208: checking for $ac_word" >&5
+echo "configure:11304: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_NSPR_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$NSPR_CONFIG" in
   /*)
   ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -11230,25 +11326,25 @@ else
   ;;
 esac
 fi
 NSPR_CONFIG="$ac_cv_path_NSPR_CONFIG"
 if test -n "$NSPR_CONFIG"; then
   echo "$ac_t""$NSPR_CONFIG" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
 	min_nspr_version=4.0.0
 	echo $ac_n "checking for NSPR - version >= $min_nspr_version (skipping)""... $ac_c" 1>&6
-echo "configure:11243: checking for NSPR - version >= $min_nspr_version (skipping)" >&5
+echo "configure:11339: checking for NSPR - version >= $min_nspr_version (skipping)" >&5
 
 	no_nspr=""
 	if test "$NSPR_CONFIG" = "no"; then
 		no_nspr="yes"
 	else
 		NSPR_CFLAGS=`$NSPR_CONFIG $nspr_config_args --cflags`
 		NSPR_LIBS=`$NSPR_CONFIG $nspr_config_args --libs`
 
 				nspr_config_major_version=`$NSPR_CONFIG $nspr_config_args --version | \
 			sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
 		nspr_config_minor_version=`$NSPR_CONFIG $nspr_config_args --version | \
 			sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
@@ -11300,44 +11396,44 @@ fi
 
 _SAVE_CFLAGS=$CFLAGS
 _SAVE_LDFLAGS=$LDFLAGS
 _SAVE_LIBS=$LIBS
 if test -n "${JPEG_DIR}" -a "${JPEG_DIR}" != "yes"; then
     CFLAGS="-I${JPEG_DIR}/include $CFLAGS"
     LDFLAGS="-L${JPEG_DIR}/lib $LDFLAGS"
 fi
 if test -z "$JPEG_DIR" -o "$JPEG_DIR" = no; then
     SYSTEM_JPEG=
 else
     echo $ac_n "checking for jpeg_destroy_compress in -ljpeg""... $ac_c" 1>&6
-echo "configure:11313: checking for jpeg_destroy_compress in -ljpeg" >&5
+echo "configure:11409: checking for jpeg_destroy_compress in -ljpeg" >&5
 ac_lib_var=`echo jpeg'_'jpeg_destroy_compress | 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="-ljpeg $JPEG_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 11321 "configure"
+#line 11417 "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 jpeg_destroy_compress();
 
 int main() {
 jpeg_destroy_compress()
 ; return 0; }
 EOF
-if { (eval echo configure:11332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
@@ -11348,39 +11444,39 @@ else
   echo "$ac_t""no" 1>&6
 SYSTEM_JPEG=
 fi
 
 fi
 
 if test "$SYSTEM_JPEG" = 1; then
     LIBS="$JPEG_LIBS $LIBS"
     if test "$cross_compiling" = yes; then
   SYSTEM_JPEG= 
 else
   cat > conftest.$ac_ext <<EOF
-#line 11361 "configure"
+#line 11457 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 	#include <sys/types.h>
 	#include <jpeglib.h>
 	int main () {
 	    #if JPEG_LIB_VERSION >= $MOZJPEG
 		exit(0);
 	    #else
 		exit(1);
 	    #endif
 	}
 	
 EOF
-if { (eval echo configure:11375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   SYSTEM_JPEG=1
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   SYSTEM_JPEG= JPEG_CFLAGS= JPEG_LIBS=
 fi
 rm -fr conftest*
 fi
  
     rm -f core
@@ -11403,44 +11499,44 @@ fi
 
 _SAVE_CFLAGS=$CFLAGS
 _SAVE_LDFLAGS=$LDFLAGS
 _SAVE_LIBS=$LIBS
 if test -n "${ZLIB_DIR}" -a "${ZLIB_DIR}" != "yes"; then
     CFLAGS="-I${ZLIB_DIR}/include $CFLAGS"
     LDFLAGS="-L${ZLIB_DIR}/lib $LDFLAGS"
 fi
 if test -z "$ZLIB_DIR" -o "$ZLIB_DIR" = no; then
     SYSTEM_ZLIB=
 else
     echo $ac_n "checking for gzread in -lz""... $ac_c" 1>&6
-echo "configure:11416: checking for gzread in -lz" >&5
+echo "configure:11512: checking for gzread in -lz" >&5
 ac_lib_var=`echo z'_'gzread | 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="-lz $ZLIB_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 11424 "configure"
+#line 11520 "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 gzread();
 
 int main() {
 gzread()
 ; return 0; }
 EOF
-if { (eval echo configure:11435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
@@ -11450,46 +11546,46 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l
 else
   echo "$ac_t""no" 1>&6
 SYSTEM_ZLIB= ZLIB_CFLAGS= ZLIB_LIBS=
 fi
 
 fi
 if test "$SYSTEM_ZLIB" = 1; then
     LIBS="$ZLIB_LIBS $LIBS"
     if test "$cross_compiling" = yes; then
   SYSTEM_ZLIB= 
 else
   cat > conftest.$ac_ext <<EOF
-#line 11463 "configure"
+#line 11559 "configure"
 #include "confdefs.h"
 
     #include <stdio.h>
     #include <string.h>
     #include <zlib.h>
     int parse_version(const char *str, int *ver) {
       return (sscanf(str, "%d.%d.%d", ver, ver+1, ver+2)==3?0:1);
     }
     int main() {
       int sys[3], req[3];
       if (parse_version(zlib_version, sys) || parse_version("$MOZZLIB", req))
         exit(1);
       if ((sys[0] == req[0]) &&
           ((sys[1] > req[1]) || ((sys[1] == req[1]) && (sys[2] >= req[2]))))
         exit(0);
       else
         exit(1);
     }
     
 EOF
-if { (eval echo configure:11484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   SYSTEM_ZLIB=1
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   SYSTEM_ZLIB= ZLIB_CFLAGS= ZLIB_LIBS=
 fi
 rm -fr conftest*
 fi
  
     rm -f core
@@ -11514,44 +11610,44 @@ _SAVE_CFLAGS=$CFLAGS
 _SAVE_LDFLAGS=$LDFLAGS
 _SAVE_LIBS=$LIBS
 CFLAGS="$ZLIB_CFLAGS $CFLAGS"
 LDFLAGS="$ZLIB_LIBS -lz $LDFLAGS"
 if test -n "${PNG_DIR}" -a "${PNG_DIR}" != "yes"; then
     CFLAGS="-I${PNG_DIR}/include $CFLAGS"
     LDFLAGS="-L${PNG_DIR}/lib $LDFLAGS"
 fi
 if test -z "$PNG_DIR" -o "$PNG_DIR" = no; then
     SYSTEM_PNG=
 else
     echo $ac_n "checking for png_get_valid in -lpng""... $ac_c" 1>&6
-echo "configure:11527: checking for png_get_valid in -lpng" >&5
+echo "configure:11623: checking for png_get_valid in -lpng" >&5
 ac_lib_var=`echo png'_'png_get_valid | 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="-lpng $PNG_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 11535 "configure"
+#line 11631 "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 png_get_valid();
 
 int main() {
 png_get_valid()
 ; return 0; }
 EOF
-if { (eval echo configure:11546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
@@ -11561,39 +11657,39 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l
 else
   echo "$ac_t""no" 1>&6
 SYSTEM_PNG=
 fi
 
 fi
 if test "$SYSTEM_PNG" = 1; then
     LIBS="$PNG_LIBS $LIBS"
     if test "$cross_compiling" = yes; then
   SYSTEM_PNG= 
 else
   cat > conftest.$ac_ext <<EOF
-#line 11574 "configure"
+#line 11670 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 	#include <sys/types.h>
 	#include <png.h>
 	int main () {
 	    #if PNG_LIBPNG_VER >= $MOZPNG
 		exit(0);
 	    #else
 		exit(1);
 	    #endif
 	}
 	
 EOF
-if { (eval echo configure:11588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   SYSTEM_PNG=1
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   SYSTEM_PNG= PNG_CFLAGS= PNG_LIBS=
 fi
 rm -fr conftest*
 fi
  
     rm -f core
@@ -11844,25 +11940,25 @@ fi
   if test x$gtk_config_prefix != x ; then
      gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
      if test x${GTK_CONFIG+set} != xset ; then
         GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
      fi
   fi
 
     unset ac_cv_path_GTK_CONFIG
 
   # Extract the first word of "gtk-config", so it can be a program name with args.
 set dummy gtk-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:11857: checking for $ac_word" >&5
+echo "configure:11953: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$GTK_CONFIG" in
   /*)
   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -11879,48 +11975,48 @@ else
   ;;
 esac
 fi
 GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
 if test -n "$GTK_CONFIG"; then
   echo "$ac_t""$GTK_CONFIG" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
   min_gtk_version=$GTK_VERSION
   echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
-echo "configure:11892: checking for GTK - version >= $min_gtk_version" >&5
+echo "configure:11988: checking for GTK - version >= $min_gtk_version" >&5
   no_gtk=""
   if test "$GTK_CONFIG" = "no" ; then
     no_gtk=yes
   else
     GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
     GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
     gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
     gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
     gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
     if test "x$enable_gtktest" = "xyes" ; then
       ac_save_CFLAGS="$CFLAGS"
       ac_save_LIBS="$LIBS"
       CFLAGS="$CFLAGS $GTK_CFLAGS"
       LIBS="$LIBS $GTK_LIBS"
       rm -f conf.gtktest
       if test "$cross_compiling" = yes; then
   echo $ac_n "cross compiling; assumed OK... $ac_c"
 else
   cat > conftest.$ac_ext <<EOF
-#line 11915 "configure"
+#line 12011 "configure"
 #include "confdefs.h"
 
 #include <gtk/gtk.h>
 #include <stdio.h>
 #include <stdlib.h>
 
 int 
 main ()
 {
   int major, minor, micro;
   char *tmp_version;
 
@@ -11980,25 +12076,25 @@ main ()
         printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
         printf("*** being found. The easiest way to fix this is to remove the old version\n");
         printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
         printf("*** correct copy of gtk-config. (In this case, you will have to\n");
         printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n");
         printf("*** so that the correct libraries are found at run-time))\n");
       }
     }
   return 1;
 }
 
 EOF
-if { (eval echo configure:11993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   no_gtk=yes
 fi
 rm -fr conftest*
 fi
 
        CFLAGS="$ac_save_CFLAGS"
@@ -12015,35 +12111,35 @@ fi
        echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
        echo "*** your path, or set the GTK_CONFIG environment variable to the"
        echo "*** full path to gtk-config."
        echo "*** GTK+ is available from ftp://ftp.gtk.org/pub/gtk"
      else
        if test -f conf.gtktest ; then
         :
        else
           echo "*** Could not run GTK test program, checking why..."
           CFLAGS="$CFLAGS $GTK_CFLAGS"
           LIBS="$LIBS $GTK_LIBS"
           cat > conftest.$ac_ext <<EOF
-#line 12028 "configure"
+#line 12124 "configure"
 #include "confdefs.h"
 
 #include <gtk/gtk.h>
 #include <stdio.h>
 
 int main() {
  return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); 
 ; return 0; }
 EOF
-if { (eval echo configure:12038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
    echo "*** The test program compiled, but did not run. This usually means"
           echo "*** that the run-time linker is not finding GTK or finding the wrong"
           echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
           echo "*** is required on your system"
 	  echo "***"
           echo "*** If you have an old version installed, it is best to remove it, although"
           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
           echo "***"
           echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
@@ -12077,25 +12173,25 @@ rm -f conftest*
     MOZ_GTK_CFLAGS=$GTK_CFLAGS
 fi
 
 if test "$MOZ_ENABLE_GTK2"
 then
     
   succeeded=no
 
   if test -z "$PKG_CONFIG"; then
     # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:12090: checking for $ac_word" >&5
+echo "configure:12186: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$PKG_CONFIG" in
   /*)
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -12121,37 +12217,37 @@ fi
 
   fi
 
   if test "$PKG_CONFIG" = "no" ; then
      echo "*** The pkg-config script could not be found. Make sure it is"
      echo "*** in your path, or set the PKG_CONFIG environment variable"
      echo "*** to the full path to pkg-config."
      echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
   else
      PKG_CONFIG_MIN_VERSION=0.9.0
      if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
         echo $ac_n "checking for gtk+-2.0 >= 1.3.7""... $ac_c" 1>&6
-echo "configure:12134: checking for gtk+-2.0 >= 1.3.7" >&5
+echo "configure:12230: checking for gtk+-2.0 >= 1.3.7" >&5
 
         if $PKG_CONFIG --exists "gtk+-2.0 >= 1.3.7" ; then
             echo "$ac_t""yes" 1>&6
             succeeded=yes
 
             echo $ac_n "checking MOZ_GTK2_CFLAGS""... $ac_c" 1>&6
-echo "configure:12141: checking MOZ_GTK2_CFLAGS" >&5
+echo "configure:12237: checking MOZ_GTK2_CFLAGS" >&5
             MOZ_GTK2_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 1.3.7"`
             echo "$ac_t""$MOZ_GTK2_CFLAGS" 1>&6
 
             echo $ac_n "checking MOZ_GTK2_LIBS""... $ac_c" 1>&6
-echo "configure:12146: checking MOZ_GTK2_LIBS" >&5
+echo "configure:12242: checking MOZ_GTK2_LIBS" >&5
             ## don't use --libs since that can do evil things like add
             ## -Wl,--export-dynamic
             MOZ_GTK2_LIBS="`$PKG_CONFIG --libs-only-L \"gtk+-2.0 >= 1.3.7\"` `$PKG_CONFIG --libs-only-l \"gtk+-2.0 >= 1.3.7\"`"
             echo "$ac_t""$MOZ_GTK2_LIBS" 1>&6
         else
             MOZ_GTK2_CFLAGS=""
             MOZ_GTK2_LIBS=""
             ## If we have a custom action on failure, don't print errors, but 
             ## do set a variable so people can do so.
             MOZ_GTK2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 1.3.7"`
             echo $MOZ_GTK2_PKG_ERRORS
         fi
@@ -12198,25 +12294,25 @@ fi
     if test ! -d "$QTDIR$QTINCDIR"; then
        QTINCDIR="/include"
     fi
 
     if test -x "$QTDIR/bin/moc"; then
       HOST_MOC="$QTDIR/bin/moc"
     else
       for ac_prog in moc
 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:12211: checking for $ac_word" >&5
+echo "configure:12307: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_HOST_MOC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$HOST_MOC"; then
   ac_cv_prog_HOST_MOC="$HOST_MOC" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_HOST_MOC="$ac_prog"
@@ -12250,74 +12346,74 @@ test -n "$HOST_MOC" || HOST_MOC=""""
     _SAVE_LDFLAGS=$LDFLAGS
     QT_LDFLAGS=-L${QTDIR}/lib
     LDFLAGS="$LDFLAGS $QT_LDFLAGS"
     
     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
 
     echo $ac_n "checking for main in -lqt""... $ac_c" 1>&6
-echo "configure:12263: checking for main in -lqt" >&5
+echo "configure:12359: checking for main in -lqt" >&5
 ac_lib_var=`echo qt'_'main | 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="-lqt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 12271 "configure"
+#line 12367 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:12278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   QT_LIB=-lqt
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for main in -lqt-mt""... $ac_c" 1>&6
-echo "configure:12297: checking for main in -lqt-mt" >&5
+echo "configure:12393: checking for main in -lqt-mt" >&5
 ac_lib_var=`echo qt-mt'_'main | 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="-lqt-mt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 12305 "configure"
+#line 12401 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:12312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
@@ -12335,38 +12431,38 @@ fi
     QT_LIBS="-L/usr/X11R6/lib $QT_LDFLAGS $QT_LIB -lXext -lX11"
 
     MOZ_QT_LDFLAGS=$QT_LIBS
     MOZ_QT_CFLAGS=$QT_CFLAGS
 
     _SAVE_CXXFLAGS=$CXXFLAGS
     _SAVE_LIBS=$LIBS
 
     CXXFLAGS="$CXXFLAGS $QT_CFLAGS"
     LIBS="$LIBS $QT_LIBS"
     
     echo $ac_n "checking Qt - version >= $QT_VERSION""... $ac_c" 1>&6
-echo "configure:12348: checking Qt - version >= $QT_VERSION" >&5
+echo "configure:12444: checking Qt - version >= $QT_VERSION" >&5
     cat > conftest.$ac_ext <<EOF
-#line 12350 "configure"
+#line 12446 "configure"
 #include "confdefs.h"
 #include <qglobal.h>
 int main() {
 
         #if (QT_VERSION < $QT_VERSION_NUM)
             #error  "QT_VERSION too old"
         #endif
     
 ; return 0; }
 EOF
-if { (eval echo configure:12361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:12457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   result="yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   result="no"
 fi
 rm -f conftest*
 
     echo "$ac_t"""$result"" 1>&6
     if test "$result" = "no"; then
@@ -12432,24 +12528,25 @@ ACCESSIBILITY=1
 BUILD_MODULES=all
 BUILD_SHARED_LIBS=1
 BUILD_STATIC_LIBS=
 ENABLE_TESTS=1
 MOZ_ACTIVEX_SCRIPTING_SUPPORT=
 MOZ_BRANDING_DIRECTORY=
 MOZ_CALENDAR=
 MOZ_DBGRINFO_MODULES=
 MOZ_ENABLE_LIBXUL=
 MOZ_EXTENSIONS_ALL=" cookie wallet content-packs xml-rpc xmlextras help p3p pref transformiix venkman inspector irc universalchardet typeaheadfind webservices spellcheck gnomevfs auth sroaming xmlterm datetime finger cview layout-debug tasks sql xforms permissions schema-validation reporter"
 MOZ_IMG_DECODERS_DEFAULT="png gif jpeg bmp xbm"
 MOZ_IPCD=
+MOZ_JAVAXPCOM=
 MOZ_JSDEBUGGER=1
 MOZ_JSLOADER=1
 MOZ_LIBART_CFLAGS=
 MOZ_LIBART_LIBS=
 MOZ_MAIL_NEWS=
 MOZ_MATHML=1
 MOZ_NO_ACTIVEX_SUPPORT=1
 MOZ_NO_XPCOM_OBSOLETE=
 MOZ_OJI=1
 MOZ_PLAINTEXT_EDITOR_ONLY=
 MOZ_PLUGINS=1
 MOZ_PROFILELOCKING=1
@@ -12619,24 +12716,25 @@ calendar)
 #define MOZ_SUNBIRD 1
 EOF
 
   ;;
 
 xulrunner)
   MOZ_APP_NAME=xulrunner
   MOZ_APP_DISPLAYNAME=Mozilla
   MOZ_XUL_APP=1
   MOZ_XULRUNNER=1
   MOZ_ENABLE_LIBXUL=1
   MOZ_APP_VERSION=$MOZILLA_VERSION
+  MOZ_JAVAXPCOM=1
   MOZ_EXTENSIONS_DEFAULT=" xml-rpc xmlextras pref transformiix universalchardet webservices gnomevfs auth"
   cat >> confdefs.h <<\EOF
 #define MOZ_XULRUNNER 1
 EOF
 
   ;;
 
 macbrowser) 
   MOZ_APP_NAME=mozilla
   MOZ_APP_DISPLAYNAME=Mozilla
   MOZ_APP_VERSION=$MOZILLA_VERSION
   MOZ_EXTENSIONS_DEFAULT=" cookie xmlextras universalchardet typeaheadfind transformiix permissions"
@@ -12862,25 +12960,25 @@ if test "$MOZ_ENABLE_XFT"
 then
     cat >> confdefs.h <<\EOF
 #define MOZ_ENABLE_XFT 1
 EOF
 
     
   succeeded=no
 
   if test -z "$PKG_CONFIG"; then
     # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:12875: checking for $ac_word" >&5
+echo "configure:12973: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$PKG_CONFIG" in
   /*)
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -12906,37 +13004,37 @@ fi
 
   fi
 
   if test "$PKG_CONFIG" = "no" ; then
      echo "*** The pkg-config script could not be found. Make sure it is"
      echo "*** in your path, or set the PKG_CONFIG environment variable"
      echo "*** to the full path to pkg-config."
      echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
   else
      PKG_CONFIG_MIN_VERSION=0.9.0
      if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
         echo $ac_n "checking for xft""... $ac_c" 1>&6
-echo "configure:12919: checking for xft" >&5
+echo "configure:13017: checking for xft" >&5
 
         if $PKG_CONFIG --exists "xft" ; then
             echo "$ac_t""yes" 1>&6
             succeeded=yes
 
             echo $ac_n "checking MOZ_XFT_CFLAGS""... $ac_c" 1>&6
-echo "configure:12926: checking MOZ_XFT_CFLAGS" >&5
+echo "configure:13024: checking MOZ_XFT_CFLAGS" >&5
             MOZ_XFT_CFLAGS=`$PKG_CONFIG --cflags "xft"`
             echo "$ac_t""$MOZ_XFT_CFLAGS" 1>&6
 
             echo $ac_n "checking MOZ_XFT_LIBS""... $ac_c" 1>&6
-echo "configure:12931: checking MOZ_XFT_LIBS" >&5
+echo "configure:13029: checking MOZ_XFT_LIBS" >&5
             ## don't use --libs since that can do evil things like add
             ## -Wl,--export-dynamic
             MOZ_XFT_LIBS="`$PKG_CONFIG --libs-only-L \"xft\"` `$PKG_CONFIG --libs-only-l \"xft\"`"
             echo "$ac_t""$MOZ_XFT_LIBS" 1>&6
         else
             MOZ_XFT_CFLAGS=""
             MOZ_XFT_LIBS=""
             ## If we have a custom action on failure, don't print errors, but 
             ## do set a variable so people can do so.
             MOZ_XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft"`
             echo $MOZ_XFT_PKG_ERRORS
         fi
@@ -12953,25 +13051,25 @@ echo "configure:12931: checking MOZ_XFT_
      :
   else
      { echo "configure: error: Library requirements (xft) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; exit 1; }
   fi
 
     
   succeeded=no
 
   if test -z "$PKG_CONFIG"; then
     # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:12966: checking for $ac_word" >&5
+echo "configure:13064: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$PKG_CONFIG" in
   /*)
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -12997,37 +13095,37 @@ fi
 
   fi
 
   if test "$PKG_CONFIG" = "no" ; then
      echo "*** The pkg-config script could not be found. Make sure it is"
      echo "*** in your path, or set the PKG_CONFIG environment variable"
      echo "*** to the full path to pkg-config."
      echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
   else
      PKG_CONFIG_MIN_VERSION=0.9.0
      if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
         echo $ac_n "checking for pango >= 1.1.0""... $ac_c" 1>&6
-echo "configure:13010: checking for pango >= 1.1.0" >&5
+echo "configure:13108: checking for pango >= 1.1.0" >&5
 
         if $PKG_CONFIG --exists "pango >= 1.1.0" ; then
             echo "$ac_t""yes" 1>&6
             succeeded=yes
 
             echo $ac_n "checking _PANGOCHK_CFLAGS""... $ac_c" 1>&6
-echo "configure:13017: checking _PANGOCHK_CFLAGS" >&5
+echo "configure:13115: checking _PANGOCHK_CFLAGS" >&5
             _PANGOCHK_CFLAGS=`$PKG_CONFIG --cflags "pango >= 1.1.0"`
             echo "$ac_t""$_PANGOCHK_CFLAGS" 1>&6
 
             echo $ac_n "checking _PANGOCHK_LIBS""... $ac_c" 1>&6
-echo "configure:13022: checking _PANGOCHK_LIBS" >&5
+echo "configure:13120: checking _PANGOCHK_LIBS" >&5
             ## don't use --libs since that can do evil things like add
             ## -Wl,--export-dynamic
             _PANGOCHK_LIBS="`$PKG_CONFIG --libs-only-L \"pango >= 1.1.0\"` `$PKG_CONFIG --libs-only-l \"pango >= 1.1.0\"`"
             echo "$ac_t""$_PANGOCHK_LIBS" 1>&6
         else
             _PANGOCHK_CFLAGS=""
             _PANGOCHK_LIBS=""
             ## If we have a custom action on failure, don't print errors, but 
             ## do set a variable so people can do so.
             _PANGOCHK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pango >= 1.1.0"`
             echo $_PANGOCHK_PKG_ERRORS
         fi
@@ -13069,25 +13167,25 @@ if test "$MOZ_ENABLE_PANGO"
 then
     cat >> confdefs.h <<\EOF
 #define MOZ_ENABLE_PANGO 1
 EOF
 
     
   succeeded=no
 
   if test -z "$PKG_CONFIG"; then
     # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:13082: checking for $ac_word" >&5
+echo "configure:13180: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$PKG_CONFIG" in
   /*)
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -13113,37 +13211,37 @@ fi
 
   fi
 
   if test "$PKG_CONFIG" = "no" ; then
      echo "*** The pkg-config script could not be found. Make sure it is"
      echo "*** in your path, or set the PKG_CONFIG environment variable"
      echo "*** to the full path to pkg-config."
      echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
   else
      PKG_CONFIG_MIN_VERSION=0.9.0
      if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
         echo $ac_n "checking for pango >= 1.6.0 pangoft2 >= 1.6.0""... $ac_c" 1>&6
-echo "configure:13126: checking for pango >= 1.6.0 pangoft2 >= 1.6.0" >&5
+echo "configure:13224: checking for pango >= 1.6.0 pangoft2 >= 1.6.0" >&5
 
         if $PKG_CONFIG --exists "pango >= 1.6.0 pangoft2 >= 1.6.0" ; then
             echo "$ac_t""yes" 1>&6
             succeeded=yes
 
             echo $ac_n "checking MOZ_PANGO_CFLAGS""... $ac_c" 1>&6
-echo "configure:13133: checking MOZ_PANGO_CFLAGS" >&5
+echo "configure:13231: checking MOZ_PANGO_CFLAGS" >&5
             MOZ_PANGO_CFLAGS=`$PKG_CONFIG --cflags "pango >= 1.6.0 pangoft2 >= 1.6.0"`
             echo "$ac_t""$MOZ_PANGO_CFLAGS" 1>&6
 
             echo $ac_n "checking MOZ_PANGO_LIBS""... $ac_c" 1>&6
-echo "configure:13138: checking MOZ_PANGO_LIBS" >&5
+echo "configure:13236: checking MOZ_PANGO_LIBS" >&5
             ## don't use --libs since that can do evil things like add
             ## -Wl,--export-dynamic
             MOZ_PANGO_LIBS="`$PKG_CONFIG --libs-only-L \"pango >= 1.6.0 pangoft2 >= 1.6.0\"` `$PKG_CONFIG --libs-only-l \"pango >= 1.6.0 pangoft2 >= 1.6.0\"`"
             echo "$ac_t""$MOZ_PANGO_LIBS" 1>&6
         else
             MOZ_PANGO_CFLAGS=""
             MOZ_PANGO_LIBS=""
             ## If we have a custom action on failure, don't print errors, but 
             ## do set a variable so people can do so.
             MOZ_PANGO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pango >= 1.6.0 pangoft2 >= 1.6.0"`
             echo $MOZ_PANGO_PKG_ERRORS
         fi
@@ -13193,44 +13291,44 @@ if test "${enable_postscript+set}" = set
     MOZ_ENABLE_POSTSCRIPT=1 
   else
     { echo "configure: error: Option, postscript, does not take an argument ($enableval)." 1>&2; exit 1; }
   fi
 fi
 
 
 if test "$MOZ_X11"
 then
     _SAVE_LDFLAGS="$LDFLAGS"
     LDFLAGS="$XLDFLAGS $LDFLAGS"
     echo $ac_n "checking for XpGetPrinterList in -lXp""... $ac_c" 1>&6
-echo "configure:13206: checking for XpGetPrinterList in -lXp" >&5
+echo "configure:13304: checking for XpGetPrinterList in -lXp" >&5
 ac_lib_var=`echo Xp'_'XpGetPrinterList | 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="-lXp $XEXT_LIBS $XLIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 13214 "configure"
+#line 13312 "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 XpGetPrinterList();
 
 int main() {
 XpGetPrinterList()
 ; return 0; }
 EOF
-if { (eval echo configure:13225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
@@ -13285,25 +13383,25 @@ if test "${enable_gnomevfs+set}" = set; 
 fi
 
 
     if test "$MOZ_ENABLE_GNOMEVFS"
     then
         
   succeeded=no
 
   if test -z "$PKG_CONFIG"; then
     # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:13298: checking for $ac_word" >&5
+echo "configure:13396: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$PKG_CONFIG" in
   /*)
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -13329,37 +13427,37 @@ fi
 
   fi
 
   if test "$PKG_CONFIG" = "no" ; then
      echo "*** The pkg-config script could not be found. Make sure it is"
      echo "*** in your path, or set the PKG_CONFIG environment variable"
      echo "*** to the full path to pkg-config."
      echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
   else
      PKG_CONFIG_MIN_VERSION=0.9.0
      if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
         echo $ac_n "checking for gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION""... $ac_c" 1>&6
-echo "configure:13342: checking for gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION" >&5
+echo "configure:13440: checking for gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION" >&5
 
         if $PKG_CONFIG --exists "gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION" ; then
             echo "$ac_t""yes" 1>&6
             succeeded=yes
 
             echo $ac_n "checking MOZ_GNOMEVFS_CFLAGS""... $ac_c" 1>&6
-echo "configure:13349: checking MOZ_GNOMEVFS_CFLAGS" >&5
+echo "configure:13447: checking MOZ_GNOMEVFS_CFLAGS" >&5
             MOZ_GNOMEVFS_CFLAGS=`$PKG_CONFIG --cflags "gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION"`
             echo "$ac_t""$MOZ_GNOMEVFS_CFLAGS" 1>&6
 
             echo $ac_n "checking MOZ_GNOMEVFS_LIBS""... $ac_c" 1>&6
-echo "configure:13354: checking MOZ_GNOMEVFS_LIBS" >&5
+echo "configure:13452: checking MOZ_GNOMEVFS_LIBS" >&5
             ## don't use --libs since that can do evil things like add
             ## -Wl,--export-dynamic
             MOZ_GNOMEVFS_LIBS="`$PKG_CONFIG --libs-only-L \"gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION\"` `$PKG_CONFIG --libs-only-l \"gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION\"`"
             echo "$ac_t""$MOZ_GNOMEVFS_LIBS" 1>&6
         else
             MOZ_GNOMEVFS_CFLAGS=""
             MOZ_GNOMEVFS_LIBS=""
             ## If we have a custom action on failure, don't print errors, but 
             ## do set a variable so people can do so.
             MOZ_GNOMEVFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION"`
             
         fi
@@ -13391,25 +13489,25 @@ echo "configure:13354: checking MOZ_GNOM
     
     
 
     if test "$MOZ_ENABLE_GCONF"
     then
         
   succeeded=no
 
   if test -z "$PKG_CONFIG"; then
     # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:13404: checking for $ac_word" >&5
+echo "configure:13502: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$PKG_CONFIG" in
   /*)
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -13435,37 +13533,37 @@ fi
 
   fi
 
   if test "$PKG_CONFIG" = "no" ; then
      echo "*** The pkg-config script could not be found. Make sure it is"
      echo "*** in your path, or set the PKG_CONFIG environment variable"
      echo "*** to the full path to pkg-config."
      echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
   else
      PKG_CONFIG_MIN_VERSION=0.9.0
      if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
         echo $ac_n "checking for gconf-2.0 >= $GCONF_VERSION""... $ac_c" 1>&6
-echo "configure:13448: checking for gconf-2.0 >= $GCONF_VERSION" >&5
+echo "configure:13546: checking for gconf-2.0 >= $GCONF_VERSION" >&5
 
         if $PKG_CONFIG --exists "gconf-2.0 >= $GCONF_VERSION" ; then
             echo "$ac_t""yes" 1>&6
             succeeded=yes
 
             echo $ac_n "checking MOZ_GCONF_CFLAGS""... $ac_c" 1>&6
-echo "configure:13455: checking MOZ_GCONF_CFLAGS" >&5
+echo "configure:13553: checking MOZ_GCONF_CFLAGS" >&5
             MOZ_GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= $GCONF_VERSION"`
             echo "$ac_t""$MOZ_GCONF_CFLAGS" 1>&6
 
             echo $ac_n "checking MOZ_GCONF_LIBS""... $ac_c" 1>&6
-echo "configure:13460: checking MOZ_GCONF_LIBS" >&5
+echo "configure:13558: checking MOZ_GCONF_LIBS" >&5
             ## don't use --libs since that can do evil things like add
             ## -Wl,--export-dynamic
             MOZ_GCONF_LIBS="`$PKG_CONFIG --libs-only-L \"gconf-2.0 >= $GCONF_VERSION\"` `$PKG_CONFIG --libs-only-l \"gconf-2.0 >= $GCONF_VERSION\"`"
             echo "$ac_t""$MOZ_GCONF_LIBS" 1>&6
         else
             MOZ_GCONF_CFLAGS=""
             MOZ_GCONF_LIBS=""
             ## If we have a custom action on failure, don't print errors, but 
             ## do set a variable so people can do so.
             MOZ_GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= $GCONF_VERSION"`
             
         fi
@@ -13493,25 +13591,25 @@ echo "configure:13460: checking MOZ_GCON
     
     
 
     if test "$MOZ_ENABLE_LIBGNOME"
     then
         
   succeeded=no
 
   if test -z "$PKG_CONFIG"; then
     # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:13506: checking for $ac_word" >&5
+echo "configure:13604: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$PKG_CONFIG" in
   /*)
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -13537,37 +13635,37 @@ fi
 
   fi
 
   if test "$PKG_CONFIG" = "no" ; then
      echo "*** The pkg-config script could not be found. Make sure it is"
      echo "*** in your path, or set the PKG_CONFIG environment variable"
      echo "*** to the full path to pkg-config."
      echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
   else
      PKG_CONFIG_MIN_VERSION=0.9.0
      if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
         echo $ac_n "checking for libgnome-2.0 >= $LIBGNOME_VERSION""... $ac_c" 1>&6
-echo "configure:13550: checking for libgnome-2.0 >= $LIBGNOME_VERSION" >&5
+echo "configure:13648: checking for libgnome-2.0 >= $LIBGNOME_VERSION" >&5
 
         if $PKG_CONFIG --exists "libgnome-2.0 >= $LIBGNOME_VERSION" ; then
             echo "$ac_t""yes" 1>&6
             succeeded=yes
 
             echo $ac_n "checking MOZ_LIBGNOME_CFLAGS""... $ac_c" 1>&6
-echo "configure:13557: checking MOZ_LIBGNOME_CFLAGS" >&5
+echo "configure:13655: checking MOZ_LIBGNOME_CFLAGS" >&5
             MOZ_LIBGNOME_CFLAGS=`$PKG_CONFIG --cflags "libgnome-2.0 >= $LIBGNOME_VERSION"`
             echo "$ac_t""$MOZ_LIBGNOME_CFLAGS" 1>&6
 
             echo $ac_n "checking MOZ_LIBGNOME_LIBS""... $ac_c" 1>&6
-echo "configure:13562: checking MOZ_LIBGNOME_LIBS" >&5
+echo "configure:13660: checking MOZ_LIBGNOME_LIBS" >&5
             ## don't use --libs since that can do evil things like add
             ## -Wl,--export-dynamic
             MOZ_LIBGNOME_LIBS="`$PKG_CONFIG --libs-only-L \"libgnome-2.0 >= $LIBGNOME_VERSION\"` `$PKG_CONFIG --libs-only-l \"libgnome-2.0 >= $LIBGNOME_VERSION\"`"
             echo "$ac_t""$MOZ_LIBGNOME_LIBS" 1>&6
         else
             MOZ_LIBGNOME_CFLAGS=""
             MOZ_LIBGNOME_LIBS=""
             ## If we have a custom action on failure, don't print errors, but 
             ## do set a variable so people can do so.
             MOZ_LIBGNOME_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libgnome-2.0 >= $LIBGNOME_VERSION"`
             
         fi
@@ -13626,25 +13724,25 @@ if test "${enable_gnomeui+set}" = set; t
 fi
 
 
     if test "$MOZ_ENABLE_GNOMEUI"
     then
         
   succeeded=no
 
   if test -z "$PKG_CONFIG"; then
     # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:13639: checking for $ac_word" >&5
+echo "configure:13737: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$PKG_CONFIG" in
   /*)
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -13670,37 +13768,37 @@ fi
 
   fi
 
   if test "$PKG_CONFIG" = "no" ; then
      echo "*** The pkg-config script could not be found. Make sure it is"
      echo "*** in your path, or set the PKG_CONFIG environment variable"
      echo "*** to the full path to pkg-config."
      echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
   else
      PKG_CONFIG_MIN_VERSION=0.9.0
      if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
         echo $ac_n "checking for libgnomeui-2.0 >= $GNOMEUI_VERSION""... $ac_c" 1>&6
-echo "configure:13683: checking for libgnomeui-2.0 >= $GNOMEUI_VERSION" >&5
+echo "configure:13781: checking for libgnomeui-2.0 >= $GNOMEUI_VERSION" >&5
 
         if $PKG_CONFIG --exists "libgnomeui-2.0 >= $GNOMEUI_VERSION" ; then
             echo "$ac_t""yes" 1>&6
             succeeded=yes
 
             echo $ac_n "checking MOZ_GNOMEUI_CFLAGS""... $ac_c" 1>&6
-echo "configure:13690: checking MOZ_GNOMEUI_CFLAGS" >&5
+echo "configure:13788: checking MOZ_GNOMEUI_CFLAGS" >&5
             MOZ_GNOMEUI_CFLAGS=`$PKG_CONFIG --cflags "libgnomeui-2.0 >= $GNOMEUI_VERSION"`
             echo "$ac_t""$MOZ_GNOMEUI_CFLAGS" 1>&6
 
             echo $ac_n "checking MOZ_GNOMEUI_LIBS""... $ac_c" 1>&6
-echo "configure:13695: checking MOZ_GNOMEUI_LIBS" >&5
+echo "configure:13793: checking MOZ_GNOMEUI_LIBS" >&5
             ## don't use --libs since that can do evil things like add
             ## -Wl,--export-dynamic
             MOZ_GNOMEUI_LIBS="`$PKG_CONFIG --libs-only-L \"libgnomeui-2.0 >= $GNOMEUI_VERSION\"` `$PKG_CONFIG --libs-only-l \"libgnomeui-2.0 >= $GNOMEUI_VERSION\"`"
             echo "$ac_t""$MOZ_GNOMEUI_LIBS" 1>&6
         else
             MOZ_GNOMEUI_CFLAGS=""
             MOZ_GNOMEUI_LIBS=""
             ## If we have a custom action on failure, don't print errors, but 
             ## do set a variable so people can do so.
             MOZ_GNOMEUI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libgnomeui-2.0 >= $GNOMEUI_VERSION"`
             
         fi
@@ -14053,134 +14151,74 @@ if test "${enable_xtf+set}" = set; then
   else
     { echo "configure: error: Option, xtf, does not take an argument ($enableval)." 1>&2; exit 1; }
   fi
 fi
 
 if test "$MOZ_XTF"; then
   cat >> confdefs.h <<\EOF
 #define MOZ_XTF 1
 EOF
 
 fi
 
-
-# Check whether --enable-extensions or --disable-extensions was given.
-if test "${enable_extensions+set}" = set; then
-  enableval="$enable_extensions"
-   for option in `echo $enableval | sed 's/,/ /g'`; do
-    if test "$option" = "yes" || test "$option" = "all"; then
-        MOZ_EXTENSIONS="$MOZ_EXTENSIONS $MOZ_EXTENSIONS_ALL"
-    elif test "$option" = "no" || test "$option" = "none"; then
-        MOZ_EXTENSIONS=""
-    elif test "$option" = "default"; then
-        MOZ_EXTENSIONS="$MOZ_EXTENSIONS $MOZ_EXTENSIONS_DEFAULT"
-    elif test `echo "$option" | grep -c \^-` != 0; then
-        option=`echo $option | sed 's/^-//'`
-        MOZ_EXTENSIONS=`echo "$MOZ_EXTENSIONS" | sed "s/ ${option}//"`
-    else
-        MOZ_EXTENSIONS="$MOZ_EXTENSIONS $option"
-    fi
-done
-else
-  MOZ_EXTENSIONS="$MOZ_EXTENSIONS_DEFAULT"
-fi
-
-
-if test -z "$MOZ_ENABLE_GTK" && test `echo "$MOZ_EXTENSIONS" | grep -c xmlterm` -ne 0; then
-    echo "configure: warning: Cannot build xmlterm without gtk toolkit. Removing xmlterm from MOZ_EXTENSIONS." 1>&2
-    MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|xmlterm||'`
-fi
-
-if test -z "$MOZ_ENABLE_GNOMEVFS" && test `echo "$MOZ_EXTENSIONS" | grep -c gnomevfs` -ne 0; then
-    # Suppress warning on non-X11 platforms
-    if test -n "$MOZ_X11"; then
-        echo "configure: warning: Cannot build gnomevfs without required libraries. Removing gnomevfs from MOZ_EXTENSIONS." 1>&2
-    fi
-    MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|gnomevfs||'`
-fi
-
-if test -z "$MOZ_JSDEBUGGER" && test `echo "$MOZ_EXTENSIONS" | grep -c venkman` -ne 0; then
-    echo "configure: warning: Cannot build venkman without JavaScript debug library. Removing venkman from MOZ_EXTENSIONS." 1>&2
-    MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|venkman||'`
-fi
-
-if test `echo "$MOZ_EXTENSIONS" | grep -c tridentprofile` -ne 0 && test "$OS_ARCH" != "WINNT"; then
-    echo "configure: warning: tridentprofile extension works only on Windows at this time. Removing tridentprofile from MOZ_EXTENSIONS." 1>&2
-    MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|tridentprofile||'`
-fi
-
-if test `echo "$MOZ_EXTENSIONS" | grep -c tridentprofile` -ne 0; then
-  MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|tridentprofile||'`
-  if test `echo "$MOZ_EXTENSIONS" | grep -c cookie` -eq 0; then
-    echo "configure: warning: tridentprofile extension requires cookie. Removing tridentprofile." 1>&2
+# Check whether --enable-javaxpcom or --disable-javaxpcom was given.
+if test "${enable_javaxpcom+set}" = set; then
+  enableval="$enable_javaxpcom"
+  if test "$enableval" = "yes"; then
+    MOZ_JAVAXPCOM=1
+  elif test "$enableval" = "no"; then
+    MOZ_JAVAXPCOM= 
   else
-    MOZ_EXTENSIONS="$MOZ_EXTENSIONS tridentprofile"
+    { echo "configure: error: Option, javaxpcom, does not take an argument ($enableval)." 1>&2; exit 1; }
   fi
 fi
 
-if test -z "$MOZ_XTF" && test `echo "$MOZ_EXTENSIONS" | grep -c xforms` -ne 0; then
-    echo "configure: warning: Cannot build XForms without XTF support.  Removing XForms from MOZ_EXTENSIONS." 1>&2
-    MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|xforms||g'`
-fi
-if test `echo "$MOZ_EXTENSIONS" | grep -c xforms` -ne 0 && test `echo "$MOZ_EXTENSIONS" | grep -c webservices` -eq 0; then
-    echo "configure: warning: Cannot build XForms without webservices.  Removing XForms from MOZ_EXTENSIONS." 1>&2
-    MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|xforms||g'`
-fi
-
-if test `echo "$MOZ_EXTENSIONS" | grep -c xforms` -ne 0 && test `echo "$MOZ_EXTENSIONS" | grep -c schema-validation` -eq 0; then
-    echo "configure: warning: Cannot build XForms without schema validation.  Removing XForms from MOZ_EXTENSIONS." 1>&2
-    MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|xforms||g'`
-fi
 
-MOZ_ENABLE_JAVAXPCOM=
-JAVAC=
-JAR=
-if test `echo "$MOZ_EXTENSIONS" | grep -c java` -ne 0; then
-  MOZ_ENABLE_JAVAXPCOM=1
+if test -n "${MOZ_JAVAXPCOM}"; then
+  case "$host_os" in
+    cygwin*|msvc*|mks*)
+      if test -n "$JAVA_HOME"; then
+        JAVA_HOME=`cygpath -u \`cygpath -m -s "$JAVA_HOME"\``
+      fi
+      ;;
+  esac
 
   if test -n "${JAVA_INCLUDE_PATH}"; then
-        if test ! -f $JAVA_INCLUDE_PATH/jni.h; then
+        if test ! -f "$JAVA_INCLUDE_PATH/jni.h"; then
       { echo "configure: error: jni.h was not found in given include path $JAVA_INCLUDE_PATH." 1>&2; exit 1; }
     fi
   else
     case "$target_os" in
       darwin*)
                 JAVA_INCLUDE_PATH=/System/Library/Frameworks/JavaVM.framework/Headers
         ;;
       *)
-                JAVA_INCLUDE_PATH=$JAVA_HOME/include
+                JAVA_INCLUDE_PATH="$JAVA_HOME/include"
         ;;
     esac
-    if test ! -f $JAVA_INCLUDE_PATH/jni.h; then
+    if test ! -f "$JAVA_INCLUDE_PATH/jni.h"; then
       { echo "configure: error: The header jni.h was not found.  Set \$JAVA_HOME or use --with-java-include-path={java-include-dir}." 1>&2; exit 1; }
     fi
   fi
 
   if test -n "${JAVA_BIN_PATH}"; then
-        _JAVA_PATH=$JAVA_BIN_PATH
+        JAVA_PATH="$JAVA_BIN_PATH"
   else
-        _JAVA_PATH=$JAVA_HOME/bin:$PATH
+        JAVA_PATH="$JAVA_HOME/bin:$PATH"
   fi
-  case "$host_os" in
-    mingw*|cygwin*|msvc*|mks*)
-        JAVA_PATH=`cygpath -u $_JAVA_PATH`
-        ;;
-    *)
-        JAVA_PATH=$_JAVA_PATH
-        ;;
-  esac
+
   # Extract the first word of "javac", so it can be a program name with args.
 set dummy javac; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:14175: checking for $ac_word" >&5
+echo "configure:14213: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_JAVAC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$JAVAC" in
   /*)
   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -14198,25 +14236,25 @@ else
 esac
 fi
 JAVAC="$ac_cv_path_JAVAC"
 if test -n "$JAVAC"; then
   echo "$ac_t""$JAVAC" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
   # Extract the first word of "jar", so it can be a program name with args.
 set dummy jar; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:14211: checking for $ac_word" >&5
+echo "configure:14249: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_JAR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$JAR" in
   /*)
   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_JAR="$JAR" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -14236,24 +14274,99 @@ fi
 JAR="$ac_cv_path_JAR"
 if test -n "$JAR"; then
   echo "$ac_t""$JAR" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
   if test -z "$JAVAC" || test "$JAVAC" = ":" || test -z "$JAR" || test "$JAR" = ":"; then
     { echo "configure: error: The programs javac and jar were not found.  Set \$JAVA_HOME or use --with-java-bin-path={java-bin-dir}." 1>&2; exit 1; }
   fi
 fi
 
+
+
+# Check whether --enable-extensions or --disable-extensions was given.
+if test "${enable_extensions+set}" = set; then
+  enableval="$enable_extensions"
+   for option in `echo $enableval | sed 's/,/ /g'`; do
+    if test "$option" = "yes" || test "$option" = "all"; then
+        MOZ_EXTENSIONS="$MOZ_EXTENSIONS $MOZ_EXTENSIONS_ALL"
+    elif test "$option" = "no" || test "$option" = "none"; then
+        MOZ_EXTENSIONS=""
+    elif test "$option" = "default"; then
+        MOZ_EXTENSIONS="$MOZ_EXTENSIONS $MOZ_EXTENSIONS_DEFAULT"
+    elif test `echo "$option" | grep -c \^-` != 0; then
+        option=`echo $option | sed 's/^-//'`
+        MOZ_EXTENSIONS=`echo "$MOZ_EXTENSIONS" | sed "s/ ${option}//"`
+    else
+        MOZ_EXTENSIONS="$MOZ_EXTENSIONS $option"
+    fi
+done
+else
+  MOZ_EXTENSIONS="$MOZ_EXTENSIONS_DEFAULT"
+fi
+
+
+if test -z "$MOZ_ENABLE_GTK" && test `echo "$MOZ_EXTENSIONS" | grep -c xmlterm` -ne 0; then
+    echo "configure: warning: Cannot build xmlterm without gtk toolkit. Removing xmlterm from MOZ_EXTENSIONS." 1>&2
+    MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|xmlterm||'`
+fi
+
+if test -z "$MOZ_ENABLE_GNOMEVFS" && test `echo "$MOZ_EXTENSIONS" | grep -c gnomevfs` -ne 0; then
+    # Suppress warning on non-X11 platforms
+    if test -n "$MOZ_X11"; then
+        echo "configure: warning: Cannot build gnomevfs without required libraries. Removing gnomevfs from MOZ_EXTENSIONS." 1>&2
+    fi
+    MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|gnomevfs||'`
+fi
+
+if test -z "$MOZ_JSDEBUGGER" && test `echo "$MOZ_EXTENSIONS" | grep -c venkman` -ne 0; then
+    echo "configure: warning: Cannot build venkman without JavaScript debug library. Removing venkman from MOZ_EXTENSIONS." 1>&2
+    MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|venkman||'`
+fi
+
+if test `echo "$MOZ_EXTENSIONS" | grep -c tridentprofile` -ne 0 && test "$OS_ARCH" != "WINNT"; then
+    echo "configure: warning: tridentprofile extension works only on Windows at this time. Removing tridentprofile from MOZ_EXTENSIONS." 1>&2
+    MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|tridentprofile||'`
+fi
+
+if test `echo "$MOZ_EXTENSIONS" | grep -c tridentprofile` -ne 0; then
+  MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|tridentprofile||'`
+  if test `echo "$MOZ_EXTENSIONS" | grep -c cookie` -eq 0; then
+    echo "configure: warning: tridentprofile extension requires cookie. Removing tridentprofile." 1>&2
+  else
+    MOZ_EXTENSIONS="$MOZ_EXTENSIONS tridentprofile"
+  fi
+fi
+
+if test -z "$MOZ_XTF" && test `echo "$MOZ_EXTENSIONS" | grep -c xforms` -ne 0; then
+    echo "configure: warning: Cannot build XForms without XTF support.  Removing XForms from MOZ_EXTENSIONS." 1>&2
+    MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|xforms||g'`
+fi
+if test `echo "$MOZ_EXTENSIONS" | grep -c xforms` -ne 0 && test `echo "$MOZ_EXTENSIONS" | grep -c webservices` -eq 0; then
+    echo "configure: warning: Cannot build XForms without webservices.  Removing XForms from MOZ_EXTENSIONS." 1>&2
+    MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|xforms||g'`
+fi
+
+if test `echo "$MOZ_EXTENSIONS" | grep -c xforms` -ne 0 && test `echo "$MOZ_EXTENSIONS" | grep -c schema-validation` -eq 0; then
+    echo "configure: warning: Cannot build XForms without schema validation.  Removing XForms from MOZ_EXTENSIONS." 1>&2
+    MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|xforms||g'`
+fi
+
+if test `echo "$MOZ_EXTENSIONS" | grep -c java` -ne 0; then
+    echo "configure: warning: java is no longer an extension, use --enable-javaxpcom to enable." 1>&2
+    MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|java||g'`
+fi
+
 MOZ_EXTENSIONS=`${PERL} ${srcdir}/build/unix/uniq.pl ${MOZ_EXTENSIONS}`
 
 case "$target_os" in
 cygwin*|mingw*|msvc*|mks*|os2*|wince*)
     MOZ_IMG_DECODERS_DEFAULT="$MOZ_IMG_DECODERS_DEFAULT icon"
     ;;
 darwin*)
     if test "$MOZ_WIDGET_TOOLKIT" = "mac" -o "$MOZ_WIDGET_TOOLKIT" = "cocoa";
     then
         MOZ_IMG_DECODERS_DEFAULT="$MOZ_IMG_DECODERS_DEFAULT icon"
     fi
     ;;
@@ -14344,44 +14457,44 @@ EOF
 if test "${enable_svg_renderer+set}" = set; then
   enableval="$enable_svg_renderer"
    SVG_RENDERER=$enableval 
 else
    SVG_RENDERER=$SVG_DEFAULT_RENDERER
 fi
 
 
   case "$SVG_RENDERER" in
   gdiplus)
     MOZ_SVG_RENDERER_GDIPLUS=1
                         echo $ac_n "checking for Gdiplus.h""... $ac_c" 1>&6
-echo "configure:14357: checking for Gdiplus.h" >&5
+echo "configure:14470: checking for Gdiplus.h" >&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 14367 "configure"
+#line 14480 "configure"
 #include "confdefs.h"
 #include <windows.h>
                     #include <unknwn.h>
                     #include <Gdiplus.h>
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:14376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:14489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   { echo "configure: error: Building the SVG GDI+ renderer requires an appropriate Microsoft SDK." 1>&2; exit 1; }
 fi
 rm -f conftest*
     ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 ac_cpp='$CPP $CPPFLAGS'
@@ -14463,31 +14576,31 @@ if test "${enable_updater+set}" = set; t
     MOZ_UPDATER=1 
   else
     { echo "configure: error: Option, updater, does not take an argument ($enableval)." 1>&2; exit 1; }
   fi
 fi
 
 # The Windows build requires the iconv command line utility
 # in order to build the updater.
 case "$target_os" in
     msvc*|mks*|cygwin*|mingw*|wince*)
         if test -n "$MOZ_UPDATER"; then
             echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:14476: checking for iconv" >&5
+echo "configure:14589: checking for iconv" >&5
             for ac_prog in $HOST_ICONV "iconv"
 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:14482: checking for $ac_word" >&5
+echo "configure:14595: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_HOST_ICONV'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$HOST_ICONV"; then
   ac_cv_prog_HOST_ICONV="$HOST_ICONV" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_HOST_ICONV="$ac_prog"
@@ -14735,36 +14848,36 @@ MOZ_DEBUG_ENABLE_DEFS="-DDEBUG -D_DEBUG"
         MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`"
         ;;
     *) 
         MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_`$WHOAMI`"
         ;;
   esac
 MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DTRACING"
 
 MOZ_DEBUG_DISABLE_DEFS="-DNDEBUG -DTRIMMED"
 
 if test -n "$MOZ_DEBUG"; then
     echo $ac_n "checking for valid debug flags""... $ac_c" 1>&6
-echo "configure:14748: checking for valid debug flags" >&5
+echo "configure:14861: checking for valid debug flags" >&5
     _SAVE_CFLAGS=$CFLAGS
     CFLAGS="$CFLAGS $MOZ_DEBUG_FLAGS"
     cat > conftest.$ac_ext <<EOF
-#line 14752 "configure"
+#line 14865 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 printf("Hello World\n");
 ; return 0; }
 EOF
-if { (eval echo configure:14759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:14872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   _results=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   _results=no
 fi
 rm -f conftest*
     echo "$ac_t""$_results" 1>&6
     if test "$_results" = "no"; then
         { echo "configure: error: These compiler flags are invalid: $MOZ_DEBUG_FLAGS" 1>&2; exit 1; }
@@ -14787,36 +14900,36 @@ if test "${enable_optimize+set}" = set; 
     fi
 else
     MOZ_OPTIMIZE=
 fi 
 else
   MOZ_OPTIMIZE=1
 fi
 
 
 if test "$COMPILE_ENVIRONMENT"; then
 if test -n "$MOZ_OPTIMIZE"; then
     echo $ac_n "checking for valid optimization flags""... $ac_c" 1>&6
-echo "configure:14800: checking for valid optimization flags" >&5
+echo "configure:14913: checking for valid optimization flags" >&5
     _SAVE_CFLAGS=$CFLAGS
     CFLAGS="$CFLAGS $MOZ_OPTIMIZE_FLAGS"
     cat > conftest.$ac_ext <<EOF
-#line 14804 "configure"
+#line 14917 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 printf("Hello World\n");
 ; return 0; }
 EOF
-if { (eval echo configure:14811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:14924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   _results=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   _results=no
 fi
 rm -f conftest*
     echo "$ac_t""$_results" 1>&6
     if test "$_results" = "no"; then
         { echo "configure: error: These compiler flags are invalid: $MOZ_OPTIMIZE_FLAGS" 1>&2; exit 1; }
@@ -15015,44 +15128,44 @@ if test "${enable_efence+set}" = set; th
   enableval="$enable_efence"
   if test "$enableval" = "yes"; then
     _ENABLE_EFENCE=1
   elif test "$enableval" = "no"; then
     _ENABLE_EFENCE= 
   else
     { echo "configure: error: Option, efence, does not take an argument ($enableval)." 1>&2; exit 1; }
   fi
 fi
 
 if test -n "$_ENABLE_EFENCE"; then
     echo $ac_n "checking for malloc in -lefence""... $ac_c" 1>&6
-echo "configure:15028: checking for malloc in -lefence" >&5
+echo "configure:15141: checking for malloc in -lefence" >&5
 ac_lib_var=`echo efence'_'malloc | 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="-lefence  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 15036 "configure"
+#line 15149 "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 malloc();
 
 int main() {
 malloc()
 ; return 0; }
 EOF
-if { (eval echo configure:15047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
@@ -15135,30 +15248,30 @@ if test "$COMPILE_ENVIRONMENT"; then
 if test "$MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS"; then
     
     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
 
     for ac_func in __builtin_vec_new __builtin_vec_delete __builtin_new __builtin_delete __pure_virtual
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:15148: checking for $ac_func" >&5
+echo "configure:15261: 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 15153 "configure"
+#line 15266 "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.  */
 #ifdef __cplusplus
 extern "C"
 #endif
 /* 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();
 
@@ -15166,25 +15279,25 @@ int main() {
 
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
 $ac_func();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:15179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15292: \"$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
 rm -f conftest*
 fi
 
 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
@@ -15409,30 +15522,30 @@ fi
 if test -z "$SKIP_LIBRARY_CHECKS"; then
     
     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
 
     for ac_func in __cxa_demangle
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:15422: checking for $ac_func" >&5
+echo "configure:15535: 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 15427 "configure"
+#line 15540 "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.  */
 #ifdef __cplusplus
 extern "C"
 #endif
 /* 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();
 
@@ -15440,25 +15553,25 @@ int main() {
 
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
 $ac_func();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:15453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15566: \"$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
 rm -f conftest*
 fi
 
 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
@@ -15578,47 +15691,47 @@ MOZ_DOC_OUTPUT_DIR='./dist/docs'
 # Check whether --with-doc-output-dir or --without-doc-output-dir was given.
 if test "${with_doc_output_dir+set}" = set; then
   withval="$with_doc_output_dir"
    MOZ_DOC_OUTPUT_DIR=$withval  
 fi
 
 
 
 if test -z "$SKIP_COMPILER_CHECKS"; then
 # Compiler Options
 
 echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
-echo "configure:15591: checking for gcc -pipe support" >&5
+echo "configure:15704: checking for gcc -pipe support" >&5
 if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
     echo '#include <stdio.h>' > dummy-hello.c
     echo 'int main() { printf("Hello World\n"); exit(0); }' >> dummy-hello.c
     ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5
     cat dummy-hello.s | ${AS_BIN} -o dummy-hello.S - 2>&5
     if test $? = 0; then
         _res_as_stdin="yes"
     else
         _res_as_stdin="no"
     fi
     if test "$_res_as_stdin" = "yes"; then
         _SAVE_CFLAGS=$CFLAGS
         CFLAGS="$CFLAGS -pipe"
         cat > conftest.$ac_ext <<EOF
-#line 15606 "configure"
+#line 15719 "configure"
 #include "confdefs.h"
  #include <stdio.h> 
 int main() {
 printf("Hello World\n");
 ; return 0; }
 EOF
-if { (eval echo configure:15613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:15726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   _res_gcc_pipe="yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   _res_gcc_pipe="no" 
 fi
 rm -f conftest*
         CFLAGS=$_SAVE_CFLAGS
     fi
     if test "$_res_as_stdin" = "yes" && test "$_res_gcc_pipe" = "yes"; then
@@ -15642,91 +15755,91 @@ if test "${enable_long_long_warning+set}
   elif test "$enableval" = "no"; then
     _IGNORE_LONG_LONG_WARNINGS=1
   else
     { echo "configure: error: Option, long-long-warning, does not take an argument ($enableval)." 1>&2; exit 1; }
   fi
 fi
 
 
 if test "$_IGNORE_LONG_LONG_WARNINGS"; then
      _SAVE_CFLAGS="$CFLAGS"
      CFLAGS="$CFLAGS ${_COMPILER_PREFIX}-Wno-long-long"
      echo $ac_n "checking whether compiler supports -Wno-long-long""... $ac_c" 1>&6
-echo "configure:15655: checking whether compiler supports -Wno-long-long" >&5
+echo "configure:15768: checking whether compiler supports -Wno-long-long" >&5
      cat > conftest.$ac_ext <<EOF
-#line 15657 "configure"
+#line 15770 "configure"
 #include "confdefs.h"
 
 int main() {
 return(0);
 ; return 0; }
 EOF
-if { (eval echo configure:15664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:15777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
    _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} ${_COMPILER_PREFIX}-Wno-long-long"
 	  _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-Wno-long-long"
 	  result="yes" 
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   result="no"
 fi
 rm -f conftest*
      echo "$ac_t""$result" 1>&6
      CFLAGS="$_SAVE_CFLAGS"
 fi
 
 
 _SAVE_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -fprofile-generate"
 
 echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6
-echo "configure:15685: checking whether C compiler supports -fprofile-generate" >&5
+echo "configure:15798: checking whether C compiler supports -fprofile-generate" >&5
 cat > conftest.$ac_ext <<EOF
-#line 15687 "configure"
+#line 15800 "configure"
 #include "confdefs.h"
 
 int main() {
 return 0;
 ; return 0; }
 EOF
-if { (eval echo configure:15694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:15807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
    PROFILE_GEN_CFLAGS="-fprofile-generate"
                  result="yes" 
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   result="no"
 fi
 rm -f conftest*
 echo "$ac_t""$result" 1>&6
 
 if test $result = "yes"; then
   PROFILE_USE_CFLAGS="-fprofile-use"
 else
   CFLAGS="$_SAVE_CFLAGS -fprofile-arcs"
   echo $ac_n "checking whether C compiler supports -fprofile-arcs""... $ac_c" 1>&6
-echo "configure:15712: checking whether C compiler supports -fprofile-arcs" >&5
+echo "configure:15825: checking whether C compiler supports -fprofile-arcs" >&5
   cat > conftest.$ac_ext <<EOF
-#line 15714 "configure"
+#line 15827 "configure"
 #include "confdefs.h"
 
 int main() {
 return 0;
 ; return 0; }
 EOF
-if { (eval echo configure:15721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:15834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
    PROFILE_GEN_CFLAGS="-fprofile-arcs"
                    result="yes" 
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   result="no"
 fi
 rm -f conftest*
   echo "$ac_t""$result" 1>&6
   if test $result = "yes"; then
@@ -15754,39 +15867,36 @@ if test "${enable_pedantic+set}" = set; 
     _PEDANTIC= 
   elif test "$enableval" = "yes"; then
     :
   else
     { echo "configure: error: Option, pedantic, does not take an argument ($enableval)." 1>&2; exit 1; }
   fi
 fi
 
 if test "$_PEDANTIC"; then
     _SAVE_CXXFLAGS=$CXXFLAGS
     CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-pedantic"
     echo $ac_n "checking whether C++ compiler has -pedantic long long bug""... $ac_c" 1>&6
-echo "configure:15767: checking whether C++ compiler has -pedantic long long bug" >&5
+echo "configure:15880: checking whether C++ compiler has -pedantic long long bug" >&5
     if test "$cross_compiling" = yes; then
   result="maybe" 
 else
   cat > conftest.$ac_ext <<EOF
-#line 15772 "configure"
+#line 15885 "configure"
 #include "confdefs.h"
-#ifdef __cplusplus
-extern "C" void exit(int);
-#endif
  int main () {
                 if (sizeof(long long) != 8) { return 1; } 
                     return 0; } 
 EOF
-if { (eval echo configure:15781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:15891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   result="no"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   result="yes"
 fi
 rm -fr conftest*
 fi
 
     echo "$ac_t""$result" 1>&6
@@ -15798,79 +15908,76 @@ fi
         _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-pedantic"
         ;;
     yes)
         { echo "configure: error: Your compiler appears to have a known bug where long long is miscompiled when using -pedantic.  Reconfigure using --disable-pedantic. " 1>&2; exit 1; }
         ;;
     maybe)
         echo "configure: warning: Cannot test -pedantic long long bug when cross-compiling." 1>&2
         ;;
     esac
 fi
 
 echo $ac_n "checking for correct temporary object destruction order""... $ac_c" 1>&6
-echo "configure:15811: checking for correct temporary object destruction order" >&5
+echo "configure:15921: checking for correct temporary object destruction order" >&5
 if test "$cross_compiling" = yes; then
   result="maybe"
 else
   cat > conftest.$ac_ext <<EOF
-#line 15816 "configure"
+#line 15926 "configure"
 #include "confdefs.h"
-#ifdef __cplusplus
-extern "C" void exit(int);
-#endif
  class A {
              public:  A(int& x) : mValue(x) {}
                       ~A() { mValue--; }
                       operator char**() { return 0; }
              private:  int& mValue;
              };
              void func(char **arg) {}
              int m=2;
              void test() {
                   func(A(m));
                   if (m==1) m = 0;
              }
              int main() {
                  test();
                  return(m);
              }
              
 EOF
-if { (eval echo configure:15839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:15946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   result="yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   result="no"
 fi
 rm -fr conftest*
 fi
 
 echo "$ac_t""$result" 1>&6
 
 if test "$result" = "no"; then
     { echo "configure: error: Your compiler does not follow the C++ specification for temporary object destruction order." 1>&2; exit 1; }
 fi
 
 _SAVE_CXXFLAGS=$CXXFLAGS
 CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS}"
 echo $ac_n "checking for correct overload resolution with const and templates""... $ac_c" 1>&6
-echo "configure:15860: checking for correct overload resolution with const and templates" >&5
+echo "configure:15967: checking for correct overload resolution with const and templates" >&5
 if eval "test \"`echo '$''{'ac_nscap_nonconst_opeq_bug'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15865 "configure"
+#line 15972 "configure"
 #include "confdefs.h"
 
                       template <class T>
                       class Pointer
                         {
                         public:
                           T* myPtr;
                         };
                       
                       template <class T, class U>
                       int operator==(const Pointer<T>& rhs, U* lhs)
                         {
@@ -15882,25 +15989,25 @@ else
                         {
                           return rhs.myPtr == lhs;
                         }
                     
 int main() {
 
                       Pointer<int> foo;
                       const int* bar;
                       return foo == bar;
                     
 ; return 0; }
 EOF
-if { (eval echo configure:15895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:16002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_nscap_nonconst_opeq_bug="no"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_nscap_nonconst_opeq_bug="yes"
 fi
 rm -f conftest*
 fi
 
 echo "$ac_t""$ac_nscap_nonconst_opeq_bug" 1>&6
@@ -16147,25 +16254,25 @@ then
       
       unset NEXT_ROOT
     fi
 
     if test "$MOZ_ENABLE_GTK2"; then
         
   succeeded=no
 
   if test -z "$PKG_CONFIG"; then
     # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:16160: checking for $ac_word" >&5
+echo "configure:16267: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$PKG_CONFIG" in
   /*)
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -16191,37 +16298,37 @@ fi
 
   fi
 
   if test "$PKG_CONFIG" = "no" ; then
      echo "*** The pkg-config script could not be found. Make sure it is"
      echo "*** in your path, or set the PKG_CONFIG environment variable"
      echo "*** to the full path to pkg-config."
      echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
   else
      PKG_CONFIG_MIN_VERSION=0.9.0
      if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
         echo $ac_n "checking for libIDL-2.0 >= 0.8.0""... $ac_c" 1>&6
-echo "configure:16204: checking for libIDL-2.0 >= 0.8.0" >&5
+echo "configure:16311: checking for libIDL-2.0 >= 0.8.0" >&5
 
         if $PKG_CONFIG --exists "libIDL-2.0 >= 0.8.0" ; then
             echo "$ac_t""yes" 1>&6
             succeeded=yes
 
             echo $ac_n "checking LIBIDL_CFLAGS""... $ac_c" 1>&6
-echo "configure:16211: checking LIBIDL_CFLAGS" >&5
+echo "configure:16318: checking LIBIDL_CFLAGS" >&5
             LIBIDL_CFLAGS=`$PKG_CONFIG --cflags "libIDL-2.0 >= 0.8.0"`
             echo "$ac_t""$LIBIDL_CFLAGS" 1>&6
 
             echo $ac_n "checking LIBIDL_LIBS""... $ac_c" 1>&6
-echo "configure:16216: checking LIBIDL_LIBS" >&5
+echo "configure:16323: checking LIBIDL_LIBS" >&5
             ## don't use --libs since that can do evil things like add
             ## -Wl,--export-dynamic
             LIBIDL_LIBS="`$PKG_CONFIG --libs-only-L \"libIDL-2.0 >= 0.8.0\"` `$PKG_CONFIG --libs-only-l \"libIDL-2.0 >= 0.8.0\"`"
             echo "$ac_t""$LIBIDL_LIBS" 1>&6
         else
             LIBIDL_CFLAGS=""
             LIBIDL_LIBS=""
             ## If we have a custom action on failure, don't print errors, but 
             ## do set a variable so people can do so.
             LIBIDL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libIDL-2.0 >= 0.8.0"`
             
         fi
@@ -16326,25 +16433,25 @@ fi
          ;;
          gthread) 
              glib_config_args="$glib_config_args gthread"
          ;;
       esac
   done
 
     unset ac_cv_path_GLIB_CONFIG
 
   # Extract the first word of "glib-config", so it can be a program name with args.
 set dummy glib-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:16339: checking for $ac_word" >&5
+echo "configure:16446: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$GLIB_CONFIG" in
   /*)
   ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -16361,48 +16468,48 @@ else
   ;;
 esac
 fi
 GLIB_CONFIG="$ac_cv_path_GLIB_CONFIG"
 if test -n "$GLIB_CONFIG"; then
   echo "$ac_t""$GLIB_CONFIG" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
   min_glib_version=1.2.0
   echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6
-echo "configure:16374: checking for GLIB - version >= $min_glib_version" >&5
+echo "configure:16481: checking for GLIB - version >= $min_glib_version" >&5
   no_glib=""
   if test "$GLIB_CONFIG" = "no" ; then
     no_glib=yes
   else
     GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
     GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
     glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
     glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
     glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
     if test "x$enable_glibtest" = "xyes" ; then
       ac_save_CFLAGS="$CFLAGS"
       ac_save_LIBS="$LIBS"
       CFLAGS="$CFLAGS $GLIB_CFLAGS"
       LIBS="$GLIB_LIBS $LIBS"
       rm -f conf.glibtest
       if test "$cross_compiling" = yes; then
   echo $ac_n "cross compiling; assumed OK... $ac_c"
 else
   cat > conftest.$ac_ext <<EOF
-#line 16397 "configure"
+#line 16504 "configure"
 #include "confdefs.h"
 
 #include <glib.h>
 #include <stdio.h>
 #include <stdlib.h>
 
 int 
 main ()
 {
   int major, minor, micro;
   char *tmp_version;
 
@@ -16460,25 +16567,25 @@ main ()
         printf("*** probably means that the wrong copy of the glib-config shell script is\n");
         printf("*** being found. The easiest way to fix this is to remove the old version\n");
         printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
         printf("*** correct copy of glib-config. (In this case, you will have to\n");
         printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n");
         printf("*** so that the correct libraries are found at run-time))\n");
       }
     }
   return 1;
 }
 
 EOF
-if { (eval echo configure:16473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:16580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   no_glib=yes
 fi
 rm -fr conftest*
 fi
 
        CFLAGS="$ac_save_CFLAGS"
@@ -16494,35 +16601,35 @@ fi
        echo "*** The glib-config script installed by GLIB could not be found"
        echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
        echo "*** your path, or set the GLIB_CONFIG environment variable to the"
        echo "*** full path to glib-config."
      else
        if test -f conf.glibtest ; then
         :
        else
           echo "*** Could not run GLIB test program, checking why..."
           CFLAGS="$CFLAGS $GLIB_CFLAGS"
           LIBS="$LIBS $GLIB_LIBS"
           cat > conftest.$ac_ext <<EOF
-#line 16507 "configure"
+#line 16614 "configure"
 #include "confdefs.h"
 
 #include <glib.h>
 #include <stdio.h>
 
 int main() {
  return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); 
 ; return 0; }
 EOF
-if { (eval echo configure:16517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
    echo "*** The test program compiled, but did not run. This usually means"
           echo "*** that the run-time linker is not finding GLIB or finding the wrong"
           echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
           echo "*** is required on your system"
 	  echo "***"
           echo "*** If you have an old version installed, it is best to remove it, although"
           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
           echo "***"
           echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
@@ -16548,25 +16655,25 @@ rm -f conftest*
      :
   fi
   
   
   rm -f conf.glibtest
 
 
     unset ac_cv_path_LIBIDL_CONFIG
 
   # Extract the first word of "libIDL-config", so it can be a program name with args.
 set dummy libIDL-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:16561: checking for $ac_word" >&5
+echo "configure:16668: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_LIBIDL_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$LIBIDL_CONFIG" in
   /*)
   ac_cv_path_LIBIDL_CONFIG="$LIBIDL_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_LIBIDL_CONFIG="$LIBIDL_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -16583,25 +16690,25 @@ else
   ;;
 esac
 fi
 LIBIDL_CONFIG="$ac_cv_path_LIBIDL_CONFIG"
 if test -n "$LIBIDL_CONFIG"; then
   echo "$ac_t""$LIBIDL_CONFIG" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
   min_libIDL_version=$LIBIDL_VERSION
   echo $ac_n "checking for libIDL - version >= $min_libIDL_version""... $ac_c" 1>&6
-echo "configure:16596: checking for libIDL - version >= $min_libIDL_version" >&5
+echo "configure:16703: checking for libIDL - version >= $min_libIDL_version" >&5
   no_libIDL=""
   if test "$LIBIDL_CONFIG" = "no" ; then
     no_libIDL=yes
   else
     LIBIDL_CFLAGS=`$LIBIDL_CONFIG $libIDL_config_args --cflags`
     LIBIDL_LIBS=`$LIBIDL_CONFIG $libIDL_config_args --libs`
     # hack to allow us to keep using libIDL 0.6.3-0.6.7. Anyone may remove
     # this after we start requiring libIDL 0.6.8 or anything higher
     LIBIDL_CFLAGS="$GLIB_CFLAGS $LIBIDL_CFLAGS"
     LIBIDL_LIBS="$GLIB_LIBS $LIBIDL_LIBS"
     libIDL_config_major_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
@@ -16610,25 +16717,25 @@ echo "configure:16596: checking for libI
     libIDL_config_micro_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
     if test "x$enable_libIDLtest" = "xyes" ; then
       ac_save_CFLAGS="$CFLAGS"
       ac_save_LIBS="$LIBS"
       CFLAGS="$CFLAGS $LIBIDL_CFLAGS"
       LIBS="$LIBIDL_LIBS $LIBS"
       rm -f conf.libIDLtest
       if test "$cross_compiling" = yes; then
   echo $ac_n "cross compiling; assumed OK... $ac_c"
 else
   cat > conftest.$ac_ext <<EOF
-#line 16623 "configure"
+#line 16730 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <libIDL/IDL.h>
 
 int 
 main ()
 {
   int major, minor, micro;
   int libIDL_major_version;
   int libIDL_minor_version;
@@ -16696,25 +16803,25 @@ main ()
         printf("*** probably means that the wrong copy of the libIDL-config shell script is\n");
         printf("*** being found. The easiest way to fix this is to remove the old version\n");
         printf("*** of libIDL, but you can also set the LIBIDL_CONFIG environment to point to the\n");
         printf("*** correct copy of libIDL-config. (In this case, you will have to\n");
         printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n");
         printf("*** so that the correct libraries are found at run-time))\n");
       }
     }
   return 1;
 }
 
 EOF
-if { (eval echo configure:16709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:16816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   no_libIDL=yes
 fi
 rm -fr conftest*
 fi
 
        CFLAGS="$ac_save_CFLAGS"
@@ -16730,36 +16837,36 @@ fi
        echo "*** The libIDL-config script installed by libIDL could not be found"
        echo "*** If libIDL was installed in PREFIX, make sure PREFIX/bin is in"
        echo "*** your path, or set the LIBIDL_CONFIG environment variable to the"
        echo "*** full path to libIDL-config."
      else
        if test -f conf.libIDLtest ; then
         :
        else
           echo "*** Could not run libIDL test program, checking why..."
           CFLAGS="$CFLAGS $LIBIDL_CFLAGS"
           LIBS="$LIBS $LIBIDL_LIBS"
           cat > conftest.$ac_ext <<EOF
-#line 16743 "configure"
+#line 16850 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <libIDL/IDL.h>
 
 int main() {
  return IDL_get_libver_string ? 1 : 0; 
 ; return 0; }
 EOF
-if { (eval echo configure:16754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
    echo "*** The test program compiled, but did not run. This usually means"
           echo "*** that the run-time linker is not finding libIDL or finding the wrong"
           echo "*** version of LIBIDL. If it is not finding libIDL, you'll need to set your"
           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
           echo "*** is required on your system"
 	  echo "***"
           echo "*** If you have an old version installed, it is best to remove it, although"
           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" 
 else
   echo "configure: failed program was:" >&5
@@ -16869,25 +16976,25 @@ fi
          ;;
          gthread) 
              glib_config_args="$glib_config_args gthread"
          ;;
       esac
   done
 
     unset ac_cv_path_GLIB_CONFIG
 
   # Extract the first word of "glib-config", so it can be a program name with args.
 set dummy glib-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:16882: checking for $ac_word" >&5
+echo "configure:16989: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$GLIB_CONFIG" in
   /*)
   ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -16904,48 +17011,48 @@ else
   ;;
 esac
 fi
 GLIB_CONFIG="$ac_cv_path_GLIB_CONFIG"
 if test -n "$GLIB_CONFIG"; then
   echo "$ac_t""$GLIB_CONFIG" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
   min_glib_version=1.2.0
   echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6
-echo "configure:16917: checking for GLIB - version >= $min_glib_version" >&5
+echo "configure:17024: checking for GLIB - version >= $min_glib_version" >&5
   no_glib=""
   if test "$GLIB_CONFIG" = "no" ; then
     no_glib=yes
   else
     GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
     GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
     glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
     glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
     glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
     if test "x$enable_glibtest" = "xyes" ; then
       ac_save_CFLAGS="$CFLAGS"
       ac_save_LIBS="$LIBS"
       CFLAGS="$CFLAGS $GLIB_CFLAGS"
       LIBS="$GLIB_LIBS $LIBS"
       rm -f conf.glibtest
       if test "$cross_compiling" = yes; then
   echo $ac_n "cross compiling; assumed OK... $ac_c"
 else
   cat > conftest.$ac_ext <<EOF
-#line 16940 "configure"
+#line 17047 "configure"
 #include "confdefs.h"
 
 #include <glib.h>
 #include <stdio.h>
 #include <stdlib.h>
 
 int 
 main ()
 {
   int major, minor, micro;
   char *tmp_version;
 
@@ -17003,25 +17110,25 @@ main ()
         printf("*** probably means that the wrong copy of the glib-config shell script is\n");
         printf("*** being found. The easiest way to fix this is to remove the old version\n");
         printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
         printf("*** correct copy of glib-config. (In this case, you will have to\n");
         printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n");
         printf("*** so that the correct libraries are found at run-time))\n");
       }
     }
   return 1;
 }
 
 EOF
-if { (eval echo configure:17016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:17123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   no_glib=yes
 fi
 rm -fr conftest*
 fi
 
        CFLAGS="$ac_save_CFLAGS"
@@ -17037,35 +17144,35 @@ fi
        echo "*** The glib-config script installed by GLIB could not be found"
        echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
        echo "*** your path, or set the GLIB_CONFIG environment variable to the"
        echo "*** full path to glib-config."
      else
        if test -f conf.glibtest ; then
         :
        else
           echo "*** Could not run GLIB test program, checking why..."
           CFLAGS="$CFLAGS $GLIB_CFLAGS"
           LIBS="$LIBS $GLIB_LIBS"
           cat > conftest.$ac_ext <<EOF
-#line 17050 "configure"
+#line 17157 "configure"
 #include "confdefs.h"
 
 #include <glib.h>
 #include <stdio.h>
 
 int main() {
  return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); 
 ; return 0; }
 EOF
-if { (eval echo configure:17060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
    echo "*** The test program compiled, but did not run. This usually means"
           echo "*** that the run-time linker is not finding GLIB or finding the wrong"
           echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
           echo "*** is required on your system"
 	  echo "***"
           echo "*** If you have an old version installed, it is best to remove it, although"
           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
           echo "***"
           echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
@@ -17091,25 +17198,25 @@ rm -f conftest*
      :
   fi
   
   
   rm -f conf.glibtest
 
 
     unset ac_cv_path_LIBIDL_CONFIG
 
   # Extract the first word of "libIDL-config", so it can be a program name with args.
 set dummy libIDL-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:17104: checking for $ac_word" >&5
+echo "configure:17211: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_LIBIDL_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$LIBIDL_CONFIG" in
   /*)
   ac_cv_path_LIBIDL_CONFIG="$LIBIDL_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_LIBIDL_CONFIG="$LIBIDL_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -17126,25 +17233,25 @@ else
   ;;
 esac
 fi
 LIBIDL_CONFIG="$ac_cv_path_LIBIDL_CONFIG"
 if test -n "$LIBIDL_CONFIG"; then
   echo "$ac_t""$LIBIDL_CONFIG" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
   min_libIDL_version=$LIBIDL_VERSION
   echo $ac_n "checking for libIDL - version >= $min_libIDL_version""... $ac_c" 1>&6
-echo "configure:17139: checking for libIDL - version >= $min_libIDL_version" >&5
+echo "configure:17246: checking for libIDL - version >= $min_libIDL_version" >&5
   no_libIDL=""
   if test "$LIBIDL_CONFIG" = "no" ; then
     no_libIDL=yes
   else
     LIBIDL_CFLAGS=`$LIBIDL_CONFIG $libIDL_config_args --cflags`
     LIBIDL_LIBS=`$LIBIDL_CONFIG $libIDL_config_args --libs`
     # hack to allow us to keep using libIDL 0.6.3-0.6.7. Anyone may remove
     # this after we start requiring libIDL 0.6.8 or anything higher
     LIBIDL_CFLAGS="$GLIB_CFLAGS $LIBIDL_CFLAGS"
     LIBIDL_LIBS="$GLIB_LIBS $LIBIDL_LIBS"
     libIDL_config_major_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
@@ -17153,25 +17260,25 @@ echo "configure:17139: checking for libI
     libIDL_config_micro_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
     if test "x$enable_libIDLtest" = "xyes" ; then
       ac_save_CFLAGS="$CFLAGS"
       ac_save_LIBS="$LIBS"
       CFLAGS="$CFLAGS $LIBIDL_CFLAGS"
       LIBS="$LIBIDL_LIBS $LIBS"
       rm -f conf.libIDLtest
       if test "$cross_compiling" = yes; then
   echo $ac_n "cross compiling; assumed OK... $ac_c"
 else
   cat > conftest.$ac_ext <<EOF
-#line 17166 "configure"
+#line 17273 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <libIDL/IDL.h>
 
 int 
 main ()
 {
   int major, minor, micro;
   int libIDL_major_version;
   int libIDL_minor_version;
@@ -17239,25 +17346,25 @@ main ()
         printf("*** probably means that the wrong copy of the libIDL-config shell script is\n");
         printf("*** being found. The easiest way to fix this is to remove the old version\n");
         printf("*** of libIDL, but you can also set the LIBIDL_CONFIG environment to point to the\n");
         printf("*** correct copy of libIDL-config. (In this case, you will have to\n");
         printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n");
         printf("*** so that the correct libraries are found at run-time))\n");
       }
     }
   return 1;
 }
 
 EOF
-if { (eval echo configure:17252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:17359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   no_libIDL=yes
 fi
 rm -fr conftest*
 fi
 
        CFLAGS="$ac_save_CFLAGS"
@@ -17273,36 +17380,36 @@ fi
        echo "*** The libIDL-config script installed by libIDL could not be found"
        echo "*** If libIDL was installed in PREFIX, make sure PREFIX/bin is in"
        echo "*** your path, or set the LIBIDL_CONFIG environment variable to the"
        echo "*** full path to libIDL-config."
      else
        if test -f conf.libIDLtest ; then
         :
        else
           echo "*** Could not run libIDL test program, checking why..."
           CFLAGS="$CFLAGS $LIBIDL_CFLAGS"
           LIBS="$LIBS $LIBIDL_LIBS"
           cat > conftest.$ac_ext <<EOF
-#line 17286 "configure"
+#line 17393 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <libIDL/IDL.h>
 
 int main() {
  return IDL_get_libver_string ? 1 : 0; 
 ; return 0; }
 EOF
-if { (eval echo configure:17297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
    echo "*** The test program compiled, but did not run. This usually means"
           echo "*** that the run-time linker is not finding libIDL or finding the wrong"
           echo "*** version of LIBIDL. If it is not finding libIDL, you'll need to set your"
           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
           echo "*** is required on your system"
 	  echo "***"
           echo "*** If you have an old version installed, it is best to remove it, although"
           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" 
 else
   echo "configure: failed program was:" >&5
@@ -17325,25 +17432,25 @@ rm -f conftest*
   
   
   rm -f conf.libIDLtest
 
         if test -z "$_LIBIDL_FOUND"; then
             
   succeeded=no
 
   if test -z "$PKG_CONFIG"; then
     # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:17338: checking for $ac_word" >&5
+echo "configure:17445: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$PKG_CONFIG" in
   /*)
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -17369,37 +17476,37 @@ fi
 
   fi
 
   if test "$PKG_CONFIG" = "no" ; then
      echo "*** The pkg-config script could not be found. Make sure it is"
      echo "*** in your path, or set the PKG_CONFIG environment variable"
      echo "*** to the full path to pkg-config."
      echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
   else
      PKG_CONFIG_MIN_VERSION=0.9.0
      if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
         echo $ac_n "checking for libIDL-2.0 >= 0.8.0""... $ac_c" 1>&6
-echo "configure:17382: checking for libIDL-2.0 >= 0.8.0" >&5
+echo "configure:17489: checking for libIDL-2.0 >= 0.8.0" >&5
 
         if $PKG_CONFIG --exists "libIDL-2.0 >= 0.8.0" ; then
             echo "$ac_t""yes" 1>&6
             succeeded=yes
 
             echo $ac_n "checking LIBIDL_CFLAGS""... $ac_c" 1>&6
-echo "configure:17389: checking LIBIDL_CFLAGS" >&5
+echo "configure:17496: checking LIBIDL_CFLAGS" >&5
             LIBIDL_CFLAGS=`$PKG_CONFIG --cflags "libIDL-2.0 >= 0.8.0"`
             echo "$ac_t""$LIBIDL_CFLAGS" 1>&6
 
             echo $ac_n "checking LIBIDL_LIBS""... $ac_c" 1>&6
-echo "configure:17394: checking LIBIDL_LIBS" >&5
+echo "configure:17501: checking LIBIDL_LIBS" >&5
             ## don't use --libs since that can do evil things like add
             ## -Wl,--export-dynamic
             LIBIDL_LIBS="`$PKG_CONFIG --libs-only-L \"libIDL-2.0 >= 0.8.0\"` `$PKG_CONFIG --libs-only-l \"libIDL-2.0 >= 0.8.0\"`"
             echo "$ac_t""$LIBIDL_LIBS" 1>&6
         else
             LIBIDL_CFLAGS=""
             LIBIDL_LIBS=""
             ## If we have a custom action on failure, don't print errors, but 
             ## do set a variable so people can do so.
             LIBIDL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libIDL-2.0 >= 0.8.0"`
             echo $LIBIDL_PKG_ERRORS
         fi
@@ -17417,25 +17524,25 @@ echo "configure:17394: checking LIBIDL_L
   else
      { echo "configure: error: Library requirements (libIDL-2.0 >= 0.8.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; exit 1; }
   fi
 
         fi
     fi
                     if test -z "$_LIBIDL_FOUND" && test -z "$CROSS_COMPILE"; then
         for ac_prog in $ORBIT_CONFIG orbit-config
 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:17430: checking for $ac_word" >&5
+echo "configure:17537: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_ORBIT_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$ORBIT_CONFIG" in
   /*)
   ac_cv_path_ORBIT_CONFIG="$ORBIT_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_ORBIT_CONFIG="$ORBIT_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -17454,57 +17561,57 @@ fi
 ORBIT_CONFIG="$ac_cv_path_ORBIT_CONFIG"
 if test -n "$ORBIT_CONFIG"; then
   echo "$ac_t""$ORBIT_CONFIG" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
 test -n "$ORBIT_CONFIG" && break
 done
 
         if test -n "$ORBIT_CONFIG"; then
             echo $ac_n "checking for ORBit libIDL usability""... $ac_c" 1>&6
-echo "configure:17467: checking for ORBit libIDL usability" >&5
+echo "configure:17574: checking for ORBit libIDL usability" >&5
         	_ORBIT_CFLAGS=`${ORBIT_CONFIG} client --cflags`
     	    _ORBIT_LIBS=`${ORBIT_CONFIG} client --libs`
             _ORBIT_INC_PATH=`${PERL} -e '{ for $f (@ARGV) { print "$f " if ($f =~ m/^-I/); } }' -- ${_ORBIT_CFLAGS}`
             _ORBIT_LIB_PATH=`${PERL} -e '{ for $f (@ARGV) { print "$f " if ($f =~ m/^-L/); } }' -- ${_ORBIT_LIBS}`
             LIBIDL_CFLAGS="$_ORBIT_INC_PATH"
             LIBIDL_LIBS="$_ORBIT_LIB_PATH -lIDL -lglib"
             LIBIDL_CONFIG=
             _SAVE_CFLAGS="$CFLAGS"
             _SAVE_LIBS="$LIBS"
             CFLAGS="$LIBIDL_CFLAGS $CFLAGS"
             LIBS="$LIBIDL_LIBS $LIBS"
             if test "$cross_compiling" = yes; then
   _LIBIDL_FOUND=1
                 result="maybe" 
 else
   cat > conftest.$ac_ext <<EOF
-#line 17484 "configure"
+#line 17591 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
 #include <libIDL/IDL.h>
 int main() {
   char *s;
   s=strdup(IDL_get_libver_string());
   if(s==NULL) {
     exit(1);
   }
   exit(0);
 }
             
 EOF
-if { (eval echo configure:17499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:17606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   _LIBIDL_FOUND=1
                 result="yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   LIBIDL_CFLAGS=
                 LIBIDL_LIBS=
                 result="no"
 fi
 rm -fr conftest*
@@ -17543,25 +17650,25 @@ if test -n "$CROSS_COMPILE"; then
 fi
 
 if test -z "$SKIP_PATH_CHECKS"; then
 if test -z "${GLIB_CFLAGS}" || test -z "${GLIB_LIBS}" ; then
     if test "$MOZ_ENABLE_GTK2"; then
         
   succeeded=no
 
   if test -z "$PKG_CONFIG"; then
     # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:17556: checking for $ac_word" >&5
+echo "configure:17663: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$PKG_CONFIG" in
   /*)
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -17587,37 +17694,37 @@ fi
 
   fi
 
   if test "$PKG_CONFIG" = "no" ; then
      echo "*** The pkg-config script could not be found. Make sure it is"
      echo "*** in your path, or set the PKG_CONFIG environment variable"
      echo "*** to the full path to pkg-config."
      echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
   else
      PKG_CONFIG_MIN_VERSION=0.9.0
      if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
         echo $ac_n "checking for glib-2.0 >= 1.3.7""... $ac_c" 1>&6
-echo "configure:17600: checking for glib-2.0 >= 1.3.7" >&5
+echo "configure:17707: checking for glib-2.0 >= 1.3.7" >&5
 
         if $PKG_CONFIG --exists "glib-2.0 >= 1.3.7" ; then
             echo "$ac_t""yes" 1>&6
             succeeded=yes
 
             echo $ac_n "checking GLIB_CFLAGS""... $ac_c" 1>&6
-echo "configure:17607: checking GLIB_CFLAGS" >&5
+echo "configure:17714: checking GLIB_CFLAGS" >&5
             GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 1.3.7"`
             echo "$ac_t""$GLIB_CFLAGS" 1>&6
 
             echo $ac_n "checking GLIB_LIBS""... $ac_c" 1>&6
-echo "configure:17612: checking GLIB_LIBS" >&5
+echo "configure:17719: checking GLIB_LIBS" >&5
             ## don't use --libs since that can do evil things like add
             ## -Wl,--export-dynamic
             GLIB_LIBS="`$PKG_CONFIG --libs-only-L \"glib-2.0 >= 1.3.7\"` `$PKG_CONFIG --libs-only-l \"glib-2.0 >= 1.3.7\"`"
             echo "$ac_t""$GLIB_LIBS" 1>&6
         else
             GLIB_CFLAGS=""
             GLIB_LIBS=""
             ## If we have a custom action on failure, don't print errors, but 
             ## do set a variable so people can do so.
             GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= 1.3.7"`
             echo $GLIB_PKG_ERRORS
         fi
@@ -17683,25 +17790,25 @@ fi
          ;;
          gthread) 
              glib_config_args="$glib_config_args gthread"
          ;;
       esac
   done
 
     unset ac_cv_path_GLIB_CONFIG
 
   # Extract the first word of "glib-config", so it can be a program name with args.
 set dummy glib-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:17696: checking for $ac_word" >&5
+echo "configure:17803: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$GLIB_CONFIG" in
   /*)
   ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -17718,48 +17825,48 @@ else
   ;;
 esac
 fi
 GLIB_CONFIG="$ac_cv_path_GLIB_CONFIG"
 if test -n "$GLIB_CONFIG"; then
   echo "$ac_t""$GLIB_CONFIG" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
   min_glib_version=${GLIB_VERSION}
   echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6
-echo "configure:17731: checking for GLIB - version >= $min_glib_version" >&5
+echo "configure:17838: checking for GLIB - version >= $min_glib_version" >&5
   no_glib=""
   if test "$GLIB_CONFIG" = "no" ; then
     no_glib=yes
   else
     GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
     GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
     glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
     glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
     glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
     if test "x$enable_glibtest" = "xyes" ; then
       ac_save_CFLAGS="$CFLAGS"
       ac_save_LIBS="$LIBS"
       CFLAGS="$CFLAGS $GLIB_CFLAGS"
       LIBS="$GLIB_LIBS $LIBS"
       rm -f conf.glibtest
       if test "$cross_compiling" = yes; then
   echo $ac_n "cross compiling; assumed OK... $ac_c"
 else
   cat > conftest.$ac_ext <<EOF
-#line 17754 "configure"
+#line 17861 "configure"
 #include "confdefs.h"
 
 #include <glib.h>
 #include <stdio.h>
 #include <stdlib.h>
 
 int 
 main ()
 {
   int major, minor, micro;
   char *tmp_version;
 
@@ -17817,25 +17924,25 @@ main ()
         printf("*** probably means that the wrong copy of the glib-config shell script is\n");
         printf("*** being found. The easiest way to fix this is to remove the old version\n");
         printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
         printf("*** correct copy of glib-config. (In this case, you will have to\n");
         printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n");
         printf("*** so that the correct libraries are found at run-time))\n");
       }
     }
   return 1;
 }
 
 EOF
-if { (eval echo configure:17830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:17937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   no_glib=yes
 fi
 rm -fr conftest*
 fi
 
        CFLAGS="$ac_save_CFLAGS"
@@ -17851,35 +17958,35 @@ fi
        echo "*** The glib-config script installed by GLIB could not be found"
        echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
        echo "*** your path, or set the GLIB_CONFIG environment variable to the"
        echo "*** full path to glib-config."
      else
        if test -f conf.glibtest ; then
         :
        else
           echo "*** Could not run GLIB test program, checking why..."
           CFLAGS="$CFLAGS $GLIB_CFLAGS"
           LIBS="$LIBS $GLIB_LIBS"
           cat > conftest.$ac_ext <<EOF
-#line 17864 "configure"
+#line 17971 "configure"
 #include "confdefs.h"
 
 #include <glib.h>
 #include <stdio.h>
 
 int main() {
  return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); 
 ; return 0; }
 EOF
-if { (eval echo configure:17874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
    echo "*** The test program compiled, but did not run. This usually means"
           echo "*** that the run-time linker is not finding GLIB or finding the wrong"
           echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
           echo "*** is required on your system"
 	  echo "***"
           echo "*** If you have an old version installed, it is best to remove it, although"
           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
           echo "***"
           echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
@@ -17940,63 +18047,63 @@ mk_add_options MOZ_CO_MODULE=mozilla/oth
       MOZ_LIBART_LIBS='-lmoz_art -lm'
       ;;
   beos*)
       MOZ_LIBART_LIBS='-lmoz_art_lgpl -lroot -lbe'
       ;;
   *)
       MOZ_LIBART_LIBS='-lmoz_art_lgpl -lm'
       ;;
   esac
   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:17953: checking for working alloca.h" >&5
+echo "configure:18060: checking for working alloca.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 17958 "configure"
+#line 18065 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:17965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_header_alloca_h=no
 fi
 rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
 if test $ac_cv_header_alloca_h = yes; then
   cat >> confdefs.h <<\EOF
 #define HAVE_ALLOCA_H 1
 EOF
 
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:17986: checking for alloca" >&5
+echo "configure:18093: checking for alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 17991 "configure"
+#line 18098 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
 # define alloca __builtin_alloca
 #else
 # ifdef _MSC_VER
 #  include <malloc.h>
 #  define alloca _alloca
 # else
 #  if HAVE_ALLOCA_H
 #   include <alloca.h>
 #  else
@@ -18006,25 +18113,25 @@ else
 #    ifndef alloca /* predefined by HP cc +Olibcalls */
 char *alloca ();
 #    endif
 #   endif
 #  endif
 # endif
 #endif
 
 int main() {
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:18019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   ac_cv_func_alloca_works=no
 fi
 rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
@@ -18038,83 +18145,83 @@ fi
 if test $ac_cv_func_alloca_works = no; then
   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
   # that cause trouble.  Some versions do not even contain alloca or
   # contain a buggy version.  If you still want to use their alloca,
   # use ar to extract alloca.o from them instead of compiling alloca.c.
   ALLOCA=alloca.${ac_objext}
   cat >> confdefs.h <<\EOF
 #define C_ALLOCA 1
 EOF
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:18051: checking whether alloca needs Cray hooks" >&5
+echo "configure:18158: checking whether alloca needs Cray hooks" >&5
 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 18056 "configure"
+#line 18163 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
 #else
 wenotbecray
 #endif
 
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   egrep "webecray" >/dev/null 2>&1; then
   rm -rf conftest*
   ac_cv_os_cray=yes
 else
   rm -rf conftest*
   ac_cv_os_cray=no
 fi
 rm -f conftest*
 
 fi
 
 echo "$ac_t""$ac_cv_os_cray" 1>&6
 if test $ac_cv_os_cray = yes; then
 for ac_func in _getb67 GETB67 getb67; do
   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:18081: checking for $ac_func" >&5
+echo "configure:18188: 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 18086 "configure"
+#line 18193 "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();
 
 int main() {
 
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
 $ac_func();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:18109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18216: \"$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
 rm -f conftest*
 fi
 
 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
@@ -18123,52 +18230,52 @@ if eval "test \"`echo '$ac_cv_func_'$ac_
 #define CRAY_STACKSEG_END $ac_func
 EOF
 
   break
 else
   echo "$ac_t""no" 1>&6
 fi
 
 done
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:18136: checking stack direction for C alloca" >&5
+echo "configure:18243: checking stack direction for C alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 18144 "configure"
+#line 18251 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
   static char *addr = 0;
   auto char dummy;
   if (addr == 0)
     {
       addr = &dummy;
       return find_stack_direction ();
     }
   else
     return (&dummy > addr) ? 1 : -1;
 }
 main ()
 {
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:18163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:18270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_stack_direction=1
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
   ac_cv_c_stack_direction=-1
 fi
 rm -fr conftest*
 fi
 
 fi
@@ -18199,35 +18306,35 @@ if test "${enable_system_cairo+set}" = s
   else
     { echo "configure: error: Option, system-cairo, does not take an argument ($enableval)." 1>&2; exit 1; }
   fi
 fi
 
 
    if test "$MOZ_TREE_CAIRO"; then
        # Check for headers defining standard int types.
        for ac_hdr in stdint.h inttypes.h sys/int_types.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:18212: checking for $ac_hdr" >&5
+echo "configure:18319: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 18217 "configure"
+#line 18324 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:18222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:18329: \"$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
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
@@ -18289,25 +18396,25 @@ EOF
            if test "$MOZ_WIDGET_TOOLKIT" = "windows"; then
                MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS -lgdi32"
            fi
        fi
    else
       
   succeeded=no
 
   if test -z "$PKG_CONFIG"; then
     # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:18302: checking for $ac_word" >&5
+echo "configure:18409: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$PKG_CONFIG" in
   /*)
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -18333,37 +18440,37 @@ fi
 
   fi
 
   if test "$PKG_CONFIG" = "no" ; then
      echo "*** The pkg-config script could not be found. Make sure it is"
      echo "*** in your path, or set the PKG_CONFIG environment variable"
      echo "*** to the full path to pkg-config."
      echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
   else
      PKG_CONFIG_MIN_VERSION=0.9.0
      if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
         echo $ac_n "checking for cairo >= $CAIRO_VERSION""... $ac_c" 1>&6
-echo "configure:18346: checking for cairo >= $CAIRO_VERSION" >&5
+echo "configure:18453: checking for cairo >= $CAIRO_VERSION" >&5
 
         if $PKG_CONFIG --exists "cairo >= $CAIRO_VERSION" ; then
             echo "$ac_t""yes" 1>&6
             succeeded=yes
 
             echo $ac_n "checking CAIRO_CFLAGS""... $ac_c" 1>&6
-echo "configure:18353: checking CAIRO_CFLAGS" >&5
+echo "configure:18460: checking CAIRO_CFLAGS" >&5
             CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= $CAIRO_VERSION"`
             echo "$ac_t""$CAIRO_CFLAGS" 1>&6
 
             echo $ac_n "checking CAIRO_LIBS""... $ac_c" 1>&6
-echo "configure:18358: checking CAIRO_LIBS" >&5
+echo "configure:18465: checking CAIRO_LIBS" >&5
             ## don't use --libs since that can do evil things like add
             ## -Wl,--export-dynamic
             CAIRO_LIBS="`$PKG_CONFIG --libs-only-L \"cairo >= $CAIRO_VERSION\"` `$PKG_CONFIG --libs-only-l \"cairo >= $CAIRO_VERSION\"`"
             echo "$ac_t""$CAIRO_LIBS" 1>&6
         else
             CAIRO_CFLAGS=""
             CAIRO_LIBS=""
             ## If we have a custom action on failure, don't print errors, but 
             ## do set a variable so people can do so.
             CAIRO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo >= $CAIRO_VERSION"`
             echo $CAIRO_PKG_ERRORS
         fi
@@ -18410,25 +18517,25 @@ EOF
 
 else
     MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's/inspector//' -e 's/venkman//' -e 's/irc//' -e 's/tasks//'`
 fi
 
 
 
 if test `echo "$MOZ_EXTENSIONS" | grep -c python/xpcom` -ne 0; then
         if test -z "$PYTHON"; then
         # Extract the first word of "python", so it can be a program name with args.
 set dummy python; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:18423: checking for $ac_word" >&5
+echo "configure:18530: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PYTHON'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$PYTHON" in
   /*)
   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
   ;;
   ?:/*)			 
   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -18671,32 +18778,32 @@ if test "$COMPILE_ENVIRONMENT"; then
 if test "$SUNCTL"; then
         _SAVE_CFLAGS=$CFLAGS
     CFLAGS="$CFLAGS $GLIB_CFLAGS"
     
     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 18684 "configure"
+#line 18791 "configure"
 #include "confdefs.h"
 #include <gmodule.h>
 int main() {
  int x = 1; x++; 
 ; return 0; }
 EOF
-if { (eval echo configure:18691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:18798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   :
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   { echo "configure: error: Cannot build ctl without gmodule support in glib." 1>&2; exit 1; }
 fi
 rm -f conftest*
     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'
@@ -18971,41 +19078,41 @@ if test "$USING_HCC"; then
    CC="$CC '$_OLDCC'"
    CXX='${topsrcdir}/build/hcpp'
    CXX="$CXX '$_OLDCXX'"
    
    
 fi
 
 if test "$COMPILE_ENVIRONMENT"; then
 if test "$MOZ_X11"; then
                 _SAVE_CFLAGS=$CFLAGS
     CFLAGS="$CFLAGS $XCFLAGS"
     cat > conftest.$ac_ext <<EOF
-#line 18984 "configure"
+#line 19091 "configure"
 #include "confdefs.h"
 
         #include <stdio.h>
         #include <X11/Xlib.h>
     
 int main() {
 
         Display *dpy = 0;
         if ((dpy = XOpenDisplay(NULL)) == NULL) {
             fprintf(stderr, ": can't open %s\n", XDisplayName(NULL));
             exit(1);
         }
     
 ; return 0; }
 EOF
-if { (eval echo configure:19000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:19107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   :
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
    { echo "configure: error: Could not compile basic X program." 1>&2; exit 1; } 
 fi
 rm -f conftest*
     CFLAGS="$_SAVE_CFLAGS"
 
     if test ! -z "$MISSING_X"; then
         { echo "configure: error:  Could not find the following X libraries: $MISSING_X " 1>&2; exit 1; };
@@ -19204,33 +19311,52 @@ EOF
     mv -f $_CONFIG_TMP $_CONFIG_DEFS_H
 
     echo ==== $_CONFIG_DEFS_H =================================
     cat $_CONFIG_DEFS_H
   fi
 
 rm -f confdefs.h.save
 mv confdefs.h confdefs.h.save
 egrep -v "$_EGREP_PATTERN" confdefs.h.save > confdefs.h
 # Transform confdefs.h into DEFS.
 # Protect against shell expansion while executing Makefile rules.
 # Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the quote section.  Otherwise,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	(][^ 	(]*([^)]*)\)[ 	]*\(.*\),-D\1=\2,g
+t quote
+s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[ 	`~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output.  A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
 
 MOZ_DEFINES=$DEFS
 
 rm -f confdefs.h
 mv confdefs.h.save confdefs.h
 
 . ${srcdir}/allmakefiles.sh
 if test -z "${AS_PERL}"; then
 echo $MAKEFILES | ${PERL} $srcdir/build/autoconf/acoutput-fast.pl > conftest.sh
 else
 echo $MAKEFILES | ${PERL} $srcdir/build/autoconf/acoutput-fast.pl -nowrap --cygwin-srcdir=$srcdir > conftest.sh
 fi
@@ -19648,25 +19774,25 @@ s%@MOZ_JSLOADER@%$MOZ_JSLOADER%g
 s%@MOZ_USE_NATIVE_UCONV@%$MOZ_USE_NATIVE_UCONV%g
 s%@MOZ_INSURE@%$MOZ_INSURE%g
 s%@MOZ_INSURE_DIRS@%$MOZ_INSURE_DIRS%g
 s%@MOZ_INSURE_EXCLUDE_DIRS@%$MOZ_INSURE_EXCLUDE_DIRS%g
 s%@MOZ_QUANTIFY@%$MOZ_QUANTIFY%g
 s%@MOZ_INSURIFYING@%$MOZ_INSURIFYING%g
 s%@MOZ_LDAP_XPCOM@%$MOZ_LDAP_XPCOM%g
 s%@MOZ_LDAP_XPCOM_EXPERIMENTAL@%$MOZ_LDAP_XPCOM_EXPERIMENTAL%g
 s%@LDAP_CFLAGS@%$LDAP_CFLAGS%g
 s%@LDAP_LIBS@%$LDAP_LIBS%g
 s%@LIBICONV@%$LIBICONV%g
 s%@MOZ_STORAGE@%$MOZ_STORAGE%g
-s%@MOZ_ENABLE_JAVAXPCOM@%$MOZ_ENABLE_JAVAXPCOM%g
+s%@MOZ_JAVAXPCOM@%$MOZ_JAVAXPCOM%g
 s%@JAVA_INCLUDE_PATH@%$JAVA_INCLUDE_PATH%g
 s%@MOZ_PROFILESHARING@%$MOZ_PROFILESHARING%g
 s%@MOZ_PROFILELOCKING@%$MOZ_PROFILELOCKING%g
 s%@MOZ_IPCD@%$MOZ_IPCD%g
 s%@HAVE_XIE@%$HAVE_XIE%g
 s%@MOZ_XIE_LIBS@%$MOZ_XIE_LIBS%g
 s%@MOZ_XPRINT_CFLAGS@%$MOZ_XPRINT_CFLAGS%g
 s%@MOZ_XPRINT_LDFLAGS@%$MOZ_XPRINT_LDFLAGS%g
 s%@MOZ_ENABLE_XPRINT@%$MOZ_ENABLE_XPRINT%g
 s%@MOZ_ENABLE_POSTSCRIPT@%$MOZ_ENABLE_POSTSCRIPT%g
 s%@MOZ_XINERAMA_LIBS@%$MOZ_XINERAMA_LIBS%g
 s%@MOZ_ENABLE_XINERAMA@%$MOZ_ENABLE_XINERAMA%g
Index: configure.in
===================================================================
RCS file: /cvsroot/mozilla/configure.in,v
retrieving revision 1.1503.2.15.2.1
diff -u -1 -2 -p -d -r1.1503.2.15.2.1 configure.in
--- configure.in	5 Jan 2006 15:40:16 -0000	1.1503.2.15.2.1
+++ configure.in	6 Jan 2006 17:07:31 -0000
@@ -3939,24 +3939,25 @@ ACCESSIBILITY=1
 BUILD_MODULES=all
 BUILD_SHARED_LIBS=1
 BUILD_STATIC_LIBS=
 ENABLE_TESTS=1
 MOZ_ACTIVEX_SCRIPTING_SUPPORT=
 MOZ_BRANDING_DIRECTORY=
 MOZ_CALENDAR=
 MOZ_DBGRINFO_MODULES=
 MOZ_ENABLE_LIBXUL=
 MOZ_EXTENSIONS_ALL=" cookie wallet content-packs xml-rpc xmlextras help p3p pref transformiix venkman inspector irc universalchardet typeaheadfind webservices spellcheck gnomevfs auth sroaming xmlterm datetime finger cview layout-debug tasks sql xforms permissions schema-validation reporter"
 MOZ_IMG_DECODERS_DEFAULT="png gif jpeg bmp xbm"
 MOZ_IPCD=
+MOZ_JAVAXPCOM=
 MOZ_JSDEBUGGER=1
 MOZ_JSLOADER=1
 MOZ_LIBART_CFLAGS=
 MOZ_LIBART_LIBS=
 MOZ_MAIL_NEWS=
 MOZ_MATHML=1
 MOZ_NO_ACTIVEX_SUPPORT=1
 MOZ_NO_XPCOM_OBSOLETE=
 MOZ_OJI=1
 MOZ_PLAINTEXT_EDITOR_ONLY=
 MOZ_PLUGINS=1
 MOZ_PROFILELOCKING=1
@@ -4116,24 +4117,25 @@ calendar)
   MOZ_APP_VERSION=`cat $topsrcdir/calendar/sunbird/config/version.txt`
   MOZ_EXTENSIONS_DEFAULT=" pref xmlextras transformiix"
   AC_DEFINE(MOZ_SUNBIRD)
   ;;
 
 xulrunner)
   MOZ_APP_NAME=xulrunner
   MOZ_APP_DISPLAYNAME=Mozilla
   MOZ_XUL_APP=1
   MOZ_XULRUNNER=1
   MOZ_ENABLE_LIBXUL=1
   MOZ_APP_VERSION=$MOZILLA_VERSION
+  MOZ_JAVAXPCOM=1
   MOZ_EXTENSIONS_DEFAULT=" xml-rpc xmlextras pref transformiix universalchardet webservices gnomevfs auth"
   AC_DEFINE(MOZ_XULRUNNER)
   ;;
 
 macbrowser) 
   MOZ_APP_NAME=mozilla
   MOZ_APP_DISPLAYNAME=Mozilla
   MOZ_APP_VERSION=$MOZILLA_VERSION
   MOZ_EXTENSIONS_DEFAULT=" cookie xmlextras universalchardet typeaheadfind transformiix permissions"
   AC_DEFINE(MOZ_MACBROWSER)
   ;;
 
@@ -4703,24 +4705,79 @@ fi
 dnl ========================================================
 dnl XTF
 dnl ========================================================
 MOZ_ARG_DISABLE_BOOL(xtf,
 [  --disable-xtf           Disable XTF (pluggable xml tags) support],
     MOZ_XTF=,
     MOZ_XTF=1 )
 if test "$MOZ_XTF"; then
   AC_DEFINE(MOZ_XTF)
 fi
 
 dnl ========================================================
+dnl JavaXPCOM
+dnl ========================================================
+MOZ_ARG_ENABLE_BOOL(javaxpcom,
+[  --enable-javaxpcom
+                          Enable Java-XPCOM bridge],
+    MOZ_JAVAXPCOM=1,
+    MOZ_JAVAXPCOM= )
+
+if test -n "${MOZ_JAVAXPCOM}"; then
+  case "$host_os" in
+    cygwin*|msvc*|mks*)
+      if test -n "$JAVA_HOME"; then
+        JAVA_HOME=`cygpath -u \`cygpath -m -s "$JAVA_HOME"\``
+      fi
+      ;;
+  esac
+
+  if test -n "${JAVA_INCLUDE_PATH}"; then
+    dnl Make sure jni.h exists in the given include path.
+    if test ! -f "$JAVA_INCLUDE_PATH/jni.h"; then
+      AC_MSG_ERROR([jni.h was not found in given include path $JAVA_INCLUDE_PATH.])
+    fi
+  else
+    case "$target_os" in
+      darwin*)
+        dnl Default to java system location
+        JAVA_INCLUDE_PATH=/System/Library/Frameworks/JavaVM.framework/Headers
+        ;;
+      *)
+        dnl Try $JAVA_HOME
+        JAVA_INCLUDE_PATH="$JAVA_HOME/include"
+        ;;
+    esac
+    if test ! -f "$JAVA_INCLUDE_PATH/jni.h"; then
+      AC_MSG_ERROR([The header jni.h was not found.  Set \$JAVA_HOME or use --with-java-include-path={java-include-dir}.])
+    fi
+  fi
+
+  if test -n "${JAVA_BIN_PATH}"; then
+    dnl Look for javac and jar in the specified path.
+    JAVA_PATH="$JAVA_BIN_PATH"
+  else
+    dnl No path specified, so look for javac and jar in $JAVA_HOME & $PATH.
+    JAVA_PATH="$JAVA_HOME/bin:$PATH"
+  fi
+
+  AC_PATH_PROG(JAVAC, javac, :, $JAVA_PATH)
+  AC_PATH_PROG(JAR, jar, :, $JAVA_PATH)
+  if test -z "$JAVAC" || test "$JAVAC" = ":" || test -z "$JAR" || test "$JAR" = ":"; then
+    AC_MSG_ERROR([The programs javac and jar were not found.  Set \$JAVA_HOME or use --with-java-bin-path={java-bin-dir}.])
+  fi
+fi
+
+
+dnl ========================================================
 dnl = Enable compilation of specific extension modules
 dnl ========================================================
 
 MOZ_ARG_ENABLE_STRING(extensions,
 [  --enable-extensions     Enable extensions],
 [ for option in `echo $enableval | sed 's/,/ /g'`; do
     if test "$option" = "yes" || test "$option" = "all"; then
         MOZ_EXTENSIONS="$MOZ_EXTENSIONS $MOZ_EXTENSIONS_ALL"
     elif test "$option" = "no" || test "$option" = "none"; then
         MOZ_EXTENSIONS=""
     elif test "$option" = "default"; then
         MOZ_EXTENSIONS="$MOZ_EXTENSIONS $MOZ_EXTENSIONS_DEFAULT"
@@ -4773,71 +4830,27 @@ if test -z "$MOZ_XTF" && test `echo "$MO
     MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|xforms||g'`
 fi
 if test `echo "$MOZ_EXTENSIONS" | grep -c xforms` -ne 0 && test `echo "$MOZ_EXTENSIONS" | grep -c webservices` -eq 0; then
     AC_MSG_WARN([Cannot build XForms without webservices.  Removing XForms from MOZ_EXTENSIONS.])
     MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|xforms||g'`
 fi
 
 if test `echo "$MOZ_EXTENSIONS" | grep -c xforms` -ne 0 && test `echo "$MOZ_EXTENSIONS" | grep -c schema-validation` -eq 0; then
     AC_MSG_WARN([Cannot build XForms without schema validation.  Removing XForms from MOZ_EXTENSIONS.])
     MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|xforms||g'`
 fi
 
-MOZ_ENABLE_JAVAXPCOM=
-JAVAC=
-JAR=
 if test `echo "$MOZ_EXTENSIONS" | grep -c java` -ne 0; then
-  MOZ_ENABLE_JAVAXPCOM=1
-
-  if test -n "${JAVA_INCLUDE_PATH}"; then
-    dnl Make sure jni.h exists in the given include path.
-    if test ! -f $JAVA_INCLUDE_PATH/jni.h; then
-      AC_MSG_ERROR([jni.h was not found in given include path $JAVA_INCLUDE_PATH.])
-    fi
-  else
-    case "$target_os" in
-      darwin*)
-        dnl Default to java system location
-        JAVA_INCLUDE_PATH=/System/Library/Frameworks/JavaVM.framework/Headers
-        ;;
-      *)
-        dnl Try $JAVA_HOME
-        JAVA_INCLUDE_PATH=$JAVA_HOME/include
-        ;;
-    esac
-    if test ! -f $JAVA_INCLUDE_PATH/jni.h; then
-      AC_MSG_ERROR([The header jni.h was not found.  Set \$JAVA_HOME or use --with-java-include-path={java-include-dir}.])
-    fi
-  fi
-
-  if test -n "${JAVA_BIN_PATH}"; then
-    dnl Look for javac and jar in the specified path.
-    _JAVA_PATH=$JAVA_BIN_PATH
-  else
-    dnl No path specified, so look for javac and jar are in $JAVA_HOME & $PATH.
-    _JAVA_PATH=$JAVA_HOME/bin:$PATH
-  fi
-  case "$host_os" in
-    mingw*|cygwin*|msvc*|mks*)
-        JAVA_PATH=`cygpath -u $_JAVA_PATH`
-        ;;
-    *)
-        JAVA_PATH=$_JAVA_PATH
-        ;;
-  esac
-  AC_PATH_PROG(JAVAC, javac, :, $JAVA_PATH)
-  AC_PATH_PROG(JAR, jar, :, $JAVA_PATH)
-  if test -z "$JAVAC" || test "$JAVAC" = ":" || test -z "$JAR" || test "$JAR" = ":"; then
-    AC_MSG_ERROR([The programs javac and jar were not found.  Set \$JAVA_HOME or use --with-java-bin-path={java-bin-dir}.])
-  fi
+    AC_MSG_WARN([java is no longer an extension, use --enable-javaxpcom to enable.])
+    MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|java||g'`
 fi
 
 dnl Remove dupes
 MOZ_EXTENSIONS=`${PERL} ${srcdir}/build/unix/uniq.pl ${MOZ_EXTENSIONS}`
 
 dnl ========================================================
 dnl Image decoders
 dnl ========================================================
 case "$target_os" in
 cygwin*|mingw*|msvc*|mks*|os2*|wince*)
     MOZ_IMG_DECODERS_DEFAULT="$MOZ_IMG_DECODERS_DEFAULT icon"
     ;;
@@ -6588,25 +6601,25 @@ AC_SUBST(MOZ_USE_NATIVE_UCONV)
 AC_SUBST(MOZ_INSURE)
 AC_SUBST(MOZ_INSURE_DIRS)
 AC_SUBST(MOZ_INSURE_EXCLUDE_DIRS)
 AC_SUBST(MOZ_QUANTIFY)
 AC_SUBST(MOZ_INSURIFYING)
 AC_SUBST(MOZ_LDAP_XPCOM)
 AC_SUBST(MOZ_LDAP_XPCOM_EXPERIMENTAL)
 AC_SUBST(LDAP_CFLAGS)
 AC_SUBST(LDAP_LIBS)
 AC_SUBST(LIBICONV)
 AC_SUBST(MOZ_STORAGE)
 
-AC_SUBST(MOZ_ENABLE_JAVAXPCOM)
+AC_SUBST(MOZ_JAVAXPCOM)
 AC_SUBST(JAVA_INCLUDE_PATH)
 AC_SUBST(JAVAC)
 AC_SUBST(JAR)
 
 AC_SUBST(MOZ_PROFILESHARING)
 AC_SUBST(MOZ_PROFILELOCKING)
 
 AC_SUBST(MOZ_IPCD)
 
 AC_SUBST(HAVE_XIE)
 AC_SUBST(MOZ_XIE_LIBS)
 AC_SUBST(MOZ_XPRINT_CFLAGS)
Index: config/autoconf.mk.in
===================================================================
RCS file: /cvsroot/mozilla/config/autoconf.mk.in,v
retrieving revision 3.363.2.1.4.1
diff -u -1 -2 -p -d -r3.363.2.1.4.1 autoconf.mk.in
--- config/autoconf.mk.in	5 Jan 2006 15:40:17 -0000	3.363.2.1.4.1
+++ config/autoconf.mk.in	6 Jan 2006 17:07:37 -0000
@@ -128,25 +128,25 @@ MOZ_INSTALLER	= @MOZ_INSTALLER@
 MOZ_UPDATER	= @MOZ_UPDATER@
 MOZ_UPDATE_PACKAGING	= @MOZ_UPDATE_PACKAGING@
 MOZ_NO_ACTIVEX_SUPPORT = @MOZ_NO_ACTIVEX_SUPPORT@
 MOZ_ACTIVEX_SCRIPTING_SUPPORT = @MOZ_ACTIVEX_SCRIPTING_SUPPORT@
 XPC_IDISPATCH_SUPPORT = @MOZ_ACTIVEX_SCRIPTING_SUPPORT@
 MOZ_XPFE_COMPONENTS = @MOZ_XPFE_COMPONENTS@
 MOZ_IPCD = @MOZ_IPCD@
 MOZ_PROFILESHARING = @MOZ_PROFILESHARING@
 MOZ_PROFILELOCKING = @MOZ_PROFILELOCKING@
 MOZ_STORAGE = @MOZ_STORAGE@
 MOZ_NO_XPCOM_OBSOLETE = @MOZ_NO_XPCOM_OBSOLETE@
 
-MOZ_ENABLE_JAVAXPCOM = @MOZ_ENABLE_JAVAXPCOM@
+MOZ_JAVAXPCOM = @MOZ_JAVAXPCOM@
 JAVA_INCLUDE_PATH=@JAVA_INCLUDE_PATH@
 JAVAC=@JAVAC@
 JAR=@JAR@
 
 # The MOZ_UI_LOCALE var is used to build a particular locale. Do *not*
 # use the var to change any binary files. Do *not* use this var unless you
 # write rules for the "clean-locale" and "locale" targets.
 MOZ_UI_LOCALE = @MOZ_UI_LOCALE@
 
 MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS = @MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS@
 MOZ_COMPONENT_NSPR_LIBS=@MOZ_COMPONENT_NSPR_LIBS@
 
Index: config/config.mk
===================================================================
RCS file: /cvsroot/mozilla/config/config.mk,v
retrieving revision 3.337.8.1
diff -u -1 -2 -p -d -r3.337.8.1 config.mk
--- config/config.mk	5 Jan 2006 15:40:17 -0000	3.337.8.1
+++ config/config.mk	6 Jan 2006 17:07:37 -0000
@@ -873,12 +873,23 @@ ifdef LOCALE_SRCDIR
 MAKE_JARS_FLAGS += -c $(LOCALE_SRCDIR)
 endif
 
 #
 # Add BUILD_ID to set of DEFINES
 #
 BUILD_ID := $(shell cat $(DEPTH)/config/build_number)
 DEFINES += -DBUILD_ID=$(BUILD_ID)
 
 ifeq (,$(filter WINCE WINNT OS2,$(OS_ARCH)))
 RUN_TEST_PROGRAM = $(DIST)/bin/run-mozilla.sh
 endif
+
+#
+# Java macros
+#
+
+# Make sure any compiled classes work with at least JVM 1.4
+JAVAC_FLAGS += -source 1.4
+
+ifdef MOZ_DEBUG
+JAVAC_FLAGS += -g
+endif
Index: extensions/java/xpcom/AppFileLocProvider.java
===================================================================
RCS file: extensions/java/xpcom/AppFileLocProvider.java
diff -N extensions/java/xpcom/AppFileLocProvider.java
--- extensions/java/xpcom/AppFileLocProvider.java	12 Jan 2005 18:23:59 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,89 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Java XPCOM Bindings.
- *
- * The Initial Developer of the Original Code is
- * IBM Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * IBM Corporation. All Rights Reserved.
- *
- * Contributor(s):
- *   Javier Pedemonte (jhpedemonte@gmail.com)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-package org.mozilla.xpcom;
-
-import java.io.*;
-
-
-/**
- * Used by XPCOM's Directory Service to get file locations.
- * <p>
- * This interface is similar to <code>nsIDirectoryServiceProvider</code> and
- * <code>nsIDirectoryServiceProvider2</code>, except that its methods use
- * <code>java.io.File</code> instead of <code>nsIFile</code>.
- * </p>
- *
- * @see GeckoEmbed#initEmbedding
- * @see XPCOM#initXPCOM
- * @see <a href="http://lxr.mozilla.org/mozilla/source/xpcom/io/nsIDirectoryService.idl">
- *      nsIDirectoryServiceProvider </a>
- * @see <a href="http://lxr.mozilla.org/mozilla/source/xpcom/io/nsDirectoryServiceDefs.h">
- *      Directory Service property names </a>
- */
-public interface AppFileLocProvider {
-
-  /**
-   * Directory Service calls this when it gets the first request for
-   * a prop or on every request if the prop is not persistent.
-   *
-   * @param prop        the symbolic name of the file
-   * @param persistent  an array of length one used to supply the output value:
-   *                    <ul>
-   *                      <li><code>true</code> - The returned file will be
-   *                      cached by Directory Service. Subsequent requests for
-   *                      this prop will bypass the provider and use the cache.
-   *                      </li>
-   *                      <li><code>false</code> - The provider will be asked
-   *                      for this prop each time it is requested. </li>
-   *                    </ul>
-   *
-   * @return            the file represented by the property
-   */
-  public File getFile(String prop, boolean[] persistent);
-
-  /**
-   * Directory Service calls this when it gets a request for
-   * a prop and the requested type is nsISimpleEnumerator.
-   *
-   * @param prop  the symbolic name of the file list
-   *
-   * @return      an array for a list of file locations
-   */
-  public File[] getFiles(String prop);
-
-}
Index: extensions/java/xpcom/GeckoEmbed.java
===================================================================
RCS file: extensions/java/xpcom/GeckoEmbed.java
diff -N extensions/java/xpcom/GeckoEmbed.java
--- extensions/java/xpcom/GeckoEmbed.java	21 Dec 2004 17:36:55 -0000	1.7
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,82 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Java XPCOM Bindings.
- *
- * The Initial Developer of the Original Code is
- * IBM Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * IBM Corporation. All Rights Reserved.
- *
- * Contributor(s):
- *   Javier Pedemonte (jhpedemonte@gmail.com)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-package org.mozilla.xpcom;
-
-import java.io.*;
-
-/**
- *  Provides access to functions that are used to embed Mozilla's Gecko layer.
- */
-public final class GeckoEmbed {
-
-  /**
-   * Initializes the Gecko embedding layer. You <i>must</i>
-   * call this method before proceeding to use Gecko. This function ensures
-   * XPCOM is started, creates the component registry if necessary and
-   * starts global services.
-   *
-   * @param aMozBinDirectory The Gecko directory containing the component
-   *                         registry and runtime libraries;
-   *                         or use <code>null</code> to use the working
-   *                         directory.
-   * @param aAppFileLocProvider The object to be used by Gecko that specifies
-   *                         to Gecko where to find profiles, the component
-   *                         registry preferences and so on; or use
-   *                         <code>null</code> for the default behaviour.
-   *
-   * @exception XPCOMException  if a failure occurred during initialization
-   */
-  public static native
-  void initEmbedding(File aMozBinDirectory,
-                     AppFileLocProvider aAppFileLocProvider);
-
-  /**
-   * Terminates the Gecko embedding layer. Call this function during shutdown to
-   * ensure that global services are unloaded, files are closed and
-   * XPCOM is shutdown.
-   * <p>
-   * NOTE: Release any XPCOM objects within Gecko that you may be holding a
-   *       reference to before calling this function.
-   * </p>
-   *
-   * @exception XPCOMException  if a failure occurred during termination
-   */
-  public static native
-  void termEmbedding();
-
-}
Index: extensions/java/xpcom/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/extensions/java/xpcom/Makefile.in,v
retrieving revision 1.15
diff -u -1 -2 -p -d -r1.15 Makefile.in
--- extensions/java/xpcom/Makefile.in	2 May 2005 16:30:01 -0000	1.15
+++ extensions/java/xpcom/Makefile.in	6 Jan 2006 17:07:45 -0000
@@ -33,61 +33,24 @@
 # the provisions above, a recipient may use your version of this file under
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
 DEPTH		= ../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE		= javaxpcom
-LIBRARY_NAME	= javaxpcom
-MOZILLA_INTERNAL_API = 1
-
-# On Mac OS X, JNI libraries must end with a '.jnilib' extension
-ifeq ($(OS_ARCH),Darwin)
-DLL_SUFFIX = .jnilib
-endif
-
-REQUIRES	= xpcom \
-		  string \
-		  embed_base \
-		  $(NULL)
-
-DIRS = tools/genifaces build
-
-CPPSRCS		= \
-		nsAppFileLocProviderProxy.cpp \
-		nsJavaInterfaces.cpp \
-		nsJavaWrapper.cpp \
-		nsJavaXPTCStub.cpp \
-		nsJavaXPTCStubWeakRef.cpp \
-		nsJavaXPCOMBindingUtils.cpp \
-		$(NULL)
-
-LOCAL_INCLUDES	= -I$(JAVA_INCLUDE_PATH)
-
-ifeq ($(OS_ARCH),WINNT)
-LOCAL_INCLUDES += -I$(JAVA_INCLUDE_PATH)/win32
-else
-LOCAL_INCLUDES += -I$(JAVA_INCLUDE_PATH)/linux
-endif
-
-EXTRA_DSO_LIBS = \
-	embed_base_s \
-	$(NULL)
+DIRS = src
 
-EXTRA_DSO_LDOPTS = \
-	$(LIBS_DIR) \
-	$(EXTRA_DSO_LIBS) \
-	$(MOZ_COMPONENT_LIBS) \
+TOOL_DIRS = \
+	tools/genifaces \
+	interfaces \
+	glue \
 	$(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
-XPCOMError.java: $(topsrcdir)/xpcom/base/nsError.h gen-nsError.pl Makefile Makefile.in
-	$(PERL) $(srcdir)/gen-nsError.pl < $< > $@
-
-export:: XPCOMError.java
+tools::
+	$(MAKE) -C src jarfile
Index: extensions/java/xpcom/XPCOM.java
===================================================================
RCS file: extensions/java/xpcom/XPCOM.java
diff -N extensions/java/xpcom/XPCOM.java
--- extensions/java/xpcom/XPCOM.java	13 Apr 2005 19:04:57 -0000	1.10
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,242 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Java XPCOM Bindings.
- *
- * The Initial Developer of the Original Code is
- * IBM Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2005
- * IBM Corporation. All Rights Reserved.
- *
- * Contributor(s):
- *   Javier Pedemonte (jhpedemonte@gmail.com)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-package org.mozilla.xpcom;
-
-import java.lang.reflect.*;
-import java.io.*;
-import java.util.*;
-
-
-/**
- *  Provides access to methods for initializing XPCOM, as well as helper methods
- *  for working with XPCOM classes.
- */
-public final class XPCOM implements XPCOMError {
-
-  /**
-   * Initializes XPCOM. You must call this method before proceeding
-   * to use XPCOM.
-   *
-   * @param aMozBinDirectory The directory containing the component
-   *                         registry and runtime libraries;
-   *                         or use <code>null</code> to use the working
-   *                         directory.
-   *
-   * @param aAppFileLocProvider The object to be used by Gecko that specifies
-   *                         to Gecko where to find profiles, the component
-   *                         registry preferences and so on; or use
-   *                         <code>null</code> for the default behaviour.
-   *
-   * @return the service manager
-   *
-   * @exception XPCOMException <ul>
-   *      <li> NS_ERROR_NOT_INITIALIZED - if static globals were not initialied,
-   *            which can happen if XPCOM is reloaded, but did not completly
-   *            shutdown. </li>
-   *      <li> Other error codes indicate a failure during initialisation. </li>
-   * </ul>
-   */
-  public static native
-  nsIServiceManager initXPCOM(File aMozBinDirectory,
-                              AppFileLocProvider aAppFileLocProvider);
-
-  /**
-   * Shutdown XPCOM. You must call this method after you are finished
-   * using xpcom.
-   *
-   * @param aServMgr    The service manager which was returned by initXPCOM.
-   *                    This will release servMgr.
-   *
-   * @exception XPCOMException  if a failure occurred during termination
-   */
-  public static native
-  void shutdownXPCOM(nsIServiceManager aServMgr);
-
-  /**
-   * Public Method to access to the service manager.
-   *
-   * @return the service manager
-   *
-   * @exception XPCOMException
-   */
-  public static native
-  nsIServiceManager getServiceManager();
-
-  /**
-   * Public Method to access to the component manager.
-   *
-   * @return the component manager
-   *
-   * @exception XPCOMException
-   */
-  public static native
-  nsIComponentManager getComponentManager();
-
-  /**
-   * Public Method to access to the component registration manager.
-   * 
-   * @return the component registration manager
-   *
-   * @exception XPCOMException
-   */
-  public static native
-  nsIComponentRegistrar getComponentRegistrar();
-
-  /**
-   * Public Method to create an instance of a nsILocalFile.
-   *
-   * @param aPath         A string which specifies a full file path to a 
-   *                      location.  Relative paths will be treated as an
-   *                      error (NS_ERROR_FILE_UNRECOGNIZED_PATH).
-   * @param aFollowLinks  This attribute will determine if the nsLocalFile will
-   *                      auto resolve symbolic links.  By default, this value
-   *                      will be false on all non unix systems.  On unix, this
-   *                      attribute is effectively a noop.
-   *
-   * @return an instance of an nsILocalFile that points to given path
-   *
-   * @exception XPCOMException <ul>
-   *      <li> NS_ERROR_FILE_UNRECOGNIZED_PATH - raised for unrecognized paths
-   *           or relative paths (must supply full file path) </li>
-   * </ul>
-   */
-  public static native
-  nsILocalFile newLocalFile(String aPath, boolean aFollowLinks);
-
-
-  /**
-   * If you create a class that implements nsISupports, you will need to provide
-   * an implementation of the <code>queryInterface</code> method.  This helper
-   * function provides a simple implementation.  Therefore, if your class does
-   * not need to do anything special with <code>queryInterface</code>, your
-   * implementation would look like:
-   * <pre>
-   *      public nsISupports queryInterface(String aIID) {
-   *        return XPCOM.queryInterface(this, aIID);
-   *      }
-   * </pre>
-   *
-   * @param aObject object to query
-   * @param aIID    requested interface IID
-   *
-   * @return        <code>aObject</code> if the given object supports that
-   *                interface;
-   *                <code>null</code> otherwise.
-   */
-  public static nsISupports queryInterface(nsISupports aObject, String aIID)
-  {
-    ArrayList classes = new ArrayList();
-    classes.add(aObject.getClass());
-
-    while (!classes.isEmpty()) {
-      Class clazz = (Class) classes.remove(0);
-
-      // Skip over any class/interface in the "java.*" and "javax.*" domains.
-      if (clazz.getName().startsWith("java")) {
-        continue;
-      }
-
-      // If given IID matches that of the current class/interface, then we
-      // know that aObject implements the interface specified by the given IID.
-      String iid = XPCOM.getInterfaceIID(clazz);
-      if (iid != null && aIID.equals(iid)) {
-        return aObject;
-      }
-
-      // clazz didn't match, so add the interfaces it implements
-      Class[] interfaces = clazz.getInterfaces();
-      for (int i = 0; i < interfaces.length; i++ ) {
-        classes.add(interfaces[i]);
-      }
-
-      // Also add its superclass
-      Class superclass = clazz.getSuperclass();
-      if (superclass != null) {
-        classes.add(superclass);
-      }
-    }
-
-    return null;
-  }
-
-  /**
-   * Gets the interface IID for a particular Java interface.  This is similar
-   * to NS_GET_IID in the C++ Mozilla files.
-   *
-   * @param aInterface  interface which has defined an IID
-   *
-   * @return            IID for given interface
-   */
-  public static String getInterfaceIID(Class aInterface)
-  {
-    // Get short class name (i.e. "bar", not "org.blah.foo.bar")
-    StringBuffer iidName = new StringBuffer();
-    String fullClassName = aInterface.getName();
-    int index = fullClassName.lastIndexOf(".");
-    String className = index > 0 ? fullClassName.substring(index + 1) :
-                                    fullClassName;
-
-    // Create iid field name
-    if (className.startsWith("ns")) {
-      iidName.append("NS_");
-      iidName.append(className.substring(2).toUpperCase());
-    } else {
-      iidName.append(className.toUpperCase());
-    }
-    iidName.append("_IID");
-
-    String iid;
-    try {
-      Field iidField = aInterface.getDeclaredField(iidName.toString());
-      iid = (String) iidField.get(null);
-    } catch (NoSuchFieldException e) {
-      // Class may implement non-Mozilla interfaces, which would not have an
-      // IID method.  In that case, just null.
-      iid = null;
-    } catch (IllegalAccessException e) {
-      // Not allowed to access that field for some reason.  Write out an
-      // error message, but don't fail.
-      System.err.println("ERROR: Could not get field " + iidName.toString());
-      iid = null;
-    }
-
-    return iid;
-  }
-
-}
-
Index: extensions/java/xpcom/XPCOMException.java
===================================================================
RCS file: /cvsroot/mozilla/extensions/java/xpcom/XPCOMException.java,v
retrieving revision 1.4
diff -u -1 -2 -p -d -r1.4 XPCOMException.java
--- extensions/java/xpcom/XPCOMException.java	22 Dec 2004 22:03:50 -0000	1.4
+++ extensions/java/xpcom/XPCOMException.java	6 Jan 2006 17:07:45 -0000
@@ -28,39 +28,39 @@
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 package org.mozilla.xpcom;
 
-import java.lang.*;
-
 
 /**
  * This exception is thrown whenever an internal XPCOM/Gecko error occurs.
  * You can query the error ID returned by XPCOM by checking
  * <code>errorcode</code> field.
  */
-public final class XPCOMException extends RuntimeException {
+public class XPCOMException extends RuntimeException {
 
   /**
    * The XPCOM error value.
    */
   public long errorcode;
 
+  private static final long serialVersionUID = 198521829884000593L;
+
   /**
    * Constructs a new XPCOMException instance, with a default error
    * (NS_ERROR_FAILURE) and message.
    */
   public XPCOMException() {
     this(0x80004005L, "Unspecified internal XPCOM error");
   }
 
   /**
    * Constructs a new XPCOMException instance with the given message, passing
    * NS_ERROR_FAILURE as the error code.
    *
Index: extensions/java/xpcom/XPCOMJavaProxy.java
===================================================================
RCS file: /cvsroot/mozilla/extensions/java/xpcom/XPCOMJavaProxy.java,v
retrieving revision 1.1
diff -u -1 -2 -p -d -r1.1 XPCOMJavaProxy.java
--- extensions/java/xpcom/XPCOMJavaProxy.java	23 Feb 2005 20:19:55 -0000	1.1
+++ extensions/java/xpcom/XPCOMJavaProxy.java	6 Jan 2006 17:07:45 -0000
@@ -26,81 +26,96 @@
  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-package org.mozilla.xpcom;
+package org.mozilla.xpcom.internal;
 
 import java.lang.reflect.*;
+import org.mozilla.xpcom.*;
 
 
 /**
  * This class is used to pass XPCOM objects to Java functions.  A
  * <code>java.lang.reflect.Proxy</code> instance is created using the expected
  * interface, and all calls to the proxy are forwarded to the XPCOM object.
  */
-public final class XPCOMJavaProxy implements InvocationHandler {
+public class XPCOMJavaProxy implements InvocationHandler {
 
   /**
    * Pointer to the XPCOM object for which we are a proxy.
    */
   protected long nativeXPCOMPtr;
 
   /**
    * Default constructor.
    *
    * @param aXPCOMInstance  address of XPCOM object as a long
    */
-  public XPCOMJavaProxy(long aXPCOMInstance)
-  {
+  public XPCOMJavaProxy(long aXPCOMInstance) {
     nativeXPCOMPtr = aXPCOMInstance;
   }
 
   /**
+   * Returns the XPCOM object that the given proxy references.
+   *
+   * @param aProxy  Proxy created by <code>createProxy</code>
+   *
+   * @return  address of XPCOM object as a long
+   */
+  protected static long getNativeXPCOMInstance(Object aProxy) {
+    XPCOMJavaProxy proxy = (XPCOMJavaProxy) Proxy.getInvocationHandler(aProxy);
+    return proxy.nativeXPCOMPtr;
+  }
+
+  /**
    * Creates a Proxy for the given XPCOM object.
    *
    * @param aInterface      interface from which to create Proxy
    * @param aXPCOMInstance  address of XPCOM object as a long
    *
    * @return  Proxy of given XPCOM object
    */
-  protected static Object createProxy(Class aInterface, long aXPCOMInstance)
-  {
-    return Proxy.newProxyInstance(aInterface.getClassLoader(),
-                                  new Class[] { aInterface,
-                                                XPCOMJavaProxyBase.class },
-                                  new XPCOMJavaProxy(aXPCOMInstance));
+  protected static Object createProxy(Class aInterface, long aXPCOMInstance) {
+    // XXX We should really get the class loader from |aInterface|.  However,
+    //     that class loader doesn't know about |XPCOMJavaProxyBase|.  So for
+    //     now, we get the class loader that loaded |XPCOMJavaProxy|.  When
+    //     we get rid of the "XPCOMJavaProxyBase.java" class, we can revert
+    //     to the old method below.
+//    return Proxy.newProxyInstance(aInterface.getClassLoader(),
+    return Proxy.newProxyInstance(XPCOMJavaProxy.class.getClassLoader(),
+            new Class[] { aInterface, XPCOMJavaProxyBase.class },
+            new XPCOMJavaProxy(aXPCOMInstance));
   }
 
   /**
    * All calls to the Java proxy are forwarded to this method.  This method
    * takes care of a few of the <code>Object</code> method calls;  all other
    * calls are forwarded to the XPCOM object.
    *
    * @param aProxy    Proxy created by <code>createProxy</code>
    * @param aMethod   object that describes the called method
    * @param aParams   array of the arguments passed to the method
    *
    * @return  return value as defined by given <code>aMethod</code>
    */
   public Object invoke(Object aProxy, Method aMethod, Object[] aParams)
-    throws Throwable
-  {
+          throws Throwable {
     String methodName = aMethod.getName();
 
     // Handle the three java.lang.Object methods that are passed to us.
     if (aMethod.getDeclaringClass() == Object.class)  {
       if (methodName.equals("hashCode"))  {
         return proxyHashCode(aProxy);
       }
       if (methodName.equals("equals")) {
         return proxyEquals(aProxy, aParams[0]);
       }
       if (methodName.equals("toString")) {
         return proxyToString(aProxy);
@@ -125,106 +140,116 @@ public final class XPCOMJavaProxy implem
     return callXPCOMMethod(aProxy, methodName, aParams);
   }
 
   /**
    * Handles method calls of <code>java.lang.Object.hashCode</code>
    *
    * @param aProxy  Proxy created by <code>createProxy</code>
    *
    * @return  Integer object representing hash code of given object
    *
    * @see Object#hashCode()
    */
-  protected static Integer proxyHashCode(Object aProxy)
-  {
+  protected static Integer proxyHashCode(Object aProxy) {
     return new Integer(System.identityHashCode(aProxy));
   }
 
   /**
    * Handles method calls of <code>java.lang.Object.equals</code>
    *
    * @param aProxy  Proxy created by <code>createProxy</code>
    * @param aOther  another object
    *
    * @return  <code>true</code> if the given objects are the same;
    *          <code>false</code> otherwise
    *
    * @see Object#equals(Object)
    */
-  protected static Boolean proxyEquals(Object aProxy, Object aOther)
-  {
-    return (aProxy == aOther ? Boolean.TRUE : Boolean.FALSE);
-  }
-
-  /**
-   * Handles method calls of <code>java.lang.Object.toString</code>
-   *
-   * @param aProxy  Proxy created by <code>createProxy</code>
-   *
-   * @return  String representation of given object
-   *
-   * @see Object#toString()
-   */
-  protected static String proxyToString(Object aProxy)
-  {
-    return aProxy.getClass().getInterfaces()[0].getName() + '@' +
-           Integer.toHexString(aProxy.hashCode());
+  protected static Boolean proxyEquals(Object aProxy, Object aOther) {
+    // See if the two are the same Java object
+    if (aProxy == aOther) {
+      return Boolean.TRUE;
+    } else {
+      // If not, then see if they represent the same XPCOM object.  But first,
+      // we need to check if |aOther| is an XPCOMJavaProxy.
+      if (isXPCOMJavaProxy(aOther) && isSameXPCOMObject(aProxy, aOther)) {
+        return Boolean.TRUE;
+      }
+    }
+    return Boolean.FALSE;
   }
 
   /**
    * Indicates whether the given object is an XPCOMJavaProxy.
    *
    * @param aObject  object to check
    *
    * @return  <code>true</code> if the given object is an XPCOMJavaProxy;
    *          <code>false</code> otherwise
    */
-  protected static boolean isXPCOMJavaProxy(Object aObject)
-  {
-    Class objectClass = aObject.getClass();
-    if (Proxy.isProxyClass(objectClass)) {
-      Class[] interfaces = objectClass.getInterfaces();
-      if (interfaces[interfaces.length-1] == XPCOMJavaProxyBase.class) {
+  protected static boolean isXPCOMJavaProxy(Object aObject) {
+    if (Proxy.isProxyClass(aObject.getClass())) {
+      InvocationHandler h = Proxy.getInvocationHandler(aObject);
+      if (h instanceof XPCOMJavaProxy) {
         return true;
       }
     }
     return false;
   }
 
   /**
-   * Returns the XPCOM object that the given proxy references.
+   * Checks if the two given XPCOMJavaProxy objects are proxies for
+   * the same XPCOM object.
+   *
+   * @param aProxy1  XPCOMJavaProxy created by <code>createProxy</code>
+   * @param aProxy2  XPCOMJavaProxy created by <code>createProxy</code>
+   *
+   * @return <code>true</code> if both proxies represent the same XPCOM object;
+   *         <code>false</code> otherwise
+   */
+  protected static native boolean isSameXPCOMObject(Object aProxy1,
+          Object aProxy2);
+
+  /**
+   * Handles method calls of <code>java.lang.Object.toString</code>
    *
    * @param aProxy  Proxy created by <code>createProxy</code>
    *
-   * @return  address of XPCOM object as a long
+   * @return  String representation of given object
+   *
+   * @see Object#toString()
    */
-  protected static long getNativeXPCOMInstance(Object aProxy)
-  {
-    XPCOMJavaProxy proxy = (XPCOMJavaProxy) Proxy.getInvocationHandler(aProxy);
-    return proxy.nativeXPCOMPtr;
+  protected static String proxyToString(Object aProxy) {
+    return aProxy.getClass().getInterfaces()[0].getName() + '@' +
+           Integer.toHexString(aProxy.hashCode());
   }
 
   /**
+   * Called when the proxy is garbage collected by the JVM.  Allows us to clean
+   * up any references to the XPCOM object.
+   *
+   * @param aProxy  reference to Proxy that is being garbage collected
+   */
+  protected void finalizeProxy(Object aProxy) throws Throwable {
+    finalizeProxyNative(aProxy);
+    super.finalize();
+  }
+
+  protected static native void finalizeProxyNative(Object aProxy);
+
+  /**
    * Calls the XPCOM object referenced by the proxy with the given method.
    *
    * @param aProxy        Proxy created by <code>createProxy</code>
    * @param aMethodName   name of method that we want to call
    * @param aParams       array of params passed to method
    *
    * @return  return value as defined by given method
    *
    * @exception XPCOMException if XPCOM method failed.  Values of XPCOMException
    *            are defined by the method called.
    */
-  protected static native
-   Object callXPCOMMethod(Object aProxy, String aMethodName, Object[] aParams);
-
-  /**
-   * Called when the proxy is garbage collected by the JVM.  Allows us to clean
-   * up any references to the XPCOM object.
-   *
-   * @param aProxy  reference to Proxy that is being garbage collected
-   */
-  protected static native
-   void finalizeProxy(Object aProxy);
+  protected static native Object callXPCOMMethod(Object aProxy,
+          String aMethodName, Object[] aParams);
 
 }
+
Index: extensions/java/xpcom/XPCOMJavaProxyBase.java
===================================================================
RCS file: /cvsroot/mozilla/extensions/java/xpcom/XPCOMJavaProxyBase.java,v
retrieving revision 1.1
diff -u -1 -2 -p -d -r1.1 XPCOMJavaProxyBase.java
--- extensions/java/xpcom/XPCOMJavaProxyBase.java	23 Feb 2005 20:19:55 -0000	1.1
+++ extensions/java/xpcom/XPCOMJavaProxyBase.java	6 Jan 2006 17:07:45 -0000
@@ -26,25 +26,25 @@
  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-package org.mozilla.xpcom;
+package org.mozilla.xpcom.internal;
 
 
 /**
  * This interface forms the foundation of any XPCOMJavaProxy that is created.
  * It allows us to handle any JVM calls to <code>finalize</code> when the Proxy
  * is garbage collected.
  */
 public interface XPCOMJavaProxyBase {
 
   /**
    * @see java.lang.Object#finalize()
    */
Index: extensions/java/xpcom/gen-nsError.pl
===================================================================
RCS file: /cvsroot/mozilla/extensions/java/xpcom/gen-nsError.pl,v
retrieving revision 1.2
diff -u -1 -2 -p -d -r1.2 gen-nsError.pl
--- extensions/java/xpcom/gen-nsError.pl	26 Apr 2005 22:58:26 -0000	1.2
+++ extensions/java/xpcom/gen-nsError.pl	6 Jan 2006 17:07:45 -0000
@@ -28,27 +28,27 @@
 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 # in which case the provisions of the GPL or the LGPL are applicable instead
 # of those above. If you wish to allow use of your version of this file only
 # under the terms of either the GPL or the LGPL, and not to allow others to
 # use your version of this file under the terms of the MPL, indicate your
 # decision by deleting the provisions above and replace them with the notice
 # and other provisions required by the GPL or the LGPL. If you do not delete
 # the provisions above, a recipient may use your version of this file under
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
-# Generates XPCOMError.java from xpcom/base/nsError.h
+# Generates IXPCOMError.java from xpcom/base/nsError.h
 #
-# usage: perl gen-nsErrors.pl < <topsrcdir>/xpcom/base/nsError.h > XPCOMError.java
+# usage: perl gen-nsErrors.pl < <topsrcdir>/xpcom/base/nsError.h > IXPCOMError.java
 
 
 print "/* ***** BEGIN LICENSE BLOCK *****\n";
 print " * Version: MPL 1.1/GPL 2.0/LGPL 2.1\n";
 print " *\n";
 print " * The contents of this file are subject to the Mozilla Public License Version\n";
 print " * 1.1 (the \"License\"); you may not use this file except in compliance with\n";
 print " * the License. You may obtain a copy of the License at\n";
 print " * http://www.mozilla.org/MPL/\n";
 print " *\n";
 print " * Software distributed under the License is distributed on an \"AS IS\" basis,\n";
 print " * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License\n";
@@ -74,30 +74,30 @@ print " * use your version of this file 
 print " * decision by deleting the provisions above and replace them with the notice\n";
 print " * and other provisions required by the GPL or the LGPL. If you do not delete\n";
 print " * the provisions above, a recipient may use your version of this file under\n";
 print " * the terms of any one of the MPL, the GPL or the LGPL.\n";
 print " *\n";
 print " * ***** END LICENSE BLOCK ***** */\n";
 
 print "\n";
 print "package org.mozilla.xpcom;\n";
 print "\n\n";
 
 print "/**\n";
-print " * Mozilla error codes.\n";
-print " *\n";
+print " * Mozilla XPCOM error codes.\n";
+print " * <p>\n";
 print " * THIS FILE GENERATED FROM mozilla/xpcom/base/nsError.h.\n";
 print " * PLEASE SEE THAT FILE FOR FULL DOCUMENTATION.\n";
 print " */\n";
-print "public interface XPCOMError {\n";
+print "public interface IXPCOMError {\n";
 
 while (<STDIN>) {
   $line = $_;
 
   if ($prevline) {
     $_ = $prevline.$_;
   }
   if (/(.*)\\$/) {
     #splitted line
     $prevline = $1;
     next;
   }
Index: extensions/java/xpcom/nsJavaInterfaces.cpp
===================================================================
RCS file: /cvsroot/mozilla/extensions/java/xpcom/nsJavaInterfaces.cpp,v
retrieving revision 1.26
diff -u -1 -2 -p -d -r1.26 nsJavaInterfaces.cpp
--- extensions/java/xpcom/nsJavaInterfaces.cpp	13 Jul 2005 22:15:09 -0000	1.26
+++ extensions/java/xpcom/nsJavaInterfaces.cpp	6 Jan 2006 17:07:45 -0000
@@ -26,100 +26,94 @@
  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
+#include "nsJavaInterfaces.h"
 #include "nsJavaWrapper.h"
 #include "nsJavaXPCOMBindingUtils.h"
 #include "nsJavaXPTCStub.h"
-#include "nsEmbedAPI.h"
 #include "nsIComponentRegistrar.h"
 #include "nsString.h"
 #include "nsISimpleEnumerator.h"
 #include "nsIInterfaceInfoManager.h"
 #include "nsIInputStream.h"
 #include "nsEnumeratorUtils.h"
 #include "nsArray.h"
 #include "nsAppFileLocProviderProxy.h"
 #include "nsIEventQueueService.h"
-
-#define GECKO_NATIVE(func) Java_org_mozilla_xpcom_GeckoEmbed_##func
-#define XPCOM_NATIVE(func) Java_org_mozilla_xpcom_XPCOM_##func
+#include "nsXULAppAPI.h"
+#include "nsILocalFile.h"
 
 
 nsresult
-InitEmbedding_Impl(JNIEnv* env, jobject aMozBinDirectory,
-                   jobject aAppFileLocProvider)
+InitEmbedding_Impl(JNIEnv* env, jobject aLibXULDirectory,
+                   jobject aAppDirectory, jobject aAppDirProvider)
 {
   nsresult rv;
   if (!InitializeJavaGlobals(env))
     return NS_ERROR_FAILURE;
 
   // create an nsILocalFile from given java.io.File
-  nsCOMPtr<nsILocalFile> directory;
-  if (aMozBinDirectory) {
-    rv = File_to_nsILocalFile(env, aMozBinDirectory, getter_AddRefs(directory));
+  nsCOMPtr<nsILocalFile> libXULDir;
+  if (aLibXULDirectory) {
+    rv = File_to_nsILocalFile(env, aLibXULDirectory, getter_AddRefs(libXULDir));
+    NS_ENSURE_SUCCESS(rv, rv);
+  }
+  nsCOMPtr<nsILocalFile> appDir;
+  if (aAppDirectory) {
+    rv = File_to_nsILocalFile(env, aAppDirectory, getter_AddRefs(appDir));
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   // create nsAppFileLocProviderProxy from given Java object
   nsCOMPtr<nsIDirectoryServiceProvider> provider;
-  if (aAppFileLocProvider) {
-    rv = NS_NewAppFileLocProviderProxy(aAppFileLocProvider,
+  if (aAppDirProvider) {
+    rv = NS_NewAppFileLocProviderProxy(aAppDirProvider,
                                        getter_AddRefs(provider));
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
-  // init Gecko
-  rv = NS_InitEmbedding(directory, provider);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  // init Event Queue
-  nsCOMPtr<nsIEventQueueService>
-             eventQService(do_GetService(NS_EVENTQUEUESERVICE_CONTRACTID, &rv));
-  NS_ENSURE_SUCCESS(rv, rv);
-  rv = eventQService->CreateThreadEventQueue();
-
-  return rv;
+  // init libXUL
+  return XRE_InitEmbedding(libXULDir, appDir, provider, nsnull, 0);
 }
 
-extern "C" JX_EXPORT void JNICALL
-GECKO_NATIVE(initEmbedding) (JNIEnv* env, jclass, jobject aMozBinDirectory,
-                             jobject aAppFileLocProvider)
+extern "C" NS_EXPORT void
+GRE_NATIVE(initEmbedding) (JNIEnv* env, jobject, jobject aLibXULDirectory,
+                           jobject aAppDirectory, jobject aAppDirProvider)
 {
-  nsresult rv = InitEmbedding_Impl(env, aMozBinDirectory, aAppFileLocProvider);
+  nsresult rv = InitEmbedding_Impl(env, aLibXULDirectory, aAppDirectory,
+                                   aAppDirProvider);
 
   if (NS_FAILED(rv)) {
     ThrowException(env, rv, "Failure in initEmbedding");
     FreeJavaGlobals(env);
   }
 }
 
-extern "C" JX_EXPORT void JNICALL
-GECKO_NATIVE(termEmbedding) (JNIEnv *env, jclass)
+extern "C" NS_EXPORT void
+GRE_NATIVE(termEmbedding) (JNIEnv *env, jobject)
 {
-  // Free globals before calling NS_TermEmbedding(), since we need some
+  // Free globals before calling XRE_TermEmbedding(), since we need some
   // XPCOM services.
   FreeJavaGlobals(env);
 
-  nsresult rv = NS_TermEmbedding();
-  if (NS_FAILED(rv))
-    ThrowException(env, rv, "NS_TermEmbedding failed");
+  XRE_TermEmbedding();
 }
 
 nsresult
 InitXPCOM_Impl(JNIEnv* env, jobject aMozBinDirectory,
                jobject aAppFileLocProvider, jobject* aResult)
 {
   nsresult rv;
   if (!InitializeJavaGlobals(env))
     return NS_ERROR_FAILURE;
 
   // create an nsILocalFile from given java.io.File
   nsCOMPtr<nsILocalFile> directory;
@@ -128,166 +122,158 @@ InitXPCOM_Impl(JNIEnv* env, jobject aMoz
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   // create nsAppFileLocProviderProxy from given Java object
   nsAppFileLocProviderProxy* provider = nsnull;
   if (aAppFileLocProvider) {
     provider = new nsAppFileLocProviderProxy(aAppFileLocProvider);
     if (!provider)
       return NS_ERROR_OUT_OF_MEMORY;
   }
 
   // init XPCOM
-  nsIServiceManager* servMan = nsnull;
-  rv = NS_InitXPCOM2(&servMan, directory, provider);
+  nsCOMPtr<nsIServiceManager> servMan;
+  rv = NS_InitXPCOM2(getter_AddRefs(servMan), directory, provider);
   if (provider) {
     delete provider;
   }
   NS_ENSURE_SUCCESS(rv, rv);
 
   // init Event Queue
-  nsCOMPtr<nsIEventQueueService>
-             eventQService(do_GetService(NS_EVENTQUEUESERVICE_CONTRACTID, &rv));
+  nsCOMPtr<nsIEventQueueService> eventQService =
+            do_GetService(NS_EVENTQUEUESERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   rv = eventQService->CreateThreadEventQueue();
   NS_ENSURE_SUCCESS(rv, rv);
 
   // create Java proxy for service manager returned by NS_InitXPCOM2
-  rv = CreateJavaProxy(env, servMan, NS_GET_IID(nsIServiceManager),
-                       aResult);
-  NS_RELEASE(servMan);   // Java proxy has owning ref
-
-  return rv;
+  return GetNewOrUsedJavaObject(env, servMan, NS_GET_IID(nsIServiceManager),
+                                aResult);
 }
 
-extern "C" JX_EXPORT jobject JNICALL
-XPCOM_NATIVE(initXPCOM) (JNIEnv* env, jclass, jobject aMozBinDirectory,
+extern "C" NS_EXPORT jobject
+XPCOM_NATIVE(initXPCOM) (JNIEnv* env, jobject, jobject aMozBinDirectory,
                          jobject aAppFileLocProvider)
 {
   jobject servMan;
   nsresult rv = InitXPCOM_Impl(env, aMozBinDirectory, aAppFileLocProvider,
                                &servMan);
   if (NS_SUCCEEDED(rv))
     return servMan;
 
   ThrowException(env, rv, "Failure in initXPCOM");
   FreeJavaGlobals(env);
   return nsnull;
 }
 
-extern "C" JX_EXPORT void JNICALL
-XPCOM_NATIVE(shutdownXPCOM) (JNIEnv *env, jclass, jobject aServMgr)
+extern "C" NS_EXPORT void
+XPCOM_NATIVE(shutdownXPCOM) (JNIEnv *env, jobject, jobject aServMgr)
 {
   nsresult rv;
   nsCOMPtr<nsIServiceManager> servMgr;
   if (aServMgr) {
     // Get native XPCOM instance
-    void* xpcom_obj;
-    rv = GetXPCOMInstFromProxy(env, aServMgr, &xpcom_obj);
+    rv = GetNewOrUsedXPCOMObject(env, aServMgr, NS_GET_IID(nsIServiceManager),
+                                 getter_AddRefs(servMgr), nsnull);
     NS_ASSERTION(NS_SUCCEEDED(rv), "Failed to get XPCOM obj for ServiceMgr.");
 
     // Even if we failed to get the matching xpcom object, we don't abort this
     // function.  Just call NS_ShutdownXPCOM with a null service manager.
-
-    if (NS_SUCCEEDED(rv)) {
-      JavaXPCOMInstance* inst = NS_STATIC_CAST(JavaXPCOMInstance*, xpcom_obj);
-      servMgr = do_QueryInterface(inst->GetInstance());
-    }
   }
 
   // Free globals before calling NS_ShutdownXPCOM(), since we need some
   // XPCOM services.
   FreeJavaGlobals(env);
 
   rv = NS_ShutdownXPCOM(servMgr);
   if (NS_FAILED(rv))
     ThrowException(env, rv, "NS_ShutdownXPCOM failed");
 }
 
-extern "C" JX_EXPORT jobject JNICALL
-XPCOM_NATIVE(newLocalFile) (JNIEnv *env, jclass, jstring aPath,
+extern "C" NS_EXPORT jobject
+XPCOM_NATIVE(newLocalFile) (JNIEnv *env, jobject, jstring aPath,
                             jboolean aFollowLinks)
 {
   // Create a Mozilla string from the jstring
   const PRUnichar* buf = nsnull;
   if (aPath) {
     buf = env->GetStringChars(aPath, nsnull);
     if (!buf)
       return nsnull;  // exception already thrown
   }
 
   nsAutoString path_str(buf);
   env->ReleaseStringChars(aPath, buf);
 
   // Make call to given function
-  nsILocalFile* file = nsnull;
-  nsresult rv = NS_NewLocalFile(path_str, aFollowLinks, &file);
+  nsCOMPtr<nsILocalFile> file;
+  nsresult rv = NS_NewLocalFile(path_str, aFollowLinks, getter_AddRefs(file));
 
   if (NS_SUCCEEDED(rv)) {
     jobject javaProxy;
-    rv = CreateJavaProxy(env, file, NS_GET_IID(nsILocalFile), &javaProxy);
-    NS_RELEASE(file);   // JavaXPCOMInstance has owning ref
+    rv = GetNewOrUsedJavaObject(env, file, NS_GET_IID(nsILocalFile),
+                                &javaProxy);
     if (NS_SUCCEEDED(rv))
       return javaProxy;
   }
 
   ThrowException(env, rv, "Failure in newLocalFile");
   return nsnull;
 }
 
-extern "C" JX_EXPORT jobject JNICALL
-XPCOM_NATIVE(getComponentManager) (JNIEnv *env, jclass)
+extern "C" NS_EXPORT jobject
+XPCOM_NATIVE(getComponentManager) (JNIEnv *env, jobject)
 {
   // Call XPCOM method
-  nsIComponentManager* cm = nsnull;
-  nsresult rv = NS_GetComponentManager(&cm);
+  nsCOMPtr<nsIComponentManager> cm;
+  nsresult rv = NS_GetComponentManager(getter_AddRefs(cm));
 
   if (NS_SUCCEEDED(rv)) {
     jobject javaProxy;
-    rv = CreateJavaProxy(env, cm, NS_GET_IID(nsIComponentManager), &javaProxy);
-    NS_RELEASE(cm);   // JavaXPCOMInstance has owning ref
+    rv = GetNewOrUsedJavaObject(env, cm, NS_GET_IID(nsIComponentManager),
+                                &javaProxy);
     if (NS_SUCCEEDED(rv))
       return javaProxy;
   }
 
   ThrowException(env, rv, "Failure in getComponentManager");
   return nsnull;
 }
 
-extern "C" JX_EXPORT jobject JNICALL
-XPCOM_NATIVE(getComponentRegistrar) (JNIEnv *env, jclass)
+extern "C" NS_EXPORT jobject
+XPCOM_NATIVE(getComponentRegistrar) (JNIEnv *env, jobject)
 {
   // Call XPCOM method
-  nsIComponentRegistrar* cr = nsnull;
-  nsresult rv = NS_GetComponentRegistrar(&cr);
+  nsCOMPtr<nsIComponentRegistrar> cr;
+  nsresult rv = NS_GetComponentRegistrar(getter_AddRefs(cr));
 
   if (NS_SUCCEEDED(rv)) {
     jobject javaProxy;
-    rv = CreateJavaProxy(env, cr, NS_GET_IID(nsIComponentRegistrar), &javaProxy);
-    NS_RELEASE(cr);   // JavaXPCOMInstance has owning ref
+    rv = GetNewOrUsedJavaObject(env, cr, NS_GET_IID(nsIComponentRegistrar),
+                                &javaProxy);
     if (NS_SUCCEEDED(rv))
       return javaProxy;
   }
 
   ThrowException(env, rv, "Failure in getComponentRegistrar");
   return nsnull;
 }
 
-extern "C" JX_EXPORT jobject JNICALL
-XPCOM_NATIVE(getServiceManager) (JNIEnv *env, jclass)
+extern "C" NS_EXPORT jobject
+XPCOM_NATIVE(getServiceManager) (JNIEnv *env, jobject)
 {
   // Call XPCOM method
-  nsIServiceManager* sm = nsnull;
-  nsresult rv = NS_GetServiceManager(&sm);
+  nsCOMPtr<nsIServiceManager> sm;
+  nsresult rv = NS_GetServiceManager(getter_AddRefs(sm));
 
   if (NS_SUCCEEDED(rv)) {
     jobject javaProxy;
-    rv = CreateJavaProxy(env, sm, NS_GET_IID(nsIServiceManager), &javaProxy);
-    NS_RELEASE(sm);   // JavaXPCOMInstance has owning ref
+    rv = GetNewOrUsedJavaObject(env, sm, NS_GET_IID(nsIServiceManager),
+                                &javaProxy);
     if (NS_SUCCEEDED(rv))
       return javaProxy;
   }
 
   ThrowException(env, rv, "Failure in getServiceManager");
   return nsnull;
 }
 
Index: extensions/java/xpcom/nsJavaWrapper.cpp
===================================================================
RCS file: /cvsroot/mozilla/extensions/java/xpcom/nsJavaWrapper.cpp,v
retrieving revision 1.33
diff -u -1 -2 -p -d -r1.33 nsJavaWrapper.cpp
--- extensions/java/xpcom/nsJavaWrapper.cpp	3 May 2005 20:15:35 -0000	1.33
+++ extensions/java/xpcom/nsJavaWrapper.cpp	6 Jan 2006 17:07:46 -0000
@@ -26,35 +26,35 @@
  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
+#include "nsJavaInterfaces.h"
 #include "nsJavaWrapper.h"
 #include "nsJavaXPTCStub.h"
 #include "nsJavaXPCOMBindingUtils.h"
 #include "jni.h"
 #include "xptcall.h"
 #include "nsIInterfaceInfoManager.h"
 #include "nsString.h"
 #include "nsCRT.h"
 #include "prmem.h"
-
-#define JAVAPROXY_NATIVE(func) Java_org_mozilla_xpcom_XPCOMJavaProxy_##func
+#include "nsServiceManagerUtils.h"
 
 static nsID nullID = {0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}};
 
 
 nsresult
 CreateJavaArray(JNIEnv* env, PRUint8 aType, PRUint32 aSize, const nsID& aIID,
                 jobject* aResult)
 {
   jobject array = nsnull;
   switch (aType)
   {
     case nsXPTType::T_I8:
@@ -128,25 +128,25 @@ CreateJavaArray(JNIEnv* env, PRUint8 aTy
       // Create proper Java interface name
       nsCAutoString class_name("org/mozilla/xpcom/");
       class_name.AppendASCII(iface_name);
       jclass ifaceClass = env->FindClass(class_name.get());
       if (!ifaceClass)
         return NS_ERROR_FAILURE;
 
       array = env->NewObjectArray(aSize, ifaceClass, nsnull);
       break;
     }
 
     case nsXPTType::T_VOID:
-      array = env->NewIntArray(aSize);
+      array = env->NewLongArray(aSize);
       break;
 
     default:
       NS_WARNING("unknown type");
       return NS_ERROR_FAILURE;
   }
 
   if (!array)
     return NS_ERROR_OUT_OF_MEMORY;
 
   *aResult = array;
   return NS_OK;
@@ -217,25 +217,25 @@ GetNativeArrayElement(PRUint8 aType, voi
 
     case nsXPTType::T_ASTRING:
     case nsXPTType::T_DOMSTRING:
       aResult->val.p = NS_STATIC_CAST(nsString**, aArray)[aIndex];
       break;
 
     case nsXPTType::T_UTF8STRING:
     case nsXPTType::T_CSTRING:
       aResult->val.p = NS_STATIC_CAST(nsCString**, aArray)[aIndex];
       break;
 
     case nsXPTType::T_VOID:
-      aResult->val.u32 = NS_STATIC_CAST(PRUint32*, aArray)[aIndex];
+      aResult->val.p = NS_STATIC_CAST(void**, aArray)[aIndex];
       break;
 
     default:
       NS_WARNING("unknown type");
       return NS_ERROR_FAILURE;
   }
 
   return NS_OK;
 }
 
 nsresult
 CreateNativeArray(PRUint8 aType, PRUint32 aSize, void** aResult)
@@ -287,25 +287,25 @@ CreateNativeArray(PRUint8 aType, PRUint3
     case nsXPTType::T_WCHAR_STR:
     case nsXPTType::T_IID:
     case nsXPTType::T_ASTRING:
     case nsXPTType::T_DOMSTRING:
     case nsXPTType::T_UTF8STRING:
     case nsXPTType::T_CSTRING:
     case nsXPTType::T_INTERFACE:
     case nsXPTType::T_INTERFACE_IS:
       array = PR_Malloc(aSize * sizeof(void*));
       break;
 
     case nsXPTType::T_VOID:
-      array = PR_Malloc(aSize * sizeof(PRUint32));
+      array = PR_Malloc(aSize * sizeof(void*));
       break;
 
     default:
       NS_WARNING("unknown type");
       return NS_ERROR_FAILURE;
   }
 
   if (!array)
     return NS_ERROR_OUT_OF_MEMORY;
 
   *aResult = array;
   return NS_OK;
@@ -840,46 +840,46 @@ SetupParams(JNIEnv *env, const jobject a
           aVariant.SetValIsUTF8String();
         }
         if (aIsOut) { // 'inout'
           aVariant.ptr = &aVariant.val;
           aVariant.SetPtrIsData();
         }
       } else {  // 'array'
         NS_STATIC_CAST(nsACString**, aVariant.val.p)[aIndex] = str;
       }
       break;
     }
 
-    // handle "void *" as an "int" in Java
+    // handle "void *" as an "long" in Java
     case nsXPTType::T_VOID:
     {
-      LOG(("int (void*)\n"));
+      LOG(("long (void*)\n"));
       if (!aIsOut && !aIsArrayElement) {  // 'in'
-        aVariant.val.p = (void*) env->CallIntMethod(aParam, intValueMID);
+        aVariant.val.p = (void*) env->CallLongMethod(aParam, longValueMID);
       } else { // 'inout' & 'array'
-        jint value;
+        jlong value;
         if (aParam) {
-          env->GetIntArrayRegion((jintArray) aParam, aIndex, 1, &value);
+          env->GetLongArrayRegion((jlongArray) aParam, aIndex, 1, &value);
         }
 
         if (aIsOut) { // 'inout'
           if (aParam) {
             aVariant.val.p = NS_REINTERPRET_CAST(void*, value);
             aVariant.ptr = &aVariant.val;
           } else {
             aVariant.ptr = nsnull;
           }
           aVariant.SetPtrIsData();
         } else {  // 'array'
-          NS_STATIC_CAST(PRUint32*, aVariant.val.p)[aIndex] = value;
+          NS_STATIC_CAST(void**, aVariant.val.p)[aIndex] = (void*) value;
         }
       }
       break;
     }
 
     case nsXPTType::T_ARRAY:
     {
       jobject sourceArray = nsnull;
       if (!aIsOut) {  // 'in'
         sourceArray = aParam;
       } else if (aParam) {  // 'inout'
         jobjectArray array = NS_STATIC_CAST(jobjectArray, aParam);
@@ -1207,29 +1207,29 @@ FinalizeParams(JNIEnv *env, const nsXPTP
       }
 
       // cleanup
       if (str) {
         delete str;
       }
       break;
     }
 
     case nsXPTType::T_VOID:
     {
       if (NS_SUCCEEDED(aInvokeResult)) {
-        jint value = NS_REINTERPRET_CAST(jint, aVariant.val.p);
+        jlong value = NS_REINTERPRET_CAST(jlong, aVariant.val.p);
         if (aParamInfo.IsRetval() && !aIsArrayElement) {
-          *aParam = env->NewObject(intClass, intInitMID, value);
+          *aParam = env->NewObject(longClass, longInitMID, value);
         } else if ((aParamInfo.IsOut() || aIsArrayElement) && *aParam) {
-          env->SetIntArrayRegion((jintArray) *aParam, aIndex, 1, &value);
+          env->SetLongArrayRegion((jlongArray) *aParam, aIndex, 1, &value);
         }
       }
       break;
     }
 
     case nsXPTType::T_ARRAY:
     {
       if (aParamInfo.IsOut() && NS_SUCCEEDED(aInvokeResult)) {
         // Create Java array from returned native array
         jobject jarray = nsnull;
         if (aVariant.val.p) {
           rv = CreateJavaArray(env, aArrayType, aArraySize, aIID, &jarray);
@@ -1369,27 +1369,27 @@ QueryMethodInfo(nsIInterfaceInfo* aIInfo
             rv = NS_ERROR_FAILURE;
           }
         }
       }
       free(setterName);
     }
   }
 
   return rv;
 }
 
 /**
- *  org.mozilla.xpcom.XPCOMJavaProxy.callXPCOMMethod
+ *  org.mozilla.xpcom.XPCOMJavaProxy.internal.callXPCOMMethod
  */
-extern "C" JX_EXPORT jobject JNICALL
+extern "C" NS_EXPORT jobject
 JAVAPROXY_NATIVE(callXPCOMMethod) (JNIEnv *env, jclass that, jobject aJavaProxy,
                                    jstring aMethodName, jobjectArray aParams)
 {
   nsresult rv;
 
   // Get native XPCOM instance
   void* xpcom_obj;
   rv = GetXPCOMInstFromProxy(env, aJavaProxy, &xpcom_obj);
   if (NS_FAILED(rv)) {
     ThrowException(env, 0, "Failed to get matching XPCOM object");
     return nsnull;
   }
@@ -1509,27 +1509,35 @@ JAVAPROXY_NATIVE(callXPCOMMethod) (JNIEn
         LOG(("out/retval\n"));
         params[i].ptr = &(params[i].val);
         params[i].SetPtrIsData();
       }
     }
     if (NS_FAILED(rv)) {
       ThrowException(env, rv, "SetupParams failed");
       return nsnull;
     }
   }
 
   // Call the XPCOM method
-  nsresult invokeResult;
-  invokeResult = XPTC_InvokeByIndex(inst->GetInstance(), methodIndex,
-                                    paramCount, params);
+  const nsIID* iid;
+  iinfo->GetIIDShared(&iid);
+  nsISupports* realObject;
+  rv = inst->GetInstance()->QueryInterface(*iid, (void**) &realObject);
+  if (NS_FAILED(rv)) {
+    ThrowException(env, rv, "Failed to get real XPCOM object");
+    return nsnull;
+  }
+  nsresult invokeResult = XPTC_InvokeByIndex(realObject, methodIndex,
+                                             paramCount, params);
+  NS_RELEASE(realObject);
 
   // Clean up params
   jobject result = nsnull;
   for (PRUint8 i = 0; i < paramCount && NS_SUCCEEDED(rv); i++)
   {
     const nsXPTParamInfo &paramInfo = methodInfo->GetParam(i);
     PRUint8 type = paramInfo.GetType().TagPart();
 
     // is paramater an array?
     PRUint8 arrayType = 0;
     PRUint32 arraySize = 0;
     if (type == nsXPTType::T_ARRAY) {
@@ -1675,50 +1683,50 @@ CreateJavaProxy(JNIEnv* env, nsISupports
   // If there was an error, clean up.
   delete inst;
   return rv;
 }
 
 nsresult
 GetXPCOMInstFromProxy(JNIEnv* env, jobject aJavaObject, void** aResult)
 {
   NS_PRECONDITION(aResult != nsnull, "null ptr");
   if (!aResult)
     return NS_ERROR_NULL_POINTER;
 
-  long xpcom_obj = env->CallStaticLongMethod(xpcomJavaProxyClass,
-                                             getNativeXPCOMInstMID, aJavaObject);
+  jlong xpcom_obj = env->CallStaticLongMethod(xpcomJavaProxyClass,
+                                            getNativeXPCOMInstMID, aJavaObject);
 
   if (!xpcom_obj || env->ExceptionCheck()) {
     return NS_ERROR_FAILURE;
   }
 
   *aResult = NS_REINTERPRET_CAST(void*, xpcom_obj);
 #ifdef DEBUG_JAVAXPCOM
   JavaXPCOMInstance* inst = NS_STATIC_CAST(JavaXPCOMInstance*, *aResult);
   nsIID* iid;
   inst->InterfaceInfo()->GetInterfaceIID(&iid);
   char* iid_str = iid->ToString();
   LOG(("< GetXPCOMInstFromProxy (Java=%08x | XPCOM=%08x | IID=%s)\n",
        (PRUint32) env->CallIntMethod(aJavaObject, hashCodeMID),
        (PRUint32) inst->GetInstance(), iid_str));
   PR_Free(iid_str);
   nsMemory::Free(iid);
 #endif
   return NS_OK;
 }
 
 /**
- *  org.mozilla.xpcom.XPCOMJavaProxy.finalizeProxy
+ *  org.mozilla.xpcom.internal.XPCOMJavaProxy.finalizeProxy
  */
-extern "C" JX_EXPORT void JNICALL
+extern "C" NS_EXPORT void
 JAVAPROXY_NATIVE(finalizeProxy) (JNIEnv *env, jclass that, jobject aJavaProxy)
 {
 #ifdef DEBUG_JAVAXPCOM
   PRUint32 xpcom_addr = 0;
 #endif
 
   // Due to Java's garbage collection, this finalize statement may get called
   // after FreeJavaGlobals().  So check to make sure that everything is still
   // initialized.
   if (gJavaXPCOMLock) {
     nsAutoLock lock(gJavaXPCOMLock);
 
@@ -1745,12 +1753,35 @@ JAVAPROXY_NATIVE(finalizeProxy) (JNIEnv 
         NS_ASSERTION(NS_SUCCEEDED(rv), "Failed to RemoveJavaProxy");
         delete inst;
       }
     }
   }
 
 #ifdef DEBUG_JAVAXPCOM
   LOG(("- Finalize (Java=%08x | XPCOM=%08x)\n",
        (PRUint32) env->CallIntMethod(aJavaProxy, hashCodeMID), xpcom_addr));
 #endif
 }
 
+/**
+ *  org.mozilla.xpcom.XPCOMJavaProxy.isSameXPCOMObject
+ */
+extern "C" NS_EXPORT jboolean
+JAVAPROXY_NATIVE(isSameXPCOMObject) (JNIEnv *env, jclass that,
+                                     jobject aProxy1, jobject aProxy2)
+{
+  void* xpcom_obj1;
+  nsresult rv = GetXPCOMInstFromProxy(env, aProxy1, &xpcom_obj1);
+  if (NS_SUCCEEDED(rv)) {
+    void* xpcom_obj2;
+    rv = GetXPCOMInstFromProxy(env, aProxy2, &xpcom_obj2);
+    if (NS_SUCCEEDED(rv)) {
+      JavaXPCOMInstance* inst1 = NS_STATIC_CAST(JavaXPCOMInstance*, xpcom_obj1);
+      JavaXPCOMInstance* inst2 = NS_STATIC_CAST(JavaXPCOMInstance*, xpcom_obj2);
+      if (inst1->GetInstance() == inst2->GetInstance()) {
+        return JNI_TRUE;
+      }
+    }
+  }
+  return JNI_FALSE;
+}
+
Index: extensions/java/xpcom/nsJavaXPCOMBindingUtils.cpp
===================================================================
RCS file: /cvsroot/mozilla/extensions/java/xpcom/nsJavaXPCOMBindingUtils.cpp,v
retrieving revision 1.33
diff -u -1 -2 -p -d -r1.33 nsJavaXPCOMBindingUtils.cpp
--- extensions/java/xpcom/nsJavaXPCOMBindingUtils.cpp	3 May 2005 20:15:35 -0000	1.33
+++ extensions/java/xpcom/nsJavaXPCOMBindingUtils.cpp	6 Jan 2006 17:07:47 -0000
@@ -88,50 +88,39 @@ jmethodID getNativeXPCOMInstMID = nsnull
 jmethodID getNameMID = nsnull;
 jmethodID proxyToStringMID = nsnull;
 #endif
 
 NativeToJavaProxyMap* gNativeToJavaProxyMap = nsnull;
 JavaToXPTCStubMap* gJavaToXPTCStubMap = nsnull;
 
 PRBool gJavaXPCOMInitialized = PR_FALSE;
 PRLock* gJavaXPCOMLock = nsnull;
 
 
 /******************************
- *  JNI Load & Unload
- ******************************/
-extern "C" JX_EXPORT jint JNICALL
-JNI_OnLoad(JavaVM* vm, void* reserved)
-{
-  // Save pointer to JavaVM, which is valid across threads.
-  gCachedJVM = vm;
-
-  // Let the JVM know that we are using JDK 1.2 JNI features.
-  return JNI_VERSION_1_2;
-}
-
-extern "C" JX_EXPORT void JNICALL
-JNI_OnUnload(JavaVM* vm, void* reserved)
-{
-}
-
-/******************************
  *  InitializeJavaGlobals
  ******************************/
 PRBool
 InitializeJavaGlobals(JNIEnv *env)
 {
   if (gJavaXPCOMInitialized)
     return PR_TRUE;
 
+  // Save pointer to JavaVM, which is valid across threads.
+  jint rc = env->GetJavaVM(&gCachedJVM);
+  if (rc != 0) {
+    NS_WARNING("Failed to get JavaVM");
+    goto init_error;
+  }
+
   jclass clazz;
   if (!(clazz = env->FindClass("java/lang/Object")) ||
       !(hashCodeMID = env->GetMethodID(clazz, "hashCode","()I")))
   {
     NS_WARNING("Problem creating java.lang.Object globals");
     goto init_error;
   }
 
   if (!(clazz = env->FindClass("java/lang/Boolean")) ||
       !(booleanClass = (jclass) env->NewGlobalRef(clazz)) ||
       !(booleanValueMID = env->GetMethodID(clazz, "booleanValue", "()Z")) ||
       !(booleanInitMID = env->GetMethodID(clazz, "<init>", "(Z)V")))
@@ -215,35 +204,35 @@ InitializeJavaGlobals(JNIEnv *env)
   {
     NS_WARNING("Problem creating org.mozilla.xpcom.nsISupports globals");
     goto init_error;
   }
 
   if (!(clazz = env->FindClass("org/mozilla/xpcom/XPCOMException")) ||
       !(xpcomExceptionClass = (jclass) env->NewGlobalRef(clazz)))
   {
     NS_WARNING("Problem creating org.mozilla.xpcom.XPCOMException globals");
     goto init_error;
   }
 
-  if (!(clazz = env->FindClass("org/mozilla/xpcom/XPCOMJavaProxy")) ||
+  if (!(clazz = env->FindClass("org/mozilla/xpcom/internal/XPCOMJavaProxy")) ||
       !(xpcomJavaProxyClass = (jclass) env->NewGlobalRef(clazz)) ||
       !(createProxyMID = env->GetStaticMethodID(clazz, "createProxy",
                                    "(Ljava/lang/Class;J)Ljava/lang/Object;")) ||
       !(isXPCOMJavaProxyMID = env->GetStaticMethodID(clazz, "isXPCOMJavaProxy",
                                                     "(Ljava/lang/Object;)Z")) ||
       !(getNativeXPCOMInstMID = env->GetStaticMethodID(xpcomJavaProxyClass,
                                                        "getNativeXPCOMInstance",
                                                        "(Ljava/lang/Object;)J")))
   {
-    NS_WARNING("Problem creating org.mozilla.xpcom.XPCOMJavaProxy globals");
+    NS_WARNING("Problem creating org.mozilla.xpcom.internal.XPCOMJavaProxy globals");
     goto init_error;
   }
 
 #ifdef DEBUG_JAVAXPCOM
   if (!(clazz = env->FindClass("java/lang/Class")) ||
       !(getNameMID = env->GetMethodID(clazz, "getName","()Ljava/lang/String;")))
   {
     NS_WARNING("Problem creating java.lang.Class globals");
     goto init_error;
   }
 
   if (!(proxyToStringMID = env->GetStaticMethodID(xpcomJavaProxyClass,
@@ -274,29 +263,32 @@ init_error:
   // If we encounter an error during initialization, then free any globals that
   // were allocated, and return false.
   FreeJavaGlobals(env);
   return PR_FALSE;
 }
 
 /*************************
  *    FreeJavaGlobals
  *************************/
 void
 FreeJavaGlobals(JNIEnv* env)
 {
-  PR_Lock(gJavaXPCOMLock);
+  PRLock* tempLock = nsnull;
+  if (gJavaXPCOMLock) {
+    PR_Lock(gJavaXPCOMLock);
 
-  // null out global lock so no one else can use it
-  PRLock* tempLock = gJavaXPCOMLock;
-  gJavaXPCOMLock = nsnull;
+    // null out global lock so no one else can use it
+    tempLock = gJavaXPCOMLock;
+    gJavaXPCOMLock = nsnull;
+  }
 
   gJavaXPCOMInitialized = PR_FALSE;
 
   // Free the mappings first, since that process depends on some of the Java
   // globals that are freed later.
   if (gNativeToJavaProxyMap) {
     gNativeToJavaProxyMap->Destroy(env);
     delete gNativeToJavaProxyMap;
     gNativeToJavaProxyMap = nsnull;
   }
   if (gJavaToXPTCStubMap) {
     gJavaToXPTCStubMap->Destroy();
@@ -345,26 +337,28 @@ FreeJavaGlobals(JNIEnv* env)
     env->DeleteGlobalRef(nsISupportsClass);
     nsISupportsClass = nsnull;
   }
   if (xpcomExceptionClass) {
     env->DeleteGlobalRef(xpcomExceptionClass);
     xpcomExceptionClass = nsnull;
   }
   if (xpcomJavaProxyClass) {
     env->DeleteGlobalRef(xpcomJavaProxyClass);
     xpcomJavaProxyClass = nsnull;
   }
 
-  PR_Unlock(tempLock);
-  PR_DestroyLock(tempLock);
+  if (tempLock) {
+    PR_Unlock(tempLock);
+    PR_DestroyLock(tempLock);
+  }
 }
 
 
 /**************************************
  *  Java<->XPCOM object mappings
  **************************************/
 
 static PLDHashTableOps hash_ops =
 {
   PL_DHashAllocTable,
   PL_DHashFreeTable,
   PL_DHashGetKeyStub,
@@ -718,93 +712,101 @@ GetNewOrUsedJavaObject(JNIEnv* env, nsIS
 
   nsresult rv;
   nsJavaXPTCStub* stub = nsnull;
   aXPCOMObject->QueryInterface(NS_GET_IID(nsJavaXPTCStub), (void**) &stub);
   if (stub) {
     // Get Java object directly from nsJavaXPTCStub
     *aResult = stub->GetJavaObject();
     NS_ASSERTION(*aResult != nsnull, "nsJavaXPTCStub w/o matching Java object");
     NS_RELEASE(stub);
     return NS_OK;
   }
 
+  // Get the root nsISupports of the xpcom object
+  nsCOMPtr<nsISupports> rootObject = do_QueryInterface(aXPCOMObject, &rv);
+  NS_ENSURE_SUCCESS(rv, rv);
+
   // Get associated Java object from hash table
-  rv = gNativeToJavaProxyMap->Find(env, aXPCOMObject, aIID, aResult);
-  if (NS_FAILED(rv))
-    return rv;
+  rv = gNativeToJavaProxyMap->Find(env, rootObject, aIID, aResult);
+  NS_ENSURE_SUCCESS(rv, rv);
   if (*aResult)
     return NS_OK;
 
   // No Java object is associated with the given XPCOM object, so we
   // create a Java proxy.
-  return CreateJavaProxy(env, aXPCOMObject, aIID, aResult);
+  return CreateJavaProxy(env, rootObject, aIID, aResult);
 }
 
 nsresult
 GetNewOrUsedXPCOMObject(JNIEnv* env, jobject aJavaObject, const nsIID& aIID,
                         nsISupports** aResult, PRBool* aIsXPTCStub)
 {
-  NS_PRECONDITION(aResult != nsnull && aIsXPTCStub != nsnull, "null ptr");
-  if (!aResult || !aIsXPTCStub)
+  NS_PRECONDITION(aResult != nsnull, "null ptr");
+  if (!aResult)
     return NS_ERROR_NULL_POINTER;
 
   nsresult rv;
   *aResult = nsnull;
 
   // Check if the given Java object is actually one of our Java proxies.  If so,
   // then we query the associated XPCOM object directly from the proxy.
   // If Java object is not a proxy, then we try to find associated XPCOM object
   // in the mapping table.
   jboolean isProxy = env->CallStaticBooleanMethod(xpcomJavaProxyClass,
                                                   isXPCOMJavaProxyMID,
                                                   aJavaObject);
   if (env->ExceptionCheck())
     return NS_ERROR_FAILURE;
 
   if (isProxy) {
     void* inst;
     rv = GetXPCOMInstFromProxy(env, aJavaObject, &inst);
-    if (NS_SUCCEEDED(rv)) {
-      *aResult = NS_STATIC_CAST(JavaXPCOMInstance*, inst)->GetInstance();
-      NS_ADDREF(*aResult);
+    NS_ENSURE_SUCCESS(rv, rv);
+
+    nsISupports* rootObject =
+              NS_STATIC_CAST(JavaXPCOMInstance*, inst)->GetInstance();
+    rv = rootObject->QueryInterface(aIID, (void**) aResult);
+    NS_ENSURE_SUCCESS(rv, rv);
+
+    if (aIsXPTCStub) {
       *aIsXPTCStub = PR_FALSE;
-      return NS_OK;
     }
+    return NS_OK;
   }
 
-  *aIsXPTCStub = PR_TRUE;
+  if (aIsXPTCStub) {
+    *aIsXPTCStub = PR_TRUE;
+  }
 
   nsJavaXPTCStub* stub;
   rv = gJavaToXPTCStubMap->Find(env, aJavaObject, aIID, &stub);
-  if (NS_FAILED(rv)) {
-    return rv;
-  }
+  NS_ENSURE_SUCCESS(rv, rv);
   if (stub) {
-    // stub is already AddRef'd
+    // stub is already AddRef'd and QI'd
     *aResult = NS_STATIC_CAST(nsISupports*,
                               NS_STATIC_CAST(nsXPTCStubBase*, stub));
     return NS_OK;
   }
 
   // If there is no corresponding XPCOM object, then that means that the
   // parameter is a non-generated class (that is, it is not one of our
   // Java stubs that represent an exising XPCOM object).  So we need to
   // create an XPCOM stub, that can route any method calls to the class.
 
   // Get interface info for class
   nsCOMPtr<nsIInterfaceInfoManager> iim = XPTI_GetInterfaceInfoManager();
+
   nsCOMPtr<nsIInterfaceInfo> iinfo;
   rv = iim->GetInfoForIID(&aIID, getter_AddRefs(iinfo));
-  if (NS_FAILED(rv))
-    return rv;
+  NS_ENSURE_SUCCESS(rv, rv);
 
   // Create XPCOM stub
   stub = new nsJavaXPTCStub(aJavaObject, iinfo);
   if (!stub) {
     return NS_ERROR_OUT_OF_MEMORY;
   }
   rv = gJavaToXPTCStubMap->Add(env, aJavaObject, stub);
   if (NS_FAILED(rv)) {
     delete stub;
     return rv;
   }
 
@@ -895,73 +897,61 @@ ThrowException(JNIEnv* env, const nsresu
     if (clazz) {
       env->ThrowNew(clazz, aMessage);
     }
     env->DeleteLocalRef(clazz);
     return;
   }
 
   // If the error was not handled above, then create an XPCOMException with the
   // given error code and message.
 
   // Create parameters and method signature. Max of 2 params.  The error code
   // comes before the message string.
-  PRUint32 index = 0;
-  jvalue* args = new jvalue[2];
-  if (!args) {
-    ThrowException(env, NS_ERROR_OUT_OF_MEMORY,
-                   "Out of memory while throwing another exception");
-    return;
-  }
-
-  nsCAutoString methodSig("(");
-  if (aErrorCode) {
-    args[index++].j = aErrorCode;
-    methodSig.Append('J');
-  }
+  PRInt64 errorCode = aErrorCode ? aErrorCode : NS_ERROR_FAILURE;
+  nsCAutoString methodSig("(J");
+  jstring message = nsnull;
   if (aMessage) {
-    args[index].l = env->NewStringUTF(aMessage);
-    if (args[index].l == nsnull) {
-      delete[] args;
+    message = env->NewStringUTF(aMessage);
+    if (!message) {
       return;
     }
     methodSig.AppendLiteral("Ljava/lang/String;");
   }
   methodSig.AppendLiteral(")V");
 
   // In some instances (such as in shutdownXPCOM() and termEmbedding()), we
-  // will need to throw an exception when Javaconnect has already been
+  // will need to throw an exception when JavaXPCOM has already been
   // terminated.  In such a case, 'xpcomExceptionClass' will be null.  So we
   // reset it temporarily in order to throw the appropriate exception.
   if (xpcomExceptionClass == nsnull) {
     xpcomExceptionClass = env->FindClass("org/mozilla/xpcom/XPCOMException");
-    if (!xpcomExceptionClass)
+    if (!xpcomExceptionClass) {
       return;
+    }
   }
 
   // create exception object
   jthrowable throwObj = nsnull;
   jmethodID mid = env->GetMethodID(xpcomExceptionClass, "<init>",
                                    methodSig.get());
   if (mid) {
-    throwObj = (jthrowable) env->NewObjectA(xpcomExceptionClass, mid, args);
+    throwObj = (jthrowable) env->NewObject(xpcomExceptionClass, mid, errorCode,
+                                           message);
   }
   NS_ASSERTION(throwObj, "Failed to create XPCOMException object");
 
   // throw exception
   if (throwObj) {
     env->Throw(throwObj);
   }
-
-  // cleanup
-  delete[] args;
 }
 
 nsAString*
 jstring_to_nsAString(JNIEnv* env, jstring aString)
 {
   const PRUnichar* buf = nsnull;
   if (aString) {
     buf = env->GetStringChars(aString, nsnull);
     if (!buf)
       return nsnull;  // exception already thrown
   }
 
Index: extensions/java/xpcom/nsJavaXPCOMBindingUtils.h
===================================================================
RCS file: /cvsroot/mozilla/extensions/java/xpcom/nsJavaXPCOMBindingUtils.h,v
retrieving revision 1.27
diff -u -1 -2 -p -d -r1.27 nsJavaXPCOMBindingUtils.h
--- extensions/java/xpcom/nsJavaXPCOMBindingUtils.h	3 May 2005 20:15:35 -0000	1.27
+++ extensions/java/xpcom/nsJavaXPCOMBindingUtils.h	6 Jan 2006 17:07:47 -0000
@@ -109,27 +109,27 @@ class NativeToJavaProxyMap;
 extern NativeToJavaProxyMap* gNativeToJavaProxyMap;
 class JavaToXPTCStubMap;
 extern JavaToXPTCStubMap* gJavaToXPTCStubMap;
 
 // The Java garbage collector runs in a separate thread.  Since it calls the
 // finalizeProxy() function in nsJavaWrapper.cpp, we need to make sure that
 // all the structures touched by finalizeProxy() are multithread aware.
 extern PRLock* gJavaXPCOMLock;
 
 extern PRBool gJavaXPCOMInitialized;
 
 /**
- * Initialize global structures used by Javaconnect.
+ * Initialize global structures used by JavaXPCOM.
  * @param env   Java environment pointer
- * @return PR_TRUE if Javaconnect is initialized; PR_FALSE if an error occurred
+ * @return PR_TRUE if JavaXPCOM is initialized; PR_FALSE if an error occurred
  */
 PRBool InitializeJavaGlobals(JNIEnv *env);
 
 /**
  * Frees global structures that were allocated by InitializeJavaGlobals().
  * @param env   Java environment pointer
  */
 void FreeJavaGlobals(JNIEnv* env);
 
 
 /*************************
  *  JavaXPCOMInstance
Index: extensions/java/xpcom/nsJavaXPTCStub.cpp
===================================================================
RCS file: /cvsroot/mozilla/extensions/java/xpcom/nsJavaXPTCStub.cpp,v
retrieving revision 1.33
diff -u -1 -2 -p -d -r1.33 nsJavaXPTCStub.cpp
--- extensions/java/xpcom/nsJavaXPTCStub.cpp	8 Jun 2005 16:41:18 -0000	1.33
+++ extensions/java/xpcom/nsJavaXPTCStub.cpp	6 Jan 2006 17:07:48 -0000
@@ -34,24 +34,25 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsJavaXPTCStub.h"
 #include "nsJavaWrapper.h"
 #include "nsJavaXPCOMBindingUtils.h"
 #include "prmem.h"
 #include "nsIInterfaceInfoManager.h"
 #include "nsString.h"
 #include "nsString.h"
 #include "nsCRT.h"
+#include "nsServiceManagerUtils.h"
 
 
 nsJavaXPTCStub::nsJavaXPTCStub(jobject aJavaObject, nsIInterfaceInfo *aIInfo)
   : mJavaStrongRef(nsnull)
   , mIInfo(aIInfo)
   , mMaster(nsnull)
   , mWeakRefCnt(0)
 {
   JNIEnv* env = GetJNIEnv();
   mJavaWeakRef = env->NewWeakGlobalRef(aJavaObject);
 
 #ifdef DEBUG_JAVAXPCOM
@@ -201,24 +202,26 @@ nsJavaXPTCStub::ReleaseWeakRef()
 }
 
 void
 nsJavaXPTCStub::DeleteStrongRef()
 {
   GetJNIEnv()->DeleteGlobalRef(mJavaStrongRef);
   mJavaStrongRef = nsnull;
 }
 
 NS_IMETHODIMP
 nsJavaXPTCStub::QueryInterface(const nsID &aIID, void **aInstancePtr)
 {
+  nsresult rv;
+
   LOG(("JavaStub::QueryInterface()\n"));
   *aInstancePtr = nsnull;
   nsJavaXPTCStub *master = mMaster ? mMaster : this;
 
   // This helps us differentiate between the help classes.
   if (aIID.Equals(NS_GET_IID(nsJavaXPTCStub)))
   {
     *aInstancePtr = master;
     NS_ADDREF(this);
     return NS_OK;
   }
 
@@ -281,26 +284,27 @@ nsJavaXPTCStub::QueryInterface(const nsI
 
   // call queryInterface method
   jobject obj = env->CallObjectMethod(javaObject, qiMID, iid_jstr);
   if (env->ExceptionCheck()) {
     env->ExceptionClear();
     return NS_ERROR_FAILURE;
   }
   if (!obj)
     return NS_NOINTERFACE;
 
   // Get interface info for new java object
   nsCOMPtr<nsIInterfaceInfoManager> iim = XPTI_GetInterfaceInfoManager();
+
   nsCOMPtr<nsIInterfaceInfo> iinfo;
-  nsresult rv = iim->GetInfoForIID(&aIID, getter_AddRefs(iinfo));
+  rv = iim->GetInfoForIID(&aIID, getter_AddRefs(iinfo));
   if (NS_FAILED(rv))
     return rv;
 
   stub = new nsJavaXPTCStub(obj, iinfo);
   if (!stub)
     return NS_ERROR_OUT_OF_MEMORY;
 
   // add stub to the master's list of children, so we can preserve
   // symmetry in future QI calls.  the master will delete each child
   // when it is destroyed.  the refcount of each child is bound to
   // the refcount of the master.  this is done to deal with code
   // like this:
@@ -450,42 +454,47 @@ nsJavaXPTCStub::CallMethod(PRUint16 aMet
       rv = NS_ERROR_FAILURE;
   }
 
   // Call method
   jvalue retval;
   if (NS_SUCCEEDED(rv)) {
     if (!retvalInfo) {
       env->CallVoidMethodA(javaObject, mid, java_params);
     } else {
       switch (retvalInfo->GetType().TagPart())
       {
         case nsXPTType::T_I8:
-        case nsXPTType::T_U8:
           retval.b = env->CallByteMethodA(javaObject, mid, java_params);
           break;
 
         case nsXPTType::T_I16:
-        case nsXPTType::T_U16:
+        case nsXPTType::T_U8:
           retval.s = env->CallShortMethodA(javaObject, mid, java_params);
           break;
 
         case nsXPTType::T_I32:
-        case nsXPTType::T_U32:
+        case nsXPTType::T_U16:
           retval.i = env->CallIntMethodA(javaObject, mid, java_params);
           break;
 
+        case nsXPTType::T_I64:
+        case nsXPTType::T_U32:
+          retval.j = env->CallLongMethodA(javaObject, mid, java_params);
+          break;
+
         case nsXPTType::T_FLOAT:
           retval.f = env->CallFloatMethodA(javaObject, mid, java_params);
           break;
 
+        case nsXPTType::T_U64:
         case nsXPTType::T_DOUBLE:
           retval.d = env->CallDoubleMethodA(javaObject, mid, java_params);
           break;
 
         case nsXPTType::T_BOOL:
           retval.z = env->CallBooleanMethodA(javaObject, mid, java_params);
           break;
 
         case nsXPTType::T_CHAR:
         case nsXPTType::T_WCHAR:
           retval.c = env->CallCharMethodA(javaObject, mid, java_params);
           break;
@@ -494,25 +503,25 @@ nsJavaXPTCStub::CallMethod(PRUint16 aMet
         case nsXPTType::T_WCHAR_STR:
         case nsXPTType::T_IID:
         case nsXPTType::T_ASTRING:
         case nsXPTType::T_DOMSTRING:
         case nsXPTType::T_UTF8STRING:
         case nsXPTType::T_CSTRING:
         case nsXPTType::T_INTERFACE:
         case nsXPTType::T_INTERFACE_IS:
           retval.l = env->CallObjectMethodA(javaObject, mid, java_params);
           break;
 
         case nsXPTType::T_VOID:
-          retval.i = env->CallIntMethodA(javaObject, mid, java_params);
+          retval.j = env->CallLongMethodA(javaObject, mid, java_params);
           break;
 
         default:
           NS_WARNING("Unhandled retval type");
           break;
       }
     }
 
     // Check for exception from called Java function
     jthrowable exp = env->ExceptionOccurred();
     if (exp) {
 #ifdef DEBUG
@@ -883,24 +892,25 @@ nsJavaXPTCStub::SetupJavaParams(const ns
       }
 
       nsID iid;
       rv = GetIIDForMethodParam(mIInfo, aMethodInfo, aParamInfo,
                                 aParamInfo.GetType().TagPart(), aMethodIndex,
                                 aDispatchParams, PR_FALSE, iid);
       if (NS_FAILED(rv))
         break;
 
       // get name of interface
       char* iface_name = nsnull;
       nsCOMPtr<nsIInterfaceInfoManager> iim = XPTI_GetInterfaceInfoManager();
+
       rv = iim->GetNameForIID(&iid, &iface_name);
       if (NS_FAILED(rv) || !iface_name)
         break;
 
       jobject java_stub = nsnull;
       if (xpcom_obj) {
         // Get matching Java object for given xpcom object
         rv = GetNewOrUsedJavaObject(env, xpcom_obj, iid, &java_stub);
         if (NS_FAILED(rv))
           break;
       }
 
@@ -1002,44 +1012,44 @@ nsJavaXPTCStub::SetupJavaParams(const ns
           if (aJValue.l == nsnull) {
             rv = NS_ERROR_OUT_OF_MEMORY;
             break;
           }
         } else {
           aJValue.l = nsnull;
         }
         aMethodSig.AppendLiteral("[Ljava/lang/String;");
       }
     }
     break;
 
-    // Pass the 'void*' address as an integer
+    // Pass the 'void*' address as a long
     case nsXPTType::T_VOID:
     {
       if (!aParamInfo.IsOut()) {  // 'in'
-        aJValue.i = (jint) aVariant.val.p;
-        aMethodSig.Append('I');
+        aJValue.j = (jlong) aVariant.val.p;
+        aMethodSig.Append('J');
       } else {  // 'inout' & 'out'
         if (aVariant.val.p) {
-          jintArray array = env->NewIntArray(1);
+          jlongArray array = env->NewLongArray(1);
           if (!array) {
             rv = NS_ERROR_OUT_OF_MEMORY;
             break;
           }
 
-          env->SetIntArrayRegion(array, 0, 1, (jint*) aVariant.val.p);
+          env->SetLongArrayRegion(array, 0, 1, (jlong*) aVariant.val.p);
           aJValue.l = array;
         } else {
           aJValue.l = nsnull;
         }
-        aMethodSig.AppendLiteral("[I");
+        aMethodSig.AppendLiteral("[J");
       }
     }
     break;
 
     case nsXPTType::T_ARRAY:
       NS_WARNING("array types are not yet supported");
       return NS_ERROR_NOT_IMPLEMENTED;
       break;
 
     case nsXPTType::T_PSTRING_SIZE_IS:
     case nsXPTType::T_PWSTRING_SIZE_IS:
     default:
@@ -1110,41 +1120,42 @@ nsJavaXPTCStub::GetRetvalSig(const nsXPT
     case nsXPTType::T_INTERFACE:
     {
       nsID iid;
       nsresult rv = GetIIDForMethodParam(mIInfo, aMethodInfo, *aParamInfo, type,
                                          aMethodIndex, aDispatchParams,
                                          PR_FALSE, iid);
       if (NS_FAILED(rv))
         break;
 
       // get name of interface
       char* iface_name = nsnull;
       nsCOMPtr<nsIInterfaceInfoManager> iim = XPTI_GetInterfaceInfoManager();
+
       rv = iim->GetNameForIID(&iid, &iface_name);
       if (NS_FAILED(rv) || !iface_name)
         break;
 
       aRetvalSig.AppendLiteral("Lorg/mozilla/xpcom/");
       aRetvalSig.AppendASCII(iface_name);
       aRetvalSig.Append(';');
       nsMemory::Free(iface_name);
       break;
     }
 
     case nsXPTType::T_INTERFACE_IS:
       aRetvalSig.AppendLiteral("Lorg/mozilla/xpcom/nsISupports;");
       break;
 
     case nsXPTType::T_VOID:
-      aRetvalSig.Append('I');
+      aRetvalSig.Append('J');
       break;
 
     case nsXPTType::T_ARRAY:
       NS_WARNING("array types are not yet supported");
       return NS_ERROR_NOT_IMPLEMENTED;
       break;
 
     case nsXPTType::T_PSTRING_SIZE_IS:
     case nsXPTType::T_PWSTRING_SIZE_IS:
     default:
       NS_WARNING("unexpected parameter type");
       return NS_ERROR_UNEXPECTED;
@@ -1453,46 +1464,45 @@ nsJavaXPTCStub::FinalizeJavaParams(const
     break;
 
     case nsXPTType::T_INTERFACE:
     case nsXPTType::T_INTERFACE_IS:
     {
       jobject java_obj = nsnull;
       if (aParamInfo.IsRetval()) {  // 'retval'
         java_obj = aJValue.l;
       } else if (aJValue.l) {  // 'inout' & 'out'
         java_obj = env->GetObjectArrayElement((jobjectArray) aJValue.l, 0);
       }
 
-      nsISupports** variant = NS_STATIC_CAST(nsISupports**, aVariant.val.p);
+      nsISupports* xpcom_obj = nsnull;
       if (java_obj) {
         // Get IID for this param
         nsID iid;
         rv = GetIIDForMethodParam(mIInfo, aMethodInfo, aParamInfo,
                                   aParamInfo.GetType().TagPart(), aMethodIndex,
                                   aDispatchParams, PR_FALSE, iid);
         if (NS_FAILED(rv))
           break;
 
         // If the requested interface is nsIWeakReference, then we look for or
         // create a stub for the nsISupports interface.  Then we create a weak
         // reference from that stub.
         PRBool isWeakRef;
         if (iid.Equals(NS_GET_IID(nsIWeakReference))) {
           isWeakRef = PR_TRUE;
           iid = NS_GET_IID(nsISupports);
         } else {
           isWeakRef = PR_FALSE;
         }
 
-        nsISupports* xpcom_obj;
         PRBool isXPTCStub;
         rv = GetNewOrUsedXPCOMObject(env, java_obj, iid, &xpcom_obj,
                                      &isXPTCStub);
         if (NS_FAILED(rv))
           break;
 
         // If the function expects a weak reference, then we need to
         // create it here.
         if (isWeakRef) {
           if (isXPTCStub) {
             nsJavaXPTCStub* stub = NS_STATIC_CAST(nsJavaXPTCStub*,
                                                  NS_STATIC_CAST(nsXPTCStubBase*,
@@ -1510,43 +1520,39 @@ nsJavaXPTCStub::FinalizeJavaParams(const
             nsCOMPtr<nsISupportsWeakReference> supportsweak =
                                                    do_QueryInterface(xpcom_obj);
             if (supportsweak) {
               nsWeakPtr weakref;
               supportsweak->GetWeakReference(getter_AddRefs(weakref));
               NS_RELEASE(xpcom_obj);
               xpcom_obj = weakref;
               NS_ADDREF(xpcom_obj);
             } else {
               xpcom_obj = nsnull;
             }
           }
-
-        } else if (!isXPTCStub) { // if is native XPCOM object
-          xpcom_obj->Release();
         }
+      }
 
-//        } else if (isXPTCStub) {
-          // nothing to do
-
-        if (*variant && !aParamInfo.IsRetval()) {
-          NS_RELEASE(*variant);
-        }
-        *variant = xpcom_obj;
-      } else {
-        // If were passed in an object, release it now, and set to null.
-        if (*variant && !aParamInfo.IsRetval()) {
+      // For 'inout' params, if the resulting xpcom value is different than the
+      // one passed in, then we must release the incoming xpcom value.
+      nsISupports** variant = NS_STATIC_CAST(nsISupports**, aVariant.val.p);
+      if (aParamInfo.IsIn() && *variant) {
+        nsCOMPtr<nsISupports> in = do_QueryInterface(*variant);
+        nsCOMPtr<nsISupports> out = do_QueryInterface(xpcom_obj);
+        if (in != out) {
           NS_RELEASE(*variant);
         }
-        *variant = nsnull;
       }
+
+      *variant = xpcom_obj;
     }
     break;
 
     case nsXPTType::T_ASTRING:
     case nsXPTType::T_DOMSTRING:
     {
       jstring str = nsnull;
       if (aParamInfo.IsRetval()) {  // 'retval'
         str = (jstring) aJValue.l;
       } else {  // 'inout' & 'out'
         str = (jstring) env->GetObjectArrayElement((jobjectArray) aJValue.l, 0);
       }
@@ -1557,25 +1563,25 @@ nsJavaXPTCStub::FinalizeJavaParams(const
         const jchar* wchar_ptr = env->GetStringChars(str, nsnull);
         if (!wchar_ptr) {
           rv = NS_ERROR_OUT_OF_MEMORY;
           break;
         }
 
         if (!aParamInfo.IsRetval() && *variant) {
           // If we were given an nsString, set it to the new string
           nsString* string = *variant;
           string->Assign(wchar_ptr);
         } else {
           // If the argument that was passed in was null, then we need to
-          // create a new nsID.
+          // create a new string.
           nsString* embedStr = new nsString(wchar_ptr);
           if (embedStr) {
             *variant = embedStr;
           } else {
             rv = NS_ERROR_OUT_OF_MEMORY;
             // don't 'break'; fall through to release chars
           }
         }
 
         // release String buffer
         env->ReleaseStringChars(str, wchar_ptr);
       } else {
@@ -1631,28 +1637,28 @@ nsJavaXPTCStub::FinalizeJavaParams(const
         // (Free only 'inout' & 'out' params)
         if (*variant && !aParamInfo.IsRetval()) {
           delete *variant;
         }
         *variant = nsnull;
       }
     }
     break;
 
     case nsXPTType::T_VOID:
     {
       if (aParamInfo.IsRetval()) {  // 'retval'
-        *((PRUint32 *) aVariant.val.p) = aJValue.i;
+        aVariant.val.p = NS_REINTERPRET_CAST(void*, aJValue.j);
       } else if (aJValue.l) {  // 'inout' & 'out'
-        env->GetIntArrayRegion((jintArray) aJValue.l, 0, 1,
-                               (jint*) aVariant.val.p);
+        env->GetLongArrayRegion((jlongArray) aJValue.l, 0, 1,
+                                (jlong*) aVariant.val.p);
       }
     }
     break;
 
     default:
       NS_WARNING("unexpected parameter type");
       return NS_ERROR_UNEXPECTED;
   }
 
   return rv;
 }
 
Index: extensions/java/xpcom/glue/Makefile.in
===================================================================
RCS file: extensions/java/xpcom/glue/Makefile.in
diff -N extensions/java/xpcom/glue/Makefile.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ extensions/java/xpcom/glue/Makefile.in	6 Jan 2006 17:07:48 -0000
@@ -0,0 +1,77 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Java XPCOM Bindings.
+#
+# The Initial Developer of the Original Code is
+# IBM Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2005
+# IBM Corporation. All Rights Reserved.
+#
+# Contributor(s):
+#   Javier Pedemonte (jhpedemonte@gmail.com)
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH		= ../../../..
+topsrcdir	= @top_srcdir@
+srcdir		= @srcdir@
+VPATH		= @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+MODULE		= javaxpcomglue
+LIBRARY_NAME	= javaxpcomglue
+
+# On Mac OS X, JNI libraries must end with a '.jnilib' extension
+ifeq ($(OS_ARCH),Darwin)
+DLL_SUFFIX = .jnilib
+endif
+
+CPPSRCS	= nsJavaXPCOMGlue.cpp
+
+DEFINES += -DXPCOM_GLUE
+
+LOCAL_INCLUDES	= -I$(JAVA_INCLUDE_PATH)
+
+ifeq ($(OS_ARCH),WINNT)
+LOCAL_INCLUDES += -I$(JAVA_INCLUDE_PATH)/win32
+else
+LOCAL_INCLUDES += -I$(JAVA_INCLUDE_PATH)/linux
+endif
+
+LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/build
+
+EXTRA_DSO_LDOPTS = \
+	$(XPCOM_STANDALONE_GLUE_LDOPTS) \
+	$(NULL)
+
+# Need to link with CoreFoundation on Mac
+ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+EXTRA_DSO_LDOPTS += $(TK_LIBS)
+endif
+
+include $(topsrcdir)/config/rules.mk
+
Index: extensions/java/xpcom/glue/nsJavaXPCOMGlue.cpp
===================================================================
RCS file: extensions/java/xpcom/glue/nsJavaXPCOMGlue.cpp
diff -N extensions/java/xpcom/glue/nsJavaXPCOMGlue.cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ extensions/java/xpcom/glue/nsJavaXPCOMGlue.cpp	6 Jan 2006 17:07:48 -0000
@@ -0,0 +1,297 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Java XPCOM Bindings.
+ *
+ * The Initial Developer of the Original Code is
+ * IBM Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * IBM Corporation. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Javier Pedemonte (jhpedemonte@gmail.com)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "jni.h"
+#include "nsXPCOMPrivate.h" // for XPCOM_DLL defines.
+#include "nsXPCOMGlue.h"
+#include <stdlib.h>
+
+#define GRE_NATIVE(func) Java_org_mozilla_xpcom_internal_GREImpl_##func
+#define XPCOM_NATIVE(func) Java_org_mozilla_xpcom_internal_XPCOMImpl_##func
+#define JAVAPROXY_NATIVE(func) \
+          Java_org_mozilla_xpcom_internal_XPCOMJavaProxy_##func
+
+
+/***********************
+ *  JNI Load & Unload
+ ***********************/
+
+extern "C" JNIEXPORT jint JNICALL
+JNI_OnLoad(JavaVM* vm, void* reserved)
+{
+  // Let the JVM know that we are using JDK 1.2 JNI features.
+  return JNI_VERSION_1_2;
+}
+
+extern "C" JNIEXPORT void JNICALL
+JNI_OnUnload(JavaVM* vm, void* reserved)
+{
+}
+
+/********************************
+ *  JavaXPCOM JNI interfaces
+ ********************************/
+
+typedef void     (*JX_InitEmbeddingFunc) (JNIEnv*, jobject, jobject, jobject,
+                                          jobject);
+typedef void     (*JX_TermEmbeddingFunc) (JNIEnv*, jobject);
+typedef jobject  (*JX_InitXPCOMFunc) (JNIEnv*, jobject, jobject, jobject);
+typedef void     (*JX_ShutdownXPCOMFunc) (JNIEnv*, jobject, jobject);
+typedef jobject  (*JX_NewLocalFileFunc) (JNIEnv*, jobject, jstring, jboolean);
+typedef jobject  (*JX_GetComponentManagerFunc) (JNIEnv*, jobject);
+typedef jobject  (*JX_GetComponentRegistrarFunc) (JNIEnv*, jobject);
+typedef jobject  (*JX_GetServiceManagerFunc) (JNIEnv*, jobject);
+typedef jobject  (*JX_CallXPCOMMethodFunc) (JNIEnv*, jclass, jobject, jstring,
+                                            jobjectArray);
+typedef void     (*JX_FinalizeProxyFunc) (JNIEnv*, jclass, jobject);
+typedef jboolean (*JX_IsSameXPCOMObjectFunc) (JNIEnv*, jclass, jobject,
+                                              jobject);
+
+JX_InitEmbeddingFunc          InitEmbedding;
+JX_TermEmbeddingFunc          TermEmbedding;
+JX_InitXPCOMFunc              InitXPCOM;
+JX_ShutdownXPCOMFunc          ShutdownXPCOM;
+JX_NewLocalFileFunc           NewLocalFile;
+JX_GetComponentManagerFunc    GetComponentManager;
+JX_GetComponentRegistrarFunc  GetComponentRegistrar;
+JX_GetServiceManagerFunc      GetServiceManager;
+JX_CallXPCOMMethodFunc        CallXPCOMMethod;
+JX_FinalizeProxyFunc          FinalizeProxy;
+JX_IsSameXPCOMObjectFunc      IsSameXPCOMObject;
+
+static nsDynamicFunctionLoad funcs[] = {
+  { "Java_org_mozilla_xpcom_internal_GREImpl_initEmbedding",
+          (NSFuncPtr*) &InitEmbedding },
+  { "Java_org_mozilla_xpcom_internal_GREImpl_termEmbedding",
+          (NSFuncPtr*) &TermEmbedding },
+  { "Java_org_mozilla_xpcom_internal_XPCOMImpl_initXPCOM",
+          (NSFuncPtr*) &InitXPCOM },
+  { "Java_org_mozilla_xpcom_internal_XPCOMImpl_shutdownXPCOM",
+          (NSFuncPtr*) &ShutdownXPCOM },
+  { "Java_org_mozilla_xpcom_internal_XPCOMImpl_newLocalFile",
+          (NSFuncPtr*) &NewLocalFile },
+  { "Java_org_mozilla_xpcom_internal_XPCOMImpl_getComponentManager",
+          (NSFuncPtr*) &GetComponentManager },
+  { "Java_org_mozilla_xpcom_internal_XPCOMImpl_getComponentRegistrar",
+          (NSFuncPtr*) &GetComponentRegistrar },
+  { "Java_org_mozilla_xpcom_internal_XPCOMImpl_getServiceManager",
+          (NSFuncPtr*) &GetServiceManager },
+  { "Java_org_mozilla_xpcom_internal_XPCOMJavaProxy_callXPCOMMethod",
+          (NSFuncPtr*) &CallXPCOMMethod },
+  { "Java_org_mozilla_xpcom_internal_XPCOMJavaProxy_finalizeProxy",
+          (NSFuncPtr*) &FinalizeProxy },
+  { "Java_org_mozilla_xpcom_internal_XPCOMJavaProxy_isSameXPCOMObject",
+          (NSFuncPtr*) &IsSameXPCOMObject },
+  { nsnull, nsnull }
+};
+
+// Get path string from java.io.File object.
+jstring
+GetJavaFilePath(JNIEnv* env, jobject aFile)
+{
+  jclass clazz = env->FindClass("java/io/File");
+  if (clazz) {
+    jmethodID pathMID = env->GetMethodID(clazz, "getCanonicalPath",
+                                         "()Ljava/lang/String;");
+    if (pathMID) {
+      return (jstring) env->CallObjectMethod(aFile, pathMID);
+    }
+  }
+
+  return nsnull;
+}
+
+
+// Calls XPCOMGlueStartup using the given java.io.File object, and loads
+// the JavaXPCOM methods from the XUL shared library.
+nsresult
+Initialize(JNIEnv* env, jobject aXPCOMPath)
+{
+  jstring pathString = GetJavaFilePath(env, aXPCOMPath);
+  if (!pathString)
+    return NS_ERROR_FAILURE;
+  const char* path = env->GetStringUTFChars(pathString, nsnull);
+  if (!path)
+    return NS_ERROR_OUT_OF_MEMORY;
+
+  int len = strlen(path);
+  char* xpcomPath = (char*) malloc(len + sizeof(XPCOM_DLL) +
+                                   sizeof(XPCOM_FILE_PATH_SEPARATOR) + 1);
+  if (!xpcomPath)
+    return NS_ERROR_OUT_OF_MEMORY;
+  sprintf(xpcomPath, "%s" XPCOM_FILE_PATH_SEPARATOR XPCOM_DLL, path);
+
+  nsresult rv = XPCOMGlueStartup(xpcomPath);
+  free(xpcomPath);
+  if (NS_FAILED(rv))
+    return rv;
+
+  rv = XPCOMGlueLoadXULFunctions(funcs);
+  if (NS_FAILED(rv))
+    return rv;
+
+  return NS_OK;
+}
+
+void
+ThrowException(JNIEnv* env, const nsresult aErrorCode, const char* aMessage)
+{
+  // Only throw this exception if one hasn't already been thrown, so we don't
+  // mask a previous exception/error.
+  if (env->ExceptionCheck())
+    return;
+
+  // If the error code we get is for an Out Of Memory error, try to throw an
+  // OutOfMemoryError.  The JVM may have enough memory to create this error.
+  if (aErrorCode == NS_ERROR_OUT_OF_MEMORY) {
+    jclass clazz = env->FindClass("java/lang/OutOfMemoryError");
+    if (clazz) {
+      env->ThrowNew(clazz, aMessage);
+    }
+    env->DeleteLocalRef(clazz);
+    return;
+  }
+
+  // If the error was not handled above, then create an XPCOMException with the
+  // given error code.
+  jthrowable throwObj = nsnull;
+  jclass exceptionClass = env->FindClass("org/mozilla/xpcom/XPCOMException");
+  if (exceptionClass) {
+    jmethodID mid = env->GetMethodID(exceptionClass, "<init>",
+                                     "(JLjava/lang/String;)V");
+    if (mid) {
+      throwObj = (jthrowable) env->NewObject(exceptionClass, mid,
+                                             (PRInt64) aErrorCode,
+                                             env->NewStringUTF(aMessage));
+    }
+  }
+  NS_ASSERTION(throwObj, "Failed to create XPCOMException object");
+
+  // throw exception
+  if (throwObj) {
+    env->Throw(throwObj);
+  }
+}
+
+extern "C" JNIEXPORT void JNICALL
+GRE_NATIVE(initEmbeddingNative) (JNIEnv* env, jobject aObject,
+                                 jobject aLibXULDirectory,
+                                 jobject aAppDirectory, jobject aAppDirProvider)
+{
+  nsresult rv = Initialize(env, aLibXULDirectory);
+  if (NS_FAILED(rv)) {
+    ThrowException(env, rv, "Initialization failed in initEmbeddingNative");
+    return;
+  }
+
+  InitEmbedding(env, aObject, aLibXULDirectory, aAppDirectory, aAppDirProvider);
+}
+
+extern "C" JNIEXPORT void JNICALL
+GRE_NATIVE(termEmbedding) (JNIEnv *env, jobject aObject)
+{
+  TermEmbedding(env, aObject);
+  XPCOMGlueShutdown();
+}
+
+extern "C" JNIEXPORT jobject JNICALL
+XPCOM_NATIVE(initXPCOMNative) (JNIEnv* env, jobject aObject,
+                               jobject aMozBinDirectory,
+                               jobject aAppFileLocProvider)
+{
+  nsresult rv = Initialize(env, aMozBinDirectory);
+  if (NS_FAILED(rv)) {
+    ThrowException(env, rv, "Initialization failed in initXPCOMNative");
+    return nsnull;
+  }
+
+  return InitXPCOM(env, aObject, aMozBinDirectory, aAppFileLocProvider);
+}
+
+extern "C" JNIEXPORT void JNICALL
+XPCOM_NATIVE(shutdownXPCOM) (JNIEnv *env, jobject aObject, jobject aServMgr)
+{
+  ShutdownXPCOM(env, aObject, aServMgr);
+  XPCOMGlueShutdown();
+}
+
+extern "C" JNIEXPORT jobject JNICALL
+XPCOM_NATIVE(newLocalFile) (JNIEnv *env, jobject aObject, jstring aPath,
+                            jboolean aFollowLinks)
+{
+  return NewLocalFile(env, aObject, aPath, aFollowLinks);
+}
+
+extern "C" JNIEXPORT jobject JNICALL
+XPCOM_NATIVE(getComponentManager) (JNIEnv *env, jobject aObject)
+{
+  return GetComponentManager(env, aObject);
+}
+
+extern "C" JNIEXPORT jobject JNICALL
+XPCOM_NATIVE(getComponentRegistrar) (JNIEnv *env, jobject aObject)
+{
+  return GetComponentRegistrar(env, aObject);
+}
+
+extern "C" JNIEXPORT jobject JNICALL
+XPCOM_NATIVE(getServiceManager) (JNIEnv *env, jobject aObject)
+{
+  return GetServiceManager(env, aObject);
+}
+
+extern "C" JNIEXPORT jobject JNICALL
+JAVAPROXY_NATIVE(callXPCOMMethod) (JNIEnv *env, jclass that, jobject aJavaProxy,
+                                   jstring aMethodName, jobjectArray aParams)
+{
+  return CallXPCOMMethod(env, that, aJavaProxy, aMethodName, aParams);
+}
+
+extern "C" JNIEXPORT void JNICALL
+JAVAPROXY_NATIVE(finalizeProxyNative) (JNIEnv *env, jclass that,
+                                       jobject aJavaProxy)
+{
+  FinalizeProxy(env, that, aJavaProxy);
+}
+
+extern "C" JNIEXPORT jboolean JNICALL
+JAVAPROXY_NATIVE(isSameXPCOMObject) (JNIEnv *env, jclass that, jobject aProxy1,
+                                     jobject aProxy2)
+{
+  return IsSameXPCOMObject(env, that, aProxy1, aProxy2);
+}
+
Index: extensions/java/xpcom/interfaces/GREVersionRange.java
===================================================================
RCS file: extensions/java/xpcom/interfaces/GREVersionRange.java
diff -N extensions/java/xpcom/interfaces/GREVersionRange.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ extensions/java/xpcom/interfaces/GREVersionRange.java	6 Jan 2006 17:07:48 -0000
@@ -0,0 +1,80 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Java XPCOM Bindings.
+ *
+ * The Initial Developer of the Original Code is
+ * IBM Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * IBM Corporation. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Javier Pedemonte (jhpedemonte@gmail.com)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+package org.mozilla.xpcom;
+
+
+public class GREVersionRange {
+
+  private String lower;
+  private boolean lowerInclusive;
+  private String upper;
+  private boolean upperInclusive;
+
+  public GREVersionRange(String aLower, boolean aLowerInclusive,
+                         String aUpper, boolean aUpperInclusive) {
+    lower = aLower;
+    lowerInclusive = aLowerInclusive;
+    upper = aUpper;
+    upperInclusive = aUpperInclusive;
+  }
+
+  public boolean check(String aVersion) {
+    VersionComparator comparator = new VersionComparator();
+    int c = comparator.compare(aVersion, lower);
+    if (c < 0) {
+      return false;
+    }
+
+    if (c == 0 && !lowerInclusive) {
+      return false;
+    }
+
+    c = comparator.compare(aVersion, upper);
+    if (c > 0) {
+      return false;
+    }
+
+    if (c == 0 && !upperInclusive) {
+      return false;
+    }
+
+    return true;
+  }
+
+}
+
Index: extensions/java/xpcom/interfaces/IAppFileLocProvider.java
===================================================================
RCS file: extensions/java/xpcom/interfaces/IAppFileLocProvider.java
diff -N extensions/java/xpcom/interfaces/IAppFileLocProvider.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ extensions/java/xpcom/interfaces/IAppFileLocProvider.java	6 Jan 2006 17:07:48 -0000
@@ -0,0 +1,92 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Java XPCOM Bindings.
+ *
+ * The Initial Developer of the Original Code is
+ * IBM Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2004
+ * IBM Corporation. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Javier Pedemonte (jhpedemonte@gmail.com)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+package org.mozilla.xpcom;
+
+import java.io.*;
+
+
+/**
+ * Used by XPCOM's Directory Service to get file locations.
+ * <p>
+ * This interface is similar to <code>nsIDirectoryServiceProvider</code> and
+ * <code>nsIDirectoryServiceProvider2</code>, except that its methods use
+ * <code>java.io.File</code> instead of <code>nsIFile</code>.
+ * </p>
+ *
+ * @see Mozilla#initEmbedding
+ * @see Mozilla#initXPCOM
+ * @see <a href=
+ *     "http://lxr.mozilla.org/mozilla/source/xpcom/io/nsIDirectoryService.idl">
+ *      nsIDirectoryServiceProvider </a>
+ * @see <a href=
+ *    "http://lxr.mozilla.org/mozilla/source/xpcom/io/nsDirectoryServiceDefs.h">
+ *      Directory Service property names </a>
+ */
+public interface IAppFileLocProvider {
+
+  /**
+   * Directory Service calls this when it gets the first request for
+   * a property or on every request if the property is not persistent.
+   *
+   * @param prop        the symbolic name of the file
+   * @param persistent  an array of length one used to supply the output value:
+   *                    <ul>
+   *                      <li><code>true</code> - The returned file will be
+   *                      cached by Directory Service. Subsequent requests for
+   *                      this prop will bypass the provider and use the cache.
+   *                      </li>
+   *                      <li><code>false</code> - The provider will be asked
+   *                      for this prop each time it is requested. </li>
+   *                    </ul>
+   *
+   * @return            the file represented by the property
+   */
+  public File getFile(String prop, boolean[] persistent);
+
+  /**
+   * Directory Service calls this when it gets a request for
+   * a property and the requested type is nsISimpleEnumerator.
+   *
+   * @param prop  the symbolic name of the file list
+   *
+   * @return      an array of file locations
+   */
+  public File[] getFiles(String prop);
+
+}
+
Index: extensions/java/xpcom/interfaces/IGRE.java
===================================================================
RCS file: extensions/java/xpcom/interfaces/IGRE.java
diff -N extensions/java/xpcom/interfaces/IGRE.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ extensions/java/xpcom/interfaces/IGRE.java	6 Jan 2006 17:07:48 -0000
@@ -0,0 +1,80 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Java XPCOM Bindings.
+ *
+ * The Initial Developer of the Original Code is
+ * IBM Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2004
+ * IBM Corporation. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Javier Pedemonte (jhpedemonte@gmail.com)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+package org.mozilla.xpcom;
+
+import java.io.*;
+
+
+public interface IGRE {
+
+  /**
+   * Initializes libXUL for embedding purposes.
+   * <p>
+   * NOTE: This function must be called from the "main" thread.
+   * <p>
+   * NOTE: At the present time, this function may only be called once in
+   *       a given process. Use <code>termEmbedding</code> to clean up and free
+   *       resources allocated by <code>initEmbedding</code>.
+   *
+   * @param aLibXULDirectory   The directory in which the libXUL shared library
+   *                           was found.
+   * @param aAppDirectory      The directory in which the application components
+   *                           and resources can be found. This will map to
+   *                           the "resource:app" directory service key.
+   * @param aAppDirProvider    A directory provider for the application. This
+   *                           provider will be aggregated by a libXUL provider
+   *                           which will provide the base required GRE keys.
+   *
+   * @throws XPCOMException  if a failure occurred during initialization
+   */
+  public void initEmbedding(File aLibXULDirectory, File aAppDirectory,
+          IAppFileLocProvider aAppDirProvider) throws XPCOMException;
+
+  /**
+   * Terminates libXUL embedding.
+   * <p>
+   * NOTE: Release any references to XPCOM objects that you may be holding
+   *       before calling this function.
+   *
+   * @throws XPCOMException  if a failure occurred during initialization
+   */
+  public void termEmbedding() throws XPCOMException;
+
+}
+
+
Index: extensions/java/xpcom/interfaces/INIParser.java
===================================================================
RCS file: extensions/java/xpcom/interfaces/INIParser.java
diff -N extensions/java/xpcom/interfaces/INIParser.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ extensions/java/xpcom/interfaces/INIParser.java	6 Jan 2006 17:07:49 -0000
@@ -0,0 +1,235 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Java XPCOM Bindings.
+ *
+ * The Initial Developer of the Original Code is
+ * IBM Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * IBM Corporation. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Javier Pedemonte (jhpedemonte@gmail.com)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+package org.mozilla.xpcom;
+
+import java.io.*;
+import java.nio.charset.Charset;
+import java.util.*;
+
+
+/**
+ * A simple parser for INI files.
+ */
+public class INIParser {
+
+  private HashMap mSections;
+
+  /**
+   * Creates a new <code>INIParser</code> instance from the INI file at the
+   * given path. <code>aCharset</code> specifies the character encoding of
+   * the file.
+   * 
+   * @param aFilename path of INI file to parse
+   * @param aCharset character encoding of file
+   * @throws FileNotFoundException if <code>aFilename</code> does not exist.
+   * @throws IOException if there is a problem reading the given file.
+   */
+  public INIParser(String aFilename, Charset aCharset)
+          throws FileNotFoundException, IOException {
+    initFromFile(new File(aFilename), aCharset);
+  }
+
+  /**
+   * Creates a new <code>INIParser</code> instance from the INI file at the
+   * given path, which is assumed to be in the <code>UTF-8</code> charset.
+   * 
+   * @param aFilename path of INI file to parse
+   * @throws FileNotFoundException if <code>aFilename</code> does not exist.
+   * @throws IOException if there is a problem reading the given file.
+   */
+  public INIParser(String aFilename) throws FileNotFoundException, IOException {
+    initFromFile(new File(aFilename), Charset.forName("UTF-8"));
+  }
+
+  /**
+   * Creates a new <code>INIParser</code> instance from the given file.
+   * <code>aCharset</code> specifies the character encoding of the file.
+   * 
+   * @param aFile INI file to parse
+   * @param aCharset character encoding of file
+   * @throws FileNotFoundException if <code>aFile</code> does not exist.
+   * @throws IOException if there is a problem reading the given file.
+   */
+  public INIParser(File aFile, Charset aCharset)
+          throws FileNotFoundException, IOException {
+    initFromFile(aFile, aCharset);
+  }
+
+  /**
+   * Creates a new <code>INIParser</code> instance from the given file,
+   * which is assumed to be in the <code>UTF-8</code> charset.
+   * 
+   * @param aFile INI file to parse
+   * @throws FileNotFoundException if <code>aFile</code> does not exist.
+   * @throws IOException if there is a problem reading the given file.
+   */
+  public INIParser(File aFile) throws FileNotFoundException, IOException {
+    initFromFile(aFile, Charset.forName("UTF-8"));
+  }
+
+  /**
+   * Parses given INI file.
+   * 
+   * @param aFile INI file to parse
+   * @param aCharset character encoding of file
+   * @throws FileNotFoundException if <code>aFile</code> does not exist.
+   * @throws IOException if there is a problem reading the given file.
+   */
+  private void initFromFile(File aFile, Charset aCharset)
+          throws FileNotFoundException, IOException {
+    FileInputStream fileStream = new FileInputStream(aFile);
+    InputStreamReader inStream = new InputStreamReader(fileStream, aCharset);
+    BufferedReader reader = new BufferedReader(inStream);
+
+    mSections = new HashMap();
+    String currSection = null;
+
+    String line;
+    while ((line = reader.readLine()) != null) {
+      // skip empty lines and comment lines
+      String trimmedLine = line.trim();
+      if (trimmedLine.length() == 0 || trimmedLine.startsWith("#")
+              || trimmedLine.startsWith(";")) {
+        continue;
+      }
+
+      // Look for section headers (i.e. "[Section]").
+      if (line.startsWith("[")) {
+        /*
+         * We are looking for a well-formed "[Section]".  If this header is
+         * malformed (i.e. "[Section" or "[Section]Moretext"), just skip it
+         * and go on to next well-formed section header.
+         */
+        if (!trimmedLine.endsWith("]") ||
+            trimmedLine.indexOf("]") != (trimmedLine.length() - 1)) {
+          currSection = null;
+          continue;
+        }
+
+        // remove enclosing brackets
+        currSection = trimmedLine.substring(1, trimmedLine.length() - 1);
+        continue;
+      }
+
+      // If we haven't found a valid section header, continue to next line
+      if (currSection == null) {
+        continue;
+      }
+
+      StringTokenizer tok = new StringTokenizer(line, "=");
+      if (tok.countTokens() != 2) { // looking for value pairs
+        continue;
+      }
+
+      Properties props = (Properties) mSections.get(currSection);
+      if (props == null) {
+        props = new Properties();
+        mSections.put(currSection, props);
+      }
+      props.setProperty(tok.nextToken(), tok.nextToken());
+    }
+
+    reader.close();
+  }
+
+  /**
+   * Returns an iterator over the section names available in the INI file.
+   * 
+   * @return an iterator over the section names
+   */
+  public Iterator getSections() {
+    return mSections.keySet().iterator();
+  }
+
+  /**
+   * Returns an iterator over the keys available within a section.
+   *
+   * @param aSection section name whose keys are to be returned 
+   * @return an iterator over section keys, or <code>null</code> if no
+   *          such section exists
+   */
+  public Iterator getKeys(String aSection) {
+    /*
+     * Simple wrapper class to convert Enumeration to Iterator
+     */
+    class PropertiesIterator implements Iterator {
+      private Enumeration e;
+
+      public PropertiesIterator(Enumeration aEnum) {
+        e = aEnum;
+      }
+
+      public boolean hasNext() {
+        return e.hasMoreElements();
+      }
+
+      public Object next() {
+        return e.nextElement();
+      }
+
+      public void remove() {
+        return;
+      }
+    }
+
+    Properties props = (Properties) mSections.get(aSection);
+    if (props == null) {
+      return null;
+    }
+
+    return new PropertiesIterator(props.propertyNames());
+  }
+
+  /**
+   * Gets the string value for a particular section and key.
+   *
+   * @param aSection a section name
+   * @param aKey the key whose value is to be returned.
+   * @return string value of particular section and key
+   */
+  public String getString(String aSection, String aKey) {
+    Properties props = (Properties) mSections.get(aSection);
+    if (props == null) {
+      return null;
+    }
+
+    return props.getProperty(aKey);
+  }
+
+}
+
Index: extensions/java/xpcom/interfaces/IXPCOM.java
===================================================================
RCS file: extensions/java/xpcom/interfaces/IXPCOM.java
diff -N extensions/java/xpcom/interfaces/IXPCOM.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ extensions/java/xpcom/interfaces/IXPCOM.java	6 Jan 2006 17:07:49 -0000
@@ -0,0 +1,131 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Java XPCOM Bindings.
+ *
+ * The Initial Developer of the Original Code is
+ * IBM Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2004
+ * IBM Corporation. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Javier Pedemonte (jhpedemonte@gmail.com)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+package org.mozilla.xpcom;
+
+import java.io.*;
+
+
+public interface IXPCOM {
+
+  /**
+   * Initializes XPCOM. You must call this method before proceeding
+   * to use XPCOM.
+   *
+   * @param aMozBinDirectory The directory containing the component
+   *                         registry and runtime libraries;
+   *                         or use <code>null</code> to use the working
+   *                         directory.
+   *
+   * @param aAppFileLocProvider The object to be used by Gecko that specifies
+   *                         to Gecko where to find profiles, the component
+   *                         registry preferences and so on; or use
+   *                         <code>null</code> for the default behaviour.
+   *
+   * @return the service manager
+   *
+   * @exception XPCOMException <ul>
+   *      <li> NS_ERROR_NOT_INITIALIZED - if static globals were not initialied,
+   *            which can happen if XPCOM is reloaded, but did not completly
+   *            shutdown. </li>
+   *      <li> Other error codes indicate a failure during initialisation. </li>
+   * </ul>
+   */
+  public nsIServiceManager initXPCOM(File aMozBinDirectory,
+          IAppFileLocProvider aAppFileLocProvider) throws XPCOMException;
+
+  /**
+   * Shutdown XPCOM. You must call this method after you are finished
+   * using xpcom.
+   *
+   * @param aServMgr    The service manager which was returned by initXPCOM.
+   *                    This will release servMgr.
+   *
+   * @exception XPCOMException  if a failure occurred during termination
+   */
+  public void shutdownXPCOM(nsIServiceManager aServMgr) throws XPCOMException;
+
+  /**
+   * Public Method to access to the service manager.
+   *
+   * @return the service manager
+   *
+   * @exception XPCOMException
+   */
+  public nsIServiceManager getServiceManager() throws XPCOMException;
+
+  /**
+   * Public Method to access to the component manager.
+   *
+   * @return the component manager
+   *
+   * @exception XPCOMException
+   */
+  public nsIComponentManager getComponentManager() throws XPCOMException;
+
+  /**
+   * Public Method to access to the component registration manager.
+   * 
+   * @return the component registration manager
+   *
+   * @exception XPCOMException
+   */
+  public nsIComponentRegistrar getComponentRegistrar() throws XPCOMException;
+
+  /**
+   * Public Method to create an instance of a nsILocalFile.
+   *
+   * @param aPath         A string which specifies a full file path to a 
+   *                      location.  Relative paths will be treated as an
+   *                      error (NS_ERROR_FILE_UNRECOGNIZED_PATH).
+   * @param aFollowLinks  This attribute will determine if the nsLocalFile will
+   *                      auto resolve symbolic links.  By default, this value
+   *                      will be false on all non unix systems.  On unix, this
+   *                      attribute is effectively a noop.
+   *
+   * @return an instance of an nsILocalFile that points to given path
+   *
+   * @exception XPCOMException <ul>
+   *      <li> NS_ERROR_FILE_UNRECOGNIZED_PATH - raised for unrecognized paths
+   *           or relative paths (must supply full file path) </li>
+   * </ul>
+   */
+  public nsILocalFile newLocalFile(String aPath, boolean aFollowLinks)
+          throws XPCOMException;
+
+}
+
Index: extensions/java/xpcom/interfaces/Makefile.in
===================================================================
RCS file: extensions/java/xpcom/interfaces/Makefile.in
diff -N extensions/java/xpcom/interfaces/Makefile.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ extensions/java/xpcom/interfaces/Makefile.in	6 Jan 2006 17:07:49 -0000
@@ -0,0 +1,119 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Java XPCOM Bindings.
+#
+# The Initial Developer of the Original Code is
+# IBM Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2004
+# IBM Corporation. All Rights Reserved.
+#
+# Contributor(s):
+#   Javier Pedemonte (jhpedemonte@gmail.com)
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH		= ../../../..
+topsrcdir	= @top_srcdir@
+srcdir		= @srcdir@
+VPATH		= @srcdir@ ; @srcdir@/..
+
+include $(DEPTH)/config/autoconf.mk
+
+JARFILE = MozillaInterfaces.jar
+JARFILE_SRC = $(patsubst %.jar,%-src.jar,$(JARFILE))
+
+JAVA_SRCS = \
+		$(srcdir)/Mozilla.java \
+		$(srcdir)/GREVersionRange.java \
+		$(srcdir)/IGRE.java \
+		$(srcdir)/IXPCOM.java \
+		$(srcdir)/../XPCOMException.java \
+		$(srcdir)/IAppFileLocProvider.java \
+		$(srcdir)/INIParser.java \
+		$(srcdir)/VersionComparator.java \
+		$(NULL)
+
+GEN_JAVA_SRCS = \
+		IXPCOMError.java \
+		$(NULL)
+
+# install jars into SDK
+SDK_LIBRARY = $(JARFILE) $(JARFILE_SRC)
+
+GARBAGE += $(JARFILE) $(JARFILE_SRC) $(GEN_JAVA_SRCS)
+GARBAGE_DIRS += _javagen org
+
+include $(topsrcdir)/config/rules.mk
+
+ifeq ($(OS_ARCH),WINNT)
+RUN =
+OUTPUT_DIR = $(shell cygpath -w $(CURDIR)/_javagen/org/mozilla/xpcom)
+else
+RUN = $(DIST)/bin/run-mozilla.sh
+OUTPUT_DIR = $(CURDIR)/_javagen/org/mozilla/xpcom
+endif
+
+_javagen/org/mozilla/xpcom/.iface_done: $(JAVA_SRCS) $(DIST)/bin/GenerateJavaInterfaces$(BIN_SUFFIX)
+	@if test ! -d _javagen/org/mozilla/xpcom; then \
+		touch .done; \
+		$(INSTALL) -m 644 .done _javagen/org/mozilla/xpcom; \
+	fi
+	@echo Copying Java source files
+	@$(INSTALL) -m 644 $(JAVA_SRCS) \
+			_javagen/org/mozilla/xpcom
+	@$(INSTALL) -m 644 $(GEN_JAVA_SRCS) _javagen/org/mozilla/xpcom
+	@echo Generating Java interface files
+	$(RUN) $(DIST)/bin/GenerateJavaInterfaces$(BIN_SUFFIX) -d $(OUTPUT_DIR)
+	@touch $@
+
+# Use find and xargs for passing list of Java files to JAVAC.  This avoids the
+# "argument list too long" error on Windows when using *.java
+org/mozilla/xpcom/.class_done: _javagen/org/mozilla/xpcom/.iface_done
+	@echo Compiling Java interface classes
+	find _javagen -name "*.java" | xargs $(JAVAC) $(JAVAC_FLAGS) -classpath . \
+      -d . -sourcepath _javagen
+	@touch $@
+
+$(JARFILE): org/mozilla/xpcom/.class_done Makefile
+	$(JAR) cf $@ org
+
+$(JARFILE_SRC): $(JARFILE)
+	$(JAR) cf $@ -C _javagen org
+
+IXPCOMError.java: $(topsrcdir)/xpcom/base/nsError.h gen-nsError.pl Makefile Makefile.in
+	$(PERL) $(srcdir)/../gen-nsError.pl < $< > $@
+
+export:: IXPCOMError.java
+
+# Temporarily copy these not only to dist/sdk/lib but to dist/bin/sdk/lib
+
+TEMP_SDK_DIR = $(DIST)/bin/sdk/lib
+
+$(TEMP_SDK_DIR)::
+	$(NSINSTALL) -D $@
+
+libs:: $(JARFILE) $(JARFILE_SRC) $(TEMP_SDK_DIR)
+	$(INSTALL) $(IFLAGS2) $^
Index: extensions/java/xpcom/interfaces/Mozilla.java
===================================================================
RCS file: extensions/java/xpcom/interfaces/Mozilla.java
diff -N extensions/java/xpcom/interfaces/Mozilla.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ extensions/java/xpcom/interfaces/Mozilla.java	6 Jan 2006 17:07:49 -0000
@@ -0,0 +1,881 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Java XPCOM Bindings.
+ *
+ * The Initial Developer of the Original Code is
+ * IBM Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * IBM Corporation. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Javier Pedemonte (jhpedemonte@gmail.com)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+package org.mozilla.xpcom;
+
+import java.io.*;
+import java.lang.reflect.*;
+import java.net.*;
+import java.nio.charset.Charset;
+import java.util.*;
+
+
+/**
+ * @see http://www.mozilla.org/projects/embedding/GRE.html
+ */
+public class Mozilla implements IGRE, IXPCOM, IXPCOMError {
+
+  private static Mozilla mozillaInstance = new Mozilla();
+
+  private static final String JAVAXPCOM_JAR = "javaxpcom.jar";
+
+  private IGRE gre = null;
+
+  private IXPCOM xpcom = null;
+
+  /**
+   * @return
+   */
+  public static Mozilla getInstance() {
+    return mozillaInstance;
+  }
+
+  /**
+   * 
+   */
+  private Mozilla() {
+  }
+
+  /**
+   * Locates the path of a GRE with the specified properties.  This method
+   * will only return GREs that support Java embedding (looks for the
+   * presence of "javaxpcom.jar").
+   * <p>
+   * Currently this uses a "first-fit" algorithm, it does not select
+   * the newest available GRE.
+   * 
+   * @param aVersions        An array of version ranges: if any version range
+   *                         matches, the GRE is considered acceptable.
+   * @param aProperties      A list of GRE property/value pairs which must
+   *                         all be satisfied.  This parameter is ignored on
+   *                         Macintosh, because of the manner in which the
+   *                         XUL frameworks are installed.
+   *
+   * @return                 A file object of the appropriate path. If
+   *                         the "local" GRE is specified (via the USE_LOCAL_GRE
+   *                         environment variable, for example), returns
+   *                         <code>null</code>.
+   *
+   * @throws FileNotFoundException if an appropriate GRE could not be found
+   */
+  public static File getGREPathWithProperties(GREVersionRange[] aVersions,
+          Properties aProperties) throws FileNotFoundException {
+    File grePath = null;
+
+    // if GRE_HOME is in the environment, use that GRE
+    String env = System.getProperty("GRE_HOME");
+    if (env != null) {
+      try {
+        grePath = new File(env).getCanonicalFile();
+      } catch (IOException e) {
+        throw new FileNotFoundException("cannot access GRE_HOME");
+      }
+      if (!grePath.exists()) {
+        throw new FileNotFoundException("GRE_HOME doesn't exist");
+      }
+      return grePath;
+    }
+
+    // the Gecko bits that sit next to the application or in the PATH
+    env = System.getProperty("USE_LOCAL_GRE");
+    if (env != null) {
+      return null;
+    }
+
+    // Search for GRE in platform specific locations.  We want a GRE that
+    // supports Java, so we look for the "javaxpcom" property by default.
+    if (aProperties == null) {
+      aProperties = new Properties();
+    }
+    aProperties.setProperty("javaxpcom", "1");
+
+    String osName = System.getProperty("os.name").toLowerCase();
+    if (osName.startsWith("mac os x")) {
+      grePath = getGREPathMacOSX(aVersions);
+    } else if (osName.startsWith("windows")) {
+      grePath = getGREPathWindows(aVersions, aProperties);
+    } else {
+      // assume everything else is Unix/Linux
+      grePath = getGREPathUnix(aVersions, aProperties);
+    }
+
+    if (grePath == null) {
+      throw new FileNotFoundException("GRE not found");
+    }
+
+    return grePath;
+  }
+
+  /**
+   * @param aVersions
+   * @return
+   */
+  private static File getGREPathMacOSX(GREVersionRange[] aVersions) {
+    /*
+     * Check the application bundle first, for
+     * <bundle>/Contents/Frameworks/XUL.framework/libxpcom.dylib.
+     */
+    File grePath = findGREBundleFramework();
+    if (grePath != null) {
+      return grePath;
+    }
+
+    // Check ~/Library/Frameworks/XUL.framework/Versions/<version>/libxpcom.dylib
+    String home = System.getProperty("user.home");
+    if (home != null) {
+      grePath = findGREFramework(home, aVersions);
+      if (grePath != null) {
+        return grePath;
+      }
+    }
+
+    // Check /Library/Frameworks/XUL.framework/Versions/<version>/libxpcom.dylib
+    return findGREFramework("", aVersions);
+  }
+
+  /**
+   * @return
+   */
+  private static File findGREBundleFramework() {
+    /*
+     * Use reflection to get Apple's NSBundle class, which can be used
+     * to get the bundle's "Frameworks" directory.
+     */
+    try {
+      URL[] urls = new URL[1];
+      urls[0] = new File("/System/Library/Java/").toURL();
+      ClassLoader loader = new URLClassLoader(urls);
+      Class bundleClass = Class.forName("com.apple.cocoa.foundation.NSBundle",
+                                        true, loader);
+
+      // Get the bundle for this app.  If this is not executing from
+      // a bundle, this will return null.
+      Method mainBundleMethod = bundleClass.getMethod("mainBundle", null);
+      Object bundle = mainBundleMethod.invoke(null, null);
+
+      if (bundle != null) {
+        // Get the path to the bundle's "Frameworks" directory
+        Method fwPathMethod = bundleClass.getMethod("privateFrameworksPath",
+                                                    null);
+        String path = (String) fwPathMethod.invoke(bundle, null);
+
+        // look for libxpcom.dylib
+        if (path.length() != 0) {
+          File xulDir = new File(path, "XUL.framework");
+          if (xulDir.isDirectory()) {
+            File xpcomLib = new File(xulDir, "libxpcom.dylib");
+            if (xpcomLib.canRead()) {
+              File grePath = xpcomLib.getCanonicalFile().getParentFile();
+
+              // Since GRE Properties aren't supported on Mac OS X, we check
+              // for the existence of the "javaxpcom.jar" file in the GRE.
+              File jar = new File(grePath, JAVAXPCOM_JAR);
+              if (jar.canRead()) {
+                // found GRE
+                return grePath;
+              }
+            }
+          }
+        }
+      }
+    } catch (Exception e) { }
+
+    return null;
+  }
+
+  /**
+   * @param aRootPath
+   * @param aVersions
+   * @return
+   */
+  private static File findGREFramework(String aRootPath,
+                                       GREVersionRange[] aVersions) {
+    File frameworkDir = new File(aRootPath +
+                                 "/Library/Frameworks/XUL.framework/Versions");
+    if (!frameworkDir.exists())
+      return null;
+
+    File[] files = frameworkDir.listFiles();
+    for (int i = 0; i < files.length; i++) {
+      if (checkVersion(files[i].getName(), aVersions)) {
+        File xpcomLib = new File(files[i], "libxpcom.dylib");
+
+        // Since GRE Properties aren't supported on Mac OS X, we check
+        // for the existence of the "javaxpcom.jar" file in the GRE.
+        File jar = new File(files[i], JAVAXPCOM_JAR);
+        if (xpcomLib.canRead() && jar.canRead()) {
+          return files[i];
+        }
+      }
+    }
+
+    return null;
+  }
+
+  /**
+   * @param aVersions
+   * @param aProperties
+   * @return
+   */
+  private static File getGREPathWindows(GREVersionRange[] aVersions,
+                                        Properties aProperties) {
+    /*
+     * Note the usage of the "Software\\mozilla.org\\GRE" subkey - this allows
+     * us to have multiple versions of GREs on the same machine by having
+     * subkeys such as 1.0, 1.1, 2.0 etc. under it.
+     *
+     * Please see http://www.mozilla.org/projects/embedding/GRE.html for
+     * more info.
+     */
+
+    final String greKey = "Software\\mozilla.org\\GRE";
+
+    // See if there is a GRE registered for the current user.
+    // If not, look for one on the system.
+    String key = "HKEY_CURRENT_USER" + "\\" + greKey;
+    File grePath = getGREPathFromRegKey(key, aVersions, aProperties);
+    if (grePath == null) {
+      key = "HKEY_LOCAL_MACHINE" + "\\" + greKey;
+      grePath = getGREPathFromRegKey(key, aVersions, aProperties);
+    }
+
+    return grePath;
+  }
+
+  /**
+   * @param aRegKey
+   * @param aVersions
+   * @param aProperties
+   * @return
+   */
+  private static File getGREPathFromRegKey(String aRegKey,
+          GREVersionRange[] aVersions, Properties aProperties) {
+    // create a temp file for the registry export
+    File tempFile;
+    try {
+      tempFile = File.createTempFile("jx_registry", null);
+    } catch (IOException e) {
+      // failed to create temp file.  ABORT
+      return null;
+    }
+
+    Process proc;
+    try {
+      proc = Runtime.getRuntime().exec("regedit /e " + tempFile.getPath() +
+                                       " \"" + aRegKey + "\"");
+      proc.waitFor();
+    } catch (Exception e) {
+      // Failed to run regedit.exe.  Length of temp file is zero, and that's
+      // handled next.
+    }
+
+    // If there is a key by that name in the registry, then the file length
+    // will not be zero.
+    File grePath = null;
+    if (tempFile.length() != 0) {
+      grePath = getGREPathFromRegistryFile(tempFile.getPath(),
+              aRegKey, aVersions, aProperties);
+    }
+
+    tempFile.delete();
+    return grePath;
+  }
+
+  /**
+   * @param aFileName
+   * @param aCharset
+   * @param aKeyName
+   * @param aVersions
+   * @param aProperties
+   * @return
+   */
+  private static File getGREPathFromRegistryFile(String aFileName,
+          String aKeyName, GREVersionRange[] aVersions,
+          Properties aProperties) {
+    INIParser parser;
+    try {
+      parser = new INIParser(aFileName, Charset.forName("UTF-16"));
+    } catch (Exception e) {
+      // Problem reading from file.  Bail out.
+      return null;
+    }
+
+    Iterator sectionsIter = parser.getSections();
+    while (sectionsIter.hasNext()) {
+      // get 'section' name, which will be a registry key name
+      String section = (String) sectionsIter.next();
+
+      // Get the GRE subkey;  that is, everything after
+      // "<root>\Software\mozilla.org\GRE\"
+      String subkeyName = section.substring(aKeyName.length() + 1);
+
+      // We are only interested in _immediate_ subkeys.  We want
+      // "<root>\Software\mozilla.org\GRE\<version>" but not
+      // "<root>\Software\mozilla.org\GRE\<version>\<moretext>".
+      if (subkeyName.indexOf('\\') != -1) {
+        continue;
+      }
+
+      // See if this registry key has a "Version" value, and if so, compare
+      // it to our desired versions.
+      String version = parser.getString(section, "\"Version\"");
+      if (version == null) {
+        continue;
+      }
+      // remove quotes around string
+      version = version.substring(1, version.length() - 1);
+      if (!checkVersion(version, aVersions)) {
+        continue;
+      }
+
+      // All properties must match, keeping in mind that the propery/value
+      // pairs returned by regedit.exe have quotes around them.
+      if (aProperties != null) {
+        boolean ok = true;
+        Enumeration e = aProperties.propertyNames();
+        while (ok && e.hasMoreElements()) {
+          String prop = (String) e.nextElement();
+          String greValue = parser.getString(section, "\"" + prop + "\"");
+          if (greValue == null) {
+            // No such property is set for this GRE. Go on to next GRE.
+            ok = false;
+          } else  {
+            // See if the value of the property for the GRE matches
+            // the given value.
+            String value = aProperties.getProperty(prop);
+            if (!greValue.equals("\"" + value + "\"")) {
+              ok = false;
+            }
+          }
+        }
+        if (!ok) {
+          continue;
+        }
+      }
+
+      String pathStr = parser.getString(section, "\"GreHome\"");
+      if (pathStr != null) {
+        // remove quotes around string
+        pathStr = pathStr.substring(1, pathStr.length() - 1);
+        File grePath = new File(pathStr);
+        if (grePath.exists()) {
+          File xpcomLib = new File(grePath, "xpcom.dll");
+          if (xpcomLib.canRead()) {
+            // found a good GRE
+            return grePath;
+          }
+        }
+      }
+    }
+
+    return null;
+  }
+
+  /**
+   * @param aVersions
+   * @param aProperties
+   * @return
+   */
+  private static File getGREPathUnix(GREVersionRange[] aVersions,
+                                     Properties aProperties) {
+    File grePath = null;
+
+    String env = System.getProperty("MOZ_GRE_CONF");
+    if (env != null) {
+      grePath = getPathFromConfigFile(env, aVersions, aProperties);
+      if (grePath != null) {
+        return grePath;
+      }
+    }
+
+    final String greUserConfFile = ".gre.config";
+    final String greUserConfDir = ".gre.d";
+    final String greConfPath = "/etc/gre.conf";
+    final String greConfDir = "/etc/gre.d";
+
+    env = System.getProperty("user.home");
+    if (env != null) {
+      // Look in ~/.gre.config
+      grePath = getPathFromConfigFile(env + File.separator + greUserConfFile,
+                                      aVersions, aProperties);
+      if (grePath != null) {
+        return grePath;
+      }
+
+      // Look in ~/.gre.d/*.conf
+      grePath = getPathFromConfigDir(env + File.separator + greUserConfDir,
+                                     aVersions, aProperties);
+      if (grePath != null) {
+        return grePath;
+      }
+    }
+
+    // Look for a global /etc/gre.conf file
+    grePath = getPathFromConfigFile(greConfPath, aVersions, aProperties);
+    if (grePath != null) {
+      return grePath;
+    }
+
+    // Look for a group of config files in /etc/gre.d/
+    grePath = getPathFromConfigDir(greConfDir, aVersions, aProperties);
+    return grePath;
+  }
+
+  /**
+   * @param aFileName
+   * @param aVersions
+   * @param aProperties
+   * @return
+   */
+  private static File getPathFromConfigFile(String aFileName,
+          GREVersionRange[] aVersions, Properties aProperties) {
+    INIParser parser;
+    try {
+      parser = new INIParser(aFileName);
+    } catch (Exception e) {
+      // Problem reading from file.  Bail out.
+      return null;
+    }
+
+    Iterator sectionsIter = parser.getSections();
+    while (sectionsIter.hasNext()) {
+      // get 'section' name, which will be a version string
+      String section = (String) sectionsIter.next();
+
+      // if this isn't one of the versions we are looking for, move
+      // on to next section
+      if (!checkVersion(section, aVersions)) {
+        continue;
+      }
+
+      // all properties must match
+      if (aProperties != null) {
+        boolean ok = true;
+        Enumeration e = aProperties.propertyNames();
+        while (ok && e.hasMoreElements()) {
+          String prop = (String) e.nextElement();
+          String greValue = parser.getString(section, prop);
+          if (greValue == null) {
+            // No such property is set for this GRE. Go on to next GRE.
+            ok = false;
+          } else  {
+            // See if the value of the property for the GRE matches
+            // the given value.
+            if (!greValue.equals(aProperties.getProperty(prop))) {
+              ok = false;
+            }
+          }
+        }
+        if (!ok) {
+          continue;
+        }
+      }
+
+      String pathStr = parser.getString(section, "GRE_PATH");
+      if (pathStr != null) {
+        File grePath = new File(pathStr);
+        if (grePath.exists()) {
+          File xpcomLib = new File(grePath, "libxpcom.so");
+          if (xpcomLib.canRead()) {
+            // found a good GRE
+            return grePath;
+          }
+        }
+      }
+    }
+
+    return null;
+  }
+
+  /**
+   * @param aDirName
+   * @param aVersions
+   * @param aProperties
+   * @return
+   */
+  private static File getPathFromConfigDir(String aDirName,
+          GREVersionRange[] aVersions, Properties aProperties) {
+    /*
+     * Open the directory provided and try to read any files in that
+     * directory that end with .conf.  We look for an entry that might
+     * point to the GRE that we're interested in.
+     */
+
+    File dir = new File(aDirName);
+    if (!dir.isDirectory()) {
+      return null;
+    }
+
+    File grePath = null;
+    File[] files = dir.listFiles();
+    for (int i = 0; i < files.length && grePath == null; i++) {
+      // only look for files that end in '.conf'
+      if (!files[i].getName().endsWith(".conf")) {
+        continue;
+      }
+
+      grePath = getPathFromConfigFile(files[i].getPath(), aVersions,
+                                      aProperties);
+    }
+
+    return grePath;
+  }
+
+  /**
+   * @param aVersionToCheck
+   * @param aVersions
+   * @return
+   */
+  private static boolean checkVersion(String aVersionToCheck,
+                                      GREVersionRange[] aVersions) {
+    for (int i = 0; i < aVersions.length; i++) {
+      if (aVersions[i].check(aVersionToCheck)) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  /**
+   * Initializes libXUL for embedding purposes.
+   * <p>
+   * NOTE: This function must be called from the "main" thread.
+   * <p>
+   * NOTE: At the present time, this function may only be called once in
+   *       a given process. Use <code>termEmbedding</code> to clean up and free
+   *       resources allocated by <code>initEmbedding</code>.
+   *
+   * @param aLibXULDirectory   The directory in which the libXUL shared library
+   *                           was found.
+   * @param aAppDirectory      The directory in which the application components
+   *                           and resources can be found. This will map to
+   *                           the "resource:app" directory service key.
+   * @param aAppDirProvider    A directory provider for the application. This
+   *                           provider will be aggregated by a libXUL provider
+   *                           which will provide the base required GRE keys.
+   *
+   * @throws IllegalArgumentException  if <code>aLibXULDirectory</code> is not
+   *                           a valid path
+   * @throws XPCOMException  if a failure occurred during initialization
+   */
+  public void initEmbedding(File aLibXULDirectory, File aAppDirectory,
+          IAppFileLocProvider aAppDirProvider) throws XPCOMException {
+    loadJavaXPCOM(aLibXULDirectory, true);
+    gre.initEmbedding(aLibXULDirectory, aAppDirectory, aAppDirProvider);
+  }
+
+  /**
+   * @param aLibXULDirectory
+   * @param aLoadGREImpl
+   * @throws XPCOMException
+   */
+  private void loadJavaXPCOM(File aLibXULDirectory, boolean aLoadGREImpl)
+          throws XPCOMException {
+    File jar = new File(aLibXULDirectory, JAVAXPCOM_JAR);
+    if (!jar.exists()) {
+      throw new XPCOMException(NS_ERROR_FILE_INVALID_PATH);
+    }
+
+    URL[] urls = new URL[1];
+    try {
+      urls[0] = jar.toURL();
+    } catch (MalformedURLException e) {
+      throw new XPCOMException(NS_ERROR_FILE_INVALID_PATH);
+    }
+    ClassLoader loader = new URLClassLoader(urls,
+            this.getClass().getClassLoader());
+
+    try {
+      if (aLoadGREImpl) {
+        Class greClass = Class.forName("org.mozilla.xpcom.internal.GREImpl",
+                                       true, loader);
+        gre = (IGRE) greClass.newInstance();
+      }
+      Class xpcomClass = Class.forName("org.mozilla.xpcom.internal.XPCOMImpl",
+                                       true, loader);
+      xpcom = (IXPCOM) xpcomClass.newInstance();
+    } catch (Exception e) {
+      throw new XPCOMException(NS_ERROR_FAILURE,
+              "failure creating org.mozilla.xpcom.internal.*");
+    }
+  }
+
+  /**
+   * Terminates libXUL embedding.
+   * <p>
+   * NOTE: Release any references to XPCOM objects that you may be holding
+   *       before calling this function.
+   */
+  public void termEmbedding() throws XPCOMException {
+    try {
+      gre.termEmbedding();
+    } catch (NullPointerException e) {
+      throw new XPCOMException(Mozilla.NS_ERROR_NULL_POINTER,
+          "Attempt to use unitialized GRE object");
+    } finally {
+      gre = null;
+      xpcom = null;
+    }
+  }
+
+  /**
+   * Initializes XPCOM. You must call this method before proceeding
+   * to use XPCOM.
+   *
+   * @param aMozBinDirectory The directory containing the component
+   *                         registry and runtime libraries;
+   *                         or use <code>null</code> to use the working
+   *                         directory.
+   *
+   * @param aAppFileLocProvider The object to be used by Gecko that specifies
+   *                         to Gecko where to find profiles, the component
+   *                         registry preferences and so on; or use
+   *                         <code>null</code> for the default behaviour.
+   *
+   * @return the service manager
+   *
+   * @exception XPCOMException <ul>
+   *      <li> NS_ERROR_NOT_INITIALIZED - if static globals were not initialied,
+   *            which can happen if XPCOM is reloaded, but did not completly
+   *            shutdown. </li>
+   *      <li> Other error codes indicate a failure during initialisation. </li>
+   * </ul>
+   */
+  public nsIServiceManager initXPCOM(File aMozBinDirectory,
+          IAppFileLocProvider aAppFileLocProvider) throws XPCOMException {
+    loadJavaXPCOM(aMozBinDirectory, false);
+    return xpcom.initXPCOM(aMozBinDirectory, aAppFileLocProvider);
+  }
+
+  /**
+   * Shutdown XPCOM. You must call this method after you are finished
+   * using xpcom.
+   *
+   * @param aServMgr    The service manager which was returned by initXPCOM.
+   *                    This will release servMgr.
+   *
+   * @exception XPCOMException  if a failure occurred during termination
+   */
+  public void shutdownXPCOM(nsIServiceManager aServMgr) throws XPCOMException {
+    try {
+      xpcom.shutdownXPCOM(aServMgr);
+    } catch (NullPointerException e) {
+      throw new XPCOMException(Mozilla.NS_ERROR_NULL_POINTER,
+          "Attempt to use unitialized XPCOM object");
+    } finally {
+      xpcom = null;
+    }
+  }
+
+  /**
+   * Public Method to access to the service manager.
+   *
+   * @return the service manager
+   *
+   * @exception XPCOMException
+   */
+  public nsIServiceManager getServiceManager() throws XPCOMException {
+    try {
+      return xpcom.getServiceManager();
+    } catch (NullPointerException e) {
+      throw new XPCOMException(Mozilla.NS_ERROR_NULL_POINTER,
+          "Attempt to use unitialized XPCOM object");
+    }
+  }
+
+  /**
+   * Public Method to access to the component manager.
+   *
+   * @return the component manager
+   *
+   * @exception XPCOMException
+   */
+  public nsIComponentManager getComponentManager() throws XPCOMException {
+    try {
+      return xpcom.getComponentManager();
+    } catch (NullPointerException e) {
+      throw new XPCOMException(Mozilla.NS_ERROR_NULL_POINTER,
+          "Attempt to use unitialized XPCOM object");
+    }
+  }
+
+  /**
+   * Public Method to access to the component registration manager.
+   * 
+   * @return the component registration manager
+   *
+   * @exception XPCOMException
+   */
+  public nsIComponentRegistrar getComponentRegistrar() throws XPCOMException {
+    try {
+      return xpcom.getComponentRegistrar();
+    } catch (NullPointerException e) {
+      throw new XPCOMException(Mozilla.NS_ERROR_NULL_POINTER,
+          "Attempt to use unitialized XPCOM object");
+    }
+  }
+
+  /**
+   * Public Method to create an instance of a nsILocalFile.
+   *
+   * @param aPath         A string which specifies a full file path to a 
+   *                      location.  Relative paths will be treated as an
+   *                      error (NS_ERROR_FILE_UNRECOGNIZED_PATH).
+   * @param aFollowLinks  This attribute will determine if the nsLocalFile will
+   *                      auto resolve symbolic links.  By default, this value
+   *                      will be false on all non unix systems.  On unix, this
+   *                      attribute is effectively a noop.
+   *
+   * @return an instance of an nsILocalFile that points to given path
+   *
+   * @exception XPCOMException <ul>
+   *      <li> NS_ERROR_FILE_UNRECOGNIZED_PATH - raised for unrecognized paths
+   *           or relative paths (must supply full file path) </li>
+   * </ul>
+   */
+  public nsILocalFile newLocalFile(String aPath, boolean aFollowLinks)
+          throws XPCOMException {
+    try {
+      return xpcom.newLocalFile(aPath, aFollowLinks);
+    } catch (NullPointerException e) {
+      throw new XPCOMException(Mozilla.NS_ERROR_NULL_POINTER,
+          "Attempt to use unitialized XPCOM object");
+    }
+  }
+
+  /**
+   * If you create a class that implements nsISupports, you will need to provide
+   * an implementation of the <code>queryInterface</code> method.  This helper
+   * function provides a simple implementation.  Therefore, if your class does
+   * not need to do anything special with <code>queryInterface</code>, your
+   * implementation would look like:
+   * <pre>
+   *      public nsISupports queryInterface(String aIID) {
+   *        return XPCOM.queryInterface(this, aIID);
+   *      }
+   * </pre>
+   *
+   * @param aObject object to query
+   * @param aIID    requested interface IID
+   *
+   * @return        <code>aObject</code> if the given object supports that
+   *                interface;
+   *                <code>null</code> otherwise.
+   */
+  public static nsISupports queryInterface(nsISupports aObject, String aIID) {
+    ArrayList classes = new ArrayList();
+    classes.add(aObject.getClass());
+
+    while (!classes.isEmpty()) {
+      Class clazz = (Class) classes.remove(0);
+
+      // Skip over any class/interface in the "java.*" and "javax.*" domains.
+      String className = clazz.getName();
+      if (className.startsWith("java.") || className.startsWith("javax.")) {
+        continue;
+      }
+
+      // If given IID matches that of the current interface, then we
+      // know that aObject implements the interface specified by the given IID.
+      if (clazz.isInterface() && className.startsWith("org.mozilla")) {
+        String iid = Mozilla.getInterfaceIID(clazz);
+        if (iid != null && aIID.equals(iid)) {
+          return aObject;
+        }
+      }
+
+      // clazz didn't match, so add the interfaces it implements
+      Class[] interfaces = clazz.getInterfaces();
+      for (int i = 0; i < interfaces.length; i++ ) {
+        classes.add(interfaces[i]);
+      }
+
+      // Also add its superclass
+      Class superclass = clazz.getSuperclass();
+      if (superclass != null) {
+        classes.add(superclass);
+      }
+    }
+
+    return null;
+  }
+
+  /**
+   * Gets the interface IID for a particular Java interface.  This is similar
+   * to NS_GET_IID in the C++ Mozilla files.
+   *
+   * @param aInterface  interface which has defined an IID
+   *
+   * @return            IID for given interface
+   */
+  public static String getInterfaceIID(Class aInterface) {
+    // Get short class name (i.e. "bar", not "org.blah.foo.bar")
+    StringBuffer iidName = new StringBuffer();
+    String fullClassName = aInterface.getName();
+    int index = fullClassName.lastIndexOf(".");
+    String className = index > 0 ? fullClassName.substring(index + 1)
+                                 : fullClassName;
+
+    // Create iid field name
+    if (className.startsWith("ns")) {
+      iidName.append("NS_");
+      iidName.append(className.substring(2).toUpperCase());
+    } else {
+      iidName.append(className.toUpperCase());
+    }
+    iidName.append("_IID");
+
+    String iid;
+    try {
+      Field iidField = aInterface.getDeclaredField(iidName.toString());
+      iid = (String) iidField.get(null);
+    } catch (NoSuchFieldException e) {
+      // Class may implement non-Mozilla interfaces, which would not have an
+      // IID method.  In that case, just null.
+      iid = null;
+    } catch (IllegalAccessException e) {
+      // Not allowed to access that field for some reason.  Write out an
+      // error message, but don't fail.
+      System.err.println("ERROR: Could not get field " + iidName.toString());
+      iid = null;
+    }
+
+    return iid;
+  }
+
+}
+
Index: extensions/java/xpcom/interfaces/VersionComparator.java
===================================================================
RCS file: extensions/java/xpcom/interfaces/VersionComparator.java
diff -N extensions/java/xpcom/interfaces/VersionComparator.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ extensions/java/xpcom/interfaces/VersionComparator.java	6 Jan 2006 17:07:49 -0000
@@ -0,0 +1,269 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Java XPCOM Bindings.
+ *
+ * The Initial Developer of the Original Code is
+ * IBM Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * IBM Corporation. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Javier Pedemonte (jhpedemonte@gmail.com)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+package org.mozilla.xpcom;
+
+import java.util.*;
+
+
+/**
+ * Version strings are dot-separated sequences of version-parts.
+ * <p>
+ * A version-part consists of up to four parts, all of which are optional:
+ * <br><code>
+ * &lt;number-a&gt;&lt;string-b&gt;&lt;number-c&gt;
+ * &lt;string-d (everything else)&gt;
+ * </code> <p>
+ * A version-part may also consist of a single asterisk "*" which indicates
+ * "infinity".
+ * <p>
+ * Numbers are base-10, and are zero if left out.
+ * Strings are compared bytewise.
+ * <p>
+ * For additional backwards compatibility, if "string-b" is "+" then
+ * "number-a" is incremented by 1 and "string-b" becomes "pre".
+ * <p> <pre>
+ * 1.0pre1
+ * < 1.0pre2  
+ *   < 1.0 == 1.0.0 == 1.0.0.0
+ *     < 1.1pre == 1.1pre0 == 1.0+
+ *       < 1.1pre1a
+ *         < 1.1pre1
+ *           < 1.1pre10a
+ *             < 1.1pre10
+ * </pre>
+ * Although not required by this interface, it is recommended that
+ * numbers remain within the limits of a signed char, i.e. -127 to 128.
+ */
+public class VersionComparator implements nsIVersionComparator {
+
+  public nsISupports queryInterface(String aIID) {
+    return Mozilla.queryInterface(this, aIID);
+  }
+
+  /**
+   * Compare two version strings
+   * @param A   a version string
+   * @param B   a version string
+   * @return a value less than 0 if A < B;
+   *         the value 0 if A == B;
+   *         or a value greater than 0 if A > B
+   */
+  public int compare(String A, String B) {
+    int result;
+    String a = A, b = B;
+
+    do {
+      VersionPart va = new VersionPart();
+      VersionPart vb = new VersionPart();
+      a = parseVersionPart(a, va);
+      b = parseVersionPart(b, vb);
+
+      result = compareVersionPart(va, vb);
+      if (result != 0) {
+        break;
+      }
+    } while (a != null || b != null);
+
+    return result;
+  }
+
+  private class VersionPart {
+    int     numA = 0;
+    String  strB;
+    int     numC = 0;
+    String  extraD;
+  }
+
+  private static String parseVersionPart(String aVersion, VersionPart result) {
+    if (aVersion == null || aVersion.length() == 0) {
+      return aVersion;
+    }
+
+    StringTokenizer tok = new StringTokenizer(aVersion.trim(), ".");
+    String part = tok.nextToken();
+
+    if (part.equals("*")) {
+      result.numA = Integer.MAX_VALUE;
+      result.strB = "";
+    } else {
+      VersionPartTokenizer vertok = new VersionPartTokenizer(part);
+      try {
+        result.numA = Integer.parseInt(vertok.nextToken());
+      } catch (NumberFormatException e) {
+        // parsing error; default to zero like 'strtol' C function
+        result.numA = 0;
+      }
+
+      if (vertok.hasMoreElements()) {
+        String str = vertok.nextToken();
+
+        // if part is of type "<num>+"
+        if (str.charAt(0) == '+') {
+          result.numA++;
+          result.strB = "pre";
+        } else {
+          // else if part is of type "<num><alpha>..."
+          result.strB = str;
+
+          if (vertok.hasMoreTokens()) {
+            try {
+              result.numC = Integer.parseInt(vertok.nextToken());
+            } catch (NumberFormatException e) {
+              // parsing error; default to zero like 'strtol' C function
+              result.numC = 0;
+            }
+            if (vertok.hasMoreTokens()) {
+              result.extraD = vertok.getRemainder();
+            }
+          }
+        }
+      }
+    }
+
+    if (tok.hasMoreTokens()) {
+      // return everything after "."
+      return aVersion.substring(part.length() + 1);
+    }
+    return null;
+  }
+
+  private int compareVersionPart(VersionPart va, VersionPart vb) {
+    int res = compareInt(va.numA, vb.numA);
+    if (res != 0) {
+      return res;
+    }
+
+    res = compareString(va.strB, vb.strB);
+    if (res != 0) {
+      return res;
+    }
+
+    res = compareInt(va.numC, vb.numC);
+    if (res != 0) {
+      return res;
+    }
+
+    return compareString(va.extraD, vb.extraD);
+  }
+
+  private int compareInt(int n1, int n2) {
+    return n1 - n2;
+  }
+
+  private int compareString(String str1, String str2) {
+    // any string is *before* no string
+    if (str1 == null) {
+      return (str2 != null) ? 1 : 0;
+    }
+
+    if (str2 == null) {
+      return -1;
+    }
+
+    return str1.compareTo(str2);
+  }
+
+}
+
+/**
+ * Specialized tokenizer for Mozilla version strings.  A token can
+ * consist of one of the four sections of a version string: <code>
+ * &lt;number-a&gt;&lt;string-b&gt;&lt;number-c&gt;
+ * &lt;string-d (everything else)&gt;</code>.
+ */
+class VersionPartTokenizer implements Enumeration {
+
+  String part;
+
+  public VersionPartTokenizer(String aPart) {
+    part = aPart;
+  }
+
+  public boolean hasMoreElements() {
+    return part.length() != 0;
+  }
+
+  public boolean hasMoreTokens() {
+    return part.length() != 0;
+  }
+
+  public Object nextElement() {
+    if (part.matches("[\\+\\-]?[0-9].*")) {
+      // if string starts with a number...
+      int index = 0;
+      if (part.charAt(0) == '+' || part.charAt(0) == '-') {
+        index = 1;
+      }
+
+      while (index < part.length() && Character.isDigit(part.charAt(index))) {
+        index++;
+      }
+
+      String numPart = part.substring(0, index);
+      part = part.substring(index);
+      return numPart;
+    } else {
+      // ... or if this is the non-numeric part of version string
+      int index = 0;
+      while (index < part.length() && !Character.isDigit(part.charAt(index))) {
+        index++;
+      }
+
+      String alphaPart = part.substring(0, index);
+      part = part.substring(index);
+      return alphaPart;
+    }
+  }
+
+  public String nextToken() {
+    return (String) nextElement();
+  }
+
+  /**
+   * Returns what remains of the original string, without tokenization.  This
+   * method is useful for getting the <code>&lt;string-d (everything else)&gt;
+   * </code> section of a version string.
+   * 
+   * @return remaining version string
+   */
+  public String getRemainder() {
+    return part;
+  }
+
+}
+
Index: extensions/java/xpcom/src/GREImpl.java
===================================================================
RCS file: extensions/java/xpcom/src/GREImpl.java
diff -N extensions/java/xpcom/src/GREImpl.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ extensions/java/xpcom/src/GREImpl.java	6 Jan 2006 17:07:49 -0000
@@ -0,0 +1,64 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Java XPCOM Bindings.
+ *
+ * The Initial Developer of the Original Code is
+ * IBM Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2004
+ * IBM Corporation. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Javier Pedemonte (jhpedemonte@gmail.com)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+package org.mozilla.xpcom.internal;
+
+import java.io.*;
+import org.mozilla.xpcom.*;
+
+
+public class GREImpl implements IGRE {
+
+  public void initEmbedding(File aLibXULDirectory, File aAppDirectory,
+                            IAppFileLocProvider aAppDirProvider) {
+    // load JNI library
+    String path = "";
+    if (aLibXULDirectory != null) {
+      path = aLibXULDirectory + File.separator;
+    }
+    System.load(path + System.mapLibraryName("javaxpcomglue"));
+
+    initEmbeddingNative(aLibXULDirectory, aAppDirectory, aAppDirProvider);
+  }
+
+  public native void initEmbeddingNative(File aLibXULDirectory,
+          File aAppDirectory, IAppFileLocProvider aAppDirProvider);
+
+  public native void termEmbedding();
+
+}
+
Index: extensions/java/xpcom/src/Makefile.in
===================================================================
RCS file: extensions/java/xpcom/src/Makefile.in
diff -N extensions/java/xpcom/src/Makefile.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ extensions/java/xpcom/src/Makefile.in	6 Jan 2006 17:07:49 -0000
@@ -0,0 +1,137 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Java XPCOM Bindings.
+#
+# The Initial Developer of the Original Code is
+# IBM Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2005
+# IBM Corporation. All Rights Reserved.
+#
+# Contributor(s):
+#   Javier Pedemonte (jhpedemonte@gmail.com)
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH		= ../../../..
+topsrcdir	= @top_srcdir@
+srcdir		= @srcdir@
+VPATH		= @srcdir@ ; @srcdir@/..
+
+include $(DEPTH)/config/autoconf.mk
+
+MODULE		= javaxpcom
+LIBRARY_NAME	= javaxpcom
+LIBXUL_LIBRARY	= 1
+
+# On Mac OS X, JNI libraries must end with a '.jnilib' extension
+ifeq ($(OS_ARCH),Darwin)
+DLL_SUFFIX = .jnilib
+endif
+
+REQUIRES	= xpcom \
+		  string \
+		  xulapp \
+		  $(NULL)
+
+CPPSRCS		= \
+		nsAppFileLocProviderProxy.cpp \
+		nsJavaInterfaces.cpp \
+		nsJavaWrapper.cpp \
+		nsJavaXPTCStub.cpp \
+		nsJavaXPTCStubWeakRef.cpp \
+		nsJavaXPCOMBindingUtils.cpp \
+		$(NULL)
+
+JARFILE = javaxpcom.jar
+JARFILE_SRC = $(patsubst %.jar,%-src.jar,$(JARFILE))
+
+JAVA_SRCS = \
+		$(srcdir)/../XPCOMJavaProxy.java \
+		$(srcdir)/../XPCOMJavaProxyBase.java \
+		$(srcdir)/GREImpl.java \
+		$(srcdir)/XPCOMImpl.java \
+		$(NULL)
+
+LOCAL_INCLUDES	= -I$(JAVA_INCLUDE_PATH)
+
+ifeq ($(OS_ARCH),WINNT)
+LOCAL_INCLUDES += -I$(JAVA_INCLUDE_PATH)/win32
+else
+LOCAL_INCLUDES += -I$(JAVA_INCLUDE_PATH)/linux
+endif
+
+# necessary until we do 'cvs move' to put files in correct directories
+LOCAL_INCLUDES += -I$(srcdir)
+
+EXTRA_DSO_LDOPTS = \
+	$(LIBS_DIR) \
+	$(EXTRA_DSO_LIBS) \
+	$(MOZ_COMPONENT_LIBS) \
+	$(NULL)
+
+GARBAGE += $(JARFILE) $(JARFILE_SRC)
+GARBAGE_DIRS += _javagen org
+
+include $(topsrcdir)/config/rules.mk
+
+ifeq ($(OS_ARCH),WINNT)
+RUN =
+SEP = ;
+else
+RUN = $(DIST)/bin/run-mozilla.sh
+SEP = :
+endif
+
+_javagen/org/mozilla/xpcom/internal/.iface_done: $(JAVA_SRCS)
+	@if test ! -d _javagen/org/mozilla/xpcom/internal; then \
+		touch .done; \
+		$(INSTALL) -m 644 .done _javagen/org/mozilla/xpcom/internal; \
+	fi
+	@echo Copying Java source files
+	@$(INSTALL) -m 644 $(JAVA_SRCS) \
+			_javagen/org/mozilla/xpcom/internal
+	@touch $@
+
+# Use find and xargs for passing list of Java files to JAVAC.  This avoids the
+# "argument list too long" error on Windows when using *.java
+org/mozilla/xpcom/internal/.class_done: _javagen/org/mozilla/xpcom/internal/.iface_done
+	@echo Compiling Java implementation classes
+	find _javagen -name "*.java" | xargs $(JAVAC) $(JAVAC_FLAGS) \
+			-classpath ".$(SEP)../interfaces/MozillaInterfaces.jar" \
+      -d . -sourcepath _javagen
+	@touch $@
+
+$(JARFILE): org/mozilla/xpcom/internal/.class_done Makefile
+	$(JAR) cf $@ org
+
+$(JARFILE_SRC): $(JARFILE)
+	$(JAR) cf $@ -C _javagen org
+
+#libs:: $(JARFILE)
+#	$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin
+jarfile:: $(JARFILE)
+	$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin
+
Index: extensions/java/xpcom/src/XPCOMImpl.java
===================================================================
RCS file: extensions/java/xpcom/src/XPCOMImpl.java
diff -N extensions/java/xpcom/src/XPCOMImpl.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ extensions/java/xpcom/src/XPCOMImpl.java	6 Jan 2006 17:07:49 -0000
@@ -0,0 +1,72 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Java XPCOM Bindings.
+ *
+ * The Initial Developer of the Original Code is
+ * IBM Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2004
+ * IBM Corporation. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Javier Pedemonte (jhpedemonte@gmail.com)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+package org.mozilla.xpcom.internal;
+
+import java.io.*;
+import org.mozilla.xpcom.*;
+
+
+public class XPCOMImpl implements IXPCOM {
+
+  public nsIServiceManager initXPCOM(File aMozBinDirectory,
+          IAppFileLocProvider aAppFileLocProvider) {
+    // load JNI library
+    String path = "";
+    if (aMozBinDirectory != null) {
+      path = aMozBinDirectory + File.separator;
+    }
+    System.load(path + System.mapLibraryName("javaxpcomglue"));
+
+    return initXPCOMNative(aMozBinDirectory, aAppFileLocProvider);
+  }
+
+  public native nsIServiceManager initXPCOMNative(File aMozBinDirectory,
+          IAppFileLocProvider aAppFileLocProvider);
+
+  public native void shutdownXPCOM(nsIServiceManager aServMgr);
+
+  public native nsIComponentManager getComponentManager();
+
+  public native nsIComponentRegistrar getComponentRegistrar();
+
+  public native nsIServiceManager getServiceManager();
+
+  public native nsILocalFile newLocalFile(String aPath, boolean aFollowLinks);
+
+}
+
Index: extensions/java/xpcom/src/dlldeps-javaxpcom.cpp
===================================================================
RCS file: extensions/java/xpcom/src/dlldeps-javaxpcom.cpp
diff -N extensions/java/xpcom/src/dlldeps-javaxpcom.cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ extensions/java/xpcom/src/dlldeps-javaxpcom.cpp	6 Jan 2006 17:07:49 -0000
@@ -0,0 +1,65 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Java XPCOM Bindings.
+ *
+ * The Initial Developer of the Original Code is
+ * IBM Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * IBM Corporation. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Javier Pedemonte (jhpedemonte@gmail.com)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "nsJavaInterfaces.h"
+
+
+void XXXNeverCalled_javaxpcom()
+{
+  GRE_NATIVE(initEmbedding) (nsnull, nsnull, nsnull, nsnull, nsnull);
+
+  GRE_NATIVE(termEmbedding) (nsnull, nsnull);
+
+  XPCOM_NATIVE(initXPCOM) (nsnull, nsnull, nsnull, nsnull);
+
+  XPCOM_NATIVE(shutdownXPCOM) (nsnull, nsnull, nsnull);
+
+  XPCOM_NATIVE(newLocalFile) (nsnull, nsnull, nsnull, nsnull);
+
+  XPCOM_NATIVE(getComponentManager) (nsnull, nsnull);
+
+  XPCOM_NATIVE(getComponentRegistrar) (nsnull, nsnull);
+
+  XPCOM_NATIVE(getServiceManager) (nsnull, nsnull);
+
+  JAVAPROXY_NATIVE(callXPCOMMethod) (nsnull, nsnull, nsnull, nsnull, nsnull);
+
+  JAVAPROXY_NATIVE(finalizeProxy) (nsnull, nsnull, nsnull);
+
+  JAVAPROXY_NATIVE(isSameXPCOMObject) (nsnull, nsnull, nsnull, nsnull);
+}
+
Index: extensions/java/xpcom/src/nsJavaInterfaces.h
===================================================================
RCS file: extensions/java/xpcom/src/nsJavaInterfaces.h
diff -N extensions/java/xpcom/src/nsJavaInterfaces.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ extensions/java/xpcom/src/nsJavaInterfaces.h	6 Jan 2006 17:07:50 -0000
@@ -0,0 +1,88 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Java XPCOM Bindings.
+ *
+ * The Initial Developer of the Original Code is
+ * IBM Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * IBM Corporation. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Javier Pedemonte (jhpedemonte@gmail.com)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef _nsJavaInterfaces_h_
+#define _nsJavaInterfaces_h_
+
+#include "jni.h"
+#include "nscore.h"
+
+#define GRE_NATIVE(func) Java_org_mozilla_xpcom_internal_GREImpl_##func
+#define XPCOM_NATIVE(func) Java_org_mozilla_xpcom_internal_XPCOMImpl_##func
+#define JAVAPROXY_NATIVE(func) \
+          Java_org_mozilla_xpcom_internal_XPCOMJavaProxy_##func
+
+
+extern "C" NS_EXPORT void
+GRE_NATIVE(initEmbedding) (JNIEnv* env, jobject, jobject aLibXULDirectory,
+                           jobject aAppDirectory, jobject aAppDirProvider);
+
+extern "C" NS_EXPORT void
+GRE_NATIVE(termEmbedding) (JNIEnv *env, jobject);
+
+extern "C" NS_EXPORT jobject
+XPCOM_NATIVE(initXPCOM) (JNIEnv* env, jobject, jobject aMozBinDirectory,
+                         jobject aAppFileLocProvider);
+
+extern "C" NS_EXPORT void
+XPCOM_NATIVE(shutdownXPCOM) (JNIEnv *env, jobject, jobject aServMgr);
+
+extern "C" NS_EXPORT jobject
+XPCOM_NATIVE(newLocalFile) (JNIEnv *env, jobject, jstring aPath,
+                            jboolean aFollowLinks);
+
+extern "C" NS_EXPORT jobject
+XPCOM_NATIVE(getComponentManager) (JNIEnv *env, jobject);
+
+extern "C" NS_EXPORT jobject
+XPCOM_NATIVE(getComponentRegistrar) (JNIEnv *env, jobject);
+
+extern "C" NS_EXPORT jobject
+XPCOM_NATIVE(getServiceManager) (JNIEnv *env, jobject);
+
+extern "C" NS_EXPORT jobject
+JAVAPROXY_NATIVE(callXPCOMMethod) (JNIEnv *env, jclass that, jobject aJavaProxy,
+                                   jstring aMethodName, jobjectArray aParams);
+
+extern "C" NS_EXPORT void
+JAVAPROXY_NATIVE(finalizeProxy) (JNIEnv *env, jclass that, jobject aJavaProxy);
+
+extern "C" NS_EXPORT jboolean
+JAVAPROXY_NATIVE(isSameXPCOMObject) (JNIEnv *env, jclass that, jobject aProxy1,
+                                     jobject aProxy2);
+
+#endif // _nsJavaInterfaces_h_
Index: extensions/java/xpcom/tests/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/extensions/java/xpcom/tests/Makefile.in,v
retrieving revision 1.8
diff -u -1 -2 -p -d -r1.8 Makefile.in
--- extensions/java/xpcom/tests/Makefile.in	2 May 2005 16:30:02 -0000	1.8
+++ extensions/java/xpcom/tests/Makefile.in	6 Jan 2006 17:07:50 -0000
@@ -69,21 +69,21 @@ SEP = :
 endif
 
 _JAVA_CLASSPATH = .$(SEP)./../build$(SEP)$(XPIDL_GEN_DIR)
 
 REBUILD_JAR = .rebuild_jar
 
 GARBAGE += *.class $(REBUILD_JAR)
 
 include $(topsrcdir)/config/rules.mk
 
 %.class: %.java Makefile Makefile.in
 	$(REPORT_BUILD)
-	$(ELOG) $(CYGWIN_WRAPPER) $(JAVAC) -classpath $(_JAVA_CLASSPATH) -d . \
-			$(_VPATH_SRCS)
+	$(ELOG) $(CYGWIN_WRAPPER) $(JAVAC) $(JAVAC_FLAGS) \
+			-classpath $(_JAVA_CLASSPATH) -d . $(_VPATH_SRCS)
 
 # make sure to rebuild Java interfaces if our XPIDLSRCS change
 $(REBUILD_JAR): $(XPIDLSRCS)
 	@cd ../build; make clean; make
 	@touch $@
 
 libs:: $(REBUILD_JAR) $(JAVA_SRCS:.java=.class)
Index: extensions/java/xpcom/tests/TestINIParser.java
===================================================================
RCS file: extensions/java/xpcom/tests/TestINIParser.java
diff -N extensions/java/xpcom/tests/TestINIParser.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ extensions/java/xpcom/tests/TestINIParser.java	6 Jan 2006 17:07:50 -0000
@@ -0,0 +1,124 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Java XPCOM Bindings.
+ *
+ * The Initial Developer of the Original Code is
+ * IBM Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * IBM Corporation. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Javier Pedemonte (jhpedemonte@gmail.com)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+import java.io.*;
+import java.util.*;
+
+import org.mozilla.xpcom.INIParser;
+
+
+public class TestINIParser {
+
+  /**
+   * @param args path of INI file to parse, or <code>null</code> to parse
+   *          a sample file
+   * @throws IOException
+   * @throws FileNotFoundException
+   */
+  public static void main(String[] args) throws FileNotFoundException,
+          IOException {
+    if (args.length > 1) {
+      System.err.println("TestINIParser [file]");
+      return;
+    }
+
+    INIParser parser = null;
+    File iniFile = null;
+    File tempFile = null;
+
+    try {
+      if (args.length == 1) {
+        iniFile = new File(args[0]);
+        parser = new INIParser(iniFile);
+      } else {
+        tempFile = File.createTempFile("testiniparser", null);
+        createSampleINIFile(tempFile);
+        parser = new INIParser(tempFile);
+      }
+
+      printValidSections(parser);
+    } finally {
+      if (tempFile != null) {
+        tempFile.delete();
+      }
+    }
+  }
+
+  private static void createSampleINIFile(File aFile) throws IOException {
+    BufferedWriter out = new BufferedWriter(new FileWriter(aFile));
+    out.write("; first comment\n");
+    out.write("; second comment\n");
+    out.newLine();
+    out.write("[good section 1]\n");
+    out.write("param1=value1\n");
+    out.write("param2=value2\n");
+    out.newLine();
+    out.write("[invalid section] 1\n");
+    out.write("blah=blippity-blah\n");
+    out.newLine();
+    out.write("[good section 2]       \n");
+    out.write("param3=value3\n");
+    out.write("param4=value4\n");
+    out.newLine();
+    out.write("param5=value5\n");
+    out.newLine();
+    out.write("invalid pair\n");
+    out.write("this shouldn't appear\n");
+    out.write("   ; another comment\n");
+
+    out.close();
+  }
+
+  private static void printValidSections(INIParser aParser) {
+    Iterator sectionsIter = aParser.getSections();
+    while (sectionsIter.hasNext()) {
+      String sectionName = (String) sectionsIter.next();
+      System.out.println("[" + sectionName + "]");
+
+      Iterator keysIter = aParser.getKeys(sectionName);
+      while (keysIter.hasNext()) {
+        String key = (String) keysIter.next();
+        String value = aParser.getString(sectionName, key);
+        System.out.println(key + " = " + value);
+      }
+
+      System.out.println();
+    }
+  }
+
+}
+
Index: extensions/java/xpcom/tests/TestJavaProxy.java
===================================================================
RCS file: /cvsroot/mozilla/extensions/java/xpcom/tests/TestJavaProxy.java,v
retrieving revision 1.2
diff -u -1 -2 -p -d -r1.2 TestJavaProxy.java
--- extensions/java/xpcom/tests/TestJavaProxy.java	24 Feb 2005 23:17:36 -0000	1.2
+++ extensions/java/xpcom/tests/TestJavaProxy.java	6 Jan 2006 17:07:50 -0000
@@ -32,30 +32,30 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 import org.mozilla.xpcom.*;
 import java.io.File;
 
 
 /**
  * Tests that if calls to XPCOM functions return the same object, then
- * the Javaconnect interface creates the proper Java proxies.
+ * the JavaXPCOM interface creates the proper Java proxies.
  * <p>
  * The XPCOM call to <code>nsISupports supp = entries.getNext()</code> returns
  * an object, for which we create an <code>nsISupports</code> Java proxy.  Then,
  * the XPCOM call to <code>supp.queryInterface(nsIFile.NS_IFILE_IID)</code>
- * will return the same object (same address).  Javaconnect needs to be smart
+ * will return the same object (same address).  JavaXPCOM needs to be smart
  * enough to create a new <code>nsIFile</code> proxy, rather than reusing the
  * <code>nsISupports</code> one that was previously created.
  * </p>
  */
 public class TestJavaProxy {
 	public static void main(String [] args) throws Exception {
 		System.loadLibrary("javaxpcom");
 
 		String mozillaPath = System.getProperty("MOZILLA_FIVE_HOME");
 		if (mozillaPath == null) {
 			throw new RuntimeException("MOZILLA_FIVE_HOME system property not set.");
 		}
Index: extensions/java/xpcom/tests/TestProps.java
===================================================================
RCS file: /cvsroot/mozilla/extensions/java/xpcom/tests/TestProps.java,v
retrieving revision 1.4
diff -u -1 -2 -p -d -r1.4 TestProps.java
--- extensions/java/xpcom/tests/TestProps.java	2 May 2005 16:30:02 -0000	1.4
+++ extensions/java/xpcom/tests/TestProps.java	6 Jan 2006 17:07:50 -0000
@@ -32,25 +32,25 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 import org.mozilla.xpcom.*;
 import java.io.*;
 import java.util.*;
 
 
 /**
- * Simple testcase that uses the nsIProperties interface to test the Javaconnect
+ * Simple testcase that uses the nsIProperties interface to test the JavaXPCOM
  * code.  In particular, it tests for 'out' and 'array' params (see method call
  * to getKeys).
  */
 
 public class TestProps {
   public static final String NS_PROPERTIES_CONTRACTID = "@mozilla.org/properties;1";
 
   public static void main(String [] args) throws Exception {
     System.loadLibrary("javaxpcom");
 
     String mozillaPath = System.getProperty("MOZILLA_FIVE_HOME");
     if (mozillaPath == null) {
Index: extensions/java/xpcom/tests/TestVersionComparator.java
===================================================================
RCS file: extensions/java/xpcom/tests/TestVersionComparator.java
diff -N extensions/java/xpcom/tests/TestVersionComparator.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ extensions/java/xpcom/tests/TestVersionComparator.java	6 Jan 2006 17:07:50 -0000
@@ -0,0 +1,102 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Java XPCOM Bindings.
+ *
+ * The Initial Developer of the Original Code is
+ * IBM Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * IBM Corporation. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Javier Pedemonte (jhpedemonte@gmail.com)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+import org.mozilla.xpcom.VersionComparator;
+
+public class TestVersionComparator {
+
+  public static void main(String[] args) {
+    String[] comparisons = {
+        "0.9",
+        "0.9.1",
+        "1.0pre1",
+        "1.0pre2",
+        "1.0",
+        "1.1pre",
+        "1.1pre1a",
+        "1.1pre1",
+        "1.1pre10a",
+        "1.1pre10",
+        "1.1",
+        "1.1.0.1",
+        "1.1.1",
+        "1.1.*",
+        "1.*",
+        "2.0",
+        "2.1",
+        "3.0.-1",
+        "3.0"
+    };
+
+    String[] equality = {
+        "1.1pre",
+        "1.1pre0",
+        "1.0+"
+    };
+
+    VersionComparator comp = new VersionComparator();
+
+    // test comparisons in both directions
+    for (int i = 0; i < comparisons.length - 1; i++) {
+      int res = comp.compare(comparisons[i], comparisons[i + 1]);
+      _assert(res < 0);
+
+      res = comp.compare(comparisons[i + 1], comparisons[i]);
+      _assert(res > 0);
+    }
+
+    // test equality in both directions
+    for (int i = 0; i < equality.length - 1; i++) {
+      int res = comp.compare(equality[i], equality[i + 1]);
+      _assert(res == 0);
+
+      res = comp.compare(equality[i + 1], equality[i]);
+      _assert(res == 0);
+    }
+
+    System.out.println("-- passed");
+  }
+
+  private static void _assert(boolean expression) {
+    if (!expression) {
+      Throwable t = new Throwable();
+      t.printStackTrace();
+      System.exit(1);
+    }
+  }
+}
+
Index: extensions/java/xpcom/tools/genifaces/GenerateJavaInterfaces.cpp
===================================================================
RCS file: /cvsroot/mozilla/extensions/java/xpcom/tools/genifaces/GenerateJavaInterfaces.cpp,v
retrieving revision 1.3
diff -u -1 -2 -p -d -r1.3 GenerateJavaInterfaces.cpp
--- extensions/java/xpcom/tools/genifaces/GenerateJavaInterfaces.cpp	8 Jun 2005 16:41:19 -0000	1.3
+++ extensions/java/xpcom/tools/genifaces/GenerateJavaInterfaces.cpp	6 Jan 2006 17:07:51 -0000
@@ -38,24 +38,25 @@
 #include "nsXPCOM.h"
 #include "nsString.h"
 #include "nsLocalFile.h"
 #include "nsIInterfaceInfoManager.h"
 #include "xptinfo.h"
 #include "nsCOMPtr.h"
 #include "prmem.h"
 #include "xptcall.h"
 #include "nsNetUtil.h"
 #include "nsHashSets.h"
 #include "nsIWeakReference.h"
 #include <stdio.h>
+#include <ctype.h>
 
 #ifdef WIN32
 #define snprintf  _snprintf
 #endif
 
 #define WRITE_NOSCRIPT_METHODS
 
 
 class TypeInfo
 {
 public:
   static nsresult GetParentInfo(nsIInterfaceInfo* aIInfo,
@@ -97,25 +98,25 @@ public:
       // if that interface is not defined in an IDL file.  In those cases, just
       // return |nsISupports|.
       //
       // For example, the |onStreamComplete| method for the interface
       // |nsIUnicharStreamLoaderObserver| takes a param of
       // |nsIUnicharInputStream|, which is defined in a simple header file, not
       // an IDL file.
       *aResult = (char*) nsMemory::Clone(isupp_str, sizeof(isupp_str));
       rv = (*aResult == nsnull) ? NS_ERROR_OUT_OF_MEMORY : NS_OK;
 
     } else {
 
-      // In Javaconnect, we handle weak references internally; no need for the
+      // In JavaXPCOM, we handle weak references internally; no need for the
       // |nsIWeakReference| interface.  So just return |nsISupports|.
       if (iid->Equals(NS_GET_IID(nsIWeakReference))) {
         *aResult = (char*) nsMemory::Clone(isupp_str, sizeof(isupp_str));
         rv = (*aResult == nsnull) ? NS_ERROR_OUT_OF_MEMORY : NS_OK;
 
       } else {
 
         // Some methods take parameters of non-scriptable interfaces.  But we
         // only output scriptable interfaces.  So if one of the param types is
         // a non-scriptable interface, output |nsISupports| instead of the
         // interface name.
         nsCOMPtr<nsIInterfaceInfo> info;
@@ -763,25 +764,25 @@ public:
         }
 
         rv = out->Write(iface_name, strlen(iface_name), &count);
         nsMemory::Free(iface_name);
         break;
       }
 
       case nsXPTType::T_INTERFACE_IS:
         rv = out->Write("nsISupports", 11, &count);
         break;
 
       case nsXPTType::T_VOID:
-        rv = out->Write("int", 3, &count);
+        rv = out->Write("long", 4, &count);
         break;
 
       case nsXPTType::T_ARRAY:
       {
         // get array type
         nsXPTType xpttype;
         rv = aIInfo->GetTypeForParam(aMethodIndex, aParamInfo, 1, &xpttype);
         if (NS_FAILED(rv))
           break;
 
         rv = WriteType(out, &xpttype, aIInfo, aMethodIndex, aParamInfo);
         if (NS_FAILED(rv))
Index: toolkit/library/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/toolkit/library/Makefile.in,v
retrieving revision 1.16.6.1
diff -u -1 -2 -p -d -r1.16.6.1 Makefile.in
--- toolkit/library/Makefile.in	4 Jan 2006 15:56:53 -0000	1.16.6.1
+++ toolkit/library/Makefile.in	6 Jan 2006 17:08:19 -0000
@@ -270,24 +270,38 @@ endif
 
 ifdef NS_TRACE_MALLOC
 EXTRA_DSO_LIBS += tracemalloc
 endif
 
 ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
 EXTRA_DSO_LIBS += macmorefiles_s
 EXTRA_DEPS += $(DIST)/lib/$(LIB_PREFIX)macmorefiles_s.$(LIB_SUFFIX)
 endif
 
 LOCAL_INCLUDES += -I$(topsrcdir)/config
 
+ifdef MOZ_JAVAXPCOM
+LOCAL_INCLUDES += \
+	-I$(topsrcdir)/extensions/java/xpcom/src \
+	-I$(JAVA_INCLUDE_PATH) \
+	$(NULL)
+ifeq ($(OS_ARCH),WINNT)
+CPPSRCS += dlldeps-javaxpcom.cpp
+LOCAL_INCLUDES += -I$(JAVA_INCLUDE_PATH)/win32
+else
+LOCAL_INCLUDES += -I$(JAVA_INCLUDE_PATH)/linux
+endif
+STATIC_LIBS += javaxpcom
+endif
+
 include $(topsrcdir)/config/rules.mk
 
 EXTRA_DSO_LDOPTS += $(EXTRA_DSO_LIBS)
 
 OS_LIBS += $(LIBICONV)
 
 DEFINES += \
 	-D_IMPL_NS_COM \
 	-D_IMPL_NS_STRINGAPI \
 	-DEXPORT_XPT_API \
 	-DEXPORT_XPTC_API \
 	-DEXPORT_XPTI_API \
@@ -345,12 +359,19 @@ endif
 
 ifneq (,$(MOZ_ENABLE_CANVAS)$(MOZ_SVG_RENDERER_CAIRO))
 EXTRA_DSO_LDOPTS += $(MOZ_CAIRO_LIBS)
 endif
 
 export:: dlldeps.cpp dlldeps-obs.cpp
 
 dlldeps.cpp: $(topsrcdir)/xpcom/build/dlldeps.cpp
 	$(INSTALL) $^ .
 
 dlldeps-obs.cpp: $(topsrcdir)/xpcom/obsolete/dlldeps-obs.cpp
 	$(INSTALL) $^ .
+
+ifdef MOZ_JAVAXPCOM
+export:: dlldeps-javaxpcom.cpp
+
+dlldeps-javaxpcom.cpp: $(topsrcdir)/extensions/java/xpcom/src/dlldeps-javaxpcom.cpp
+	$(INSTALL) $^ .
+endif
Index: toolkit/library/dlldeps-xul.cpp
===================================================================
RCS file: /cvsroot/mozilla/toolkit/library/dlldeps-xul.cpp,v
retrieving revision 1.1.8.1
diff -u -1 -2 -p -d -r1.1.8.1 dlldeps-xul.cpp
--- toolkit/library/dlldeps-xul.cpp	18 Oct 2005 18:20:20 -0000	1.1.8.1
+++ toolkit/library/dlldeps-xul.cpp	6 Jan 2006 17:08:19 -0000
@@ -33,13 +33,15 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsXULAppAPI.h"
 
 void xxxNeverCalledXUL()
 {
   XRE_main(0, nsnull, nsnull);
   XRE_GetFileFromPath(nsnull, nsnull);
   XRE_GetStaticComponents(nsnull, nsnull);
+  XRE_InitEmbedding(nsnull, nsnull, nsnull, nsnull, 0);
+  XRE_TermEmbedding();
 }
Index: toolkit/xre/nsEmbedFunctions.cpp
===================================================================
RCS file: /cvsroot/mozilla/toolkit/xre/nsEmbedFunctions.cpp,v
retrieving revision 1.2.4.2
diff -u -1 -2 -p -d -r1.2.4.2 nsEmbedFunctions.cpp
--- toolkit/xre/nsEmbedFunctions.cpp	14 Sep 2005 14:13:26 -0000	1.2.4.2
+++ toolkit/xre/nsEmbedFunctions.cpp	6 Jan 2006 17:08:21 -0000
@@ -27,22 +27,230 @@
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsXULAppAPI.h"
+
+#include <stdlib.h>
+
+#include "nsIAppStartupNotifier.h"
+#include "nsIDirectoryService.h"
+#include "nsIEventQueueService.h"
+#include "nsILocalFile.h"
+#include "nsIToolkitChromeRegistry.h"
+
+#include "nsAppDirectoryServiceDefs.h"
+#include "nsArrayEnumerator.h"
+#include "nsCOMArray.h"
+#include "nsDirectoryServiceDefs.h"
+#include "nsEnumeratorUtils.h"
 #include "nsStaticComponents.h"
+#include "nsString.h"
+
+class nsEmbeddingDirProvider : public nsIDirectoryServiceProvider2
+{
+public:
+  NS_DECL_ISUPPORTS
+  NS_DECL_NSIDIRECTORYSERVICEPROVIDER
+  NS_DECL_NSIDIRECTORYSERVICEPROVIDER2
+
+  nsEmbeddingDirProvider(nsILocalFile* aGREDir,
+                         nsILocalFile* aAppDir,
+                         nsIDirectoryServiceProvider* aAppProvider) :
+    mGREDir(aGREDir),
+    mAppDir(aAppDir),
+    mAppProvider(aAppProvider) { }
+
+private:
+  nsCOMPtr<nsILocalFile> mGREDir;
+  nsCOMPtr<nsILocalFile> mAppDir;
+  nsCOMPtr<nsIDirectoryServiceProvider> mAppProvider;
+};
+
+NS_IMPL_ISUPPORTS2(nsEmbeddingDirProvider,
+                   nsIDirectoryServiceProvider,
+                   nsIDirectoryServiceProvider2)
+
+NS_IMETHODIMP
+nsEmbeddingDirProvider::GetFile(const char *aProperty, PRBool *aPersistent,
+                                nsIFile* *aFile)
+{
+  nsresult rv;
+
+  if (mAppProvider) {
+    rv = mAppProvider->GetFile(aProperty, aPersistent, aFile);
+    if (NS_SUCCEEDED(rv) && *aFile)
+      return rv;
+  }
+
+  if (!strcmp(aProperty, NS_OS_CURRENT_PROCESS_DIR) ||
+      !strcmp(aProperty, NS_APP_INSTALL_CLEANUP_DIR)) {
+    // NOTE: this is *different* than NS_XPCOM_CURRENT_PROCESS_DIR. This points
+    // to the application dir. NS_XPCOM_CURRENT_PROCESS_DIR points to the toolkit.
+    return mAppDir->Clone(aFile);
+  }
+
+  if (!strcmp(aProperty, NS_GRE_DIR)) {
+    return mGREDir->Clone(aFile);
+  }
+
+  if (!strcmp(aProperty, NS_APP_PREF_DEFAULTS_50_DIR))
+  {
+    nsCOMPtr<nsIFile> file;
+    rv = mAppDir->Clone(getter_AddRefs(file));
+    NS_ENSURE_SUCCESS(rv, rv);
+
+    rv = file->AppendNative(NS_LITERAL_CSTRING("defaults"));
+    NS_ENSURE_SUCCESS(rv, rv);
+
+    rv = file->AppendNative(NS_LITERAL_CSTRING("pref"));
+    NS_ENSURE_SUCCESS(rv, rv);
+
+    NS_ADDREF(*aFile = file);
+    return NS_OK;
+  }
+
+  return NS_ERROR_FAILURE;
+}
+
+NS_IMETHODIMP
+nsEmbeddingDirProvider::GetFiles(const char* aProperty,
+                                 nsISimpleEnumerator** aResult)
+{
+  nsresult rv;
+
+  nsCOMPtr<nsISimpleEnumerator> appEnum;
+  nsCOMPtr<nsIDirectoryServiceProvider2> appP2
+    (do_QueryInterface(mAppProvider));
+  if (appP2) {
+    rv = appP2->GetFiles(aProperty, getter_AddRefs(appEnum));
+    if (NS_SUCCEEDED(rv) && rv != NS_SUCCESS_AGGREGATE_RESULT) {
+      NS_ADDREF(*aResult = appEnum);
+      return NS_OK;
+    }
+  }
+
+  nsCOMArray<nsIFile> dirs;
+
+  if (!strcmp(aProperty, NS_CHROME_MANIFESTS_FILE_LIST) ||
+      !strcmp(aProperty, NS_APP_CHROME_DIR_LIST)) {
+    nsCOMPtr<nsIFile> manifest;
+    mGREDir->Clone(getter_AddRefs(manifest));
+    manifest->AppendNative(NS_LITERAL_CSTRING("chrome"));
+    dirs.AppendObject(manifest);
+
+    mAppDir->Clone(getter_AddRefs(manifest));
+    manifest->AppendNative(NS_LITERAL_CSTRING("chrome"));
+    dirs.AppendObject(manifest);
+  }
+
+  if (dirs.Count()) {
+    nsCOMPtr<nsISimpleEnumerator> thisEnum;
+    rv = NS_NewArrayEnumerator(getter_AddRefs(thisEnum), dirs);
+    NS_ENSURE_SUCCESS(rv, rv);
+
+    if (appEnum) {
+      return NS_NewUnionEnumerator(aResult, appEnum, thisEnum);
+    }
+
+    NS_ADDREF(*aResult = thisEnum);
+    return NS_OK;
+  }
+
+  if (appEnum) {
+    NS_ADDREF(*aResult = appEnum);
+    return NS_OK;
+  }
+
+  return NS_ERROR_FAILURE;
+}
 
 void
 XRE_GetStaticComponents(nsStaticModuleInfo const **aStaticComponents,
                         PRUint32 *aComponentCount)
 {
   *aStaticComponents = kPStaticModules;
   *aComponentCount = kStaticModuleCount;
 }
 
+static nsStaticModuleInfo *sCombined;
+static PRInt32 sInitCounter;
+
+nsresult
+XRE_InitEmbedding(nsILocalFile *aLibXULDirectory,
+                  nsILocalFile *aAppDirectory,
+                  nsIDirectoryServiceProvider *aAppDirProvider,
+                  nsStaticModuleInfo const *aStaticComponents,
+                  PRUint32 aStaticComponentCount)
+{
+  if (++sInitCounter > 1)
+    return NS_OK;
+
+  NS_ENSURE_ARG(aLibXULDirectory);
+  NS_ENSURE_ARG(aAppDirectory);
+
+  nsresult rv;
+
+  nsCOMPtr<nsIDirectoryServiceProvider> dirSvc
+    (new nsEmbeddingDirProvider(aLibXULDirectory,
+                                aAppDirectory,
+                                aAppDirProvider));
+  if (!dirSvc)
+    return NS_ERROR_OUT_OF_MEMORY;
+
+  // Combine the toolkit static components and the app components.
+  PRUint32 combinedCount = kStaticModuleCount + aStaticComponentCount;
+
+  sCombined = new nsStaticModuleInfo[combinedCount];
+  if (!sCombined)
+    return NS_ERROR_OUT_OF_MEMORY;
+
+  memcpy(sCombined, kPStaticModules,
+         sizeof(nsStaticModuleInfo) * kStaticModuleCount);
+  memcpy(sCombined + kStaticModuleCount, aStaticComponents,
+         sizeof(nsStaticModuleInfo) * aStaticComponentCount);
+
+  rv = NS_InitXPCOM3(nsnull, aAppDirectory, dirSvc,
+                     sCombined, combinedCount);
+  if (NS_FAILED(rv))
+    return rv;
+
+  // We do not need to autoregister components here. The CheckUpdateFile()
+  // bits in NS_InitXPCOM3 check for an .autoreg file. If the app wants
+  // to autoregister every time (for instance, if it's debug), it can do
+  // so after we return from this function.
+
+  nsCOMPtr<nsIEventQueueService> eventQService
+    (do_GetService(NS_EVENTQUEUESERVICE_CONTRACTID, &rv));
+  if (NS_FAILED(rv))
+    return rv;
+
+  rv = eventQService->CreateThreadEventQueue();
+  if (NS_FAILED(rv))
+    return rv;
+
+  nsCOMPtr<nsIObserver> startupNotifier
+    (do_CreateInstance(NS_APPSTARTUPNOTIFIER_CONTRACTID));
+  if (!startupNotifier)
+    return NS_ERROR_FAILURE;
+
+  startupNotifier->Observe(nsnull, APPSTARTUP_TOPIC, nsnull);
+
+  return NS_OK;
+}
+
+void
+XRE_TermEmbedding()
+{
+  if (--sInitCounter != 0)
+    return;
+
+  NS_ShutdownXPCOM(nsnull);
+  delete [] sCombined;
+}
Index: toolkit/xre/nsXULAppAPI.h
===================================================================
RCS file: /cvsroot/mozilla/toolkit/xre/nsXULAppAPI.h,v
retrieving revision 1.15.2.2
diff -u -1 -2 -p -d -r1.15.2.2 nsXULAppAPI.h
--- toolkit/xre/nsXULAppAPI.h	4 Oct 2005 18:46:26 -0000	1.15.2.2
+++ toolkit/xre/nsXULAppAPI.h	6 Jan 2006 17:08:21 -0000
@@ -211,13 +211,48 @@ XRE_GetFileFromPath(const char *aPath, n
  *                the binary path have failed.
  */
 extern "C" XULAPI nsresult
 XRE_GetBinaryPath(const char *argv0, nsILocalFile* *aResult);
 
 /**
  * Get the static components built in to libxul.
  */
 extern "C" XULAPI void
 XRE_GetStaticComponents(nsStaticModuleInfo const **aStaticComponents,
                         PRUint32 *aComponentCount);
 
+/**
+ * Initialize libXUL for embedding purposes.
+ *
+ * @param aLibXULDirectory   The directory in which the libXUL shared library
+ *                           was found.
+ * @param aAppDirectory      The directory in which the application components
+ *                           and resources can be found. This will map to
+ *                           the "resource:app" directory service key.
+ * @param aAppDirProvider    A directory provider for the application. This
+ *                           provider will be aggregated by a libxul provider
+ *                           which will provide the base required GRE keys.
+ * @param aStaticComponents  Static components provided by the embedding
+ *                           application. This should *not* include the
+ *                           components from XRE_GetStaticComponents. May be
+ *                           null if there are no static components.
+ * @param aStaticComponentCount the number of static components in
+ *                           aStaticComponents
+ *
+ * @note This function must be called from the "main" thread.
+ *
+ * @note At the present time, this function may only be called once in
+ * a given process. Use XRE_TermEmbedding to clean up and free
+ * resources allocated by XRE_InitEmbedding.
+ */
+
+extern "C" XULAPI nsresult
+XRE_InitEmbedding(nsILocalFile *aLibXULDirectory,
+                  nsILocalFile *aAppDirectory,
+                  nsIDirectoryServiceProvider *aAppDirProvider = nsnull,
+                  nsStaticModuleInfo const *aStaticComponents = nsnull,
+                  PRUint32 aStaticComponentCount = 0);
+
+extern "C" XULAPI void
+XRE_TermEmbedding();
+
 #endif // _nsXULAppAPI_h__
Index: xpcom/build/nsXPCOMPrivate.h
===================================================================
RCS file: /cvsroot/mozilla/xpcom/build/nsXPCOMPrivate.h,v
retrieving revision 1.32.2.1
diff -u -1 -2 -p -d -r1.32.2.1 nsXPCOMPrivate.h
--- xpcom/build/nsXPCOMPrivate.h	10 Oct 2005 22:24:09 -0000	1.32.2.1
+++ xpcom/build/nsXPCOMPrivate.h	6 Jan 2006 17:08:23 -0000
@@ -179,53 +179,58 @@ typedef struct XPCOMFunctions{
 
 typedef nsresult (PR_CALLBACK *GetFrozenFunctionsFunc)(XPCOMFunctions *entryPoints, const char* libraryPath);
 extern "C" NS_COM nsresult
 NS_GetFrozenFunctions(XPCOMFunctions *entryPoints, const char* libraryPath);
 
 // think hard before changing this
 #define XPCOM_GLUE_VERSION 1
 
 
 /* XPCOM Specific Defines
  *
  * XPCOM_DLL              - name of the loadable xpcom library on disk. 
+ * XUL_DLL                - name of the loadable XUL library on disk
  * XPCOM_SEARCH_KEY       - name of the environment variable that can be 
  *                          modified to include additional search paths.
  * GRE_CONF_NAME          - Name of the GRE Configuration file
  */
 
 #if defined(XP_WIN32) || defined(XP_OS2) || defined(WINCE)
 
 #define XPCOM_SEARCH_KEY  "PATH"
 #define GRE_CONF_NAME     "gre.config"
 #define GRE_WIN_REG_LOC   "Software\\mozilla.org\\GRE"
 #define XPCOM_DLL         "xpcom.dll"
+#define XUL_DLL           "xul.dll"
 
 #elif defined(XP_BEOS)
 
 #define XPCOM_SEARCH_KEY  "ADDON_PATH"
 #define GRE_CONF_NAME ".gre.config"
 #define GRE_CONF_PATH "/boot/home/config/settings/GRE/gre.conf"
 #define XPCOM_DLL "libxpcom"MOZ_DLL_SUFFIX
+#define XUL_DLL   "libxul"MOZ_DLL_SUFFIX
 
 #else // Unix
 
 #define XPCOM_DLL "libxpcom"MOZ_DLL_SUFFIX
 
 // you have to love apple..
 #ifdef XP_MACOSX  
 #define XPCOM_SEARCH_KEY  "DYLD_LIBRARY_PATH"
 #define GRE_FRAMEWORK_NAME "XUL.framework"
+#define XUL_DLL            "XUL"
 #else
 #define XPCOM_SEARCH_KEY  "LD_LIBRARY_PATH"
+#define XUL_DLL   "libxul"MOZ_DLL_SUFFIX
 #endif
 
 #define GRE_CONF_NAME ".gre.config"
 #define GRE_CONF_PATH "/etc/gre.conf"
 #define GRE_CONF_DIR  "/etc/gre.d"
 #define GRE_USER_CONF_DIR ".gre.d"
 #endif
 
 #if defined(XP_WIN) || defined(XP_OS2)
   #define XPCOM_FILE_PATH_SEPARATOR       "\\"
   #define XPCOM_ENV_PATH_SEPARATOR        ";"
 #elif defined(XP_UNIX) || defined(XP_BEOS)
Index: xpcom/glue/nsGREGlue.cpp
===================================================================
RCS file: /cvsroot/mozilla/xpcom/glue/nsGREGlue.cpp,v
retrieving revision 1.11.2.3
diff -u -1 -2 -p -d -r1.11.2.3 nsGREGlue.cpp
--- xpcom/glue/nsGREGlue.cpp	12 Oct 2005 01:03:37 -0000	1.11.2.3
+++ xpcom/glue/nsGREGlue.cpp	6 Jan 2006 17:08:24 -0000
@@ -609,26 +609,27 @@ GRE_GetPathFromRegKey(HKEY aRegKey,
 
     PRBool ok = PR_FALSE;
 
     if (::RegQueryValueEx(subKey, "Version", NULL, NULL,
                           (BYTE*) version, &versionlen) == ERROR_SUCCESS &&
         CheckVersion(version, versions, versionsLength)) {
 
       ok = PR_TRUE;
       const GREProperty *props = properties;
       const GREProperty *propsEnd = properties + propertiesLength;
       for (; ok && props < propsEnd; ++props) {
         pathlen = sizeof(pathbuf);
-        if (!::RegQueryValueEx(subKey, props->property, NULL, &pathtype,
-                               (BYTE*) pathbuf, &pathlen) ||
+
+        if (::RegQueryValueEx(subKey, props->property, NULL, &pathtype,
+                              (BYTE*) pathbuf, &pathlen) != ERROR_SUCCESS ||
             strcmp(pathbuf, props->value))
           ok = PR_FALSE;
       }
 
       pathlen = sizeof(pathbuf);
       if (ok &&
           (!::RegQueryValueEx(subKey, "GreHome", NULL, &pathtype,
                               (BYTE*) pathbuf, &pathlen) == ERROR_SUCCESS ||
            !*pathbuf ||
            !CopyWithEnvExpansion(aBuffer, pathbuf, aBufLen, pathtype))) {
         ok = PR_FALSE;
       }
Index: xpcom/glue/standalone/nsGlueLinkingDlopen.cpp
===================================================================
RCS file: /cvsroot/mozilla/xpcom/glue/standalone/nsGlueLinkingDlopen.cpp,v
retrieving revision 1.2
diff -u -1 -2 -p -d -r1.2 nsGlueLinkingDlopen.cpp
--- xpcom/glue/standalone/nsGlueLinkingDlopen.cpp	15 Jul 2005 11:47:42 -0000	1.2
+++ xpcom/glue/standalone/nsGlueLinkingDlopen.cpp	6 Jan 2006 17:08:24 -0000
@@ -28,43 +28,46 @@
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsGlueLinking.h"
+#include "nsXPCOMGlue.h"
 
 #include <dlfcn.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdio.h>
 
 #if defined(SUNOS4) || defined(NEXTSTEP) || \
     (defined(OPENBSD) || defined(NETBSD)) && !defined(__ELF__)
 #define LEADING_UNDERSCORE "_"
 #else
 #define LEADING_UNDERSCORE
 #endif
 
 struct DependentLib
 {
     void         *libHandle;
     DependentLib *next;
 };
 
 static DependentLib *sTop;
+static void* sXULLibHandle;
 
 static void
 AppendDependentLib(void *libHandle)
 {
     DependentLib *d = new DependentLib;
     if (!d)
         return;
 
     d->next = sTop;
     d->libHandle = libHandle;
 
     sTop = d;
@@ -81,24 +84,28 @@ ReadDependentCB(const char *aDependentLi
 }
 
 GetFrozenFunctionsFunc
 XPCOMGlueLoad(const char *xpcomFile)
 {
     char xpcomDir[MAXPATHLEN];
     if (realpath(xpcomFile, xpcomDir)) {
         char *lastSlash = strrchr(xpcomDir, '/');
         if (lastSlash) {
             *lastSlash = '\0';
 
             XPCOMGlueLoadDependentLibs(xpcomDir, ReadDependentCB);
+
+            sprintf(lastSlash, "/" XUL_DLL);
+
+            sXULLibHandle = dlopen(xpcomDir, RTLD_GLOBAL | RTLD_LAZY);
         }
     }
 
     // RTLD_DEFAULT is not defined in non-GNU toolchains, and it is
     // (void*) 0 in any case.
 
     void *libHandle = nsnull;
 
     if (xpcomFile[0] != '.' || xpcomFile[1] != '\0') {
         libHandle = dlopen(xpcomFile, RTLD_GLOBAL | RTLD_LAZY);
         if (libHandle) {
             AppendDependentLib(libHandle);
@@ -117,13 +124,39 @@ XPCOMGlueLoad(const char *xpcomFile)
 
 void
 XPCOMGlueUnload()
 {
     while (sTop) {
         dlclose(sTop->libHandle);
 
         DependentLib *temp = sTop;
         sTop = sTop->next;
 
         delete temp;
     }
+
+    if (sXULLibHandle) {
+        dlclose(sXULLibHandle);
+        sXULLibHandle = nsnull;
+    }
+}
+
+nsresult
+XPCOMGlueLoadXULFunctions(const nsDynamicFunctionLoad *symbols)
+{
+    // We don't null-check sXULLibHandle because this might work even
+    // if it is null (same as RTLD_DEFAULT)
+
+    nsresult rv = NS_OK;
+    while (symbols->functionName) {
+        char buffer[512];
+        snprintf(buffer, sizeof(buffer),
+                 LEADING_UNDERSCORE "%s", symbols->functionName);
+
+        *symbols->function = (NSFuncPtr) dlsym(sXULLibHandle, buffer);
+        if (!*symbols->function)
+            rv = NS_ERROR_LOSS_OF_SIGNIFICANT_DATA;
+
+        ++symbols;
+    }
+    return rv;
 }
Index: xpcom/glue/standalone/nsGlueLinkingOS2.cpp
===================================================================
RCS file: /cvsroot/mozilla/xpcom/glue/standalone/nsGlueLinkingOS2.cpp,v
retrieving revision 1.2
diff -u -1 -2 -p -d -r1.2 nsGlueLinkingOS2.cpp
--- xpcom/glue/standalone/nsGlueLinkingOS2.cpp	6 Aug 2005 00:53:10 -0000	1.2
+++ xpcom/glue/standalone/nsGlueLinkingOS2.cpp	6 Jan 2006 17:08:24 -0000
@@ -138,13 +138,39 @@ XPCOMGlueLoad(const char *xpcomFile)
 
 void
 XPCOMGlueUnload()
 {
     while (sTop) {
         DosFreeModule(sTop->libHandle);
 
         DependentLib *temp = sTop;
         sTop = sTop->next;
 
         delete temp;
     }
+
+    if (sXULLibrary) {
+        DosFreeModule(sXULLibrary);
+        sXULLibrary = nsnull;
+    }
+}
+
+nsresult
+XPCOMGlueLoadXULFunctions(const nsDynamicFunctionLoad *symbols)
+{
+    ULONG ulrc = NO_ERROR;
+
+    if (!sXULLibrary)
+        return NS_ERROR_NOT_INITIALIZED;
+
+    nsresult rv = NS_OK;
+    while (symbols->functionName) {
+        ulrc = DosQueryProcAddr(sXULLibrary, 0, symbols->functionName, (PFN*)symbols->function);
+
+        if (ulrc != NO_ERROR)
+            rv = NS_ERROR_LOSS_OF_SIGNIFICANT_DATA;
+
+        ++symbols;
+    }
+
+    return rv;
 }
Index: xpcom/glue/standalone/nsGlueLinkingOSX.cpp
===================================================================
RCS file: /cvsroot/mozilla/xpcom/glue/standalone/nsGlueLinkingOSX.cpp,v
retrieving revision 1.1
diff -u -1 -2 -p -d -r1.1 nsGlueLinkingOSX.cpp
--- xpcom/glue/standalone/nsGlueLinkingOSX.cpp	14 Jul 2005 18:42:58 -0000	1.1
+++ xpcom/glue/standalone/nsGlueLinkingOSX.cpp	6 Jan 2006 17:08:24 -0000
@@ -28,29 +28,31 @@
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsGlueLinking.h"
+#include "nsXPCOMGlue.h"
 
 #include <mach-o/dyld.h>
 #include <sys/param.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdio.h>
 
 static void
 ReadDependentCB(const char *aDependentLib)
 {
     (void) NSAddImage(aDependentLib,
                       NSADDIMAGE_OPTION_RETURN_ON_ERROR |
                       NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME);
 }
 
 GetFrozenFunctionsFunc
 XPCOMGlueLoad(const char *xpcomFile)
 {
@@ -76,12 +78,34 @@ XPCOMGlueLoad(const char *xpcomFile)
     if (!NSIsSymbolNameDefined("_NS_GetFrozenFunctions"))
       return nsnull;
 
     NSSymbol sym = NSLookupAndBindSymbol("_NS_GetFrozenFunctions");
     return (GetFrozenFunctionsFunc) NSAddressOfSymbol(sym);
 }
 
 void
 XPCOMGlueUnload()
 {
   // nothing to do, since we cannot unload dylibs on OS X
 }
+
+nsresult
+XPCOMGlueLoadXULFunctions(const nsDynamicFunctionLoad *symbols)
+{
+    nsresult rv = NS_OK;
+    while (symbols->functionName) {
+        char buffer[512];
+        snprintf(buffer, sizeof(buffer), "_%s", symbols->functionName);
+
+        if (!NSIsSymbolNameDefined(buffer)) {
+            rv = NS_ERROR_LOSS_OF_SIGNIFICANT_DATA;
+        }
+        else {
+            NSSymbol sym = NSLookupAndBindSymbol(buffer);
+            *symbols->function = (NSFuncPtr) NSAddressOfSymbol(sym);
+        }
+
+        ++symbols;
+    }
+
+    return rv;
+}
Index: xpcom/glue/standalone/nsGlueLinkingWin.cpp
===================================================================
RCS file: /cvsroot/mozilla/xpcom/glue/standalone/nsGlueLinkingWin.cpp,v
retrieving revision 1.1
diff -u -1 -2 -p -d -r1.1 nsGlueLinkingWin.cpp
--- xpcom/glue/standalone/nsGlueLinkingWin.cpp	14 Jul 2005 18:42:58 -0000	1.1
+++ xpcom/glue/standalone/nsGlueLinkingWin.cpp	6 Jan 2006 17:08:24 -0000
@@ -28,35 +28,38 @@
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsGlueLinking.h"
+#include "nsXPCOMGlue.h"
 
 #include <windows.h>
 #include <stdlib.h>
+#include <stdio.h>
 
 struct DependentLib
 {
     HINSTANCE     libHandle;
     DependentLib *next;
 };
 
 static DependentLib *sTop;
+HINSTANCE sXULLibrary;
 
 static void
 AppendDependentLib(HINSTANCE libHandle)
 {
     DependentLib *d = new DependentLib;
     if (!d)
         return;
 
     d->next = sTop;
     d->libHandle = libHandle;
 
     sTop = d;
@@ -97,24 +100,29 @@ XPCOMGlueLoad(const char *xpcomFile)
     if (xpcomFile[0] == '.' && xpcomFile[1] == '\0') {
         xpcomFile = XPCOM_DLL;
     }
     else {
         char xpcomDir[MAXPATHLEN];
 
         _fullpath(xpcomDir, xpcomFile, sizeof(xpcomDir));
         char *lastSlash = ns_strrpbrk(xpcomDir, "/\\");
         if (lastSlash) {
             *lastSlash = '\0';
 
             XPCOMGlueLoadDependentLibs(xpcomDir, ReadDependentCB);
+
+            sprintf(lastSlash, "\\" XUL_DLL);
+
+            sXULLibrary =
+                LoadLibraryEx(xpcomDir, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
         }
     }
 
     HINSTANCE h =
         LoadLibraryEx(xpcomFile, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
 
     if (!h)
         return nsnull;
 
     AppendDependentLib(h);
 
     GetFrozenFunctionsFunc sym =
@@ -128,13 +136,37 @@ XPCOMGlueLoad(const char *xpcomFile)
 
 void
 XPCOMGlueUnload()
 {
     while (sTop) {
         FreeLibrary(sTop->libHandle);
 
         DependentLib *temp = sTop;
         sTop = sTop->next;
 
         delete temp;
     }
+
+    if (sXULLibrary) {
+        FreeLibrary(sXULLibrary);
+        sXULLibrary = nsnull;
+    }
+}
+
+nsresult
+XPCOMGlueLoadXULFunctions(const nsDynamicFunctionLoad *symbols)
+{
+    if (!sXULLibrary)
+        return NS_ERROR_NOT_INITIALIZED;
+
+    nsresult rv = NS_OK;
+    while (symbols->functionName) {
+        *symbols->function = 
+            (NSFuncPtr) GetProcAddress(sXULLibrary, symbols->functionName);
+        if (!*symbols->function)
+            rv = NS_ERROR_LOSS_OF_SIGNIFICANT_DATA;
+
+        ++symbols;
+    }
+
+    return rv;
 }
Index: xpcom/glue/standalone/nsXPCOMGlue.h
===================================================================
RCS file: /cvsroot/mozilla/xpcom/glue/standalone/nsXPCOMGlue.h,v
retrieving revision 1.8.4.1
diff -u -1 -2 -p -d -r1.8.4.1 nsXPCOMGlue.h
--- xpcom/glue/standalone/nsXPCOMGlue.h	30 Sep 2005 19:46:15 -0000	1.8.4.1
+++ xpcom/glue/standalone/nsXPCOMGlue.h	6 Jan 2006 17:08:24 -0000
@@ -93,24 +93,42 @@ GRE_GetGREPathWithProperties(const GREVe
 
 /**
  * The following functions are only available in the standalone glue.
  */
 
 /**
  * Initialize the XPCOM glue by dynamically linking against the XPCOM
  * shared library indicated by xpcomFile.
  */
 extern "C" NS_HIDDEN_(nsresult)
 XPCOMGlueStartup(const char* xpcomFile);
 
+typedef void (*NSFuncPtr)();
+
+struct nsDynamicFunctionLoad
+{
+    const char *functionName;
+    NSFuncPtr  *function;
+};
+
+/**
+ * Dynamically load functions from libxul.
+ *
+ * @throws NS_ERROR_NOT_INITIALIZED if XPCOMGlueStartup() was not called or
+ *         if the libxul DLL was not found.
+ * @throws NS_ERROR_LOSS_OF_SIGNIFICANT_DATA if only some of the required
+ *         functions were found.
+ */
+extern "C" NS_HIDDEN_(nsresult)
+XPCOMGlueLoadXULFunctions(const nsDynamicFunctionLoad *symbols);
 
 /**
  * Finish the XPCOM glue after it is no longer needed.
  */
 extern "C" NS_HIDDEN_(nsresult)
 XPCOMGlueShutdown();
 
 
 /**
  * Locate the path of the XPCOM shared library of a compatible GRE.
  * The result of this function is normally passed directly to
  * XPCOMGlueStartup. This looks for the GRE version in
Index: xulrunner/app/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/xulrunner/app/Makefile.in,v
retrieving revision 1.23.2.2
diff -u -1 -2 -p -d -r1.23.2.2 Makefile.in
--- xulrunner/app/Makefile.in	7 Oct 2005 15:41:04 -0000	1.23.2.2
+++ xulrunner/app/Makefile.in	6 Jan 2006 17:08:29 -0000
@@ -54,24 +54,28 @@ DIRS		= profile
 PREF_JS_EXPORTS = $(srcdir)/xulrunner.js
 GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/,xulrunner.js)
 
 DEFINES += -DAB_CD=$(AB_CD)
 
 ifeq ($(USE_SHORT_LIBNAME), 1)
 PROGRAM = xulrunner$(BIN_SUFFIX)
 else
 PROGRAM = xulrunner-bin$(BIN_SUFFIX)
 endif
 DEFINES += -DXULRUNNER_PROGNAME=\"xulrunner\"
 
+ifdef MOZ_JAVAXPCOM
+DEFINES += -DMOZ_JAVAXPCOM
+endif
+
 REQUIRES = \
         xpcom \
         string \
         appshell \
         xulapp \
         xulrunner \
 	$(NULL)
 
 CPPSRCS = nsXULRunnerApp.cpp
 
 ifeq ($(OS_ARCH),WINNT)
 CPPSRCS += nsRegisterGREWin.cpp
Index: xulrunner/app/nsRegisterGRE.h
===================================================================
RCS file: /cvsroot/mozilla/xulrunner/app/nsRegisterGRE.h,v
retrieving revision 1.3
diff -u -1 -2 -p -d -r1.3 nsRegisterGRE.h
--- xulrunner/app/nsRegisterGRE.h	13 Jun 2005 16:45:22 -0000	1.3
+++ xulrunner/app/nsRegisterGRE.h	6 Jan 2006 17:08:29 -0000
@@ -31,23 +31,25 @@
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #ifndef nsRegisterGRE_h__
 #define nsRegisterGRE_h__
 
 #include "nscore.h"
 class nsIFile;
+struct GREProperty;
 
 /**
  * @return PR_TRUE on success
  */
 NS_HIDDEN_(PRBool)
-RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation);
+RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation,
+                  const GREProperty *aProperties, PRUint32 aPropertiesLen);
 
 NS_HIDDEN_(void)
 UnregisterXULRunner(PRBool aUnregisterGlobally, nsIFile* aLocation);
 
 #endif // nsRegisterGRE_h__
Index: xulrunner/app/nsRegisterGREUnix.cpp
===================================================================
RCS file: /cvsroot/mozilla/xulrunner/app/nsRegisterGREUnix.cpp,v
retrieving revision 1.1
diff -u -1 -2 -p -d -r1.1 nsRegisterGREUnix.cpp
--- xulrunner/app/nsRegisterGREUnix.cpp	16 Jun 2005 13:29:45 -0000	1.1
+++ xulrunner/app/nsRegisterGREUnix.cpp	6 Jan 2006 17:08:29 -0000
@@ -27,24 +27,25 @@
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsRegisterGRE.h"
+#include "nsXPCOMGlue.h"
 
 #include "nsIFile.h"
 #include "nsILocalFile.h"
 
 #include "nsBuildID.h"
 #include "nsAppRunner.h" // for MAXPATHLEN
 #include "nsString.h"
 #include "nsINIParser.h"
 
 #include "prio.h"
 #include "prprf.h"
 #include "prenv.h"
@@ -72,61 +73,69 @@ public:
     mFD = fd;
     return fd;
   }
 
   operator PRFileDesc* () { return mFD; }
   PRFileDesc** operator &() { *this = nsnull; return &mFD; }
 
 private:
   PRFileDesc *mFD;
 };
 
 static PRBool
-MakeConfFile(const char *regfile, const nsCString &greHome)
+MakeConfFile(const char *regfile, const nsCString &greHome,
+             const GREProperty *aProperties, PRUint32 aPropertiesLen)
 {
   // If the file exists, don't create it again!
   if (access(regfile, R_OK) == 0)
     return PR_FALSE;
 
   PRBool ok = PR_TRUE;
 
   { // scope "fd" so that we can delete the file if something goes wrong
     AutoFDClose fd = PR_Open(regfile, PR_CREATE_FILE | PR_WRONLY | PR_TRUNCATE,
                              0664);
     if (!fd)
       return PR_FALSE;
 
     static const char kHeader[] =
       "# Registration file generated by xulrunner. Do not edit.\n\n"
       "[" GRE_BUILD_ID "]\n"
       "GRE_PATH=";
 
     if (PR_Write(fd, kHeader, sizeof(kHeader) - 1) != sizeof(kHeader) - 1)
       ok = PR_FALSE;
 
     if (PR_Write(fd, greHome.get(), greHome.Length()) != greHome.Length())
       ok = PR_FALSE;
 
+    for (PRUint32 i = 0; i < aPropertiesLen; ++i) {
+      if (PR_fprintf(fd, "\n%s=%s",
+                     aProperties[i].property, aProperties[i].value) <= 0)
+        ok = PR_FALSE;
+    }
+
     PR_Write(fd, "\n", 1);
   }
 
   if (!ok)
     PR_Delete(regfile);
 
   return ok;
 }
 
 
 PRBool
-RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation)
+RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation,
+                  const GREProperty *aProperties, PRUint32 aPropertiesLen)
 {
   // Register ourself in /etc/gre.d or ~/.gre.d/ and record what key we created
   // for future unregistration.
 
   nsresult rv;
 
   char root[MAXPATHLEN] = "/etc/gre.d";
 
   if (!aRegisterGlobally) {
     char *home = PR_GetEnv("HOME");
     if (!home || !*home)
       return PR_FALSE;
@@ -179,36 +188,36 @@ RegisterXULRunner(PRBool aRegisterGlobal
     if (NS_FAILED(rv))
       return PR_FALSE;
   }
 
   if (access(root, R_OK | X_OK) &&
       mkdir(root, 0775)) {
     fprintf(stderr, "Error: could not create '%s'.\n",
             root);
     return PR_FALSE;
   }
 
   PR_snprintf(regfile, MAXPATHLEN, "%s/%s.conf", root, kGREBuildID);
-  if (MakeConfFile(regfile, greHome)) {
+  if (MakeConfFile(regfile, greHome, aProperties, aPropertiesLen)) {
     PR_Write(fd, kGREBuildID, sizeof(kGREBuildID) - 1);
     return PR_TRUE;
   }
 
   for (int i = 0; i < UNIQ_LOOP_LIMIT; ++i) {
     static char buildID[30];
     sprintf(buildID, "%s_%i", kGREBuildID, i);
 
     PR_snprintf(regfile, MAXPATHLEN, "%s/%s.conf", root, buildID);
 
-    if (MakeConfFile(regfile, greHome)) {
+    if (MakeConfFile(regfile, greHome, aProperties, aPropertiesLen)) {
       PR_Write(fd, buildID, strlen(buildID));
       return PR_TRUE;
     }
   }
 
   return PR_FALSE;
 }
 
 void
 UnregisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation)
 {
   nsresult rv;
Index: xulrunner/app/nsRegisterGREVoid.cpp
===================================================================
RCS file: /cvsroot/mozilla/xulrunner/app/nsRegisterGREVoid.cpp,v
retrieving revision 1.3
diff -u -1 -2 -p -d -r1.3 nsRegisterGREVoid.cpp
--- xulrunner/app/nsRegisterGREVoid.cpp	13 Jun 2005 16:45:22 -0000	1.3
+++ xulrunner/app/nsRegisterGREVoid.cpp	6 Jan 2006 17:08:29 -0000
@@ -32,23 +32,24 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsRegisterGRE.h"
 
 #include <stdlib.h>
 #include <stdio.h>
 
 int
-RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation)
+RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation,
+                  const GREProperty *aProperties, PRUint32 aPropertiesLen)
 {
   fprintf(stderr, "Registration not implemented on this platform!\n");
   return 1;
 }
 
 void
 UnregisterXULRunner(PRBool aUnregisterGlobally, nsIFile* aLocation)
 {
   fprintf(stderr, "Registration not implemented on this platform!\n");
 }
Index: xulrunner/app/nsRegisterGREWin.cpp
===================================================================
RCS file: /cvsroot/mozilla/xulrunner/app/nsRegisterGREWin.cpp,v
retrieving revision 1.6
diff -u -1 -2 -p -d -r1.6 nsRegisterGREWin.cpp
--- xulrunner/app/nsRegisterGREWin.cpp	14 Jun 2005 21:15:21 -0000	1.6
+++ xulrunner/app/nsRegisterGREWin.cpp	6 Jan 2006 17:08:29 -0000
@@ -34,64 +34,77 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsRegisterGRE.h"
 
 #include "nsIFile.h"
 #include "nsILocalFile.h"
 
 #include "nsBuildID.h"
 #include "nsAppRunner.h" // for MAXPATHLEN
 #include "nsString.h"
+#include "nsXPCOMGlue.h"
 
 #include "prio.h"
 
 #include <windows.h>
 
 static const char kRegKeyRoot[] = "Software\\mozilla.org\\GRE";
 static const char kRegFileGlobal[] = "global.reginfo";
 static const char kRegFileUser[] = "user.reginfo";
 
 static nsresult
-MakeVersionKey(HKEY root, const char* keyname, const nsCAutoString &grehome)
+MakeVersionKey(HKEY root, const char* keyname, const nsCAutoString &grehome,
+               const GREProperty *aProperties, PRUint32 aPropertiesLen)
 {
   HKEY  subkey;
   DWORD disp;
   if (::RegCreateKeyEx(root, keyname, NULL, NULL, 0, KEY_WRITE, NULL,
                        &subkey, &disp) != ERROR_SUCCESS)
     return NS_ERROR_FAILURE;
 
   if (disp != REG_CREATED_NEW_KEY) {
     ::RegCloseKey(subkey);
     return NS_ERROR_FAILURE;
   }
 
-  if (::RegSetValueEx(subkey, "Version", NULL, REG_SZ, (BYTE*) GRE_BUILD_ID,
-                      sizeof(GRE_BUILD_ID) - 1) == ERROR_SUCCESS &&
-      ::RegSetValueEx(subkey, "GreHome", NULL, REG_SZ, (BYTE*) grehome.get(),
-                      grehome.Length()) == ERROR_SUCCESS) {
-    ::RegCloseKey(subkey);
-    return NS_OK;
+  PRBool failed = PR_FALSE;
+  failed |= ::RegSetValueEx(subkey, "Version", NULL, REG_SZ,
+                            (BYTE*) GRE_BUILD_ID,
+                            sizeof(GRE_BUILD_ID) - 1) != ERROR_SUCCESS;
+  failed |= ::RegSetValueEx(subkey, "GreHome", NULL, REG_SZ,
+                            (BYTE*) grehome.get(),
+                            grehome.Length()) != ERROR_SUCCESS;
+
+  for (PRUint32 i = 0; i < aPropertiesLen; ++i) {
+    failed |= ::RegSetValueEx(subkey, aProperties[i].property, NULL, REG_SZ,
+                              (BYTE*) aProperties[i].value,
+                              strlen(aProperties[i].value)) != ERROR_SUCCESS;
   }
 
-  // we created a key but couldn't fill it properly: delete it
   ::RegCloseKey(subkey);
-  ::RegDeleteKey(root, keyname);
 
-  return NS_ERROR_FAILURE;
+  if (failed) {
+    // we created a key but couldn't fill it properly: delete it
+    ::RegDeleteKey(root, keyname);
+    return NS_ERROR_FAILURE;
+  }
+
+  return NS_OK;
 }
 
 int
-RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation)
+RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation,
+                  const GREProperty *aProperties, PRUint32 aPropertiesLen)
 {
   // Register ourself in the windows registry, and record what key we created
   // for future unregistration.
 
   nsresult rv;
   PRBool irv;
   int i;
 
   nsCAutoString greHome;
   rv = aLocation->GetNativePath(greHome);
   if (NS_FAILED(rv))
     return rv;
@@ -148,34 +161,35 @@ RegisterXULRunner(PRBool aRegisterGlobal
     PR_Close(fd);
     fd = nsnull;
     
     rv = localSaved->OpenNSPRFileDesc(PR_CREATE_FILE | PR_WRONLY | PR_TRUNCATE, 0664, &fd);
     if (NS_FAILED(rv)) {
       // XXX report error?
       irv = PR_FALSE;
       goto reg_end;
     }
   }
 
   strcpy(keyName, GRE_BUILD_ID);
-  rv = MakeVersionKey(rootKey, keyName, greHome);
+  rv = MakeVersionKey(rootKey, keyName, greHome, aProperties, aPropertiesLen);
   if (NS_SUCCEEDED(rv)) {
     PR_Write(fd, keyName, strlen(keyName));
     irv = PR_TRUE;
     goto reg_end;
   }
   
   for (i = 0; i < 1000; ++i) {
     sprintf(keyName, GRE_BUILD_ID "_%i", i);
-    rv = MakeVersionKey(rootKey, keyName, greHome);
+    rv = MakeVersionKey(rootKey, keyName, greHome,
+                        aProperties, aPropertiesLen);
     if (NS_SUCCEEDED(rv)) {
       PR_Write(fd, keyName, strlen(keyName));
       irv = PR_TRUE;
       goto reg_end;
     }
   }
 
   irv = PR_FALSE;
 
 reg_end:
   if (fd)
     PR_Close(fd);
Index: xulrunner/app/nsXULRunnerApp.cpp
===================================================================
RCS file: /cvsroot/mozilla/xulrunner/app/nsXULRunnerApp.cpp,v
retrieving revision 1.22.2.3
diff -u -1 -2 -p -d -r1.22.2.3 nsXULRunnerApp.cpp
--- xulrunner/app/nsXULRunnerApp.cpp	7 Oct 2005 15:41:04 -0000	1.22.2.3
+++ xulrunner/app/nsXULRunnerApp.cpp	6 Jan 2006 17:08:29 -0000
@@ -340,24 +340,31 @@ InstallXULApp(nsIFile* aXULRunnerDir,
       rv = install->InstallApplication(appLocation, installTo, leafName);
     }
   }
 
   NS_ShutdownXPCOM(nsnull);
 
   if (NS_FAILED(rv))
     return 3;
 
   return 0;
 }
 
+static const GREProperty kGREProperties[] = {
+  { "xulrunner", "true" }
+#ifdef MOZ_JAVAXPCOM
+  , { "javaxpcom", "1" }
+#endif
+};
+
 int main(int argc, char* argv[])
 {
   if (argc > 1 && (IsArg(argv[1], "h") ||
                    IsArg(argv[1], "help") ||
                    IsArg(argv[1], "?")))
   {
     Usage();
     return 0;
   }
 
   if (argc == 2 && (IsArg(argv[1], "v") || IsArg(argv[1], "version")))
   {
@@ -370,25 +377,27 @@ int main(int argc, char* argv[])
     PRBool registerUser   = IsArg(argv[1], "register-user");
     if (registerGlobal || registerUser) {
       if (argc != 2) {
         Usage();
         return 1;
       }
 
       nsCOMPtr<nsIFile> regDir;
       nsresult rv = GetXULRunnerDir(argv[0], getter_AddRefs(regDir));
       if (NS_FAILED(rv))
         return 2;
 
-      return RegisterXULRunner(registerGlobal, regDir) ? 0 : 2;
+      return RegisterXULRunner(registerGlobal, regDir,
+                               kGREProperties,
+                               NS_ARRAY_LENGTH(kGREProperties)) ? 0 : 2;
     }
 
     registerGlobal = IsArg(argv[1], "unregister-global");
     registerUser   = IsArg(argv[1], "unregister-user");
     if (registerGlobal || registerUser) {
       if (argc != 2) {
         Usage();
         return 1;
       }
 
       nsCOMPtr<nsIFile> regDir;
       nsresult rv = GetXULRunnerDir(argv[0], getter_AddRefs(regDir));
@@ -396,29 +405,34 @@ int main(int argc, char* argv[])
         return 2;
       UnregisterXULRunner(registerGlobal, regDir);
       return 0;
     }
 
     if (IsArg(argv[1], "find-gre")) {
       if (argc != 3) {
         Usage();
         return 1;
       }
 
       char path[MAXPATHLEN];
-      const GREVersionRange vr = {
+      static const GREVersionRange vr = {
         argv[2], PR_TRUE,
         argv[2], PR_TRUE
       };
-      nsresult rv = GRE_GetGREPathWithProperties(&vr, 1, nsnull, 0,
+      static const GREProperty kProperties[] = {
+        { "xulrunner", "true" }
+      };
+
+      nsresult rv = GRE_GetGREPathWithProperties(&vr, 1, kProperties,
+                                                 NS_ARRAY_LENGTH(kProperties),
                                                  path, sizeof(path));
       if (NS_FAILED(rv))
         return 1;
 
       printf("%s\n", path);
       return 0;
     }
 
     if (IsArg(argv[1], "gre-version")) {
       if (argc != 2) {
         Usage();
         return 1;
Index: xulrunner/stub/nsXULStub.cpp
===================================================================
RCS file: /cvsroot/mozilla/xulrunner/stub/nsXULStub.cpp,v
retrieving revision 1.1.2.3
diff -u -1 -2 -p -d -r1.1.2.3 nsXULStub.cpp
--- xulrunner/stub/nsXULStub.cpp	17 Nov 2005 19:44:27 -0000	1.1.2.3
+++ xulrunner/stub/nsXULStub.cpp	6 Jan 2006 17:08:29 -0000
@@ -30,24 +30,25 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsXPCOMGlue.h"
 #include "nsINIParser.h"
 #include "prtypes.h"
 #include "nsXPCOMPrivate.h" // for XP MAXPATHLEN
+#include "nsMemory.h" // for NS_ARRAY_LENGTH
 
 #ifdef XP_WIN
 #include <windows.h>
 #include <io.h>
 #define snprintf _snprintf
 #define PATH_SEPARATOR_CHAR '\\'
 #define XULRUNNER_BIN "xulrunner.exe"
 #include "nsWindowsRestart.cpp"
 #define R_OK 04
 #else
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -144,26 +145,31 @@ main(int argc, char **argv)
 
     rv = parser.GetString("Gecko", "MinVersion", minVersion, sizeof(minVersion));
     if (NS_FAILED(rv)) {
       fprintf(stderr,
               "The application.ini does not specify a [Gecko] MinVersion\n");
       return 1;
     }
 
     rv = parser.GetString("Gecko", "MaxVersion", maxVersion, sizeof(maxVersion));
     if (NS_SUCCEEDED(rv))
       range.upperInclusive = PR_TRUE;
 
-    rv = GRE_GetGREPathWithProperties(&range, 1, nsnull, 0,
-                                    greDir, sizeof(greDir));
+    static const GREProperty kProperties[] = {
+      { "xulrunner", "true" }
+    };
+
+    rv = GRE_GetGREPathWithProperties(&range, 1,
+                                      kProperties, NS_ARRAY_LENGTH(kProperties),
+                                      greDir, sizeof(greDir));
     if (NS_FAILED(rv)) {
       // XXXbsmedberg: Do something much smarter here: notify the
       // user/offer to download/?
 
       fprintf(stderr,
               "Could not find compatible GRE between version %s and %s.\n", 
               range.lower, range.upper);
       return 1;
     }
   }
 
   lastSlash = strrchr(greDir, PATH_SEPARATOR_CHAR);
