Index: configure.ac
===================================================================
RCS file: /cvs/gnome/epiphany/configure.ac,v
retrieving revision 1.174
diff -p -u -u -p -r1.174 configure.ac
--- configure.ac	6 Mar 2006 20:37:14 -0000	1.174
+++ configure.ac	8 Mar 2006 11:31:40 -0000
@@ -278,10 +278,12 @@ GECKO_RUN_IFELSE([],
 [GECKO_XPCOM_PROGRAM(
 [[#include <nsIComponentRegistrar.h>]],
 [[
+status = 124;
 nsCOMPtr<nsIComponentRegistrar> registrar;
 rv = NS_GetComponentRegistrar (getter_AddRefs (registrar));
 if (NS_FAILED (rv)) break;
 
+status = 123;
 nsCID *classID = nsnull;
 rv = registrar->ContractIDToCID ("@mozilla.org/typeaheadfind;1", &classID);
 if (NS_FAILED (rv) || !classID) break;
@@ -289,7 +291,7 @@ if (NS_FAILED (rv) || !classID) break;
 nsCID badClassID = { 0x46590685, 0xbc00, 0x4aac,
 		     { 0xab, 0xed, 0x2c, 0x10, 0xa5, 0xb9, 0x45, 0xa4 } };
 
-retval = ! classID->Equals (badClassID);
+status = classID->Equals (badClassID) ? EXIT_FAILURE : EXIT_SUCCESS;
 ]]
 )],
 [have_broken_typeaheadfind=no],
Index: m4/gecko.m4
===================================================================
RCS file: /cvs/gnome/epiphany/m4/gecko.m4,v
retrieving revision 1.25
diff -p -u -u -p -r1.25 gecko.m4
--- m4/gecko.m4	5 Mar 2006 12:21:24 -0000	1.25
+++ m4/gecko.m4	8 Mar 2006 11:31:40 -0000
@@ -289,9 +289,7 @@ gecko_cv_extra_libs=
 gecko_cv_extra_pkg_dependencies=
 
 if test "$gecko_cv_gecko_version_major" = "1" -a "$gecko_cv_gecko_version_minor" -ge "9"; then
-	if test "$gecko_cv_gecko" != "xulrunner"; then
-		gecko_cv_extra_libs="-lxul"
-	fi
+	gecko_cv_extra_libs="-lxul"
 else
 	gecko_cv_extra_pkg_dependencies="${gecko_cv_gecko}-gtkmozembed"
 fi
@@ -371,10 +369,11 @@ AC_DEFUN([GECKO_RUN_IFELSE],[_GECKO_DISP
 # the BODY part has run. In BODY, the the following variables are predeclared:
 #
 # nsresult rv
-# PRBool retval (set to PR_FALSE)
+# int status = 1 (EXIT_FAILURE)
 #
-# The program's exit status will be EXIT_FAILURE if retval is PR_FALSE;
-# else it will be EXIT_SUCCESS.
+# The program's exit status will be |status|; set it to 0 (or EXIT_SUCCESS)
+# to indicate success and to a value between 1 (EXIT_FAILURE) and 124 to
+# indicate failure.
 #
 # To jump out of the BODY and exit the test program, you can use |break|.
 
@@ -397,22 +396,22 @@ AC_DEFUN([GECKO_XPCOM_PROGRAM],
 [[
 // redirect unwanted mozilla debug output to the bit bucket
 freopen ("/dev/null", "w", stdout);
-freopen ("/dev/null", "w", stderr);
+//freopen ("/dev/null", "w", stderr);
 
 nsresult rv;
 nsCOMPtr<nsILocalFile> directory;
 rv = NS_NewNativeLocalFile (NS_LITERAL_CSTRING("$_GECKO_HOME"), PR_FALSE,
 			    getter_AddRefs (directory));
 if (NS_FAILED (rv) || !directory) {
-	exit (EXIT_FAILURE);
+	exit (126);
 }
 
 rv = NS_InitXPCOM2 (nsnull, directory, nsnull);
 if (NS_FAILED (rv)) {
-	exit (EXIT_FAILURE);
+	exit (125);
 }
 
-PRBool retval = PR_FALSE;
+int status = EXIT_FAILURE;
 
 // now put in the BODY, scoped with do...while(0) to ensure we don't hold a
 // COMptr after XPCOM shutdown and so we can jump out with a simple |break|.
@@ -423,7 +422,7 @@ m4_shiftn(1,$@)
 } while (0);
 	
 NS_ShutdownXPCOM (nsnull);
-exit (retval ? EXIT_SUCCESS : EXIT_FAILURE);
+exit (status);
 ]])
 ]) # GECKO_XPCOM_PROGRAM
 
@@ -444,7 +443,7 @@ AC_CACHE_CHECK([whether we can compile a
 gecko_cv_xpcom_program_check=no
 
 GECKO_RUN_IFELSE([],
-	[GECKO_XPCOM_PROGRAM([],[[retval = PR_TRUE;]])],
+	[GECKO_XPCOM_PROGRAM([],[[status = EXIT_SUCCESS;]])],
 	[gecko_cv_xpcom_program_check=yes],
 	[gecko_cv_xpcom_program_check=no],
 	[gecko_cv_xpcom_program_check=maybe])
@@ -481,13 +480,17 @@ GECKO_RUN_IFELSE([],
 [GECKO_XPCOM_PROGRAM([[
 #include <nsIComponentRegistrar.h>
 ]],[[
+status = 124;
 nsCOMPtr<nsIComponentRegistrar> registrar;
 rv = NS_GetComponentRegistrar (getter_AddRefs (registrar));
 if (NS_FAILED (rv)) break;
 
+status = 123;
 PRBool isRegistered = PR_FALSE;
 rv = registrar->IsContractIDRegistered ("$1", &isRegistered);
-retval = NS_SUCCEEDED (rv) && isRegistered;
+if (NS_FAILED (rv)) break;
+
+status = isRegistered ? EXIT_SUCCESS : EXIT_FAILURE;
 ]])
 ],
 [AS_VAR_SET(gecko_cv_have_CID,[yes])],
