diff -crN ./expat-2.0.1/Makefile.in ./expat-2.0.1.patched/Makefile.in
*** ./expat-2.0.1/Makefile.in	2007-05-10 00:38:50.000000000 +0600
--- ./expat-2.0.1.patched/Makefile.in	2008-02-08 14:12:57.000000000 +0500
***************
*** 31,37 ****
  libdir = @libdir@
  includedir = @includedir@
  man1dir = @mandir@/man1
! 
  top_builddir = .
  
  
--- 31,37 ----
  libdir = @libdir@
  includedir = @includedir@
  man1dir = @mandir@/man1
! DESTDIR =
  top_builddir = .
  
  
diff -crN ./expat-2.0.1/configure ./expat-2.0.1.patched/configure
*** ./expat-2.0.1/configure	2007-06-06 00:19:38.000000000 +0600
--- ./expat-2.0.1.patched/configure	2008-02-05 13:00:38.000000000 +0500
***************
*** 243,248 ****
--- 243,259 ----
  $as_unset CDPATH
  
  
+ # Find the correct PATH separator.  Usually this is `:', but
+ # DJGPP uses `;' like DOS.
+ if test "X${PATH_SEPARATOR+set}" != Xset; then
+   UNAME=${UNAME-`uname 2>/dev/null`}
+   case X$UNAME in
+     *-DOS) lt_cv_sys_path_separator=';' ;;
+     *)     lt_cv_sys_path_separator=':' ;;
+   esac
+   PATH_SEPARATOR=$lt_cv_sys_path_separator
+ fi
+ 
  
  # Check that we are running under the correct shell.
  SHELL=${CONFIG_SHELL-/bin/sh}
***************
*** 4220,4225 ****
--- 4231,4251 ----
  ac_compiler_gnu=$ac_cv_c_compiler_gnu
  
  
+ echo "$as_me:$LINENO: checking for egrep" >&5
+ echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+ if test "${ac_cv_prog_egrep+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+     then ac_cv_prog_egrep='grep -E'
+     else ac_cv_prog_egrep='egrep'
+     fi
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+ echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+  EGREP=$ac_cv_prog_egrep
+  
+  
  echo "$as_me:$LINENO: checking for ANSI C header files" >&5
  echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
  if test "${ac_cv_header_stdc+set}" = set; then
***************
*** 22013,22017 ****
  abs_srcdir="`cd $srcdir && pwd`"
  abs_builddir="`pwd`"
  if test "$abs_srcdir" != "$abs_builddir"; then
!   make mkdir-init
  fi
--- 22039,22043 ----
  abs_srcdir="`cd $srcdir && pwd`"
  abs_builddir="`pwd`"
  if test "$abs_srcdir" != "$abs_builddir"; then
!   gmake mkdir-init
  fi
diff -crN ./expat-2.0.1/configure.in ./expat-2.0.1.patched/configure.in
*** ./expat-2.0.1/configure.in	2007-05-09 19:26:48.000000000 +0600
--- ./expat-2.0.1.patched/configure.in	2008-02-08 14:07:37.000000000 +0500
***************
*** 23,31 ****
  dnl NOTE: esyscmd() is a GNU M4 extension. Thus, we wrap it in an appropriate
  dnl test. I believe this test will work, but I don't have a place with non-
  dnl GNU M4 to test it right now.
! define([expat_version], ifdef([__gnu__],
!                               [esyscmd(conftools/get-version.sh lib/expat.h)],
!                               [2.0.x]))
  AC_INIT(expat, expat_version, expat-bugs@libexpat.org)
  undefine([expat_version])
  
--- 23,29 ----
  dnl NOTE: esyscmd() is a GNU M4 extension. Thus, we wrap it in an appropriate
  dnl test. I believe this test will work, but I don't have a place with non-
  dnl GNU M4 to test it right now.
! define([expat_version], [2.0.1])
  AC_INIT(expat, expat_version, expat-bugs@libexpat.org)
  undefine([expat_version])
  
***************
*** 150,154 ****
  abs_srcdir="`cd $srcdir && pwd`"
  abs_builddir="`pwd`"
  if test "$abs_srcdir" != "$abs_builddir"; then
!   make mkdir-init
  fi
--- 148,152 ----
  abs_srcdir="`cd $srcdir && pwd`"
  abs_builddir="`pwd`"
  if test "$abs_srcdir" != "$abs_builddir"; then
!   gmake mkdir-init
  fi
diff -crN ./expat-2.0.1/conftools/config.guess ./expat-2.0.1.patched/conftools/config.guess
*** ./expat-2.0.1/conftools/config.guess	2006-09-22 20:42:54.000000000 +0600
--- ./expat-2.0.1.patched/conftools/config.guess	2008-02-05 18:46:42.000000000 +0500
***************
*** 29,35 ****
  
  # Originally written by Per Bothner <per@bothner.com>.
  # Please send patches to <config-patches@gnu.org>.  Submit a context
! # diff and a properly formatted ChangeLog entry.
  #
  # This script attempts to guess a canonical system name similar to
  # config.sub.  If it succeeds, it prints the system name on stdout, and
--- 29,35 ----
  
  # Originally written by Per Bothner <per@bothner.com>.
  # Please send patches to <config-patches@gnu.org>.  Submit a context
! 
  #
  # This script attempts to guess a canonical system name similar to
  # config.sub.  If it succeeds, it prints the system name on stdout, and
***************
*** 143,172 ****
  
  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
      *:NetBSD:*:*)
! 	# NetBSD (nbsd) targets should (where applicable) match one or
  	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
  	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
  	# switched to ELF, *-*-netbsd* would select the old
  	# object file format.  This provides both forward
  	# compatibility and a consistent mechanism for selecting the
  	# object file format.
! 	#
! 	# Note: NetBSD doesn't particularly care about the vendor
! 	# portion of the name.  We always set it to "unknown".
! 	sysctl="sysctl -n hw.machine_arch"
! 	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
! 	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
! 	case "${UNAME_MACHINE_ARCH}" in
! 	    armeb) machine=armeb-unknown ;;
! 	    arm*) machine=arm-unknown ;;
! 	    sh3el) machine=shl-unknown ;;
! 	    sh3eb) machine=sh-unknown ;;
! 	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
  	esac
  	# The Operating System including object format, if it has switched
  	# to ELF recently, or will in the future.
! 	case "${UNAME_MACHINE_ARCH}" in
! 	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
  		eval $set_cc_for_build
  		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
  			| grep __ELF__ >/dev/null
--- 143,171 ----
  
  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
      *:NetBSD:*:*)
! 	# Netbsd (nbsd) targets should (where applicable) match one or
  	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
  	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
  	# switched to ELF, *-*-netbsd* would select the old
  	# object file format.  This provides both forward
  	# compatibility and a consistent mechanism for selecting the
  	# object file format.
! 	# Determine the machine/vendor (is the vendor relevant).
! 	case "${UNAME_MACHINE}" in
! 	    amiga) machine=m68k-unknown ;;
! 	    arm32) machine=arm-unknown ;;
! 	    atari*) machine=m68k-atari ;;
! 	    sun3*) machine=m68k-sun ;;
! 	    mac68k) machine=m68k-apple ;;
! 	    macppc) machine=powerpc-apple ;;
! 	    hp3[0-9][05]) machine=m68k-hp ;;
! 	    ibmrt|romp-ibm) machine=romp-ibm ;;
! 	    *) machine=${UNAME_MACHINE}-unknown ;;
  	esac
  	# The Operating System including object format, if it has switched
  	# to ELF recently, or will in the future.
! 	case "${UNAME_MACHINE}" in
! 	    i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
  		eval $set_cc_for_build
  		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
  			| grep __ELF__ >/dev/null
***************
*** 281,292 ****
      Amiga*:UNIX_System_V:4.0:*)
  	echo m68k-unknown-sysv4
  	exit ;;
      *:[Aa]miga[Oo][Ss]:*:*)
  	echo ${UNAME_MACHINE}-unknown-amigaos
  	exit ;;
!     *:[Mm]orph[Oo][Ss]:*:*)
! 	echo ${UNAME_MACHINE}-unknown-morphos
! 	exit ;;
      *:OS/390:*:*)
  	echo i370-ibm-openedition
  	exit ;;
--- 280,309 ----
      Amiga*:UNIX_System_V:4.0:*)
  	echo m68k-unknown-sysv4
  	exit ;;
+ 	 amiga:OpenBSD:*:*)
+ 	echo m68k-unknown-openbsd${UNAME_RELEASE}
+ 	exit 0 ;;
      *:[Aa]miga[Oo][Ss]:*:*)
  	echo ${UNAME_MACHINE}-unknown-amigaos
  	exit ;;
!     arc64:OpenBSD:*:*)
! 	echo mips64el-unknown-openbsd${UNAME_RELEASE}
! 	exit 0 ;;
!     arc:OpenBSD:*:*)
! 	echo mipsel-unknown-openbsd${UNAME_RELEASE}
! 	exit 0 ;;
!     hkmips:OpenBSD:*:*)
! 	echo mips-unknown-openbsd${UNAME_RELEASE}
! 	exit 0 ;;
!     pmax:OpenBSD:*:*)
! 	echo mipsel-unknown-openbsd${UNAME_RELEASE}
! 	exit 0 ;;
!     sgi:OpenBSD:*:*)
! 	echo mips-unknown-openbsd${UNAME_RELEASE}
! 	exit 0 ;;
!     wgrisc:OpenBSD:*:*)
! 	echo mipsel-unknown-openbsd${UNAME_RELEASE}
! 	exit 0 ;;
      *:OS/390:*:*)
  	echo i370-ibm-openedition
  	exit ;;
***************
*** 351,357 ****
  	echo m68k-sun-sunos${UNAME_RELEASE}
  	exit ;;
      sun*:*:4.2BSD:*)
! 	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
  	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
  	case "`/bin/arch`" in
  	    sun3)
--- 368,374 ----
  	echo m68k-sun-sunos${UNAME_RELEASE}
  	exit ;;
      sun*:*:4.2BSD:*)
! 		UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
  	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
  	case "`/bin/arch`" in
  	    sun3)
***************
*** 365,370 ****
--- 382,393 ----
      aushp:SunOS:*:*)
  	echo sparc-auspex-sunos${UNAME_RELEASE}
  	exit ;;
+ 	    sparc*:NetBSD:*)
+ 	echo `uname -p`-unknown-netbsd${UNAME_RELEASE}
+ 	exit 0 ;;
+     atari*:OpenBSD:*:*)
+ 	echo m68k-unknown-openbsd${UNAME_RELEASE}
+ 	exit 0 ;;
      # The situation for MiNT is a little confusing.  The machine name
      # can be virtually everything (everything which is not
      # "atarist" or "atariste" at least should have a processor
***************
*** 391,400 ****
      *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
          echo m68k-unknown-mint${UNAME_RELEASE}
          exit ;;
!     m68k:machten:*:*)
! 	echo m68k-apple-machten${UNAME_RELEASE}
! 	exit ;;
!     powerpc:machten:*:*)
  	echo powerpc-apple-machten${UNAME_RELEASE}
  	exit ;;
      RISC*:Mach:*:*)
--- 414,432 ----
      *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
          echo m68k-unknown-mint${UNAME_RELEASE}
          exit ;;
!     sun3*:OpenBSD:*:*)
! 	echo m68k-unknown-openbsd${UNAME_RELEASE}
! 	exit 0 ;;
!     mac68k:OpenBSD:*:*)
! 	echo m68k-unknown-openbsd${UNAME_RELEASE}
! 	exit 0 ;;
!     mvme68k:OpenBSD:*:*)
! 	echo m68k-unknown-openbsd${UNAME_RELEASE}
! 	exit 0 ;;
!     mvme88k:OpenBSD:*:*)
! 	echo m88k-unknown-openbsd${UNAME_RELEASE}
! 	exit 0 ;;
! 	powerpc:machten:*:*)
  	echo powerpc-apple-machten${UNAME_RELEASE}
  	exit ;;
      RISC*:Mach:*:*)
***************
*** 572,577 ****
--- 604,611 ----
  	    9000/31? )            HP_ARCH=m68000 ;;
  	    9000/[34]?? )         HP_ARCH=m68k ;;
  	    9000/[678][0-9][0-9])
+ 	case "${HPUX_REV}" in
+        11.[0-9][0-9])
  		if [ -x /usr/bin/getconf ]; then
  		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
                      sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
***************
*** 585,591 ****
  			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
                          esac ;;
                      esac
! 		fi
  		if [ "${HP_ARCH}" = "" ]; then
  		    eval $set_cc_for_build
  		    sed 's/^              //' << EOF >$dummy.c
--- 619,626 ----
  			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
                          esac ;;
                      esac
! 		fi  ;;
!     esac
  		if [ "${HP_ARCH}" = "" ]; then
  		    eval $set_cc_for_build
  		    sed 's/^              //' << EOF >$dummy.c
***************
*** 717,722 ****
--- 752,760 ----
  	else echo c2-convex-bsd
  	fi
          exit ;;
+ 	 hppa*:OpenBSD:*:*)
+ 	echo hppa-unknown-openbsd
+ 	exit 0 ;;
      C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
  	echo c34-convex-bsd
          exit ;;
***************
*** 726,731 ****
--- 764,772 ----
      C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
  	echo c4-convex-bsd
          exit ;;
+ 	 CRAY*X-MP:*:*:*)
+ 	echo xmp-cray-unicos
+         exit 0 ;;
      CRAY*Y-MP:*:*:*)
  	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  	exit ;;
***************
*** 829,835 ****
  	echo ${UNAME_MACHINE}-pc-minix
  	exit ;;
      arm*:Linux:*:*)
! 	echo ${UNAME_MACHINE}-unknown-linux-gnu
  	exit ;;
      avr32*:Linux:*:*)
  	echo ${UNAME_MACHINE}-unknown-linux-gnu
--- 870,876 ----
  	echo ${UNAME_MACHINE}-pc-minix
  	exit ;;
      arm*:Linux:*:*)
! 	echo ${UNAME_MACHINE}-unknown-linux
  	exit ;;
      avr32*:Linux:*:*)
  	echo ${UNAME_MACHINE}-unknown-linux-gnu
***************
*** 853,873 ****
  	echo ${UNAME_MACHINE}-unknown-linux-gnu
  	exit ;;
      mips:Linux:*:*)
! 	eval $set_cc_for_build
! 	sed 's/^	//' << EOF >$dummy.c
! 	#undef CPU
! 	#undef mips
! 	#undef mipsel
! 	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
! 	CPU=mipsel
! 	#else
! 	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
! 	CPU=mips
! 	#else
! 	CPU=
! 	#endif
! 	#endif
! EOF
  	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
  	    /^CPU/{
  		s: ::g
--- 894,903 ----
  	echo ${UNAME_MACHINE}-unknown-linux-gnu
  	exit ;;
      mips:Linux:*:*)
! 	case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
! 	  big)    echo mips-unknown-linux-gnu && exit 0 ;;
! 	  little) echo mipsel-unknown-linux-gnu && exit 0 ;;
! 	esac
  	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
  	    /^CPU/{
  		s: ::g
***************
*** 954,961 ****
  	# The BFD linker knows what the default object file format is, so
  	# first see if it will tell us. cd to the root directory to prevent
  	# problems with other programs or directories called `ld' in the path.
! 	# Set LC_ALL=C to ensure ld outputs messages in English.
! 	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
  			 | sed -ne '/supported targets:/!d
  				    s/[ 	][ 	]*/ /g
  				    s/.*supported targets: *//
--- 984,991 ----
  	# The BFD linker knows what the default object file format is, so
  	# first see if it will tell us. cd to the root directory to prevent
  	# problems with other programs or directories called `ld' in the path.
! 		ld_supported_targets=`cd /; ld --help 2>&1 \
! 
  			 | sed -ne '/supported targets:/!d
  				    s/[ 	][ 	]*/ /g
  				    s/.*supported targets: *//
***************
*** 979,1006 ****
  	esac
  	# Determine whether the default compiler is a.out or elf
  	eval $set_cc_for_build
! 	sed 's/^	//' << EOF >$dummy.c
! 	#include <features.h>
! 	#ifdef __ELF__
! 	# ifdef __GLIBC__
! 	#  if __GLIBC__ >= 2
! 	LIBC=gnu
! 	#  else
! 	LIBC=gnulibc1
! 	#  endif
! 	# else
! 	LIBC=gnulibc1
! 	# endif
! 	#else
! 	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
! 	LIBC=gnu
! 	#else
! 	LIBC=gnuaout
! 	#endif
! 	#endif
! 	#ifdef __dietlibc__
! 	LIBC=dietlibc
! 	#endif
  EOF
  	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
  	    /^LIBC/{
--- 1009,1037 ----
  	esac
  	# Determine whether the default compiler is a.out or elf
  	eval $set_cc_for_build
! 	cat >$dummy.c <<EOF
! #include <features.h>
! #ifdef __cplusplus
! #include <stdio.h>  /* for printf() prototype */
! 	int main (int argc, char *argv[]) {
! #else
! 	int main (argc, argv) int argc; char *argv[]; {
! #endif
! #ifdef __ELF__
! # ifdef __GLIBC__
! #  if __GLIBC__ >= 2
!     printf ("%s-pc-linux-gnu\n", argv[1]);
! #  else
!     printf ("%s-pc-linux-gnulibc1\n", argv[1]);
! #  endif
! # else
!    printf ("%s-pc-linux-gnulibc1\n", argv[1]);
! # endif
! #else
!   printf ("%s-pc-linux-gnuaout\n", argv[1]);
! #endif
!   return 0;
! }
  EOF
  	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
  	    /^LIBC/{
***************
*** 1222,1234 ****
  	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
  	exit ;;
      *:procnto*:*:* | *:QNX:[0123456789]*:*)
! 	UNAME_PROCESSOR=`uname -p`
! 	if test "$UNAME_PROCESSOR" = "x86"; then
! 		UNAME_PROCESSOR=i386
  		UNAME_MACHINE=pc
  	fi
! 	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
! 	exit ;;
      *:QNX:*:4*)
  	echo i386-pc-qnx
  	exit ;;
--- 1253,1263 ----
  	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
  	exit ;;
      *:procnto*:*:* | *:QNX:[0123456789]*:*)
! 	if test "${UNAME_MACHINE}" = "x86pc"; then
  		UNAME_MACHINE=pc
  	fi
! 	echo `uname -p`-${UNAME_MACHINE}-nto-qnx
! 	exit 0 ;;
      *:QNX:*:4*)
  	echo i386-pc-qnx
  	exit ;;
diff -crN ./expat-2.0.1/conftools/config.sub ./expat-2.0.1.patched/conftools/config.sub
*** ./expat-2.0.1/conftools/config.sub	2006-09-22 20:42:54.000000000 +0600
--- ./expat-2.0.1.patched/conftools/config.sub	2008-02-06 10:47:54.000000000 +0500
***************
*** 31,37 ****
  # the same distribution terms that you use for the rest of that program.
  
  
! # Please send patches to <config-patches@gnu.org>.  Submit a context
  # diff and a properly formatted ChangeLog entry.
  #
  # Configuration subroutine to validate and canonicalize a configuration type.
--- 31,37 ----
  # the same distribution terms that you use for the rest of that program.
  
  
! # Please send patches to <config-patches@gnu.org>. 
  # diff and a properly formatted ChangeLog entry.
  #
  # Configuration subroutine to validate and canonicalize a configuration type.
***************
*** 239,245 ****
  	1750a | 580 \
  	| a29k \
  	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
  	| am33_2.0 \
  	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
  	| bfin \
--- 239,244 ----
***************
*** 272,278 ****
  	| msp430 \
  	| nios | nios2 \
  	| ns16k | ns32k \
- 	| or32 \
  	| pdp10 | pdp11 | pj | pjl \
  	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
  	| pyramid \
--- 271,276 ----
***************
*** 283,291 ****
  	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
  	| spu | strongarm \
  	| tahoe | thumb | tic4x | tic80 | tron \
! 	| v850 | v850e \
  	| we32k \
! 	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
  	| z8k)
  		basic_machine=$basic_machine-unknown
  		;;
--- 281,289 ----
  	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
  	| spu | strongarm \
  	| tahoe | thumb | tic4x | tic80 | tron \
! 	| v850 \
  	| we32k \
! 	| x86 | xc16x | xscale | xscalee[bl]  \
  	| z8k)
  		basic_machine=$basic_machine-unknown
  		;;
***************
*** 315,322 ****
  	580-* \
  	| a29k-* \
  	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
! 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
! 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
  	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
  	| avr-* | avr32-* \
  	| bfin-* | bs2000-* \
--- 313,320 ----
  	580-* \
  	| a29k-* \
  	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
! 	| alphapca5[67]-* | arc-* \
! 	
  	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
  	| avr-* | avr32-* \
  	| bfin-* | bs2000-* \
***************
*** 358,375 ****
  	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
  	| pyramid-* \
  	| romp-* | rs6000-* \
! 	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
! 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
! 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
! 	| sparclite-* \
! 	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
! 	| tahoe-* | thumb-* \
! 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
! 	| tron-* \
! 	| v850-* | v850e-* | vax-* \
  	| we32k-* \
! 	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
! 	| xstormy16-* | xtensa-* \
  	| ymp-* \
  	| z8k-*)
  		;;
--- 356,369 ----
  	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
  	| pyramid-* \
  	| romp-* | rs6000-* \
! 	| s390-* | s390x-* \
! 	| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
! 	| sparc-* | sparc64-* | sparc86x-* | sparclite-* \
! 	| sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \
! 	| t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
! 	| v850-* | vax-* \
  	| we32k-* \
! 	| x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \
  	| ymp-* \
  	| z8k-*)
  		;;
***************
*** 443,452 ****
  		basic_machine=ns32k-sequent
  		os=-dynix
  		;;
- 	c90)
- 		basic_machine=c90-cray
- 		os=-unicos
- 		;;
  	convex-c1)
  		basic_machine=c1-convex
  		os=-bsd
--- 437,442 ----
***************
*** 689,694 ****
--- 679,692 ----
  	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
  		basic_machine=m68k-atari
  		os=-mint
+ 		;;	
+ 	mipsel*-linux*)
+ 		basic_machine=mipsel-unknown
+ 		os=-linux-gnu
+ 		;;
+ 	mips*-linux*)
+ 		basic_machine=mips-unknown
+ 		os=-linux-gnu
  		;;
  	mips3*-*)
  		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
***************
*** 700,709 ****
  		basic_machine=m68k-rom68k
  		os=-coff
  		;;
- 	morphos)
- 		basic_machine=powerpc-unknown
- 		os=-morphos
- 		;;
  	msdos)
  		basic_machine=i386-pc
  		os=-msdos
--- 698,703 ----
***************
*** 824,830 ****
  	pc98-*)
  		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
  		;;
! 	pentium | p5 | k5 | k6 | nexgen | viac3)
  		basic_machine=i586-pc
  		;;
  	pentiumpro | p6 | 6x86 | athlon | athlon_*)
--- 818,824 ----
  	pc98-*)
  		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
  		;;
! 	pentium | p5 | k5 | k6 | nexgen)
  		basic_machine=i586-pc
  		;;
  	pentiumpro | p6 | 6x86 | athlon | athlon_*)
***************
*** 836,842 ****
  	pentium4)
  		basic_machine=i786-pc
  		;;
! 	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
  		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
  		;;
  	pentiumpro-* | p6-* | 6x86-* | athlon-*)
--- 830,836 ----
  	pentium4)
  		basic_machine=i786-pc
  		;;
! 	pentium-* | p5-* | k5-* | k6-* | nexgen-*)
  		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
  		;;
  	pentiumpro-* | p6-* | 6x86-* | athlon-*)
***************
*** 894,905 ****
  	rtpc | rtpc-*)
  		basic_machine=romp-ibm
  		;;
- 	s390 | s390-*)
- 		basic_machine=s390-ibm
- 		;;
- 	s390x | s390x-*)
- 		basic_machine=s390x-ibm
- 		;;
  	sa29200)
  		basic_machine=a29k-amd
  		os=-udi
--- 888,893 ----
***************
*** 928,934 ****
  	sh64)
  		basic_machine=sh64-unknown
  		;;
! 	sparclite-wrs | simso-wrs)
  		basic_machine=sparclite-wrs
  		os=-vxworks
  		;;
--- 916,922 ----
  	sh64)
  		basic_machine=sh64-unknown
  		;;
! 	sparclite-wrs)
  		basic_machine=sparclite-wrs
  		os=-vxworks
  		;;
***************
*** 995,1005 ****
  		os=-dynix
  		;;
  	t3e)
! 		basic_machine=alphaev5-cray
! 		os=-unicos
! 		;;
! 	t90)
! 		basic_machine=t90-cray
  		os=-unicos
  		;;
  	tic54x | c54x*)
--- 983,989 ----
  		os=-dynix
  		;;
  	t3e)
! 		basic_machine=t3e-cray
  		os=-unicos
  		;;
  	tic54x | c54x*)
***************
*** 1078,1090 ****
  		basic_machine=i686-pc
  		os=-mingw32
  		;;
  	xps | xps100)
  		basic_machine=xps100-honeywell
  		;;
- 	ymp)
- 		basic_machine=ymp-cray
- 		os=-unicos
- 		;;
  	z8k-*-coff)
  		basic_machine=z8k-unknown
  		os=-sim
--- 1062,1074 ----
  		basic_machine=i686-pc
  		os=-mingw32
  		;;
+ 	xmp)
+ 		basic_machine=xmp-cray
+ 		os=-unicos
+ 		;;
  	xps | xps100)
  		basic_machine=xps100-honeywell
  		;;
  	z8k-*-coff)
  		basic_machine=z8k-unknown
  		os=-sim
***************
*** 1105,1110 ****
--- 1089,1101 ----
  	op60c)
  		basic_machine=hppa1.1-oki
  		;;
+ 	mips)
+ 		if [ x$os = x-linux-gnu ]; then
+ 			basic_machine=mips-unknown
+ 		else
+ 			basic_machine=mips-mips
+ 		fi
+ 		;;
  	romp)
  		basic_machine=romp-ibm
  		;;
***************
*** 1216,1223 ****
  	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
  	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
  	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
! 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
! 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
  	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
  	      | -skyos* | -haiku* | -rdos* | -toppers*)
  	# Remember, each alternative MUST END IN *, to match a version number.
--- 1207,1213 ----
  	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
  	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
  	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
! 	      | -os2* | -vos*)
  	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
  	      | -skyos* | -haiku* | -rdos* | -toppers*)
  	# Remember, each alternative MUST END IN *, to match a version number.
***************
*** 1279,1287 ****
  	-acis*)
  		os=-aos
  		;;
- 	-atheos*)
- 		os=-atheos
- 		;;
  	-syllable*)
  		os=-syllable
  		;;
--- 1269,1274 ----
***************
*** 1291,1299 ****
  	-ctix* | -uts*)
  		os=-sysv
  		;;
- 	-nova*)
- 		os=-rtmk-nova
- 		;;
  	-ns2 )
  		os=-nextstep2
  		;;
--- 1278,1283 ----
***************
*** 1406,1412 ****
  		os=-sunos4.0.2
  		;;
  	m68000-sun)
! 		os=-sunos3
  		# This also exists in the configure program, but was not the
  		# default.
  		# os=-sunos4
--- 1390,1396 ----
  		os=-sunos4.0.2
  		;;
  	m68000-sun)
! 		os=-sunos3
  		# This also exists in the configure program, but was not the
  		# default.
  		# os=-sunos4
***************
*** 1420,1428 ****
  	mips*-*)
  		os=-elf
  		;;
- 	or32-*)
- 		os=-coff
- 		;;
  	*-tti)	# must be before sparc entry or we get the wrong os.
  		os=-sysv3
  		;;
--- 1404,1409 ----
diff -crN ./expat-2.0.1/conftools/install-sh ./expat-2.0.1.patched/conftools/install-sh
*** ./expat-2.0.1/conftools/install-sh	2000-09-18 22:26:21.000000000 +0600
--- ./expat-2.0.1.patched/conftools/install-sh	2008-02-08 13:56:20.000000000 +0500
***************
*** 196,202 ****
  
  	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
  	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
! 	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
  	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
  else
  
--- 196,202 ----
  
  	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
  	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
! 	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst || true; else true ; fi &&
  	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
  else
  
***************
*** 237,243 ****
  
  	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
  	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
! 	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
  	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
  
  # Now rename the file to the real destination.
--- 237,243 ----
  
  	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
  	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
! 	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp || true; else true;fi &&
  	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
  
  # Now rename the file to the real destination.
diff -crN ./expat-2.0.1/conftools/ltmain.sh ./expat-2.0.1.patched/conftools/ltmain.sh
*** ./expat-2.0.1/conftools/ltmain.sh	2006-12-20 00:28:40.000000000 +0500
--- ./expat-2.0.1.patched/conftools/ltmain.sh	2008-02-08 14:02:56.000000000 +0500
***************
*** 1465,1471 ****
  	;;
  
        -export-dynamic)
! 	export_dynamic=yes
  	continue
  	;;
  
--- 1465,1479 ----
  	;;
  
        -export-dynamic)
! 	export_dynamic=yes	
! 	case $host in
! 	*aix*)
! 	  # add the -bexpall linker option
! 	  export_dynamic_flag_spec='-bexpall'
! 	  ;;
! 	*)
! 	  ;;
! 	esac
  	continue
  	;;
  
***************
*** 4378,4384 ****
  	esac
        done
        compile_deplibs="$new_libs"
! 
  
        compile_command="$compile_command $compile_deplibs"
        finalize_command="$finalize_command $finalize_deplibs"
--- 4386,4394 ----
  	esac
        done
        compile_deplibs="$new_libs"
! 	  
!       compile_command="$compile_command $use_runtimelinking"
!       finalize_command="$finalize_command $use_runtimelinking"
  
        compile_command="$compile_command $compile_deplibs"
        finalize_command="$finalize_command $finalize_deplibs"
***************
*** 5659,5664 ****
--- 5669,5675 ----
  	  tdlname=$dlname
  	  case $host,$output,$installed,$module,$dlname in
  	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+ 	    *aix*,*,*,*,*) tdlname=$realname\($dlname\) ;;
  	  esac
  	  $echo > $output "\
  # $outputname - a libtool library file
***************
*** 5947,5955 ****
  	  shift
  	  shift
  
! 	  srcname="$realname"
! 	  test -n "$relink_command" && srcname="$realname"T
! 
  	  # Install the shared library and build the symlinks.
  	  $show "$install_prog $dir/$srcname $destdir/$realname"
  	  $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
--- 5958,5968 ----
  	  shift
  	  shift
  
! 	  srcname="$realname" 
! 	# BEGIN WORKAROUND DESTDIR
! 	#	  test -n  "$relink_command" && srcname="$realname"T
! 	# END WORKAROUND DESTDIR
! 	
  	  # Install the shared library and build the symlinks.
  	  $show "$install_prog $dir/$srcname $destdir/$realname"
  	  $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
diff -crN ./expat-2.0.1/conftools/expat.m4 ./expat-2.0.1.patched/conftools/expat.m4
*** ./expat-2.0.1/conftools/expat.m4	2001-11-09 09:55:33.000000000 +0500
--- ./expat-2.0.1.patched/conftools/expat.m4	2008-02-11 11:01:43.000000000 +0500
***************
*** 7,13 ****
  dnl In addition, an Automake conditional EXPAT_INSTALLED is set accordingly.
  dnl This is necessary to adapt a whole lot of packages that have expat
  dnl bundled as a static library.
! AC_DEFUN(AM_WITH_EXPAT,
  [ AC_ARG_WITH(expat,
  	      [  --with-expat=PREFIX     Use system Expat library],
  	      , with_expat=no)
--- 7,13 ----
  dnl In addition, an Automake conditional EXPAT_INSTALLED is set accordingly.
  dnl This is necessary to adapt a whole lot of packages that have expat
  dnl bundled as a static library.
! AC_DEFUN([AM_WITH_EXPAT],
  [ AC_ARG_WITH(expat,
  	      [  --with-expat=PREFIX     Use system Expat library],
  	      , with_expat=no)
