changeset 950:6707684e37c8

2008-07-03 Thomas Fitzsimmons <fitzsim@redhat.com> * .hgignore: Add IcedTeaPlugin.o. * IcedTeaPlugin.cc: Do not print current thread ID in output. * Makefile.am: Fix IcedTeaPlugin.so linking. * Makefile.in: Regenerate. * configure.ac: Remove XULRUNNER_VERSION.
author Thomas Fitzsimmons <fitzsim@redhat.com>
date Thu, 03 Jul 2008 16:40:32 -0400
parents 011c674ae765
children 8405dc155272
files .hgignore ChangeLog IcedTeaPlugin.cc Makefile.am Makefile.in aclocal.m4 configure configure.ac
diffstat 8 files changed, 388 insertions(+), 496 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Thu Jul 03 16:04:29 2008 +0100
+++ b/.hgignore	Thu Jul 03 16:40:32 2008 -0400
@@ -16,6 +16,7 @@
 javac
 javap
 gcjwebplugin.so
+IcedTeaPlugin.o
 IcedTeaPlugin.so
 extra-source-files.txt
 rt-source-files.txt
--- a/ChangeLog	Thu Jul 03 16:04:29 2008 +0100
+++ b/ChangeLog	Thu Jul 03 16:40:32 2008 -0400
@@ -1,3 +1,11 @@
+2008-07-03  Thomas Fitzsimmons  <fitzsim@redhat.com>
+
+	* .hgignore: Add IcedTeaPlugin.o.
+	* IcedTeaPlugin.cc: Do not print current thread ID in output.
+	* Makefile.am: Fix IcedTeaPlugin.so linking.
+	* Makefile.in: Regenerate.
+	* configure.ac: Remove XULRUNNER_VERSION.
+
 2008-07-03  Andrew John Hughes  <gnu_andrew@member.fsf.org>
 
 	* b/Makefile.am: Fix use of abs_top_srcdir
@@ -38,13 +46,13 @@
 	Regenerated.
 
 2008-07-02  Gary Benson  <gbenson@redhat.com>
-	
+
 	* acinclude.m4:
 	Fix detection of Shark/core build.
 	* aclocal.m4,
 	* configure:
 	Regenerated.
-	
+
 2008-07-02  Thomas Fitzsimmons  <fitzsim@redhat.com>
 
 	* IcedTeaPlugin.cc: New file.
--- a/IcedTeaPlugin.cc	Thu Jul 03 16:04:29 2008 +0100
+++ b/IcedTeaPlugin.cc	Thu Jul 03 16:40:32 2008 -0400
@@ -94,13 +94,13 @@
   {
     Trace::name = name;
     Trace::function = function;
-    printf ("ICEDTEA PLUGIN: thread %p: %s%s\n", current_thread (),
+    printf ("ICEDTEA PLUGIN: %s%s\n",
              name, function);
   }
 
   ~Trace ()
   {
-    printf ("ICEDTEA PLUGIN: thread %p: %s%s %s\n", current_thread (),
+    printf ("ICEDTEA PLUGIN: %s%s %s\n",
              name, function, "return");
   }
 private:
@@ -111,10 +111,10 @@
 #if 1
 // Debugging macros.
 #define PLUGIN_DEBUG(message)                                           \
-  printf ("ICEDTEA PLUGIN: thread %p: %s\n", current_thread (), message)
+  printf ("ICEDTEA PLUGIN: %s\n", message)
 
 #define PLUGIN_DEBUG_TWO(first, second)                                 \
-  printf ("ICEDTEA PLUGIN: thread %p: %s %s\n", current_thread (),      \
+  printf ("ICEDTEA PLUGIN: %s %s\n",      \
            first, second)
 
 // Testing macro.
@@ -137,16 +137,16 @@
 
 // Error reporting macros.
 #define PLUGIN_ERROR(message)                                       \
-  fprintf (stderr, "%s:%d: thread %p: Error: %s\n", __FILE__, __LINE__,  \
-           current_thread (), message)
+  fprintf (stderr, "%s:%d: Error: %s\n", __FILE__, __LINE__,  \
+           message)
 
 #define PLUGIN_ERROR_TWO(first, second)                                 \
-  fprintf (stderr, "%s:%d: thread %p: Error: %s: %s\n", __FILE__, __LINE__,  \
-           current_thread (), first, second)
+  fprintf (stderr, "%s:%d: Error: %s: %s\n", __FILE__, __LINE__,  \
+           first, second)
 
 #define PLUGIN_ERROR_THREE(first, second, third)                        \
-  fprintf (stderr, "%s:%d: thread %p: Error: %s: %s: %s\n", __FILE__,        \
-           __LINE__, current_thread (), first, second, third)
+  fprintf (stderr, "%s:%d: Error: %s: %s: %s\n", __FILE__,        \
+           __LINE__, first, second, third)
 
 #define PLUGIN_CHECK_RETURN(message, result)           \
   if (NS_SUCCEEDED (result))                    \
@@ -180,16 +180,16 @@
 
 // Error reporting macros.
 #define PLUGIN_ERROR(message)                                       \
-  fprintf (stderr, "%s:%d: thread %p: Error: %s\n", __FILE__, __LINE__,  \
-           current_thread (), message)
+  fprintf (stderr, "%s:%d: Error: %s\n", __FILE__, __LINE__,  \
+           message)
 
 #define PLUGIN_ERROR_TWO(first, second)                                 \
-  fprintf (stderr, "%s:%d: thread %p: Error: %s: %s\n", __FILE__, __LINE__,  \
-           current_thread (), first, second)
+  fprintf (stderr, "%s:%d: Error: %s: %s\n", __FILE__, __LINE__,  \
+           first, second)
 
 #define PLUGIN_ERROR_THREE(first, second, third)                        \
-  fprintf (stderr, "%s:%d: thread %p: Error: %s: %s: %s\n", __FILE__,        \
-           __LINE__, current_thread (), first, second, third)
+  fprintf (stderr, "%s:%d: Error: %s: %s: %s\n", __FILE__,        \
+           __LINE__, first, second, third)
 #define PLUGIN_CHECK_RETURN(message, result)
 #define PLUGIN_CHECK(message, result)
 #endif
@@ -2032,7 +2032,7 @@
   PRUint32 readCount = 0;
   int index = 0;
 
-  printf ("ONINPUTSTREAMREADY 1 %p\n", current_thread());
+  printf ("ONINPUTSTREAMREADY 1 %p\n", current_thread ());
   // Omit return value checking for speed.
   input->Read (&byte, 1, &readCount);
   if (readCount != 1)
@@ -2600,7 +2600,7 @@
   // so they can all safely be null.
   if (factory->proxyEnv != NULL)
     {
-      printf ("HERE 23: %d, %p\n", liveconnect_window, current_thread());
+      printf ("HERE 23: %d, %p\n", liveconnect_window, current_thread ());
       result = factory->liveconnect->GetWindow(factory->proxyEnv,
                                                this,
                                                NULL, 0, NULL,
--- a/Makefile.am	Thu Jul 03 16:04:29 2008 +0100
+++ b/Makefile.am	Thu Jul 03 16:40:32 2008 -0400
@@ -1111,36 +1111,24 @@
 
 if ENABLE_LIVECONNECT
 # IcedTeaPlugin.so.
-# Mozilla is compiled with -fshort-wchar.
-# FIXME: How is this supposed to work?  ld doesn't include these
-# objects without the ar x hack.
-# Verbose ld output:
-# ...
-# attempt to open /usr/lib/xulrunner-sdk-1.9/sdk/lib/libmozjs.so succeeded
-# -lmozjs (/usr/lib/xulrunner-sdk-1.9/sdk/lib/libmozjs.so)
-# attempt to open /usr/lib/xulrunner-sdk-1.9/sdk/lib/libxpcomglue_s.so failedicedtea6/
-# attempt to open /usr/lib/xulrunner-sdk-1.9/sdk/lib/libxpcomglue_s.a succeeded
-# attempt to open /usr/lib/xulrunner-sdk-1.9/sdk/lib/libxul.so succeeded
-# -lxul (/usr/lib/xulrunner-sdk-1.9/sdk/lib/libxul.so)
-# ...
-IcedTeaPlugin.so: IcedTeaPlugin.cc
-	rm -rf xpcomglueobjects
-	mkdir xpcomglueobjects
-	cd xpcomglueobjects ; \
-	ar x \
-	  /usr/lib/xulrunner-sdk-$(XULRUNNER_VERSION)/sdk/lib/libxpcomglue_s.a
-	pwd
+# Separate compile and link invocations to ensure intermediate object
+# is listed before -l options.  See:
+# http://developer.mozilla.org/en/docs/XPCOM_Glue
+IcedTeaPlugin.o: IcedTeaPlugin.cc
 	$(CXX) $(CXXFLAGS) \
-	  -DXPCOM_GLUE \
-	  -DXPCOM_GLUE_USE_NSPR \
-	  $(XULRUNNER_CFLAGS) $(XULRUNNER_LIBS) \
-	  $(GTK_CFLAGS) $(GTK_LIBS) \
-	  xpcomglueobjects/*.o \
 	  -DPACKAGE_VERSION="\"$(PACKAGE_VERSION)\"" \
-	  -fpic -shared -o $@ $<
-	rm -rf xpcomglueobjects
+	  $(GTK_CFLAGS) \
+	  $(XULRUNNER_CFLAGS) \
+	  -fPIC -c -o $@ $<
+IcedTeaPlugin.so: IcedTeaPlugin.o
+	$(CXX) $(CXXFLAGS) \
+	  $< \
+	  $(GTK_LIBS) \
+	  $(XULRUNNER_LIBS) \
+	  -shared -o $@
 
 clean-IcedTeaPlugin:
+	rm -f IcedTeaPlugin.o
 	rm -f IcedTeaPlugin.so
 else
 if ENABLE_PLUGIN
--- a/Makefile.in	Thu Jul 03 16:04:29 2008 +0100
+++ b/Makefile.in	Thu Jul 03 16:40:32 2008 -0400
@@ -204,7 +204,6 @@
 XT_LIBS = @XT_LIBS@
 XULRUNNER_CFLAGS = @XULRUNNER_CFLAGS@
 XULRUNNER_LIBS = @XULRUNNER_LIBS@
-XULRUNNER_VERSION = @XULRUNNER_VERSION@
 ZERO_ARCHDEF = @ZERO_ARCHDEF@
 ZERO_ARCHFLAG = @ZERO_ARCHFLAG@
 ZERO_BITSPERWORD = @ZERO_BITSPERWORD@
@@ -935,7 +934,7 @@
 	  then \
 	    echo Applying $$p ; \
 	    $(PATCH) -l -p0 < $(abs_top_srcdir)/$$p ; \
-	    if ! grep "^\* $$(basename $$p)" HACKING >> stamps/patch.stamp.tmp ; \
+	    if ! grep "^\* $$(basename $$p)" $(abs_top_srcdir)/HACKING >> stamps/patch.stamp.tmp ; \
 	    then \
 	      echo "* $$(basename $$p): UNDOCUMENTED" >> stamps/patch.stamp.tmp ; \
 	    fi ; \
@@ -980,7 +979,7 @@
 	  then \
 	    echo Applying $$p ; \
 	    $(PATCH) -l -p0 < $(abs_top_srcdir)/$$p ; \
-	    if ! grep "^\* $$(basename $$p)" HACKING >> stamps/patch-fsg.stamp.tmp ; \
+	    if ! grep "^\* $$(basename $$p)" $(abs_top_srcdir)/HACKING >> stamps/patch-fsg.stamp.tmp ; \
 	    then \
 	      echo "* $$(basename $$p): UNDOCUMENTED" >> stamps/patch-fsg.stamp.tmp ; \
 	    fi ; \
@@ -1506,36 +1505,24 @@
 	rm -f stamps/cacao.stamp
 
 # IcedTeaPlugin.so.
-# Mozilla is compiled with -fshort-wchar.
-# FIXME: How is this supposed to work?  ld doesn't include these
-# objects without the ar x hack.
-# Verbose ld output:
-# ...
-# attempt to open /usr/lib/xulrunner-sdk-1.9/sdk/lib/libmozjs.so succeeded
-# -lmozjs (/usr/lib/xulrunner-sdk-1.9/sdk/lib/libmozjs.so)
-# attempt to open /usr/lib/xulrunner-sdk-1.9/sdk/lib/libxpcomglue_s.so failedicedtea6/
-# attempt to open /usr/lib/xulrunner-sdk-1.9/sdk/lib/libxpcomglue_s.a succeeded
-# attempt to open /usr/lib/xulrunner-sdk-1.9/sdk/lib/libxul.so succeeded
-# -lxul (/usr/lib/xulrunner-sdk-1.9/sdk/lib/libxul.so)
-# ...
-@ENABLE_LIVECONNECT_TRUE@IcedTeaPlugin.so: IcedTeaPlugin.cc
-@ENABLE_LIVECONNECT_TRUE@	rm -rf xpcomglueobjects
-@ENABLE_LIVECONNECT_TRUE@	mkdir xpcomglueobjects
-@ENABLE_LIVECONNECT_TRUE@	cd xpcomglueobjects ; \
-@ENABLE_LIVECONNECT_TRUE@	ar x \
-@ENABLE_LIVECONNECT_TRUE@	  /usr/lib/xulrunner-sdk-$(XULRUNNER_VERSION)/sdk/lib/libxpcomglue_s.a
-@ENABLE_LIVECONNECT_TRUE@	pwd
+# Separate compile and link invocations to ensure intermediate object
+# is listed before -l options.  See:
+# http://developer.mozilla.org/en/docs/XPCOM_Glue
+@ENABLE_LIVECONNECT_TRUE@IcedTeaPlugin.o: IcedTeaPlugin.cc
 @ENABLE_LIVECONNECT_TRUE@	$(CXX) $(CXXFLAGS) \
-@ENABLE_LIVECONNECT_TRUE@	  -DXPCOM_GLUE \
-@ENABLE_LIVECONNECT_TRUE@	  -DXPCOM_GLUE_USE_NSPR \
-@ENABLE_LIVECONNECT_TRUE@	  $(XULRUNNER_CFLAGS) $(XULRUNNER_LIBS) \
-@ENABLE_LIVECONNECT_TRUE@	  $(GTK_CFLAGS) $(GTK_LIBS) \
-@ENABLE_LIVECONNECT_TRUE@	  xpcomglueobjects/*.o \
 @ENABLE_LIVECONNECT_TRUE@	  -DPACKAGE_VERSION="\"$(PACKAGE_VERSION)\"" \
-@ENABLE_LIVECONNECT_TRUE@	  -fpic -shared -o $@ $<
-@ENABLE_LIVECONNECT_TRUE@	rm -rf xpcomglueobjects
+@ENABLE_LIVECONNECT_TRUE@	  $(GTK_CFLAGS) \
+@ENABLE_LIVECONNECT_TRUE@	  $(XULRUNNER_CFLAGS) \
+@ENABLE_LIVECONNECT_TRUE@	  -fPIC -c -o $@ $<
+@ENABLE_LIVECONNECT_TRUE@IcedTeaPlugin.so: IcedTeaPlugin.o
+@ENABLE_LIVECONNECT_TRUE@	$(CXX) $(CXXFLAGS) \
+@ENABLE_LIVECONNECT_TRUE@	  $< \
+@ENABLE_LIVECONNECT_TRUE@	  $(GTK_LIBS) \
+@ENABLE_LIVECONNECT_TRUE@	  $(XULRUNNER_LIBS) \
+@ENABLE_LIVECONNECT_TRUE@	  -shared -o $@
 
 @ENABLE_LIVECONNECT_TRUE@clean-IcedTeaPlugin:
+@ENABLE_LIVECONNECT_TRUE@	rm -f IcedTeaPlugin.o
 @ENABLE_LIVECONNECT_TRUE@	rm -f IcedTeaPlugin.so
 # gcjwebplugin.so.
 @ENABLE_LIVECONNECT_FALSE@@ENABLE_PLUGIN_TRUE@gcjwebplugin.so: gcjwebplugin.cc
--- a/aclocal.m4	Thu Jul 03 16:04:29 2008 +0100
+++ b/aclocal.m4	Thu Jul 03 16:40:32 2008 -0400
@@ -87,16 +87,14 @@
 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 # ---------------------------------------------
 m4_define([_PKG_CONFIG],
-[if test -n "$PKG_CONFIG"; then
-    if test -n "$$1"; then
-        pkg_cv_[]$1="$$1"
-    else
-        PKG_CHECK_EXISTS([$3],
-                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
-			 [pkg_failed=yes])
-    fi
-else
-	pkg_failed=untried
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+		     [pkg_failed=yes])
+ else
+    pkg_failed=untried
 fi[]dnl
 ])# _PKG_CONFIG
 
@@ -140,9 +138,9 @@
 if test $pkg_failed = yes; then
         _PKG_SHORT_ERRORS_SUPPORTED
         if test $_pkg_short_errors_supported = yes; then
-	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
         else 
-	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
--- a/configure	Thu Jul 03 16:04:29 2008 +0100
+++ b/configure	Thu Jul 03 16:40:32 2008 -0400
@@ -804,7 +804,6 @@
 FREETYPE2_LIBS
 ALSA_CFLAGS
 ALSA_LIBS
-XULRUNNER_VERSION
 XULRUNNER_CFLAGS
 XULRUNNER_LIBS
 GTK_CFLAGS
@@ -10407,11 +10406,10 @@
 { echo "$as_me:$LINENO: checking for XPROTO" >&5
 echo $ECHO_N "checking for XPROTO... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$XPROTO_CFLAGS"; then
-        pkg_cv_XPROTO_CFLAGS="$XPROTO_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$XPROTO_CFLAGS"; then
+    pkg_cv_XPROTO_CFLAGS="$XPROTO_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xproto\"") >&5
   ($PKG_CONFIG --exists --print-errors "xproto") 2>&5
   ac_status=$?
@@ -10421,15 +10419,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$XPROTO_LIBS"; then
-        pkg_cv_XPROTO_LIBS="$XPROTO_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$XPROTO_LIBS"; then
+    pkg_cv_XPROTO_LIBS="$XPROTO_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xproto\"") >&5
   ($PKG_CONFIG --exists --print-errors "xproto") 2>&5
   ac_status=$?
@@ -10439,9 +10435,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -10454,9 +10449,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        XPROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xproto"`
+	        XPROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xproto" 2>&1`
         else
-	        XPROTO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xproto"`
+	        XPROTO_PKG_ERRORS=`$PKG_CONFIG --print-errors "xproto" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$XPROTO_PKG_ERRORS" >&5
@@ -10489,11 +10484,10 @@
 { echo "$as_me:$LINENO: checking for XT" >&5
 echo $ECHO_N "checking for XT... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$XT_CFLAGS"; then
-        pkg_cv_XT_CFLAGS="$XT_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$XT_CFLAGS"; then
+    pkg_cv_XT_CFLAGS="$XT_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5
   ($PKG_CONFIG --exists --print-errors "xt") 2>&5
   ac_status=$?
@@ -10503,15 +10497,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$XT_LIBS"; then
-        pkg_cv_XT_LIBS="$XT_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$XT_LIBS"; then
+    pkg_cv_XT_LIBS="$XT_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5
   ($PKG_CONFIG --exists --print-errors "xt") 2>&5
   ac_status=$?
@@ -10521,9 +10513,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -10536,9 +10527,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        XT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"`
+	        XT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xt" 2>&1`
         else
-	        XT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"`
+	        XT_PKG_ERRORS=`$PKG_CONFIG --print-errors "xt" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$XT_PKG_ERRORS" >&5
@@ -10571,11 +10562,10 @@
 { echo "$as_me:$LINENO: checking for XP" >&5
 echo $ECHO_N "checking for XP... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$XP_CFLAGS"; then
-        pkg_cv_XP_CFLAGS="$XP_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$XP_CFLAGS"; then
+    pkg_cv_XP_CFLAGS="$XP_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xp\"") >&5
   ($PKG_CONFIG --exists --print-errors "xp") 2>&5
   ac_status=$?
@@ -10585,15 +10575,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$XP_LIBS"; then
-        pkg_cv_XP_LIBS="$XP_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$XP_LIBS"; then
+    pkg_cv_XP_LIBS="$XP_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xp\"") >&5
   ($PKG_CONFIG --exists --print-errors "xp") 2>&5
   ac_status=$?
@@ -10603,9 +10591,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -10618,9 +10605,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        XP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xp"`
+	        XP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xp" 2>&1`
         else
-	        XP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xp"`
+	        XP_PKG_ERRORS=`$PKG_CONFIG --print-errors "xp" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$XP_PKG_ERRORS" >&5
@@ -10653,11 +10640,10 @@
 { echo "$as_me:$LINENO: checking for X11" >&5
 echo $ECHO_N "checking for X11... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$X11_CFLAGS"; then
-        pkg_cv_X11_CFLAGS="$X11_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$X11_CFLAGS"; then
+    pkg_cv_X11_CFLAGS="$X11_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5
   ($PKG_CONFIG --exists --print-errors "x11") 2>&5
   ac_status=$?
@@ -10667,15 +10653,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$X11_LIBS"; then
-        pkg_cv_X11_LIBS="$X11_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$X11_LIBS"; then
+    pkg_cv_X11_LIBS="$X11_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5
   ($PKG_CONFIG --exists --print-errors "x11") 2>&5
   ac_status=$?
@@ -10685,9 +10669,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -10700,9 +10683,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        X11_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"`
+	        X11_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11" 2>&1`
         else
-	        X11_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"`
+	        X11_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$X11_PKG_ERRORS" >&5
@@ -10735,11 +10718,10 @@
 { echo "$as_me:$LINENO: checking for XINERAMA" >&5
 echo $ECHO_N "checking for XINERAMA... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$XINERAMA_CFLAGS"; then
-        pkg_cv_XINERAMA_CFLAGS="$XINERAMA_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$XINERAMA_CFLAGS"; then
+    pkg_cv_XINERAMA_CFLAGS="$XINERAMA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xinerama\"") >&5
   ($PKG_CONFIG --exists --print-errors "xinerama") 2>&5
   ac_status=$?
@@ -10749,15 +10731,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$XINERAMA_LIBS"; then
-        pkg_cv_XINERAMA_LIBS="$XINERAMA_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$XINERAMA_LIBS"; then
+    pkg_cv_XINERAMA_LIBS="$XINERAMA_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xinerama\"") >&5
   ($PKG_CONFIG --exists --print-errors "xinerama") 2>&5
   ac_status=$?
@@ -10767,9 +10747,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -10782,9 +10761,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        XINERAMA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xinerama"`
+	        XINERAMA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xinerama" 2>&1`
         else
-	        XINERAMA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xinerama"`
+	        XINERAMA_PKG_ERRORS=`$PKG_CONFIG --print-errors "xinerama" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$XINERAMA_PKG_ERRORS" >&5
@@ -10818,11 +10797,10 @@
 { echo "$as_me:$LINENO: checking for LIBPNG" >&5
 echo $ECHO_N "checking for LIBPNG... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$LIBPNG_CFLAGS"; then
-        pkg_cv_LIBPNG_CFLAGS="$LIBPNG_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$LIBPNG_CFLAGS"; then
+    pkg_cv_LIBPNG_CFLAGS="$LIBPNG_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libpng\"") >&5
   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
   ac_status=$?
@@ -10832,15 +10810,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$LIBPNG_LIBS"; then
-        pkg_cv_LIBPNG_LIBS="$LIBPNG_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$LIBPNG_LIBS"; then
+    pkg_cv_LIBPNG_LIBS="$LIBPNG_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libpng\"") >&5
   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
   ac_status=$?
@@ -10850,9 +10826,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -10865,9 +10840,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        LIBPNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libpng"`
+	        LIBPNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
         else
-	        LIBPNG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libpng"`
+	        LIBPNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$LIBPNG_PKG_ERRORS" >&5
@@ -10901,11 +10876,10 @@
 { echo "$as_me:$LINENO: checking for XTST" >&5
 echo $ECHO_N "checking for XTST... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$XTST_CFLAGS"; then
-        pkg_cv_XTST_CFLAGS="$XTST_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$XTST_CFLAGS"; then
+    pkg_cv_XTST_CFLAGS="$XTST_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xtst\"") >&5
   ($PKG_CONFIG --exists --print-errors "xtst") 2>&5
   ac_status=$?
@@ -10915,15 +10889,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$XTST_LIBS"; then
-        pkg_cv_XTST_LIBS="$XTST_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$XTST_LIBS"; then
+    pkg_cv_XTST_LIBS="$XTST_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xtst\"") >&5
   ($PKG_CONFIG --exists --print-errors "xtst") 2>&5
   ac_status=$?
@@ -10933,9 +10905,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -10948,9 +10919,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        XTST_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xtst"`
+	        XTST_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xtst" 2>&1`
         else
-	        XTST_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xtst"`
+	        XTST_PKG_ERRORS=`$PKG_CONFIG --print-errors "xtst" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$XTST_PKG_ERRORS" >&5
@@ -10983,11 +10954,10 @@
 { echo "$as_me:$LINENO: checking for FREETYPE2" >&5
 echo $ECHO_N "checking for FREETYPE2... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$FREETYPE2_CFLAGS"; then
-        pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$FREETYPE2_CFLAGS"; then
+    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"freetype2\"") >&5
   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
   ac_status=$?
@@ -10997,15 +10967,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$FREETYPE2_LIBS"; then
-        pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$FREETYPE2_LIBS"; then
+    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"freetype2\"") >&5
   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
   ac_status=$?
@@ -11015,9 +10983,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -11030,9 +10997,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "freetype2"`
+	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
         else
-	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"`
+	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$FREETYPE2_PKG_ERRORS" >&5
@@ -11066,11 +11033,10 @@
 { echo "$as_me:$LINENO: checking for ALSA" >&5
 echo $ECHO_N "checking for ALSA... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$ALSA_CFLAGS"; then
-        pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$ALSA_CFLAGS"; then
+    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"alsa\"") >&5
   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
   ac_status=$?
@@ -11080,15 +11046,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$ALSA_LIBS"; then
-        pkg_cv_ALSA_LIBS="$ALSA_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$ALSA_LIBS"; then
+    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"alsa\"") >&5
   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
   ac_status=$?
@@ -11098,9 +11062,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -11113,9 +11076,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "alsa"`
+	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
         else
-	        ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "alsa"`
+	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$ALSA_PKG_ERRORS" >&5
@@ -11145,18 +11108,15 @@
 
 if test "x${enable_liveconnect}" = "xyes"
 then
-  XULRUNNER_VERSION=`pkg-config --modversion libxul-unstable`
-
 
 pkg_failed=no
 { echo "$as_me:$LINENO: checking for XULRUNNER" >&5
 echo $ECHO_N "checking for XULRUNNER... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$XULRUNNER_CFLAGS"; then
-        pkg_cv_XULRUNNER_CFLAGS="$XULRUNNER_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$XULRUNNER_CFLAGS"; then
+    pkg_cv_XULRUNNER_CFLAGS="$XULRUNNER_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\\
     nspr mozilla-js mozilla-plugin libxul-unstable >= 1.9\"") >&5
   ($PKG_CONFIG --exists --print-errors "\
@@ -11169,15 +11129,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$XULRUNNER_LIBS"; then
-        pkg_cv_XULRUNNER_LIBS="$XULRUNNER_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$XULRUNNER_LIBS"; then
+    pkg_cv_XULRUNNER_LIBS="$XULRUNNER_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\\
     nspr mozilla-js mozilla-plugin libxul-unstable >= 1.9\"") >&5
   ($PKG_CONFIG --exists --print-errors "\
@@ -11190,9 +11148,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -11205,11 +11162,11 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        XULRUNNER_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "\
-    nspr mozilla-js mozilla-plugin libxul-unstable >= 1.9"`
+	        XULRUNNER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "\
+    nspr mozilla-js mozilla-plugin libxul-unstable >= 1.9" 2>&1`
         else
-	        XULRUNNER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "\
-    nspr mozilla-js mozilla-plugin libxul-unstable >= 1.9"`
+	        XULRUNNER_PKG_ERRORS=`$PKG_CONFIG --print-errors "\
+    nspr mozilla-js mozilla-plugin libxul-unstable >= 1.9" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$XULRUNNER_PKG_ERRORS" >&5
@@ -11273,11 +11230,10 @@
 { echo "$as_me:$LINENO: checking for GTK" >&5
 echo $ECHO_N "checking for GTK... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$GTK_CFLAGS"; then
-        pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$GTK_CFLAGS"; then
+    pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\"") >&5
   ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5
   ac_status=$?
@@ -11287,15 +11243,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$GTK_LIBS"; then
-        pkg_cv_GTK_LIBS="$GTK_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$GTK_LIBS"; then
+    pkg_cv_GTK_LIBS="$GTK_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\"") >&5
   ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5
   ac_status=$?
@@ -11305,9 +11259,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -11320,9 +11273,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0"`
+	        GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gtk+-2.0" 2>&1`
         else
-	        GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0"`
+	        GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors "gtk+-2.0" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$GTK_PKG_ERRORS" >&5
@@ -11387,11 +11340,10 @@
 { echo "$as_me:$LINENO: checking for MOZILLA" >&5
 echo $ECHO_N "checking for MOZILLA... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$MOZILLA_CFLAGS"; then
-        pkg_cv_MOZILLA_CFLAGS="$MOZILLA_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$MOZILLA_CFLAGS"; then
+    pkg_cv_MOZILLA_CFLAGS="$MOZILLA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"mozilla-plugin libxul-unstable\"") >&5
   ($PKG_CONFIG --exists --print-errors "mozilla-plugin libxul-unstable") 2>&5
   ac_status=$?
@@ -11401,15 +11353,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$MOZILLA_LIBS"; then
-        pkg_cv_MOZILLA_LIBS="$MOZILLA_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$MOZILLA_LIBS"; then
+    pkg_cv_MOZILLA_LIBS="$MOZILLA_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"mozilla-plugin libxul-unstable\"") >&5
   ($PKG_CONFIG --exists --print-errors "mozilla-plugin libxul-unstable") 2>&5
   ac_status=$?
@@ -11419,9 +11369,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -11434,9 +11383,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "mozilla-plugin libxul-unstable"`
+	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "mozilla-plugin libxul-unstable" 2>&1`
         else
-	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "mozilla-plugin libxul-unstable"`
+	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --print-errors "mozilla-plugin libxul-unstable" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$MOZILLA_PKG_ERRORS" >&5
@@ -11461,11 +11410,10 @@
 { echo "$as_me:$LINENO: checking for MOZILLA" >&5
 echo $ECHO_N "checking for MOZILLA... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$MOZILLA_CFLAGS"; then
-        pkg_cv_MOZILLA_CFLAGS="$MOZILLA_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$MOZILLA_CFLAGS"; then
+    pkg_cv_MOZILLA_CFLAGS="$MOZILLA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"mozilla-plugin\"") >&5
   ($PKG_CONFIG --exists --print-errors "mozilla-plugin") 2>&5
   ac_status=$?
@@ -11475,15 +11423,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$MOZILLA_LIBS"; then
-        pkg_cv_MOZILLA_LIBS="$MOZILLA_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$MOZILLA_LIBS"; then
+    pkg_cv_MOZILLA_LIBS="$MOZILLA_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"mozilla-plugin\"") >&5
   ($PKG_CONFIG --exists --print-errors "mozilla-plugin") 2>&5
   ac_status=$?
@@ -11493,9 +11439,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -11508,9 +11453,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "mozilla-plugin"`
+	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "mozilla-plugin" 2>&1`
         else
-	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "mozilla-plugin"`
+	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --print-errors "mozilla-plugin" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$MOZILLA_PKG_ERRORS" >&5
@@ -11536,11 +11481,10 @@
 { echo "$as_me:$LINENO: checking for MOZILLA" >&5
 echo $ECHO_N "checking for MOZILLA... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$MOZILLA_CFLAGS"; then
-        pkg_cv_MOZILLA_CFLAGS="$MOZILLA_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$MOZILLA_CFLAGS"; then
+    pkg_cv_MOZILLA_CFLAGS="$MOZILLA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"firefox-plugin firefox-xpcom\"") >&5
   ($PKG_CONFIG --exists --print-errors "firefox-plugin firefox-xpcom") 2>&5
   ac_status=$?
@@ -11550,15 +11494,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$MOZILLA_LIBS"; then
-        pkg_cv_MOZILLA_LIBS="$MOZILLA_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$MOZILLA_LIBS"; then
+    pkg_cv_MOZILLA_LIBS="$MOZILLA_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"firefox-plugin firefox-xpcom\"") >&5
   ($PKG_CONFIG --exists --print-errors "firefox-plugin firefox-xpcom") 2>&5
   ac_status=$?
@@ -11568,9 +11510,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -11583,9 +11524,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "firefox-plugin firefox-xpcom"`
+	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "firefox-plugin firefox-xpcom" 2>&1`
         else
-	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "firefox-plugin firefox-xpcom"`
+	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --print-errors "firefox-plugin firefox-xpcom" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$MOZILLA_PKG_ERRORS" >&5
@@ -11611,11 +11552,10 @@
 { echo "$as_me:$LINENO: checking for MOZILLA" >&5
 echo $ECHO_N "checking for MOZILLA... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$MOZILLA_CFLAGS"; then
-        pkg_cv_MOZILLA_CFLAGS="$MOZILLA_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$MOZILLA_CFLAGS"; then
+    pkg_cv_MOZILLA_CFLAGS="$MOZILLA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xulrunner-plugin xulrunner-xpcom\"") >&5
   ($PKG_CONFIG --exists --print-errors "xulrunner-plugin xulrunner-xpcom") 2>&5
   ac_status=$?
@@ -11625,15 +11565,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$MOZILLA_LIBS"; then
-        pkg_cv_MOZILLA_LIBS="$MOZILLA_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$MOZILLA_LIBS"; then
+    pkg_cv_MOZILLA_LIBS="$MOZILLA_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xulrunner-plugin xulrunner-xpcom\"") >&5
   ($PKG_CONFIG --exists --print-errors "xulrunner-plugin xulrunner-xpcom") 2>&5
   ac_status=$?
@@ -11643,9 +11581,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -11658,9 +11595,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xulrunner-plugin xulrunner-xpcom"`
+	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xulrunner-plugin xulrunner-xpcom" 2>&1`
         else
-	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xulrunner-plugin xulrunner-xpcom"`
+	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --print-errors "xulrunner-plugin xulrunner-xpcom" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$MOZILLA_PKG_ERRORS" >&5
@@ -11686,11 +11623,10 @@
 { echo "$as_me:$LINENO: checking for MOZILLA" >&5
 echo $ECHO_N "checking for MOZILLA... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$MOZILLA_CFLAGS"; then
-        pkg_cv_MOZILLA_CFLAGS="$MOZILLA_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$MOZILLA_CFLAGS"; then
+    pkg_cv_MOZILLA_CFLAGS="$MOZILLA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"mozilla-firefox-plugin mozilla-firefox-xpcom\"") >&5
   ($PKG_CONFIG --exists --print-errors "mozilla-firefox-plugin mozilla-firefox-xpcom") 2>&5
   ac_status=$?
@@ -11700,15 +11636,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$MOZILLA_LIBS"; then
-        pkg_cv_MOZILLA_LIBS="$MOZILLA_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$MOZILLA_LIBS"; then
+    pkg_cv_MOZILLA_LIBS="$MOZILLA_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"mozilla-firefox-plugin mozilla-firefox-xpcom\"") >&5
   ($PKG_CONFIG --exists --print-errors "mozilla-firefox-plugin mozilla-firefox-xpcom") 2>&5
   ac_status=$?
@@ -11718,9 +11652,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -11733,9 +11666,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "mozilla-firefox-plugin mozilla-firefox-xpcom"`
+	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "mozilla-firefox-plugin mozilla-firefox-xpcom" 2>&1`
         else
-	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "mozilla-firefox-plugin mozilla-firefox-xpcom"`
+	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --print-errors "mozilla-firefox-plugin mozilla-firefox-xpcom" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$MOZILLA_PKG_ERRORS" >&5
@@ -11761,11 +11694,10 @@
 { echo "$as_me:$LINENO: checking for MOZILLA" >&5
 echo $ECHO_N "checking for MOZILLA... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$MOZILLA_CFLAGS"; then
-        pkg_cv_MOZILLA_CFLAGS="$MOZILLA_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$MOZILLA_CFLAGS"; then
+    pkg_cv_MOZILLA_CFLAGS="$MOZILLA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"seamonkey-plugin seamonkey-xpcom\"") >&5
   ($PKG_CONFIG --exists --print-errors "seamonkey-plugin seamonkey-xpcom") 2>&5
   ac_status=$?
@@ -11775,15 +11707,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$MOZILLA_LIBS"; then
-        pkg_cv_MOZILLA_LIBS="$MOZILLA_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$MOZILLA_LIBS"; then
+    pkg_cv_MOZILLA_LIBS="$MOZILLA_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"seamonkey-plugin seamonkey-xpcom\"") >&5
   ($PKG_CONFIG --exists --print-errors "seamonkey-plugin seamonkey-xpcom") 2>&5
   ac_status=$?
@@ -11793,9 +11723,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -11808,9 +11737,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "seamonkey-plugin seamonkey-xpcom"`
+	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "seamonkey-plugin seamonkey-xpcom" 2>&1`
         else
-	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "seamonkey-plugin seamonkey-xpcom"`
+	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --print-errors "seamonkey-plugin seamonkey-xpcom" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$MOZILLA_PKG_ERRORS" >&5
@@ -11836,11 +11765,10 @@
 { echo "$as_me:$LINENO: checking for MOZILLA" >&5
 echo $ECHO_N "checking for MOZILLA... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$MOZILLA_CFLAGS"; then
-        pkg_cv_MOZILLA_CFLAGS="$MOZILLA_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$MOZILLA_CFLAGS"; then
+    pkg_cv_MOZILLA_CFLAGS="$MOZILLA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"iceape-plugin iceape-xpcom\"") >&5
   ($PKG_CONFIG --exists --print-errors "iceape-plugin iceape-xpcom") 2>&5
   ac_status=$?
@@ -11850,15 +11778,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$MOZILLA_LIBS"; then
-        pkg_cv_MOZILLA_LIBS="$MOZILLA_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$MOZILLA_LIBS"; then
+    pkg_cv_MOZILLA_LIBS="$MOZILLA_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"iceape-plugin iceape-xpcom\"") >&5
   ($PKG_CONFIG --exists --print-errors "iceape-plugin iceape-xpcom") 2>&5
   ac_status=$?
@@ -11868,9 +11794,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -11883,9 +11808,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "iceape-plugin iceape-xpcom"`
+	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "iceape-plugin iceape-xpcom" 2>&1`
         else
-	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "iceape-plugin iceape-xpcom"`
+	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --print-errors "iceape-plugin iceape-xpcom" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$MOZILLA_PKG_ERRORS" >&5
@@ -11916,11 +11841,10 @@
 { echo "$as_me:$LINENO: checking for GLIB" >&5
 echo $ECHO_N "checking for GLIB... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$GLIB_CFLAGS"; then
-        pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$GLIB_CFLAGS"; then
+    pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0\"") >&5
   ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5
   ac_status=$?
@@ -11930,15 +11854,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$GLIB_LIBS"; then
-        pkg_cv_GLIB_LIBS="$GLIB_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$GLIB_LIBS"; then
+    pkg_cv_GLIB_LIBS="$GLIB_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0\"") >&5
   ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5
   ac_status=$?
@@ -11948,9 +11870,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -11963,9 +11884,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0"`
+	        GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0" 2>&1`
         else
-	        GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0"`
+	        GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$GLIB_PKG_ERRORS" >&5
@@ -12027,11 +11948,10 @@
 { echo "$as_me:$LINENO: checking for GTK" >&5
 echo $ECHO_N "checking for GTK... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$GTK_CFLAGS"; then
-        pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$GTK_CFLAGS"; then
+    pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 gthread-2.0 gdk-pixbuf-2.0\"") >&5
   ($PKG_CONFIG --exists --print-errors "gtk+-2.0 gthread-2.0 gdk-pixbuf-2.0") 2>&5
   ac_status=$?
@@ -12041,15 +11961,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$GTK_LIBS"; then
-        pkg_cv_GTK_LIBS="$GTK_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$GTK_LIBS"; then
+    pkg_cv_GTK_LIBS="$GTK_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 gthread-2.0 gdk-pixbuf-2.0\"") >&5
   ($PKG_CONFIG --exists --print-errors "gtk+-2.0 gthread-2.0 gdk-pixbuf-2.0") 2>&5
   ac_status=$?
@@ -12059,9 +11977,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -12074,9 +11991,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0 gthread-2.0 gdk-pixbuf-2.0"`
+	        GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gtk+-2.0 gthread-2.0 gdk-pixbuf-2.0" 2>&1`
         else
-	        GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 gthread-2.0 gdk-pixbuf-2.0"`
+	        GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors "gtk+-2.0 gthread-2.0 gdk-pixbuf-2.0" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$GTK_PKG_ERRORS" >&5
@@ -12149,11 +12066,10 @@
 { echo "$as_me:$LINENO: checking for LIBFFI" >&5
 echo $ECHO_N "checking for LIBFFI... $ECHO_C" >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$LIBFFI_CFLAGS"; then
-        pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$LIBFFI_CFLAGS"; then
+    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libffi\"") >&5
   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
   ac_status=$?
@@ -12163,15 +12079,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$LIBFFI_LIBS"; then
-        pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$LIBFFI_LIBS"; then
+    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libffi\"") >&5
   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
   ac_status=$?
@@ -12181,9 +12095,8 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -12196,9 +12109,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libffi"`
+	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
         else
-	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libffi"`
+	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$LIBFFI_PKG_ERRORS" >&5
@@ -13624,11 +13537,11 @@
 FREETYPE2_LIBS!$FREETYPE2_LIBS$ac_delim
 ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim
 ALSA_LIBS!$ALSA_LIBS$ac_delim
-XULRUNNER_VERSION!$XULRUNNER_VERSION$ac_delim
 XULRUNNER_CFLAGS!$XULRUNNER_CFLAGS$ac_delim
 XULRUNNER_LIBS!$XULRUNNER_LIBS$ac_delim
 GTK_CFLAGS!$GTK_CFLAGS$ac_delim
 GTK_LIBS!$GTK_LIBS$ac_delim
+MOZILLA_CFLAGS!$MOZILLA_CFLAGS$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -13670,7 +13583,6 @@
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
-MOZILLA_CFLAGS!$MOZILLA_CFLAGS$ac_delim
 MOZILLA_LIBS!$MOZILLA_LIBS$ac_delim
 GLIB_CFLAGS!$GLIB_CFLAGS$ac_delim
 GLIB_LIBS!$GLIB_LIBS$ac_delim
@@ -13684,7 +13596,7 @@
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 12; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 11; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
--- a/configure.ac	Thu Jul 03 16:04:29 2008 +0100
+++ b/configure.ac	Thu Jul 03 16:40:32 2008 -0400
@@ -331,8 +331,6 @@
 dnl FIXME: use unstable
 if test "x${enable_liveconnect}" = "xyes"
 then
-  XULRUNNER_VERSION=`pkg-config --modversion libxul-unstable`
-  AC_SUBST(XULRUNNER_VERSION)
   PKG_CHECK_MODULES(XULRUNNER, \
     nspr mozilla-js mozilla-plugin libxul-unstable >= 1.9)
   PKG_CHECK_MODULES(GTK, gtk+-2.0)