--- glib-1.2.9/acglib.m4.cross	Sun Jul 29 01:47:01 2001
+++ glib-1.2.9/acglib.m4	Sun Jul 29 01:47:34 2001
@@ -73,7 +73,8 @@
     fprintf(f, "%s%d", i?",":"", *(p++));
   fprintf(f, "\n");
   exit(0);
-}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, AC_CV_NAME=0)])dnl
+}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, [
+AC_CV_NAME=`cat confdefval`])])dnl
 AC_MSG_RESULT($AC_CV_NAME)
 AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
 undefine([AC_TYPE_NAME])dnl
@@ -122,6 +123,19 @@
 		fi
 		echo "#define GLIB_SYSDEF_$glib_sysdef$glib_default" >>$glib_sysdefso
 	done
-	AC_MSG_RESULT(failed)])
+	AC_MSG_RESULT(failed)],
+[	for glib_sysdef_input in $2 ; do
+		glib_sysdef=`echo $glib_sysdef_input | sed 's/^\([[^:]]*\):.*$/\1/'`
+		glib_default=`echo $glib_sysdef_input | sed 's/^[[^:]]*:\(.*\)$/\1/'`
+		if test $glib_sysdef != $glib_default; then
+			glib_default=" $4$glib_default"
+		else
+			glib_default=
+		fi
+		echo "#define GLIB_SYSDEF_$glib_sysdef$glib_default" >>$glib_sysdefso
+	done
+]
+	,
+)
 rm -f confrun.c
 ])
--- glib-1.2.9/configure.in.cross	Sun Jul 29 01:47:13 2001
+++ glib-1.2.9/configure.in	Sun Jul 29 01:47:24 2001
@@ -8,6 +8,7 @@
 
 # init autoconf (and check for presence of glist.c)
 AC_INIT(glist.c)
+AC_CANONICAL_SYSTEM
 
 # Save this value here, since automake will set cflags later
 cflags_set=${CFLAGS+set}
@@ -79,6 +80,7 @@
 
 AC_CANONICAL_HOST
 
+
 dnl figure debugging default, prior to $ac_help setup
 dnl
 AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
@@ -88,6 +90,21 @@
 	debug_default=minimum
 fi
 AC_DIVERT_POP()dnl
+# Handle target_cpu for compatibility.
+if test "$host_cpu" != "$target_cpu"; then
+  host_cpu=$target_cpu
+fi
+case "$host_cpu" in
+  alpha*)  ARCH=alpha ;;
+  i?86)    ARCH=i386  ;;
+  ia64)    ARCH=ia64  ;;
+  arm*)    ARCH=arm   ;;
+  mips*)   ARCH=mips  ;;
+  powerpc) ARCH=ppc   ;;
+  *)       ARCH=$host_cpu ;;
+esac
+
+
 
 dnl declare --enable-* args and collect ac_help strings
 AC_ARG_ENABLE(debug, [  --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default)
@@ -193,8 +210,10 @@
          AC_MSG_RESULT()
          CFLAGS=$glib_save_CFLAGS
          AC_MSG_WARN(
-                [No ANSI prototypes found in library. (-std1 didn't work.)])
-     )
+                [No ANSI prototypes found in library. (-std1 didn't work.)]),
+	[CFLAGS=$glib_save_CFLAGS],
+     ),
+     [ AC_MSG_RESULT(none needed)],
 )
 LIBS=$glib_save_LIBS
 
@@ -218,12 +237,12 @@
 
 AC_CHECK_FUNCS(atexit on_exit)
 
-AC_CHECK_SIZEOF(char)
-AC_CHECK_SIZEOF(short)
-AC_CHECK_SIZEOF(long)
-AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(void *)
-AC_CHECK_SIZEOF(long long)
+AC_CHECK_SIZEOF(char,1)
+AC_CHECK_SIZEOF(short,2)
+AC_CHECK_SIZEOF(long,4)
+AC_CHECK_SIZEOF(int,4)
+AC_CHECK_SIZEOF(void *,4)
+AC_CHECK_SIZEOF(long long, 8)
 
 dnl long doubles were not used, and a portability problem
 dnl AC_C_LONG_DOUBLE
@@ -241,7 +260,10 @@
 	glib_cv_has__inline=yes
         ,
 	glib_cv_has__inline=no
-        ,)
+        ,
+	glib_cv_has__inline=yes
+        ,
+	),
 ])
 AC_MSG_RESULT($glib_cv_has__inline)
 case x$glib_cv_has__inline in
@@ -256,6 +278,8 @@
 	glib_cv_has__inline__=yes
         ,
 	glib_cv_has__inline__=no
+        ,
+	glib_cv_has__inline__=yes
         ,)
 ])
 AC_MSG_RESULT($glib_cv_has__inline__)
@@ -271,6 +295,8 @@
 	glib_cv_hasinline=yes
         ,
 	glib_cv_hasinline=no
+        ,
+	glib_cv_hasinline=yes
         ,)
 ])
 AC_MSG_RESULT($glib_cv_hasinline)
@@ -279,7 +305,7 @@
 esac
 
 dnl for bytesex stuff
-AC_C_BIGENDIAN
+#AC_C_BIGENDIAN(yes,ac_cv_c_bigendian=no)
 
 dnl header file checks
 AC_CHECK_HEADERS(float.h, AC_DEFINE(HAVE_FLOAT_H))
@@ -408,6 +434,9 @@
 	AC_DEFINE(REALLOC_0_WORKS)
 	,
 	glib_cv_sane_realloc=no
+	,
+	glib_cv_sane_realloc=yes
+	AC_DEFINE(REALLOC_0_WORKS)
 	,)
 ])
 AC_MSG_RESULT($glib_cv_sane_realloc)
@@ -437,6 +466,8 @@
 	glib_cv_va_copy=yes
 	,
 	glib_cv_va_copy=no
+	,
+	glib_cv_va_copy=yes
 	,)
 ])
 AC_MSG_RESULT($glib_cv_va_copy)
@@ -459,6 +490,8 @@
 	glib_cv___va_copy=yes
 	,
 	glib_cv___va_copy=no
+	,
+	glib_cv___va_copy=yes
 	,)
 ])
 AC_MSG_RESULT($glib_cv___va_copy)
@@ -481,6 +514,8 @@
 	glib_cv_va_val_copy=yes
 	,
 	glib_cv_va_val_copy=no
+	,
+	glib_cv_va_val_copy=yes
 	,)
 ])
 if test "x$glib_cv_va_copy" = "xyes"; then
@@ -577,7 +612,7 @@
                 }],
                         [glib_cv_rtldglobal_broken=no],
                         [glib_cv_rtldglobal_broken=yes],
-                        [])
+                        [glib_cv_rtldglobal_broken=no])
                 rm -f plugin.c plugin.o plugin.lo
         ])
         if test "x$glib_cv_rtldglobal_broken" = "xyes"; then
@@ -601,6 +636,7 @@
 		}],
 			glib_cv_uscore=yes,
 			glib_cv_uscore=no,
+			glib_cv_uscore=yes,
 		)
 		rm -f plugin.c plugin.o plugin.lo
 	])
@@ -843,7 +879,9 @@
 					sizeof (buffer), &pointer);
 				return errno == ENOSYS || error == ENOSYS;}],
 				[ac_cv_func_getpwuid_r=yes],
-				[ac_cv_func_getpwuid_r=no])])
+				[ac_cv_func_getpwuid_r=no],
+				[ac_cv_func_getpwuid_r=yes],
+				)])
 		if test "$ac_cv_func_getpwuid_r" = yes; then
 			AC_MSG_RESULT(yes)
 			AC_DEFINE(HAVE_GETPWUID_R)
@@ -880,7 +918,10 @@
 			return !pthread_mutex_trylock (&mutex); }],
 			[AC_MSG_RESULT(no)],
 			[AC_MSG_RESULT(yes)
-			AC_DEFINE(HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX)])
+			AC_DEFINE(HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX)],
+			[AC_MSG_RESULT(yes)
+			AC_DEFINE(HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX)],
+			)
 		AC_MSG_CHECKING(whether pthread_cond_timedwait is posix like)
 		# DCE Threads return -1 as failure, posix ETIMEDOUT.
 		AC_TRY_RUN([#include <pthread.h>
@@ -896,7 +937,10 @@
 				!= -1;}],
 			[AC_MSG_RESULT(no)],
 			[AC_MSG_RESULT(yes)
-			AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_POSIX)])
+			AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_POSIX)],
+			[AC_MSG_RESULT(yes)
+			AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_POSIX)],
+			)
 	fi
 	LIBS="$glib_save_LIBS"
 	CFLAGS="$glib_save_CFLAGS"
@@ -923,10 +967,12 @@
 dnl
 dnl if mutex_has_default = yes, we also got
 dnl mutex_default_type, mutex_default_init and mutex_header_file
+echo "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">confdefval
 GLIB_IF_VAR_EQ(mutex_has_default, yes,
 	GLIB_SIZEOF([#include <$mutex_header_file>],
                     $mutex_default_type,
                     gmutex,
+		    24,
                     )
 	GLIB_BYTE_CONTENTS([#include <$mutex_header_file>],
 			   $mutex_default_type,
