ports/132327: New port: devel/psptoolchain-newlib

Tassilo Philipp tphilipp at potion-studios.com
Thu Mar 5 10:10:05 UTC 2009


>Number:         132327
>Category:       ports
>Synopsis:       New port: devel/psptoolchain-newlib
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 05 10:10:04 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Tassilo Philipp
>Release:        FreeBSD 7.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD amphore.potion-studios.com 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Wed Aug 20 20:52:41 CEST 2008 tphilipp at amphore.potion-studios.com:/usr/obj/usr/src/sys/GENERIC amd64


	
>Description:
	
>How-To-Repeat:
	
>Fix:

	

--- psptoolchain-newlib.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	psptoolchain-newlib
#	psptoolchain-newlib/pkg-descr
#	psptoolchain-newlib/Makefile
#	psptoolchain-newlib/files
#	psptoolchain-newlib/files/patch-configure.in
#	psptoolchain-newlib/files/patch-newlib-Makefile.in
#	psptoolchain-newlib/files/patch-newlib-libc-include-sys-config.h
#	psptoolchain-newlib/files/patch-newlib-libc-sys-configure
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-aclocal.m4
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-configure
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-fdman.c
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-interrupt.S
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-netinet-in.h
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-pspcwd.c
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-Makefile.am
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-dirent.h
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-ioctl.h
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-syscalls.c
#	psptoolchain-newlib/files/patch-config.sub
#	psptoolchain-newlib/files/patch-configure
#	psptoolchain-newlib/files/patch-newlib-Makefile.am
#	psptoolchain-newlib/files/patch-newlib-configure.host
#	psptoolchain-newlib/files/patch-newlib-libc-include-machine-time.h
#	psptoolchain-newlib/files/patch-newlib-libc-include-sys-types.h
#	psptoolchain-newlib/files/patch-newlib-libc-include-time.h
#	psptoolchain-newlib/files/patch-newlib-libc-sys-configure.in
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-Makefile.in
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-README
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-arpa-inet.h
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-confdefs.h
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-configure.in
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-crt0.c
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-fdman.h
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-include-netdb.h
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-libcglue.c
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-netdb.c
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-pipe.c
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-netinet-tcp.h
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-select.c
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-socket.c
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-errno.h
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-fd_set.h
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-select.h
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-socket.h
#	psptoolchain-newlib/files/patch-newlib-libc-sys-psp-xprintf.c
#	psptoolchain-newlib/distinfo
#	psptoolchain-newlib/pkg-plist
#
echo c - psptoolchain-newlib
mkdir -p psptoolchain-newlib > /dev/null 2>&1
echo x - psptoolchain-newlib/pkg-descr
sed 's/^X//' >psptoolchain-newlib/pkg-descr << 'END-of-psptoolchain-newlib/pkg-descr'
XThe PlayStation Portable Toolchain is a collection of tools and utilities
Xfor homebrew PSP development.
X
XWWW: http://www.ps2dev.org
END-of-psptoolchain-newlib/pkg-descr
echo x - psptoolchain-newlib/Makefile
sed 's/^X//' >psptoolchain-newlib/Makefile << 'END-of-psptoolchain-newlib/Makefile'
X# New ports collection makefile for: psptoolchain-newlib
X# Date created:        13 February 2009
X# Whom:                Tassilo Philipp <tphilipp at potion-studios.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=		newlib
XPORTVERSION=		1.15.0
XCATEGORIES=		devel
XMASTER_SITES=		ftp://sources.redhat.com/pub/ \
X			${MASTER_SITE_SOURCEWARE}
XMASTER_SITE_SUBDIR=	${PORTNAME}
XPKGNAMEPREFIX=		psptoolchain-
X
XMAINTAINER=		tphilipp at potion-studios.com
XCOMMENT=		PlayStation Portable development toolchain ${PORTNAME}
X
XBUILD_DEPENDS=		${LOCALBASE}/psp/sdk/include/pspsdk.h:${PORTSDIR}/devel/psptoolchain-pspsdk-data
X
XUSE_GMAKE=		yes
X
XHAS_CONFIGURE=		yes
XCONFIGURE_ARGS=		--prefix=${PREFIX} --target="psp"
X
X.include <bsd.port.mk>
END-of-psptoolchain-newlib/Makefile
echo c - psptoolchain-newlib/files
mkdir -p psptoolchain-newlib/files > /dev/null 2>&1
echo x - psptoolchain-newlib/files/patch-configure.in
sed 's/^X//' >psptoolchain-newlib/files/patch-configure.in << 'END-of-psptoolchain-newlib/files/patch-configure.in'
X--- configure.in.orig	2006-12-12 03:38:04.000000000 +0200
X+++ configure.in	2007-06-01 12:22:26.000000000 +0300
X@@ -737,6 +737,9 @@
X   mips*-*-linux*)
X     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
X     ;;
X+  mipsallegrex*-*-*)
X+    noconfigdirs="$noconfigdirs target-libgloss"
X+    ;;
X   mips*-*-*)
X     noconfigdirs="$noconfigdirs gprof ${libgcj}"
X     ;;
END-of-psptoolchain-newlib/files/patch-configure.in
echo x - psptoolchain-newlib/files/patch-newlib-Makefile.in
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-Makefile.in << 'END-of-psptoolchain-newlib/files/patch-newlib-Makefile.in'
X--- newlib/Makefile.in.orig	2006-12-18 22:32:41.000000000 +0200
X+++ newlib/Makefile.in	2007-06-01 12:22:26.000000000 +0300
X@@ -912,6 +912,18 @@
X 	     $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/machine/`basename $$i`; \
X 	    else true; fi ; \
X 	  done; \
X+	  $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/netinet; \
X+	  for i in $(srcdir)/libc/sys/$(sys_dir)/netinet/*.h; do \
X+	    if [ -f $$i ]; then \
X+	     $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/netinet/`basename $$i`; \
X+	    else true; fi ; \
X+	  done ; \
X+	  $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/arpa; \
X+	  for i in $(srcdir)/libc/sys/$(sys_dir)/arpa/*.h; do \
X+	    if [ -f $$i ]; then \
X+	     $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/arpa/`basename $$i`; \
X+	    else true; fi ; \
X+	  done ; \
X 	  $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/sys; \
X 	  for i in $(srcdir)/libc/include/sys/*.h; do \
X 	   $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/sys/`basename $$i`; \
END-of-psptoolchain-newlib/files/patch-newlib-Makefile.in
echo x - psptoolchain-newlib/files/patch-newlib-libc-include-sys-config.h
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-include-sys-config.h << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-include-sys-config.h'
X--- newlib/libc/include/sys/config.h.orig	2006-08-30 00:00:59.000000000 +0300
X+++ newlib/libc/include/sys/config.h	2007-06-01 12:22:26.000000000 +0300
X@@ -98,6 +98,12 @@
X #define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata")))
X #endif
X 
X+/* We compile newlib with -G0 for PSP, but if we're compiling an app with $gp enabled,
X+   then _impure_ptr is expected to live in .sdata. */
X+#if defined(__psp__)
X+#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata")))
X+#endif
X+
X #ifdef __xstormy16__
X #define __SMALL_BITFIELDS
X #undef INT_MAX
END-of-psptoolchain-newlib/files/patch-newlib-libc-include-sys-config.h
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-configure
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-configure << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-configure'
X--- newlib/libc/sys/configure.orig	2006-12-19 00:21:54.000000000 +0200
X+++ newlib/libc/sys/configure	2007-06-01 12:22:26.000000000 +0300
X@@ -284,6 +284,7 @@
X ac_subdirs_all="$ac_subdirs_all mmixware"
X ac_subdirs_all="$ac_subdirs_all netware"
X ac_subdirs_all="$ac_subdirs_all rdos"
X+ac_subdirs_all="$ac_subdirs_all psp"
X ac_subdirs_all="$ac_subdirs_all rtems"
X ac_subdirs_all="$ac_subdirs_all sh"
X ac_subdirs_all="$ac_subdirs_all sparc64"
X@@ -4925,6 +4926,10 @@
X 
X subdirs="$subdirs netware"
X  ;;
X+	psp)
X+
X+subdirs="$subdirs psp"
X+ ;;
X 	rdos)
X 
X subdirs="$subdirs rdos"
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-configure
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-aclocal.m4
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-aclocal.m4 << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-aclocal.m4'
X--- newlib/libc/sys/psp/aclocal.m4.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/aclocal.m4	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,880 @@
X+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
X+
X+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
X+# 2005  Free Software Foundation, Inc.
X+# This file is free software; the Free Software Foundation
X+# gives unlimited permission to copy and/or distribute it,
X+# with or without modifications, as long as this notice is preserved.
X+
X+# This program is distributed in the hope that it will be useful,
X+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
X+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
X+# PARTICULAR PURPOSE.
X+
X+# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
X+#
X+# This file is free software; the Free Software Foundation
X+# gives unlimited permission to copy and/or distribute it,
X+# with or without modifications, as long as this notice is preserved.
X+
X+# AM_AUTOMAKE_VERSION(VERSION)
X+# ----------------------------
X+# Automake X.Y traces this macro to ensure aclocal.m4 has been
X+# generated from the m4 files accompanying Automake X.Y.
X+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
X+
X+# AM_SET_CURRENT_AUTOMAKE_VERSION
X+# -------------------------------
X+# Call AM_AUTOMAKE_VERSION so it can be traced.
X+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
X+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
X+	 [AM_AUTOMAKE_VERSION([1.9.6])])
X+
X+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
X+
X+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
X+#
X+# This file is free software; the Free Software Foundation
X+# gives unlimited permission to copy and/or distribute it,
X+# with or without modifications, as long as this notice is preserved.
X+
X+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
X+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
X+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
X+#
X+# Of course, Automake must honor this variable whenever it calls a
X+# tool from the auxiliary directory.  The problem is that $srcdir (and
X+# therefore $ac_aux_dir as well) can be either absolute or relative,
X+# depending on how configure is run.  This is pretty annoying, since
X+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
X+# source directory, any form will work fine, but in subdirectories a
X+# relative path needs to be adjusted first.
X+#
X+# $ac_aux_dir/missing
X+#    fails when called from a subdirectory if $ac_aux_dir is relative
X+# $top_srcdir/$ac_aux_dir/missing
X+#    fails if $ac_aux_dir is absolute,
X+#    fails when called from a subdirectory in a VPATH build with
X+#          a relative $ac_aux_dir
X+#
X+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
X+# are both prefixed by $srcdir.  In an in-source build this is usually
X+# harmless because $srcdir is `.', but things will broke when you
X+# start a VPATH build or use an absolute $srcdir.
X+#
X+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
X+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
X+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
X+# and then we would define $MISSING as
X+#   MISSING="\${SHELL} $am_aux_dir/missing"
X+# This will work as long as MISSING is not called from configure, because
X+# unfortunately $(top_srcdir) has no meaning in configure.
X+# However there are other variables, like CC, which are often used in
X+# configure, and could therefore not use this "fixed" $ac_aux_dir.
X+#
X+# Another solution, used here, is to always expand $ac_aux_dir to an
X+# absolute PATH.  The drawback is that using absolute paths prevent a
X+# configured tree to be moved without reconfiguration.
X+
X+AC_DEFUN([AM_AUX_DIR_EXPAND],
X+[dnl Rely on autoconf to set up CDPATH properly.
X+AC_PREREQ([2.50])dnl
X+# expand $ac_aux_dir to an absolute path
X+am_aux_dir=`cd $ac_aux_dir && pwd`
X+])
X+
X+# AM_CONDITIONAL                                            -*- Autoconf -*-
X+
X+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
X+# Free Software Foundation, Inc.
X+#
X+# This file is free software; the Free Software Foundation
X+# gives unlimited permission to copy and/or distribute it,
X+# with or without modifications, as long as this notice is preserved.
X+
X+# serial 7
X+
X+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
X+# -------------------------------------
X+# Define a conditional.
X+AC_DEFUN([AM_CONDITIONAL],
X+[AC_PREREQ(2.52)dnl
X+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
X+	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
X+AC_SUBST([$1_TRUE])
X+AC_SUBST([$1_FALSE])
X+if $2; then
X+  $1_TRUE=
X+  $1_FALSE='#'
X+else
X+  $1_TRUE='#'
X+  $1_FALSE=
X+fi
X+AC_CONFIG_COMMANDS_PRE(
X+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
X+  AC_MSG_ERROR([[conditional "$1" was never defined.
X+Usually this means the macro was only invoked conditionally.]])
X+fi])])
X+
X+
X+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
X+# Free Software Foundation, Inc.
X+#
X+# This file is free software; the Free Software Foundation
X+# gives unlimited permission to copy and/or distribute it,
X+# with or without modifications, as long as this notice is preserved.
X+
X+# serial 8
X+
X+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
X+# written in clear, in which case automake, when reading aclocal.m4,
X+# will think it sees a *use*, and therefore will trigger all it's
X+# C support machinery.  Also note that it means that autoscan, seeing
X+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
X+
X+
X+# _AM_DEPENDENCIES(NAME)
X+# ----------------------
X+# See how the compiler implements dependency checking.
X+# NAME is "CC", "CXX", "GCJ", or "OBJC".
X+# We try a few techniques and use that to set a single cache variable.
X+#
X+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
X+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
X+# dependency, and given that the user is not expected to run this macro,
X+# just rely on AC_PROG_CC.
X+AC_DEFUN([_AM_DEPENDENCIES],
X+[AC_REQUIRE([AM_SET_DEPDIR])dnl
X+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
X+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
X+AC_REQUIRE([AM_DEP_TRACK])dnl
X+
X+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
X+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
X+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
X+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
X+                   [depcc="$$1"   am_compiler_list=])
X+
X+AC_CACHE_CHECK([dependency style of $depcc],
X+               [am_cv_$1_dependencies_compiler_type],
X+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
X+  # We make a subdir and do the tests there.  Otherwise we can end up
X+  # making bogus files that we don't know about and never remove.  For
X+  # instance it was reported that on HP-UX the gcc test will end up
X+  # making a dummy file named `D' -- because `-MD' means `put the output
X+  # in D'.
X+  mkdir conftest.dir
X+  # Copy depcomp to subdir because otherwise we won't find it if we're
X+  # using a relative directory.
X+  cp "$am_depcomp" conftest.dir
X+  cd conftest.dir
X+  # We will build objects and dependencies in a subdirectory because
X+  # it helps to detect inapplicable dependency modes.  For instance
X+  # both Tru64's cc and ICC support -MD to output dependencies as a
X+  # side effect of compilation, but ICC will put the dependencies in
X+  # the current directory while Tru64 will put them in the object
X+  # directory.
X+  mkdir sub
X+
X+  am_cv_$1_dependencies_compiler_type=none
X+  if test "$am_compiler_list" = ""; then
X+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
X+  fi
X+  for depmode in $am_compiler_list; do
X+    # Setup a source with many dependencies, because some compilers
X+    # like to wrap large dependency lists on column 80 (with \), and
X+    # we should not choose a depcomp mode which is confused by this.
X+    #
X+    # We need to recreate these files for each test, as the compiler may
X+    # overwrite some of them when testing with obscure command lines.
X+    # This happens at least with the AIX C compiler.
X+    : > sub/conftest.c
X+    for i in 1 2 3 4 5 6; do
X+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
X+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
X+      # Solaris 8's {/usr,}/bin/sh.
X+      touch sub/conftst$i.h
X+    done
X+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
X+
X+    case $depmode in
X+    nosideeffect)
X+      # after this tag, mechanisms are not by side-effect, so they'll
X+      # only be used when explicitly requested
X+      if test "x$enable_dependency_tracking" = xyes; then
X+	continue
X+      else
X+	break
X+      fi
X+      ;;
X+    none) break ;;
X+    esac
X+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
X+    # mode.  It turns out that the SunPro C++ compiler does not properly
X+    # handle `-M -o', and we need to detect this.
X+    if depmode=$depmode \
X+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
X+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
X+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
X+         >/dev/null 2>conftest.err &&
X+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
X+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
X+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
X+      # icc doesn't choke on unknown options, it will just issue warnings
X+      # or remarks (even with -Werror).  So we grep stderr for any message
X+      # that says an option was ignored or not supported.
X+      # When given -MP, icc 7.0 and 7.1 complain thusly:
X+      #   icc: Command line warning: ignoring option '-M'; no argument required
X+      # The diagnosis changed in icc 8.0:
X+      #   icc: Command line remark: option '-MP' not supported
X+      if (grep 'ignoring option' conftest.err ||
X+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
X+        am_cv_$1_dependencies_compiler_type=$depmode
X+        break
X+      fi
X+    fi
X+  done
X+
X+  cd ..
X+  rm -rf conftest.dir
X+else
X+  am_cv_$1_dependencies_compiler_type=none
X+fi
X+])
X+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
X+AM_CONDITIONAL([am__fastdep$1], [
X+  test "x$enable_dependency_tracking" != xno \
X+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
X+])
X+
X+
X+# AM_SET_DEPDIR
X+# -------------
X+# Choose a directory name for dependency files.
X+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
X+AC_DEFUN([AM_SET_DEPDIR],
X+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
X+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
X+])
X+
X+
X+# AM_DEP_TRACK
X+# ------------
X+AC_DEFUN([AM_DEP_TRACK],
X+[AC_ARG_ENABLE(dependency-tracking,
X+[  --disable-dependency-tracking  speeds up one-time build
X+  --enable-dependency-tracking   do not reject slow dependency extractors])
X+if test "x$enable_dependency_tracking" != xno; then
X+  am_depcomp="$ac_aux_dir/depcomp"
X+  AMDEPBACKSLASH='\'
X+fi
X+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
X+AC_SUBST([AMDEPBACKSLASH])
X+])
X+
X+# Generate code to set up dependency tracking.              -*- Autoconf -*-
X+
X+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
X+# Free Software Foundation, Inc.
X+#
X+# This file is free software; the Free Software Foundation
X+# gives unlimited permission to copy and/or distribute it,
X+# with or without modifications, as long as this notice is preserved.
X+
X+#serial 3
X+
X+# _AM_OUTPUT_DEPENDENCY_COMMANDS
X+# ------------------------------
X+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
X+[for mf in $CONFIG_FILES; do
X+  # Strip MF so we end up with the name of the file.
X+  mf=`echo "$mf" | sed -e 's/:.*$//'`
X+  # Check whether this is an Automake generated Makefile or not.
X+  # We used to match only the files named `Makefile.in', but
X+  # some people rename them; so instead we look at the file content.
X+  # Grep'ing the first line is not enough: some people post-process
X+  # each Makefile.in and add a new line on top of each file to say so.
X+  # So let's grep whole file.
X+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
X+    dirpart=`AS_DIRNAME("$mf")`
X+  else
X+    continue
X+  fi
X+  # Extract the definition of DEPDIR, am__include, and am__quote
X+  # from the Makefile without running `make'.
X+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
X+  test -z "$DEPDIR" && continue
X+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
X+  test -z "am__include" && continue
X+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
X+  # When using ansi2knr, U may be empty or an underscore; expand it
X+  U=`sed -n 's/^U = //p' < "$mf"`
X+  # Find all dependency output files, they are included files with
X+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
X+  # simplest approach to changing $(DEPDIR) to its actual value in the
X+  # expansion.
X+  for file in `sed -n "
X+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
X+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
X+    # Make sure the directory exists.
X+    test -f "$dirpart/$file" && continue
X+    fdir=`AS_DIRNAME(["$file"])`
X+    AS_MKDIR_P([$dirpart/$fdir])
X+    # echo "creating $dirpart/$file"
X+    echo '# dummy' > "$dirpart/$file"
X+  done
X+done
X+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
X+
X+
X+# AM_OUTPUT_DEPENDENCY_COMMANDS
X+# -----------------------------
X+# This macro should only be invoked once -- use via AC_REQUIRE.
X+#
X+# This code is only required when automatic dependency tracking
X+# is enabled.  FIXME.  This creates each `.P' file that we will
X+# need in order to bootstrap the dependency handling code.
X+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
X+[AC_CONFIG_COMMANDS([depfiles],
X+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
X+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
X+])
X+
X+# Do all the work for Automake.                             -*- Autoconf -*-
X+
X+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
X+# Free Software Foundation, Inc.
X+#
X+# This file is free software; the Free Software Foundation
X+# gives unlimited permission to copy and/or distribute it,
X+# with or without modifications, as long as this notice is preserved.
X+
X+# serial 12
X+
X+# This macro actually does too much.  Some checks are only needed if
X+# your package does certain things.  But this isn't really a big deal.
X+
X+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
X+# AM_INIT_AUTOMAKE([OPTIONS])
X+# -----------------------------------------------
X+# The call with PACKAGE and VERSION arguments is the old style
X+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
X+# and VERSION should now be passed to AC_INIT and removed from
X+# the call to AM_INIT_AUTOMAKE.
X+# We support both call styles for the transition.  After
X+# the next Automake release, Autoconf can make the AC_INIT
X+# arguments mandatory, and then we can depend on a new Autoconf
X+# release and drop the old call support.
X+AC_DEFUN([AM_INIT_AUTOMAKE],
X+[AC_PREREQ([2.58])dnl
X+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
X+dnl the ones we care about.
X+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
X+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
X+AC_REQUIRE([AC_PROG_INSTALL])dnl
X+# test to see if srcdir already configured
X+if test "`cd $srcdir && pwd`" != "`pwd`" &&
X+   test -f $srcdir/config.status; then
X+  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
X+fi
X+
X+# test whether we have cygpath
X+if test -z "$CYGPATH_W"; then
X+  if (cygpath --version) >/dev/null 2>/dev/null; then
X+    CYGPATH_W='cygpath -w'
X+  else
X+    CYGPATH_W=echo
X+  fi
X+fi
X+AC_SUBST([CYGPATH_W])
X+
X+# Define the identity of the package.
X+dnl Distinguish between old-style and new-style calls.
X+m4_ifval([$2],
X+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
X+ AC_SUBST([PACKAGE], [$1])dnl
X+ AC_SUBST([VERSION], [$2])],
X+[_AM_SET_OPTIONS([$1])dnl
X+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
X+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
X+
X+_AM_IF_OPTION([no-define],,
X+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
X+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
X+
X+# Some tools Automake needs.
X+AC_REQUIRE([AM_SANITY_CHECK])dnl
X+AC_REQUIRE([AC_ARG_PROGRAM])dnl
X+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
X+AM_MISSING_PROG(AUTOCONF, autoconf)
X+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
X+AM_MISSING_PROG(AUTOHEADER, autoheader)
X+AM_MISSING_PROG(MAKEINFO, makeinfo)
X+AM_PROG_INSTALL_SH
X+AM_PROG_INSTALL_STRIP
X+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
X+# We need awk for the "check" target.  The system "awk" is bad on
X+# some platforms.
X+AC_REQUIRE([AC_PROG_AWK])dnl
X+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
X+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
X+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
X+              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
X+	      		     [_AM_PROG_TAR([v7])])])
X+_AM_IF_OPTION([no-dependencies],,
X+[AC_PROVIDE_IFELSE([AC_PROG_CC],
X+                  [_AM_DEPENDENCIES(CC)],
X+                  [define([AC_PROG_CC],
X+                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
X+AC_PROVIDE_IFELSE([AC_PROG_CXX],
X+                  [_AM_DEPENDENCIES(CXX)],
X+                  [define([AC_PROG_CXX],
X+                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
X+])
X+])
X+
X+
X+# When config.status generates a header, we must update the stamp-h file.
X+# This file resides in the same directory as the config header
X+# that is generated.  The stamp files are numbered to have different names.
X+
X+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
X+# loop where config.status creates the headers, so we can generate
X+# our stamp files there.
X+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
X+[# Compute $1's index in $config_headers.
X+_am_stamp_count=1
X+for _am_header in $config_headers :; do
X+  case $_am_header in
X+    $1 | $1:* )
X+      break ;;
X+    * )
X+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
X+  esac
X+done
X+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
X+
X+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
X+#
X+# This file is free software; the Free Software Foundation
X+# gives unlimited permission to copy and/or distribute it,
X+# with or without modifications, as long as this notice is preserved.
X+
X+# AM_PROG_INSTALL_SH
X+# ------------------
X+# Define $install_sh.
X+AC_DEFUN([AM_PROG_INSTALL_SH],
X+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
X+install_sh=${install_sh-"$am_aux_dir/install-sh"}
X+AC_SUBST(install_sh)])
X+
X+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
X+#
X+# This file is free software; the Free Software Foundation
X+# gives unlimited permission to copy and/or distribute it,
X+# with or without modifications, as long as this notice is preserved.
X+
X+# serial 2
X+
X+# Check whether the underlying file-system supports filenames
X+# with a leading dot.  For instance MS-DOS doesn't.
X+AC_DEFUN([AM_SET_LEADING_DOT],
X+[rm -rf .tst 2>/dev/null
X+mkdir .tst 2>/dev/null
X+if test -d .tst; then
X+  am__leading_dot=.
X+else
X+  am__leading_dot=_
X+fi
X+rmdir .tst 2>/dev/null
X+AC_SUBST([am__leading_dot])])
X+
X+# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
X+# From Jim Meyering
X+
X+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
X+# Free Software Foundation, Inc.
X+#
X+# This file is free software; the Free Software Foundation
X+# gives unlimited permission to copy and/or distribute it,
X+# with or without modifications, as long as this notice is preserved.
X+
X+# serial 4
X+
X+AC_DEFUN([AM_MAINTAINER_MODE],
X+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
X+  dnl maintainer-mode is disabled by default
X+  AC_ARG_ENABLE(maintainer-mode,
X+[  --enable-maintainer-mode  enable make rules and dependencies not useful
X+			  (and sometimes confusing) to the casual installer],
X+      USE_MAINTAINER_MODE=$enableval,
X+      USE_MAINTAINER_MODE=no)
X+  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
X+  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
X+  MAINT=$MAINTAINER_MODE_TRUE
X+  AC_SUBST(MAINT)dnl
X+]
X+)
X+
X+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
X+
X+# Check to see how 'make' treats includes.	            -*- Autoconf -*-
X+
X+# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
X+#
X+# This file is free software; the Free Software Foundation
X+# gives unlimited permission to copy and/or distribute it,
X+# with or without modifications, as long as this notice is preserved.
X+
X+# serial 3
X+
X+# AM_MAKE_INCLUDE()
X+# -----------------
X+# Check to see how make treats includes.
X+AC_DEFUN([AM_MAKE_INCLUDE],
X+[am_make=${MAKE-make}
X+cat > confinc << 'END'
X+am__doit:
X+	@echo done
X+.PHONY: am__doit
X+END
X+# If we don't find an include directive, just comment out the code.
X+AC_MSG_CHECKING([for style of include used by $am_make])
X+am__include="#"
X+am__quote=
X+_am_result=none
X+# First try GNU make style include.
X+echo "include confinc" > confmf
X+# We grep out `Entering directory' and `Leaving directory'
X+# messages which can occur if `w' ends up in MAKEFLAGS.
X+# In particular we don't look at `^make:' because GNU make might
X+# be invoked under some other name (usually "gmake"), in which
X+# case it prints its new name instead of `make'.
X+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
X+   am__include=include
X+   am__quote=
X+   _am_result=GNU
X+fi
X+# Now try BSD make style include.
X+if test "$am__include" = "#"; then
X+   echo '.include "confinc"' > confmf
X+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
X+      am__include=.include
X+      am__quote="\""
X+      _am_result=BSD
X+   fi
X+fi
X+AC_SUBST([am__include])
X+AC_SUBST([am__quote])
X+AC_MSG_RESULT([$_am_result])
X+rm -f confinc confmf
X+])
X+
X+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
X+
X+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
X+# Free Software Foundation, Inc.
X+#
X+# This file is free software; the Free Software Foundation
X+# gives unlimited permission to copy and/or distribute it,
X+# with or without modifications, as long as this notice is preserved.
X+
X+# serial 4
X+
X+# AM_MISSING_PROG(NAME, PROGRAM)
X+# ------------------------------
X+AC_DEFUN([AM_MISSING_PROG],
X+[AC_REQUIRE([AM_MISSING_HAS_RUN])
X+$1=${$1-"${am_missing_run}$2"}
X+AC_SUBST($1)])
X+
X+
X+# AM_MISSING_HAS_RUN
X+# ------------------
X+# Define MISSING if not defined so far and test if it supports --run.
X+# If it does, set am_missing_run to use it, otherwise, to nothing.
X+AC_DEFUN([AM_MISSING_HAS_RUN],
X+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
X+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
X+# Use eval to expand $SHELL
X+if eval "$MISSING --run true"; then
X+  am_missing_run="$MISSING --run "
X+else
X+  am_missing_run=
X+  AC_MSG_WARN([`missing' script is too old or missing])
X+fi
X+])
X+
X+# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
X+#
X+# This file is free software; the Free Software Foundation
X+# gives unlimited permission to copy and/or distribute it,
X+# with or without modifications, as long as this notice is preserved.
X+
X+# AM_PROG_MKDIR_P
X+# ---------------
X+# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
X+#
X+# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
X+# created by `make install' are always world readable, even if the
X+# installer happens to have an overly restrictive umask (e.g. 077).
X+# This was a mistake.  There are at least two reasons why we must not
X+# use `-m 0755':
X+#   - it causes special bits like SGID to be ignored,
X+#   - it may be too restrictive (some setups expect 775 directories).
X+#
X+# Do not use -m 0755 and let people choose whatever they expect by
X+# setting umask.
X+#
X+# We cannot accept any implementation of `mkdir' that recognizes `-p'.
X+# Some implementations (such as Solaris 8's) are not thread-safe: if a
X+# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
X+# concurrently, both version can detect that a/ is missing, but only
X+# one can create it and the other will error out.  Consequently we
X+# restrict ourselves to GNU make (using the --version option ensures
X+# this.)
X+AC_DEFUN([AM_PROG_MKDIR_P],
X+[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
X+  # We used to keeping the `.' as first argument, in order to
X+  # allow $(mkdir_p) to be used without argument.  As in
X+  #   $(mkdir_p) $(somedir)
X+  # where $(somedir) is conditionally defined.  However this is wrong
X+  # for two reasons:
X+  #  1. if the package is installed by a user who cannot write `.'
X+  #     make install will fail,
X+  #  2. the above comment should most certainly read
X+  #     $(mkdir_p) $(DESTDIR)$(somedir)
X+  #     so it does not work when $(somedir) is undefined and
X+  #     $(DESTDIR) is not.
X+  #  To support the latter case, we have to write
X+  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
X+  #  so the `.' trick is pointless.
X+  mkdir_p='mkdir -p --'
X+else
X+  # On NextStep and OpenStep, the `mkdir' command does not
X+  # recognize any option.  It will interpret all options as
X+  # directories to create, and then abort because `.' already
X+  # exists.
X+  for d in ./-p ./--version;
X+  do
X+    test -d $d && rmdir $d
X+  done
X+  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
X+  if test -f "$ac_aux_dir/mkinstalldirs"; then
X+    mkdir_p='$(mkinstalldirs)'
X+  else
X+    mkdir_p='$(install_sh) -d'
X+  fi
X+fi
X+AC_SUBST([mkdir_p])])
X+
X+# Helper functions for option handling.                     -*- Autoconf -*-
X+
X+# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
X+#
X+# This file is free software; the Free Software Foundation
X+# gives unlimited permission to copy and/or distribute it,
X+# with or without modifications, as long as this notice is preserved.
X+
X+# serial 3
X+
X+# _AM_MANGLE_OPTION(NAME)
X+# -----------------------
X+AC_DEFUN([_AM_MANGLE_OPTION],
X+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
X+
X+# _AM_SET_OPTION(NAME)
X+# ------------------------------
X+# Set option NAME.  Presently that only means defining a flag for this option.
X+AC_DEFUN([_AM_SET_OPTION],
X+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
X+
X+# _AM_SET_OPTIONS(OPTIONS)
X+# ----------------------------------
X+# OPTIONS is a space-separated list of Automake options.
X+AC_DEFUN([_AM_SET_OPTIONS],
X+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
X+
X+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
X+# -------------------------------------------
X+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
X+AC_DEFUN([_AM_IF_OPTION],
X+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
X+
X+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
X+
X+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
X+# Free Software Foundation, Inc.
X+#
X+# This file is free software; the Free Software Foundation
X+# gives unlimited permission to copy and/or distribute it,
X+# with or without modifications, as long as this notice is preserved.
X+
X+# serial 4
X+
X+# AM_SANITY_CHECK
X+# ---------------
X+AC_DEFUN([AM_SANITY_CHECK],
X+[AC_MSG_CHECKING([whether build environment is sane])
X+# Just in case
X+sleep 1
X+echo timestamp > conftest.file
X+# Do `set' in a subshell so we don't clobber the current shell's
X+# arguments.  Must try -L first in case configure is actually a
X+# symlink; some systems play weird games with the mod time of symlinks
X+# (eg FreeBSD returns the mod time of the symlink's containing
X+# directory).
X+if (
X+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
X+   if test "$[*]" = "X"; then
X+      # -L didn't work.
X+      set X `ls -t $srcdir/configure conftest.file`
X+   fi
X+   rm -f conftest.file
X+   if test "$[*]" != "X $srcdir/configure conftest.file" \
X+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
X+
X+      # If neither matched, then we have a broken ls.  This can happen
X+      # if, for instance, CONFIG_SHELL is bash and it inherits a
X+      # broken ls alias from the environment.  This has actually
X+      # happened.  Such a system could not be considered "sane".
X+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
X+alias in your environment])
X+   fi
X+
X+   test "$[2]" = conftest.file
X+   )
X+then
X+   # Ok.
X+   :
X+else
X+   AC_MSG_ERROR([newly created file is older than distributed files!
X+Check your system clock])
X+fi
X+AC_MSG_RESULT(yes)])
X+
X+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
X+#
X+# This file is free software; the Free Software Foundation
X+# gives unlimited permission to copy and/or distribute it,
X+# with or without modifications, as long as this notice is preserved.
X+
X+# AM_PROG_INSTALL_STRIP
X+# ---------------------
X+# One issue with vendor `install' (even GNU) is that you can't
X+# specify the program used to strip binaries.  This is especially
X+# annoying in cross-compiling environments, where the build's strip
X+# is unlikely to handle the host's binaries.
X+# Fortunately install-sh will honor a STRIPPROG variable, so we
X+# always use install-sh in `make install-strip', and initialize
X+# STRIPPROG with the value of the STRIP variable (set by the user).
X+AC_DEFUN([AM_PROG_INSTALL_STRIP],
X+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
X+# Installed binaries are usually stripped using `strip' when the user
X+# run `make install-strip'.  However `strip' might not be the right
X+# tool to use in cross-compilation environments, therefore Automake
X+# will honor the `STRIP' environment variable to overrule this program.
X+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
X+if test "$cross_compiling" != no; then
X+  AC_CHECK_TOOL([STRIP], [strip], :)
X+fi
X+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
X+AC_SUBST([INSTALL_STRIP_PROGRAM])])
X+
X+# Check how to create a tarball.                            -*- Autoconf -*-
X+
X+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
X+#
X+# This file is free software; the Free Software Foundation
X+# gives unlimited permission to copy and/or distribute it,
X+# with or without modifications, as long as this notice is preserved.
X+
X+# serial 2
X+
X+# _AM_PROG_TAR(FORMAT)
X+# --------------------
X+# Check how to create a tarball in format FORMAT.
X+# FORMAT should be one of `v7', `ustar', or `pax'.
X+#
X+# Substitute a variable $(am__tar) that is a command
X+# writing to stdout a FORMAT-tarball containing the directory
X+# $tardir.
X+#     tardir=directory && $(am__tar) > result.tar
X+#
X+# Substitute a variable $(am__untar) that extract such
X+# a tarball read from stdin.
X+#     $(am__untar) < result.tar
X+AC_DEFUN([_AM_PROG_TAR],
X+[# Always define AMTAR for backward compatibility.
X+AM_MISSING_PROG([AMTAR], [tar])
X+m4_if([$1], [v7],
X+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
X+     [m4_case([$1], [ustar],, [pax],,
X+              [m4_fatal([Unknown tar format])])
X+AC_MSG_CHECKING([how to create a $1 tar archive])
X+# Loop over all known methods to create a tar archive until one works.
X+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
X+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
X+# Do not fold the above two line into one, because Tru64 sh and
X+# Solaris sh will not grok spaces in the rhs of `-'.
X+for _am_tool in $_am_tools
X+do
X+  case $_am_tool in
X+  gnutar)
X+    for _am_tar in tar gnutar gtar;
X+    do
X+      AM_RUN_LOG([$_am_tar --version]) && break
X+    done
X+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
X+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
X+    am__untar="$_am_tar -xf -"
X+    ;;
X+  plaintar)
X+    # Must skip GNU tar: if it does not support --format= it doesn't create
X+    # ustar tarball either.
X+    (tar --version) >/dev/null 2>&1 && continue
X+    am__tar='tar chf - "$$tardir"'
X+    am__tar_='tar chf - "$tardir"'
X+    am__untar='tar xf -'
X+    ;;
X+  pax)
X+    am__tar='pax -L -x $1 -w "$$tardir"'
X+    am__tar_='pax -L -x $1 -w "$tardir"'
X+    am__untar='pax -r'
X+    ;;
X+  cpio)
X+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
X+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
X+    am__untar='cpio -i -H $1 -d'
X+    ;;
X+  none)
X+    am__tar=false
X+    am__tar_=false
X+    am__untar=false
X+    ;;
X+  esac
X+
X+  # If the value was cached, stop now.  We just wanted to have am__tar
X+  # and am__untar set.
X+  test -n "${am_cv_prog_tar_$1}" && break
X+
X+  # tar/untar a dummy directory, and stop if the command works
X+  rm -rf conftest.dir
X+  mkdir conftest.dir
X+  echo GrepMe > conftest.dir/file
X+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
X+  rm -rf conftest.dir
X+  if test -s conftest.tar; then
X+    AM_RUN_LOG([$am__untar <conftest.tar])
X+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
X+  fi
X+done
X+rm -rf conftest.dir
X+
X+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
X+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
X+AC_SUBST([am__tar])
X+AC_SUBST([am__untar])
X+]) # _AM_PROG_TAR
X+
X+m4_include([../../../acinclude.m4])
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-aclocal.m4
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-configure
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-configure << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-configure'
X--- newlib/libc/sys/psp/configure.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/configure	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,4085 @@
X+#! /bin/sh
X+# Guess values for system-dependent variables and create Makefiles.
X+# Generated by GNU Autoconf 2.59 for newlib 1.15.0.
X+#
X+# Copyright (C) 2003 Free Software Foundation, Inc.
X+# This configure script is free software; the Free Software Foundation
X+# gives unlimited permission to copy, distribute and modify it.
X+## --------------------- ##
X+## M4sh Initialization.  ##
X+## --------------------- ##
X+
X+# Be Bourne compatible
X+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
X+  emulate sh
X+  NULLCMD=:
X+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
X+  # is contrary to our usage.  Disable this feature.
X+  alias -g '${1+"$@"}'='"$@"'
X+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
X+  set -o posix
X+fi
X+DUALCASE=1; export DUALCASE # for MKS sh
X+
X+# Support unset when possible.
X+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
X+  as_unset=unset
X+else
X+  as_unset=false
X+fi
X+
X+
X+# Work around bugs in pre-3.0 UWIN ksh.
X+$as_unset ENV MAIL MAILPATH
X+PS1='$ '
X+PS2='> '
X+PS4='+ '
X+
X+# NLS nuisances.
X+for as_var in \
X+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
X+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
X+  LC_TELEPHONE LC_TIME
X+do
X+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
X+    eval $as_var=C; export $as_var
X+  else
X+    $as_unset $as_var
X+  fi
X+done
X+
X+# Required to use basename.
X+if expr a : '\(a\)' >/dev/null 2>&1; then
X+  as_expr=expr
X+else
X+  as_expr=false
X+fi
X+
X+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
X+  as_basename=basename
X+else
X+  as_basename=false
X+fi
X+
X+
X+# Name of the executable.
X+as_me=`$as_basename "$0" ||
X+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X+	 X"$0" : 'X\(//\)$' \| \
X+	 X"$0" : 'X\(/\)$' \| \
X+	 .     : '\(.\)' 2>/dev/null ||
X+echo X/"$0" |
X+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
X+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
X+  	  /^X\/\(\/\).*/{ s//\1/; q; }
X+  	  s/.*/./; q'`
X+
X+
X+# PATH needs CR, and LINENO needs CR and PATH.
X+# Avoid depending upon Character Ranges.
X+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
X+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
X+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
X+as_cr_digits='0123456789'
X+as_cr_alnum=$as_cr_Letters$as_cr_digits
X+
X+# The user is always right.
X+if test "${PATH_SEPARATOR+set}" != set; then
X+  echo "#! /bin/sh" >conf$$.sh
X+  echo  "exit 0"   >>conf$$.sh
X+  chmod +x conf$$.sh
X+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
X+    PATH_SEPARATOR=';'
X+  else
X+    PATH_SEPARATOR=:
X+  fi
X+  rm -f conf$$.sh
X+fi
X+
X+
X+  as_lineno_1=$LINENO
X+  as_lineno_2=$LINENO
X+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
X+  test "x$as_lineno_1" != "x$as_lineno_2" &&
X+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
X+  # Find who we are.  Look in the path if we contain no path at all
X+  # relative or not.
X+  case $0 in
X+    *[\\/]* ) as_myself=$0 ;;
X+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
X+for as_dir in $PATH
X+do
X+  IFS=$as_save_IFS
X+  test -z "$as_dir" && as_dir=.
X+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
X+done
X+
X+       ;;
X+  esac
X+  # We did not find ourselves, most probably we were run as `sh COMMAND'
X+  # in which case we are not to be found in the path.
X+  if test "x$as_myself" = x; then
X+    as_myself=$0
X+  fi
X+  if test ! -f "$as_myself"; then
X+    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
X+   { (exit 1); exit 1; }; }
X+  fi
X+  case $CONFIG_SHELL in
X+  '')
X+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
X+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
X+do
X+  IFS=$as_save_IFS
X+  test -z "$as_dir" && as_dir=.
X+  for as_base in sh bash ksh sh5; do
X+	 case $as_dir in
X+	 /*)
X+	   if ("$as_dir/$as_base" -c '
X+  as_lineno_1=$LINENO
X+  as_lineno_2=$LINENO
X+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
X+  test "x$as_lineno_1" != "x$as_lineno_2" &&
X+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
X+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
X+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
X+	     CONFIG_SHELL=$as_dir/$as_base
X+	     export CONFIG_SHELL
X+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
X+	   fi;;
X+	 esac
X+       done
X+done
X+;;
X+  esac
X+
X+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
X+  # uniformly replaced by the line number.  The first 'sed' inserts a
X+  # line-number line before each line; the second 'sed' does the real
X+  # work.  The second script uses 'N' to pair each line-number line
X+  # with the numbered line, and appends trailing '-' during
X+  # substitution so that $LINENO is not a special case at line end.
X+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
X+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
X+  sed '=' <$as_myself |
X+    sed '
X+      N
X+      s,$,-,
X+      : loop
X+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
X+      t loop
X+      s,-$,,
X+      s,^['$as_cr_digits']*\n,,
X+    ' >$as_me.lineno &&
X+  chmod +x $as_me.lineno ||
X+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
X+   { (exit 1); exit 1; }; }
X+
X+  # Don't try to exec as it changes $[0], causing all sort of problems
X+  # (the dirname of $[0] is not the place where we might find the
X+  # original and so on.  Autoconf is especially sensible to this).
X+  . ./$as_me.lineno
X+  # Exit status is that of the last command.
X+  exit
X+}
X+
X+
X+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
X+  *c*,-n*) ECHO_N= ECHO_C='
X+' ECHO_T='	' ;;
X+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
X+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
X+esac
X+
X+if expr a : '\(a\)' >/dev/null 2>&1; then
X+  as_expr=expr
X+else
X+  as_expr=false
X+fi
X+
X+rm -f conf$$ conf$$.exe conf$$.file
X+echo >conf$$.file
X+if ln -s conf$$.file conf$$ 2>/dev/null; then
X+  # We could just check for DJGPP; but this test a) works b) is more generic
X+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
X+  if test -f conf$$.exe; then
X+    # Don't use ln at all; we don't have any links
X+    as_ln_s='cp -p'
X+  else
X+    as_ln_s='ln -s'
X+  fi
X+elif ln conf$$.file conf$$ 2>/dev/null; then
X+  as_ln_s=ln
X+else
X+  as_ln_s='cp -p'
X+fi
X+rm -f conf$$ conf$$.exe conf$$.file
X+
X+if mkdir -p . 2>/dev/null; then
X+  as_mkdir_p=:
X+else
X+  test -d ./-p && rmdir ./-p
X+  as_mkdir_p=false
X+fi
X+
X+as_executable_p="test -f"
X+
X+# Sed expression to map a string onto a valid CPP name.
X+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
X+
X+# Sed expression to map a string onto a valid variable name.
X+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
X+
X+
X+# IFS
X+# We need space, tab and new line, in precisely that order.
X+as_nl='
X+'
X+IFS=" 	$as_nl"
X+
X+# CDPATH.
X+$as_unset CDPATH
X+
X+
X+# Name of the host.
X+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
X+# so uname gets run too.
X+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
X+
X+exec 6>&1
X+
X+#
X+# Initializations.
X+#
X+ac_default_prefix=/usr/local
X+ac_config_libobj_dir=.
X+cross_compiling=no
X+subdirs=
X+MFLAGS=
X+MAKEFLAGS=
X+SHELL=${CONFIG_SHELL-/bin/sh}
X+
X+# Maximum number of lines to put in a shell here document.
X+# This variable seems obsolete.  It should probably be removed, and
X+# only ac_max_sed_lines should be used.
X+: ${ac_max_here_lines=38}
X+
X+# Identity of this package.
X+PACKAGE_NAME='newlib'
X+PACKAGE_TARNAME='newlib'
X+PACKAGE_VERSION='1.15.0'
X+PACKAGE_STRING='newlib 1.15.0'
X+PACKAGE_BUGREPORT=''
X+
X+ac_unique_file="libcglue.c"
X+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAY_SUPPLY_SYSCALLS_TRUE MAY_SUPPLY_SYSCALLS_FALSE newlib_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB READELF ac_ct_READELF MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CCAS CCASFLAGS NEWLIB_CFLAGS LDFLAGS ELIX_LE
 VEL_0_TRUE ELIX_LEVEL_0_FALSE ELIX_LEVEL_1_TRUE ELIX_LEVEL_1_FALSE ELIX_LEVEL_2_TRUE ELIX_LEVEL_2_FALSE ELIX_LEVEL_3_TRUE ELIX_LEVEL_3_FALSE ELIX_LEVEL_4_TRUE ELIX_LEVEL_4_FALSE USE_LIBTOOL_TRUE USE_LIBTOOL_FALSE OBJEXT oext aext lpfx libm_machine_dir machine_dir sys_dir LIBOBJS LTLIBOBJS'
X+ac_subst_files=''
X+
X+# Initialize some variables set by options.
X+ac_init_help=
X+ac_init_version=false
X+# The variables have the same names as the options, with
X+# dashes changed to underlines.
X+cache_file=/dev/null
X+exec_prefix=NONE
X+no_create=
X+no_recursion=
X+prefix=NONE
X+program_prefix=NONE
X+program_suffix=NONE
X+program_transform_name=s,x,x,
X+silent=
X+site=
X+srcdir=
X+verbose=
X+x_includes=NONE
X+x_libraries=NONE
X+
X+# Installation directory options.
X+# These are left unexpanded so users can "make install exec_prefix=/foo"
X+# and all the variables that are supposed to be based on exec_prefix
X+# by default will actually change.
X+# Use braces instead of parens because sh, perl, etc. also accept them.
X+bindir='${exec_prefix}/bin'
X+sbindir='${exec_prefix}/sbin'
X+libexecdir='${exec_prefix}/libexec'
X+datadir='${prefix}/share'
X+sysconfdir='${prefix}/etc'
X+sharedstatedir='${prefix}/com'
X+localstatedir='${prefix}/var'
X+libdir='${exec_prefix}/lib'
X+includedir='${prefix}/include'
X+oldincludedir='/usr/include'
X+infodir='${prefix}/info'
X+mandir='${prefix}/man'
X+
X+ac_prev=
X+for ac_option
X+do
X+  # If the previous option needs an argument, assign it.
X+  if test -n "$ac_prev"; then
X+    eval "$ac_prev=\$ac_option"
X+    ac_prev=
X+    continue
X+  fi
X+
X+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
X+
X+  # Accept the important Cygnus configure options, so we can diagnose typos.
X+
X+  case $ac_option in
X+
X+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
X+    ac_prev=bindir ;;
X+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
X+    bindir=$ac_optarg ;;
X+
X+  -build | --build | --buil | --bui | --bu)
X+    ac_prev=build_alias ;;
X+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
X+    build_alias=$ac_optarg ;;
X+
X+  -cache-file | --cache-file | --cache-fil | --cache-fi \
X+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
X+    ac_prev=cache_file ;;
X+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
X+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
X+    cache_file=$ac_optarg ;;
X+
X+  --config-cache | -C)
X+    cache_file=config.cache ;;
X+
X+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
X+    ac_prev=datadir ;;
X+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
X+  | --da=*)
X+    datadir=$ac_optarg ;;
X+
X+  -disable-* | --disable-*)
X+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
X+    # Reject names that are not valid shell variable names.
X+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
X+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
X+   { (exit 1); exit 1; }; }
X+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
X+    eval "enable_$ac_feature=no" ;;
X+
X+  -enable-* | --enable-*)
X+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
X+    # Reject names that are not valid shell variable names.
X+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
X+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
X+   { (exit 1); exit 1; }; }
X+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
X+    case $ac_option in
X+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
X+      *) ac_optarg=yes ;;
X+    esac
X+    eval "enable_$ac_feature='$ac_optarg'" ;;
X+
X+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
X+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
X+  | --exec | --exe | --ex)
X+    ac_prev=exec_prefix ;;
X+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
X+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
X+  | --exec=* | --exe=* | --ex=*)
X+    exec_prefix=$ac_optarg ;;
X+
X+  -gas | --gas | --ga | --g)
X+    # Obsolete; use --with-gas.
X+    with_gas=yes ;;
X+
X+  -help | --help | --hel | --he | -h)
X+    ac_init_help=long ;;
X+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
X+    ac_init_help=recursive ;;
X+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
X+    ac_init_help=short ;;
X+
X+  -host | --host | --hos | --ho)
X+    ac_prev=host_alias ;;
X+  -host=* | --host=* | --hos=* | --ho=*)
X+    host_alias=$ac_optarg ;;
X+
X+  -includedir | --includedir | --includedi | --included | --include \
X+  | --includ | --inclu | --incl | --inc)
X+    ac_prev=includedir ;;
X+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
X+  | --includ=* | --inclu=* | --incl=* | --inc=*)
X+    includedir=$ac_optarg ;;
X+
X+  -infodir | --infodir | --infodi | --infod | --info | --inf)
X+    ac_prev=infodir ;;
X+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
X+    infodir=$ac_optarg ;;
X+
X+  -libdir | --libdir | --libdi | --libd)
X+    ac_prev=libdir ;;
X+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
X+    libdir=$ac_optarg ;;
X+
X+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
X+  | --libexe | --libex | --libe)
X+    ac_prev=libexecdir ;;
X+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
X+  | --libexe=* | --libex=* | --libe=*)
X+    libexecdir=$ac_optarg ;;
X+
X+  -localstatedir | --localstatedir | --localstatedi | --localstated \
X+  | --localstate | --localstat | --localsta | --localst \
X+  | --locals | --local | --loca | --loc | --lo)
X+    ac_prev=localstatedir ;;
X+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
X+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
X+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
X+    localstatedir=$ac_optarg ;;
X+
X+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
X+    ac_prev=mandir ;;
X+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
X+    mandir=$ac_optarg ;;
X+
X+  -nfp | --nfp | --nf)
X+    # Obsolete; use --without-fp.
X+    with_fp=no ;;
X+
X+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
X+  | --no-cr | --no-c | -n)
X+    no_create=yes ;;
X+
X+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
X+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
X+    no_recursion=yes ;;
X+
X+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
X+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
X+  | --oldin | --oldi | --old | --ol | --o)
X+    ac_prev=oldincludedir ;;
X+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
X+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
X+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
X+    oldincludedir=$ac_optarg ;;
X+
X+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
X+    ac_prev=prefix ;;
X+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
X+    prefix=$ac_optarg ;;
X+
X+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
X+  | --program-pre | --program-pr | --program-p)
X+    ac_prev=program_prefix ;;
X+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
X+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
X+    program_prefix=$ac_optarg ;;
X+
X+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
X+  | --program-suf | --program-su | --program-s)
X+    ac_prev=program_suffix ;;
X+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
X+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
X+    program_suffix=$ac_optarg ;;
X+
X+  -program-transform-name | --program-transform-name \
X+  | --program-transform-nam | --program-transform-na \
X+  | --program-transform-n | --program-transform- \
X+  | --program-transform | --program-transfor \
X+  | --program-transfo | --program-transf \
X+  | --program-trans | --program-tran \
X+  | --progr-tra | --program-tr | --program-t)
X+    ac_prev=program_transform_name ;;
X+  -program-transform-name=* | --program-transform-name=* \
X+  | --program-transform-nam=* | --program-transform-na=* \
X+  | --program-transform-n=* | --program-transform-=* \
X+  | --program-transform=* | --program-transfor=* \
X+  | --program-transfo=* | --program-transf=* \
X+  | --program-trans=* | --program-tran=* \
X+  | --progr-tra=* | --program-tr=* | --program-t=*)
X+    program_transform_name=$ac_optarg ;;
X+
X+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
X+  | -silent | --silent | --silen | --sile | --sil)
X+    silent=yes ;;
X+
X+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
X+    ac_prev=sbindir ;;
X+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
X+  | --sbi=* | --sb=*)
X+    sbindir=$ac_optarg ;;
X+
X+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
X+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
X+  | --sharedst | --shareds | --shared | --share | --shar \
X+  | --sha | --sh)
X+    ac_prev=sharedstatedir ;;
X+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
X+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
X+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
X+  | --sha=* | --sh=*)
X+    sharedstatedir=$ac_optarg ;;
X+
X+  -site | --site | --sit)
X+    ac_prev=site ;;
X+  -site=* | --site=* | --sit=*)
X+    site=$ac_optarg ;;
X+
X+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
X+    ac_prev=srcdir ;;
X+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
X+    srcdir=$ac_optarg ;;
X+
X+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
X+  | --syscon | --sysco | --sysc | --sys | --sy)
X+    ac_prev=sysconfdir ;;
X+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
X+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
X+    sysconfdir=$ac_optarg ;;
X+
X+  -target | --target | --targe | --targ | --tar | --ta | --t)
X+    ac_prev=target_alias ;;
X+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
X+    target_alias=$ac_optarg ;;
X+
X+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
X+    verbose=yes ;;
X+
X+  -version | --version | --versio | --versi | --vers | -V)
X+    ac_init_version=: ;;
X+
X+  -with-* | --with-*)
X+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
X+    # Reject names that are not valid shell variable names.
X+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
X+      { echo "$as_me: error: invalid package name: $ac_package" >&2
X+   { (exit 1); exit 1; }; }
X+    ac_package=`echo $ac_package| sed 's/-/_/g'`
X+    case $ac_option in
X+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
X+      *) ac_optarg=yes ;;
X+    esac
X+    eval "with_$ac_package='$ac_optarg'" ;;
X+
X+  -without-* | --without-*)
X+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
X+    # Reject names that are not valid shell variable names.
X+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
X+      { echo "$as_me: error: invalid package name: $ac_package" >&2
X+   { (exit 1); exit 1; }; }
X+    ac_package=`echo $ac_package | sed 's/-/_/g'`
X+    eval "with_$ac_package=no" ;;
X+
X+  --x)
X+    # Obsolete; use --with-x.
X+    with_x=yes ;;
X+
X+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
X+  | --x-incl | --x-inc | --x-in | --x-i)
X+    ac_prev=x_includes ;;
X+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
X+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
X+    x_includes=$ac_optarg ;;
X+
X+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
X+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
X+    ac_prev=x_libraries ;;
X+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
X+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
X+    x_libraries=$ac_optarg ;;
X+
X+  -*) { echo "$as_me: error: unrecognized option: $ac_option
X+Try \`$0 --help' for more information." >&2
X+   { (exit 1); exit 1; }; }
X+    ;;
X+
X+  *=*)
X+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
X+    # Reject names that are not valid shell variable names.
X+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
X+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
X+   { (exit 1); exit 1; }; }
X+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
X+    eval "$ac_envvar='$ac_optarg'"
X+    export $ac_envvar ;;
X+
X+  *)
X+    # FIXME: should be removed in autoconf 3.0.
X+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
X+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
X+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
X+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
X+    ;;
X+
X+  esac
X+done
X+
X+if test -n "$ac_prev"; then
X+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
X+  { echo "$as_me: error: missing argument to $ac_option" >&2
X+   { (exit 1); exit 1; }; }
X+fi
X+
X+# Be sure to have absolute paths.
X+for ac_var in exec_prefix prefix
X+do
X+  eval ac_val=$`echo $ac_var`
X+  case $ac_val in
X+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
X+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
X+   { (exit 1); exit 1; }; };;
X+  esac
X+done
X+
X+# Be sure to have absolute paths.
X+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
X+	      localstatedir libdir includedir oldincludedir infodir mandir
X+do
X+  eval ac_val=$`echo $ac_var`
X+  case $ac_val in
X+    [\\/$]* | ?:[\\/]* ) ;;
X+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
X+   { (exit 1); exit 1; }; };;
X+  esac
X+done
X+
X+# There might be people who depend on the old broken behavior: `$host'
X+# used to hold the argument of --host etc.
X+# FIXME: To remove some day.
X+build=$build_alias
X+host=$host_alias
X+target=$target_alias
X+
X+# FIXME: To remove some day.
X+if test "x$host_alias" != x; then
X+  if test "x$build_alias" = x; then
X+    cross_compiling=maybe
X+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
X+    If a cross compiler is detected then cross compile mode will be used." >&2
X+  elif test "x$build_alias" != "x$host_alias"; then
X+    cross_compiling=yes
X+  fi
X+fi
X+
X+ac_tool_prefix=
X+test -n "$host_alias" && ac_tool_prefix=$host_alias-
X+
X+test "$silent" = yes && exec 6>/dev/null
X+
X+
X+# Find the source files, if location was not specified.
X+if test -z "$srcdir"; then
X+  ac_srcdir_defaulted=yes
X+  # Try the directory containing this script, then its parent.
X+  ac_confdir=`(dirname "$0") 2>/dev/null ||
X+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X+	 X"$0" : 'X\(//\)[^/]' \| \
X+	 X"$0" : 'X\(//\)$' \| \
X+	 X"$0" : 'X\(/\)' \| \
X+	 .     : '\(.\)' 2>/dev/null ||
X+echo X"$0" |
X+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
X+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
X+  	  /^X\(\/\/\)$/{ s//\1/; q; }
X+  	  /^X\(\/\).*/{ s//\1/; q; }
X+  	  s/.*/./; q'`
X+  srcdir=$ac_confdir
X+  if test ! -r $srcdir/$ac_unique_file; then
X+    srcdir=..
X+  fi
X+else
X+  ac_srcdir_defaulted=no
X+fi
X+if test ! -r $srcdir/$ac_unique_file; then
X+  if test "$ac_srcdir_defaulted" = yes; then
X+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
X+   { (exit 1); exit 1; }; }
X+  else
X+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
X+   { (exit 1); exit 1; }; }
X+  fi
X+fi
X+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
X+  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
X+   { (exit 1); exit 1; }; }
X+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
X+ac_env_build_alias_set=${build_alias+set}
X+ac_env_build_alias_value=$build_alias
X+ac_cv_env_build_alias_set=${build_alias+set}
X+ac_cv_env_build_alias_value=$build_alias
X+ac_env_host_alias_set=${host_alias+set}
X+ac_env_host_alias_value=$host_alias
X+ac_cv_env_host_alias_set=${host_alias+set}
X+ac_cv_env_host_alias_value=$host_alias
X+ac_env_target_alias_set=${target_alias+set}
X+ac_env_target_alias_value=$target_alias
X+ac_cv_env_target_alias_set=${target_alias+set}
X+ac_cv_env_target_alias_value=$target_alias
X+ac_env_CCAS_set=${CCAS+set}
X+ac_env_CCAS_value=$CCAS
X+ac_cv_env_CCAS_set=${CCAS+set}
X+ac_cv_env_CCAS_value=$CCAS
X+ac_env_CCASFLAGS_set=${CCASFLAGS+set}
X+ac_env_CCASFLAGS_value=$CCASFLAGS
X+ac_cv_env_CCASFLAGS_set=${CCASFLAGS+set}
X+ac_cv_env_CCASFLAGS_value=$CCASFLAGS
X+
X+#
X+# Report the --help message.
X+#
X+if test "$ac_init_help" = "long"; then
X+  # Omit some internal or obsolete options to make the list less imposing.
X+  # This message is too long to be a string in the A/UX 3.1 sh.
X+  cat <<_ACEOF
X+\`configure' configures newlib 1.15.0 to adapt to many kinds of systems.
X+
X+Usage: $0 [OPTION]... [VAR=VALUE]...
X+
X+To assign environment variables (e.g., CC, CFLAGS...), specify them as
X+VAR=VALUE.  See below for descriptions of some of the useful variables.
X+
X+Defaults for the options are specified in brackets.
X+
X+Configuration:
X+  -h, --help              display this help and exit
X+      --help=short        display options specific to this package
X+      --help=recursive    display the short help of all the included packages
X+  -V, --version           display version information and exit
X+  -q, --quiet, --silent   do not print \`checking...' messages
X+      --cache-file=FILE   cache test results in FILE [disabled]
X+  -C, --config-cache      alias for \`--cache-file=config.cache'
X+  -n, --no-create         do not create output files
X+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
X+
X+_ACEOF
X+
X+  cat <<_ACEOF
X+Installation directories:
X+  --prefix=PREFIX         install architecture-independent files in PREFIX
X+			  [$ac_default_prefix]
X+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
X+			  [PREFIX]
X+
X+By default, \`make install' will install all the files in
X+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
X+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
X+for instance \`--prefix=\$HOME'.
X+
X+For better control, use the options below.
X+
X+Fine tuning of the installation directories:
X+  --bindir=DIR           user executables [EPREFIX/bin]
X+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
X+  --libexecdir=DIR       program executables [EPREFIX/libexec]
X+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
X+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
X+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
X+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
X+  --libdir=DIR           object code libraries [EPREFIX/lib]
X+  --includedir=DIR       C header files [PREFIX/include]
X+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
X+  --infodir=DIR          info documentation [PREFIX/info]
X+  --mandir=DIR           man documentation [PREFIX/man]
X+_ACEOF
X+
X+  cat <<\_ACEOF
X+
X+Program names:
X+  --program-prefix=PREFIX            prepend PREFIX to installed program names
X+  --program-suffix=SUFFIX            append SUFFIX to installed program names
X+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
X+
X+System types:
X+  --build=BUILD     configure for building on BUILD [guessed]
X+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
X+_ACEOF
X+fi
X+
X+if test -n "$ac_init_help"; then
X+  case $ac_init_help in
X+     short | recursive ) echo "Configuration of newlib 1.15.0:";;
X+   esac
X+  cat <<\_ACEOF
X+
X+Optional Features:
X+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
X+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
X+  --enable-multilib         build many library versions (default)
X+  --enable-target-optspace  optimize for space
X+  --enable-malloc-debugging indicate malloc debugging requested
X+  --enable-newlib-multithread        enable support for multiple threads
X+  --enable-newlib-iconv     enable iconv library support
X+  --enable-newlib-elix-level         supply desired elix library level (1-4)
X+  --disable-newlib-io-float disable printf/scanf family float support
X+  --disable-newlib-supplied-syscalls disable newlib from supplying syscalls
X+  --disable-dependency-tracking  speeds up one-time build
X+  --enable-dependency-tracking   do not reject slow dependency extractors
X+  --enable-maintainer-mode  enable make rules and dependencies not useful
X+			  (and sometimes confusing) to the casual installer
X+
X+Some influential environment variables:
X+  CCAS        assembler compiler command (defaults to CC)
X+  CCASFLAGS   assembler compiler flags (defaults to CFLAGS)
X+
X+Use these variables to override the choices made by `configure' or to help
X+it to find libraries and programs with nonstandard names/locations.
X+
X+_ACEOF
X+fi
X+
X+if test "$ac_init_help" = "recursive"; then
X+  # If there are subdirs, report their specific --help.
X+  ac_popdir=`pwd`
X+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
X+    test -d $ac_dir || continue
X+    ac_builddir=.
X+
X+if test "$ac_dir" != .; then
X+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
X+  # A "../" for each directory in $ac_dir_suffix.
X+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
X+else
X+  ac_dir_suffix= ac_top_builddir=
X+fi
X+
X+case $srcdir in
X+  .)  # No --srcdir option.  We are building in place.
X+    ac_srcdir=.
X+    if test -z "$ac_top_builddir"; then
X+       ac_top_srcdir=.
X+    else
X+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
X+    fi ;;
X+  [\\/]* | ?:[\\/]* )  # Absolute path.
X+    ac_srcdir=$srcdir$ac_dir_suffix;
X+    ac_top_srcdir=$srcdir ;;
X+  *) # Relative path.
X+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
X+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
X+esac
X+
X+# Do not use `cd foo && pwd` to compute absolute paths, because
X+# the directories may not exist.
X+case `pwd` in
X+.) ac_abs_builddir="$ac_dir";;
X+*)
X+  case "$ac_dir" in
X+  .) ac_abs_builddir=`pwd`;;
X+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
X+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
X+  esac;;
X+esac
X+case $ac_abs_builddir in
X+.) ac_abs_top_builddir=${ac_top_builddir}.;;
X+*)
X+  case ${ac_top_builddir}. in
X+  .) ac_abs_top_builddir=$ac_abs_builddir;;
X+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
X+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
X+  esac;;
X+esac
X+case $ac_abs_builddir in
X+.) ac_abs_srcdir=$ac_srcdir;;
X+*)
X+  case $ac_srcdir in
X+  .) ac_abs_srcdir=$ac_abs_builddir;;
X+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
X+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
X+  esac;;
X+esac
X+case $ac_abs_builddir in
X+.) ac_abs_top_srcdir=$ac_top_srcdir;;
X+*)
X+  case $ac_top_srcdir in
X+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
X+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
X+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
X+  esac;;
X+esac
X+
X+    cd $ac_dir
X+    # Check for guested configure; otherwise get Cygnus style configure.
X+    if test -f $ac_srcdir/configure.gnu; then
X+      echo
X+      $SHELL $ac_srcdir/configure.gnu  --help=recursive
X+    elif test -f $ac_srcdir/configure; then
X+      echo
X+      $SHELL $ac_srcdir/configure  --help=recursive
X+    elif test -f $ac_srcdir/configure.ac ||
X+	   test -f $ac_srcdir/configure.in; then
X+      echo
X+      $ac_configure --help
X+    else
X+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
X+    fi
X+    cd $ac_popdir
X+  done
X+fi
X+
X+test -n "$ac_init_help" && exit 0
X+if $ac_init_version; then
X+  cat <<\_ACEOF
X+newlib configure 1.15.0
X+generated by GNU Autoconf 2.59
X+
X+Copyright (C) 2003 Free Software Foundation, Inc.
X+This configure script is free software; the Free Software Foundation
X+gives unlimited permission to copy, distribute and modify it.
X+_ACEOF
X+  exit 0
X+fi
X+exec 5>config.log
X+cat >&5 <<_ACEOF
X+This file contains any messages produced by compilers while
X+running configure, to aid debugging if configure makes a mistake.
X+
X+It was created by newlib $as_me 1.15.0, which was
X+generated by GNU Autoconf 2.59.  Invocation command line was
X+
X+  $ $0 $@
X+
X+_ACEOF
X+{
X+cat <<_ASUNAME
X+## --------- ##
X+## Platform. ##
X+## --------- ##
X+
X+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
X+uname -m = `(uname -m) 2>/dev/null || echo unknown`
X+uname -r = `(uname -r) 2>/dev/null || echo unknown`
X+uname -s = `(uname -s) 2>/dev/null || echo unknown`
X+uname -v = `(uname -v) 2>/dev/null || echo unknown`
X+
X+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
X+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
X+
X+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
X+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
X+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
X+hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
X+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
X+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
X+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
X+
X+_ASUNAME
X+
X+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
X+for as_dir in $PATH
X+do
X+  IFS=$as_save_IFS
X+  test -z "$as_dir" && as_dir=.
X+  echo "PATH: $as_dir"
X+done
X+
X+} >&5
X+
X+cat >&5 <<_ACEOF
X+
X+
X+## ----------- ##
X+## Core tests. ##
X+## ----------- ##
X+
X+_ACEOF
X+
X+
X+# Keep a trace of the command line.
X+# Strip out --no-create and --no-recursion so they do not pile up.
X+# Strip out --silent because we don't want to record it for future runs.
X+# Also quote any args containing shell meta-characters.
X+# Make two passes to allow for proper duplicate-argument suppression.
X+ac_configure_args=
X+ac_configure_args0=
X+ac_configure_args1=
X+ac_sep=
X+ac_must_keep_next=false
X+for ac_pass in 1 2
X+do
X+  for ac_arg
X+  do
X+    case $ac_arg in
X+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
X+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
X+    | -silent | --silent | --silen | --sile | --sil)
X+      continue ;;
X+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
X+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
X+    esac
X+    case $ac_pass in
X+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
X+    2)
X+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
X+      if test $ac_must_keep_next = true; then
X+	ac_must_keep_next=false # Got value, back to normal.
X+      else
X+	case $ac_arg in
X+	  *=* | --config-cache | -C | -disable-* | --disable-* \
X+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
X+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
X+	  | -with-* | --with-* | -without-* | --without-* | --x)
X+	    case "$ac_configure_args0 " in
X+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
X+	    esac
X+	    ;;
X+	  -* ) ac_must_keep_next=true ;;
X+	esac
X+      fi
X+      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
X+      # Get rid of the leading space.
X+      ac_sep=" "
X+      ;;
X+    esac
X+  done
X+done
X+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
X+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
X+
X+# When interrupted or exit'd, cleanup temporary files, and complete
X+# config.log.  We remove comments because anyway the quotes in there
X+# would cause problems or look ugly.
X+# WARNING: Be sure not to use single quotes in there, as some shells,
X+# such as our DU 5.0 friend, will then `close' the trap.
X+trap 'exit_status=$?
X+  # Save into config.log some information that might help in debugging.
X+  {
X+    echo
X+
X+    cat <<\_ASBOX
X+## ---------------- ##
X+## Cache variables. ##
X+## ---------------- ##
X+_ASBOX
X+    echo
X+    # The following way of writing the cache mishandles newlines in values,
X+{
X+  (set) 2>&1 |
X+    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
X+    *ac_space=\ *)
X+      sed -n \
X+	"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
X+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
X+      ;;
X+    *)
X+      sed -n \
X+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
X+      ;;
X+    esac;
X+}
X+    echo
X+
X+    cat <<\_ASBOX
X+## ----------------- ##
X+## Output variables. ##
X+## ----------------- ##
X+_ASBOX
X+    echo
X+    for ac_var in $ac_subst_vars
X+    do
X+      eval ac_val=$`echo $ac_var`
X+      echo "$ac_var='"'"'$ac_val'"'"'"
X+    done | sort
X+    echo
X+
X+    if test -n "$ac_subst_files"; then
X+      cat <<\_ASBOX
X+## ------------- ##
X+## Output files. ##
X+## ------------- ##
X+_ASBOX
X+      echo
X+      for ac_var in $ac_subst_files
X+      do
X+	eval ac_val=$`echo $ac_var`
X+	echo "$ac_var='"'"'$ac_val'"'"'"
X+      done | sort
X+      echo
X+    fi
X+
X+    if test -s confdefs.h; then
X+      cat <<\_ASBOX
X+## ----------- ##
X+## confdefs.h. ##
X+## ----------- ##
X+_ASBOX
X+      echo
X+      sed "/^$/d" confdefs.h | sort
X+      echo
X+    fi
X+    test "$ac_signal" != 0 &&
X+      echo "$as_me: caught signal $ac_signal"
X+    echo "$as_me: exit $exit_status"
X+  } >&5
X+  rm -f core *.core &&
X+  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
X+    exit $exit_status
X+     ' 0
X+for ac_signal in 1 2 13 15; do
X+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
X+done
X+ac_signal=0
X+
X+# confdefs.h avoids OS command line length limits that DEFS can exceed.
X+rm -rf conftest* confdefs.h
X+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
X+echo >confdefs.h
X+
X+# Predefined preprocessor variables.
X+
X+cat >>confdefs.h <<_ACEOF
X+#define PACKAGE_NAME "$PACKAGE_NAME"
X+_ACEOF
X+
X+
X+cat >>confdefs.h <<_ACEOF
X+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
X+_ACEOF
X+
X+
X+cat >>confdefs.h <<_ACEOF
X+#define PACKAGE_VERSION "$PACKAGE_VERSION"
X+_ACEOF
X+
X+
X+cat >>confdefs.h <<_ACEOF
X+#define PACKAGE_STRING "$PACKAGE_STRING"
X+_ACEOF
X+
X+
X+cat >>confdefs.h <<_ACEOF
X+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
X+_ACEOF
X+
X+
X+# Let the site file select an alternate cache file if it wants to.
X+# Prefer explicitly selected file to automatically selected ones.
X+if test -z "$CONFIG_SITE"; then
X+  if test "x$prefix" != xNONE; then
X+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
X+  else
X+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
X+  fi
X+fi
X+for ac_site_file in $CONFIG_SITE; do
X+  if test -r "$ac_site_file"; then
X+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
X+echo "$as_me: loading site script $ac_site_file" >&6;}
X+    sed 's/^/| /' "$ac_site_file" >&5
X+    . "$ac_site_file"
X+  fi
X+done
X+
X+if test -r "$cache_file"; then
X+  # Some versions of bash will fail to source /dev/null (special
X+  # files actually), so we avoid doing that.
X+  if test -f "$cache_file"; then
X+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
X+echo "$as_me: loading cache $cache_file" >&6;}
X+    case $cache_file in
X+      [\\/]* | ?:[\\/]* ) . $cache_file;;
X+      *)                      . ./$cache_file;;
X+    esac
X+  fi
X+else
X+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
X+echo "$as_me: creating cache $cache_file" >&6;}
X+  >$cache_file
X+fi
X+
X+# Check that the precious variables saved in the cache have kept the same
X+# value.
X+ac_cache_corrupted=false
X+for ac_var in `(set) 2>&1 |
X+	       sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
X+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
X+  eval ac_new_set=\$ac_env_${ac_var}_set
X+  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
X+  eval ac_new_val="\$ac_env_${ac_var}_value"
X+  case $ac_old_set,$ac_new_set in
X+    set,)
X+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
X+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
X+      ac_cache_corrupted=: ;;
X+    ,set)
X+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
X+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
X+      ac_cache_corrupted=: ;;
X+    ,);;
X+    *)
X+      if test "x$ac_old_val" != "x$ac_new_val"; then
X+	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
X+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
X+	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
X+echo "$as_me:   former value:  $ac_old_val" >&2;}
X+	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
X+echo "$as_me:   current value: $ac_new_val" >&2;}
X+	ac_cache_corrupted=:
X+      fi;;
X+  esac
X+  # Pass precious variables to config.status.
X+  if test "$ac_new_set" = set; then
X+    case $ac_new_val in
X+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
X+      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
X+    *) ac_arg=$ac_var=$ac_new_val ;;
X+    esac
X+    case " $ac_configure_args " in
X+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
X+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
X+    esac
X+  fi
X+done
X+if $ac_cache_corrupted; then
X+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
X+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
X+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
X+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
X+   { (exit 1); exit 1; }; }
X+fi
X+
X+ac_ext=c
X+ac_cpp='$CPP $CPPFLAGS'
X+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
X+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
X+ac_compiler_gnu=$ac_cv_c_compiler_gnu
X+
X+
X+
X+
X+
X+
X+
X+
X+
X+
X+
X+
X+
X+
X+
X+
X+
X+
X+
X+
X+
X+
X+
X+
X+
X+
X+
X+
X+
X+ac_aux_dir=
X+for ac_dir in ../../../.. $srcdir/../../../..; do
X+  if test -f $ac_dir/install-sh; then
X+    ac_aux_dir=$ac_dir
X+    ac_install_sh="$ac_aux_dir/install-sh -c"
X+    break
X+  elif test -f $ac_dir/install.sh; then
X+    ac_aux_dir=$ac_dir
X+    ac_install_sh="$ac_aux_dir/install.sh -c"
X+    break
X+  elif test -f $ac_dir/shtool; then
X+    ac_aux_dir=$ac_dir
X+    ac_install_sh="$ac_aux_dir/shtool install -c"
X+    break
X+  fi
X+done
X+if test -z "$ac_aux_dir"; then
X+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ../../../.. $srcdir/../../../.." >&5
X+echo "$as_me: error: cannot find install-sh or install.sh in ../../../.. $srcdir/../../../.." >&2;}
X+   { (exit 1); exit 1; }; }
X+fi
X+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
X+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
X+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
X+
X+
X+
X+# Make sure we can run config.sub.
X+$ac_config_sub sun4 >/dev/null 2>&1 ||
X+  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
X+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
X+   { (exit 1); exit 1; }; }
X+
X+echo "$as_me:$LINENO: checking build system type" >&5
X+echo $ECHO_N "checking build system type... $ECHO_C" >&6
X+if test "${ac_cv_build+set}" = set; then
X+  echo $ECHO_N "(cached) $ECHO_C" >&6
X+else
X+  ac_cv_build_alias=$build_alias
X+test -z "$ac_cv_build_alias" &&
X+  ac_cv_build_alias=`$ac_config_guess`
X+test -z "$ac_cv_build_alias" &&
X+  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
X+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
X+   { (exit 1); exit 1; }; }
X+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
X+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
X+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
X+   { (exit 1); exit 1; }; }
X+
X+fi
X+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
X+echo "${ECHO_T}$ac_cv_build" >&6
X+build=$ac_cv_build
X+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
X+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
X+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
X+
X+
X+am__api_version="1.9"
X+# Find a good install program.  We prefer a C program (faster),
X+# so one script is as good as another.  But avoid the broken or
X+# incompatible versions:
X+# SysV /etc/install, /usr/sbin/install
X+# SunOS /usr/etc/install
X+# IRIX /sbin/install
X+# AIX /bin/install
X+# AmigaOS /C/install, which installs bootblocks on floppy discs
X+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
X+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
X+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
X+# OS/2's system install, which has a completely different semantic
X+# ./install, which can be erroneously created by make from ./install.sh.
X+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
X+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
X+if test -z "$INSTALL"; then
X+if test "${ac_cv_path_install+set}" = set; then
X+  echo $ECHO_N "(cached) $ECHO_C" >&6
X+else
X+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
X+for as_dir in $PATH
X+do
X+  IFS=$as_save_IFS
X+  test -z "$as_dir" && as_dir=.
X+  # Account for people who put trailing slashes in PATH elements.
X+case $as_dir/ in
X+  ./ | .// | /cC/* | \
X+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
X+  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
X+  /usr/ucb/* ) ;;
X+  *)
X+    # OSF1 and SCO ODT 3.0 have their own names for install.
X+    # Don't use installbsd from OSF since it installs stuff as root
X+    # by default.
X+    for ac_prog in ginstall scoinst install; do
X+      for ac_exec_ext in '' $ac_executable_extensions; do
X+	if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
X+	  if test $ac_prog = install &&
X+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
X+	    # AIX install.  It has an incompatible calling convention.
X+	    :
X+	  elif test $ac_prog = install &&
X+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
X+	    # program-specific install script used by HP pwplus--don't use.
X+	    :
X+	  else
X+	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
X+	    break 3
X+	  fi
X+	fi
X+      done
X+    done
X+    ;;
X+esac
X+done
X+
X+
X+fi
X+  if test "${ac_cv_path_install+set}" = set; then
X+    INSTALL=$ac_cv_path_install
X+  else
X+    # As a last resort, use the slow shell script.  We don't cache a
X+    # path for INSTALL within a source directory, because that will
X+    # break other packages using the cache if that directory is
X+    # removed, or if the path is relative.
X+    INSTALL=$ac_install_sh
X+  fi
X+fi
X+echo "$as_me:$LINENO: result: $INSTALL" >&5
X+echo "${ECHO_T}$INSTALL" >&6
X+
X+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
X+# It thinks the first close brace ends the variable substitution.
X+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
X+
X+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
X+
X+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
X+
X+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
X+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
X+# Just in case
X+sleep 1
X+echo timestamp > conftest.file
X+# Do `set' in a subshell so we don't clobber the current shell's
X+# arguments.  Must try -L first in case configure is actually a
X+# symlink; some systems play weird games with the mod time of symlinks
X+# (eg FreeBSD returns the mod time of the symlink's containing
X+# directory).
X+if (
X+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
X+   if test "$*" = "X"; then
X+      # -L didn't work.
X+      set X `ls -t $srcdir/configure conftest.file`
X+   fi
X+   rm -f conftest.file
X+   if test "$*" != "X $srcdir/configure conftest.file" \
X+      && test "$*" != "X conftest.file $srcdir/configure"; then
X+
X+      # If neither matched, then we have a broken ls.  This can happen
X+      # if, for instance, CONFIG_SHELL is bash and it inherits a
X+      # broken ls alias from the environment.  This has actually
X+      # happened.  Such a system could not be considered "sane".
X+      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
X+alias in your environment" >&5
X+echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
X+alias in your environment" >&2;}
X+   { (exit 1); exit 1; }; }
X+   fi
X+
X+   test "$2" = conftest.file
X+   )
X+then
X+   # Ok.
X+   :
X+else
X+   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
X+Check your system clock" >&5
X+echo "$as_me: error: newly created file is older than distributed files!
X+Check your system clock" >&2;}
X+   { (exit 1); exit 1; }; }
X+fi
X+echo "$as_me:$LINENO: result: yes" >&5
X+echo "${ECHO_T}yes" >&6
X+test "$program_prefix" != NONE &&
X+  program_transform_name="s,^,$program_prefix,;$program_transform_name"
X+# Use a double $ so make ignores it.
X+test "$program_suffix" != NONE &&
X+  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
X+# Double any \ or $.  echo might interpret backslashes.
X+# By default was `s,x,x', remove it if useless.
X+cat <<\_ACEOF >conftest.sed
X+s/[\\$]/&&/g;s/;s,x,x,$//
X+_ACEOF
X+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
X+rm conftest.sed
X+
X+# expand $ac_aux_dir to an absolute path
X+am_aux_dir=`cd $ac_aux_dir && pwd`
X+
X+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
X+# Use eval to expand $SHELL
X+if eval "$MISSING --run true"; then
X+  am_missing_run="$MISSING --run "
X+else
X+  am_missing_run=
X+  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
X+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
X+fi
X+
X+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
X+  # We used to keeping the `.' as first argument, in order to
X+  # allow $(mkdir_p) to be used without argument.  As in
X+  #   $(mkdir_p) $(somedir)
X+  # where $(somedir) is conditionally defined.  However this is wrong
X+  # for two reasons:
X+  #  1. if the package is installed by a user who cannot write `.'
X+  #     make install will fail,
X+  #  2. the above comment should most certainly read
X+  #     $(mkdir_p) $(DESTDIR)$(somedir)
X+  #     so it does not work when $(somedir) is undefined and
X+  #     $(DESTDIR) is not.
X+  #  To support the latter case, we have to write
X+  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
X+  #  so the `.' trick is pointless.
X+  mkdir_p='mkdir -p --'
X+else
X+  # On NextStep and OpenStep, the `mkdir' command does not
X+  # recognize any option.  It will interpret all options as
X+  # directories to create, and then abort because `.' already
X+  # exists.
X+  for d in ./-p ./--version;
X+  do
X+    test -d $d && rmdir $d
X+  done
X+  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
X+  if test -f "$ac_aux_dir/mkinstalldirs"; then
X+    mkdir_p='$(mkinstalldirs)'
X+  else
X+    mkdir_p='$(install_sh) -d'
X+  fi
X+fi
X+
X+for ac_prog in gawk mawk nawk awk
X+do
X+  # Extract the first word of "$ac_prog", so it can be a program name with args.
X+set dummy $ac_prog; ac_word=$2
X+echo "$as_me:$LINENO: checking for $ac_word" >&5
X+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
X+if test "${ac_cv_prog_AWK+set}" = set; then
X+  echo $ECHO_N "(cached) $ECHO_C" >&6
X+else
X+  if test -n "$AWK"; then
X+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
X+else
X+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
X+for as_dir in $PATH
X+do
X+  IFS=$as_save_IFS
X+  test -z "$as_dir" && as_dir=.
X+  for ac_exec_ext in '' $ac_executable_extensions; do
X+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
X+    ac_cv_prog_AWK="$ac_prog"
X+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
X+    break 2
X+  fi
X+done
X+done
X+
X+fi
X+fi
X+AWK=$ac_cv_prog_AWK
X+if test -n "$AWK"; then
X+  echo "$as_me:$LINENO: result: $AWK" >&5
X+echo "${ECHO_T}$AWK" >&6
X+else
X+  echo "$as_me:$LINENO: result: no" >&5
X+echo "${ECHO_T}no" >&6
X+fi
X+
X+  test -n "$AWK" && break
X+done
X+
X+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
X+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
X+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
X+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
X+  echo $ECHO_N "(cached) $ECHO_C" >&6
X+else
X+  cat >conftest.make <<\_ACEOF
X+all:
X+	@echo 'ac_maketemp="$(MAKE)"'
X+_ACEOF
X+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
X+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
X+if test -n "$ac_maketemp"; then
X+  eval ac_cv_prog_make_${ac_make}_set=yes
X+else
X+  eval ac_cv_prog_make_${ac_make}_set=no
X+fi
X+rm -f conftest.make
X+fi
X+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
X+  echo "$as_me:$LINENO: result: yes" >&5
X+echo "${ECHO_T}yes" >&6
X+  SET_MAKE=
X+else
X+  echo "$as_me:$LINENO: result: no" >&5
X+echo "${ECHO_T}no" >&6
X+  SET_MAKE="MAKE=${MAKE-make}"
X+fi
X+
X+rm -rf .tst 2>/dev/null
X+mkdir .tst 2>/dev/null
X+if test -d .tst; then
X+  am__leading_dot=.
X+else
X+  am__leading_dot=_
X+fi
X+rmdir .tst 2>/dev/null
X+
X+DEPDIR="${am__leading_dot}deps"
X+
X+          ac_config_commands="$ac_config_commands depfiles"
X+
X+
X+am_make=${MAKE-make}
X+cat > confinc << 'END'
X+am__doit:
X+	@echo done
X+.PHONY: am__doit
X+END
X+# If we don't find an include directive, just comment out the code.
X+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
X+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
X+am__include="#"
X+am__quote=
X+_am_result=none
X+# First try GNU make style include.
X+echo "include confinc" > confmf
X+# We grep out `Entering directory' and `Leaving directory'
X+# messages which can occur if `w' ends up in MAKEFLAGS.
X+# In particular we don't look at `^make:' because GNU make might
X+# be invoked under some other name (usually "gmake"), in which
X+# case it prints its new name instead of `make'.
X+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
X+   am__include=include
X+   am__quote=
X+   _am_result=GNU
X+fi
X+# Now try BSD make style include.
X+if test "$am__include" = "#"; then
X+   echo '.include "confinc"' > confmf
X+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
X+      am__include=.include
X+      am__quote="\""
X+      _am_result=BSD
X+   fi
X+fi
X+
X+
X+echo "$as_me:$LINENO: result: $_am_result" >&5
X+echo "${ECHO_T}$_am_result" >&6
X+rm -f confinc confmf
X+
X+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
X+if test "${enable_dependency_tracking+set}" = set; then
X+  enableval="$enable_dependency_tracking"
X+
X+fi;
X+if test "x$enable_dependency_tracking" != xno; then
X+  am_depcomp="$ac_aux_dir/depcomp"
X+  AMDEPBACKSLASH='\'
X+fi
X+
X+
X+if test "x$enable_dependency_tracking" != xno; then
X+  AMDEP_TRUE=
X+  AMDEP_FALSE='#'
X+else
X+  AMDEP_TRUE='#'
X+  AMDEP_FALSE=
X+fi
X+
X+
X+
X+
X+# Check whether --enable-multilib or --disable-multilib was given.
X+if test "${enable_multilib+set}" = set; then
X+  enableval="$enable_multilib"
X+  case "${enableval}" in
X+  yes) multilib=yes ;;
X+  no)  multilib=no ;;
X+  *)   { { echo "$as_me:$LINENO: error: bad value ${enableval} for multilib option" >&5
X+echo "$as_me: error: bad value ${enableval} for multilib option" >&2;}
X+   { (exit 1); exit 1; }; } ;;
X+ esac
X+else
X+  multilib=yes
X+fi;
X+# Check whether --enable-target-optspace or --disable-target-optspace was given.
X+if test "${enable_target_optspace+set}" = set; then
X+  enableval="$enable_target_optspace"
X+  case "${enableval}" in
X+  yes) target_optspace=yes ;;
X+  no)  target_optspace=no ;;
X+  *)   { { echo "$as_me:$LINENO: error: bad value ${enableval} for target-optspace option" >&5
X+echo "$as_me: error: bad value ${enableval} for target-optspace option" >&2;}
X+   { (exit 1); exit 1; }; } ;;
X+ esac
X+else
X+  target_optspace=
X+fi;
X+# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
X+if test "${enable_malloc_debugging+set}" = set; then
X+  enableval="$enable_malloc_debugging"
X+  case "${enableval}" in
X+  yes) malloc_debugging=yes ;;
X+  no)  malloc_debugging=no ;;
X+  *)   { { echo "$as_me:$LINENO: error: bad value ${enableval} for malloc-debugging option" >&5
X+echo "$as_me: error: bad value ${enableval} for malloc-debugging option" >&2;}
X+   { (exit 1); exit 1; }; } ;;
X+ esac
X+else
X+  malloc_debugging=
X+fi;
X+# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
X+if test "${enable_newlib_multithread+set}" = set; then
X+  enableval="$enable_newlib_multithread"
X+  case "${enableval}" in
X+  yes) newlib_multithread=yes ;;
X+  no)  newlib_multithread=no ;;
X+  *)   { { echo "$as_me:$LINENO: error: bad value ${enableval} for newlib-multithread option" >&5
X+echo "$as_me: error: bad value ${enableval} for newlib-multithread option" >&2;}
X+   { (exit 1); exit 1; }; } ;;
X+ esac
X+else
X+  newlib_multithread=yes
X+fi;
X+# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
X+if test "${enable_newlib_iconv+set}" = set; then
X+  enableval="$enable_newlib_iconv"
X+  if test "${newlib_iconv+set}" != set; then
X+   case "${enableval}" in
X+     yes) newlib_iconv=yes ;;
X+     no)  newlib_iconv=no ;;
X+     *)   { { echo "$as_me:$LINENO: error: bad value ${enableval} for newlib-iconv option" >&5
X+echo "$as_me: error: bad value ${enableval} for newlib-iconv option" >&2;}
X+   { (exit 1); exit 1; }; } ;;
X+   esac
X+ fi
X+else
X+  newlib_iconv=${newlib_iconv}
X+fi;
X+# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
X+if test "${enable_newlib_elix_level+set}" = set; then
X+  enableval="$enable_newlib_elix_level"
X+  case "${enableval}" in
X+  0)   newlib_elix_level=0 ;;
X+  1)   newlib_elix_level=1 ;;
X+  2)   newlib_elix_level=2 ;;
X+  3)   newlib_elix_level=3 ;;
X+  4)   newlib_elix_level=4 ;;
X+  *)   { { echo "$as_me:$LINENO: error: bad value ${enableval} for newlib-elix-level option" >&5
X+echo "$as_me: error: bad value ${enableval} for newlib-elix-level option" >&2;}
X+   { (exit 1); exit 1; }; } ;;
X+ esac
X+else
X+  newlib_elix_level=0
X+fi;
X+# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
X+if test "${enable_newlib_io_float+set}" = set; then
X+  enableval="$enable_newlib_io_float"
X+  case "${enableval}" in
X+  yes) newlib_io_float=yes ;;
X+  no)  newlib_io_float=no ;;
X+  *)   { { echo "$as_me:$LINENO: error: bad value ${enableval} for newlib-io-float option" >&5
X+echo "$as_me: error: bad value ${enableval} for newlib-io-float option" >&2;}
X+   { (exit 1); exit 1; }; } ;;
X+ esac
X+else
X+  newlib_io_float=yes
X+fi;
X+# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
X+if test "${enable_newlib_supplied_syscalls+set}" = set; then
X+  enableval="$enable_newlib_supplied_syscalls"
X+  case "${enableval}" in
X+  yes) newlib_may_supply_syscalls=yes ;;
X+  no)  newlib_may_supply_syscalls=no ;;
X+  *)   { { echo "$as_me:$LINENO: error: bad value ${enableval} for newlib-supplied-syscalls option" >&5
X+echo "$as_me: error: bad value ${enableval} for newlib-supplied-syscalls option" >&2;}
X+   { (exit 1); exit 1; }; } ;;
X+ esac
X+else
X+  newlib_may_supply_syscalls=yes
X+fi;
X+
X+
X+if test x${newlib_may_supply_syscalls} = xyes; then
X+  MAY_SUPPLY_SYSCALLS_TRUE=
X+  MAY_SUPPLY_SYSCALLS_FALSE='#'
X+else
X+  MAY_SUPPLY_SYSCALLS_TRUE='#'
X+  MAY_SUPPLY_SYSCALLS_FALSE=
X+fi
X+
X+
X+
X+test -z "${with_target_subdir}" && with_target_subdir=.
X+
X+if test "${srcdir}" = "."; then
X+  if test "${with_target_subdir}" != "."; then
X+    newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
X+  else
X+    newlib_basedir="${srcdir}/${with_multisrctop}../../.."
X+  fi
X+else
X+  newlib_basedir="${srcdir}/../../.."
X+fi
X+
X+
X+echo "$as_me:$LINENO: checking host system type" >&5
X+echo $ECHO_N "checking host system type... $ECHO_C" >&6
X+if test "${ac_cv_host+set}" = set; then
X+  echo $ECHO_N "(cached) $ECHO_C" >&6
X+else
X+  ac_cv_host_alias=$host_alias
X+test -z "$ac_cv_host_alias" &&
X+  ac_cv_host_alias=$ac_cv_build_alias
X+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
X+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
X+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
X+   { (exit 1); exit 1; }; }
X+
X+fi
X+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
X+echo "${ECHO_T}$ac_cv_host" >&6
X+host=$ac_cv_host
X+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
X+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
X+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
X+
X+
X+
X+# test to see if srcdir already configured
X+if test "`cd $srcdir && pwd`" != "`pwd`" &&
X+   test -f $srcdir/config.status; then
X+  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
X+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
X+   { (exit 1); exit 1; }; }
X+fi
X+
X+# test whether we have cygpath
X+if test -z "$CYGPATH_W"; then
X+  if (cygpath --version) >/dev/null 2>/dev/null; then
X+    CYGPATH_W='cygpath -w'
X+  else
X+    CYGPATH_W=echo
X+  fi
X+fi
X+
X+
X+# Define the identity of the package.
X+ PACKAGE='newlib'
X+ VERSION='1.15.0'
X+
X+
X+# Some tools Automake needs.
X+
X+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
X+
X+
X+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
X+
X+
X+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
X+
X+
X+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
X+
X+
X+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
X+
X+install_sh=${install_sh-"$am_aux_dir/install-sh"}
X+
X+# Installed binaries are usually stripped using `strip' when the user
X+# run `make install-strip'.  However `strip' might not be the right
X+# tool to use in cross-compilation environments, therefore Automake
X+# will honor the `STRIP' environment variable to overrule this program.
X+if test "$cross_compiling" != no; then
X+  if test -n "$ac_tool_prefix"; then
X+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
X+set dummy ${ac_tool_prefix}strip; ac_word=$2
X+echo "$as_me:$LINENO: checking for $ac_word" >&5
X+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
X+if test "${ac_cv_prog_STRIP+set}" = set; then
X+  echo $ECHO_N "(cached) $ECHO_C" >&6
X+else
X+  if test -n "$STRIP"; then
X+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
X+else
X+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
X+for as_dir in $PATH
X+do
X+  IFS=$as_save_IFS
X+  test -z "$as_dir" && as_dir=.
X+  for ac_exec_ext in '' $ac_executable_extensions; do
X+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
X+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
X+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
X+    break 2
X+  fi
X+done
X+done
X+
X+fi
X+fi
X+STRIP=$ac_cv_prog_STRIP
X+if test -n "$STRIP"; then
X+  echo "$as_me:$LINENO: result: $STRIP" >&5
X+echo "${ECHO_T}$STRIP" >&6
X+else
X+  echo "$as_me:$LINENO: result: no" >&5
X+echo "${ECHO_T}no" >&6
X+fi
X+
X+fi
X+if test -z "$ac_cv_prog_STRIP"; then
X+  ac_ct_STRIP=$STRIP
X+  # Extract the first word of "strip", so it can be a program name with args.
X+set dummy strip; ac_word=$2
X+echo "$as_me:$LINENO: checking for $ac_word" >&5
X+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
X+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
X+  echo $ECHO_N "(cached) $ECHO_C" >&6
X+else
X+  if test -n "$ac_ct_STRIP"; then
X+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
X+else
X+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
X+for as_dir in $PATH
X+do
X+  IFS=$as_save_IFS
X+  test -z "$as_dir" && as_dir=.
X+  for ac_exec_ext in '' $ac_executable_extensions; do
X+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
X+    ac_cv_prog_ac_ct_STRIP="strip"
X+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
X+    break 2
X+  fi
X+done
X+done
X+
X+  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
X+fi
X+fi
X+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
X+if test -n "$ac_ct_STRIP"; then
X+  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
X+echo "${ECHO_T}$ac_ct_STRIP" >&6
X+else
X+  echo "$as_me:$LINENO: result: no" >&5
X+echo "${ECHO_T}no" >&6
X+fi
X+
X+  STRIP=$ac_ct_STRIP
X+else
X+  STRIP="$ac_cv_prog_STRIP"
X+fi
X+
X+fi
X+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
X+
X+# We need awk for the "check" target.  The system "awk" is bad on
X+# some platforms.
X+# Always define AMTAR for backward compatibility.
X+
X+AMTAR=${AMTAR-"${am_missing_run}tar"}
X+
X+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
X+
X+
X+
X+
X+
X+
X+# FIXME: We temporarily define our own version of AC_PROG_CC.  This is
X+# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
X+# are probably using a cross compiler, which will not be able to fully
X+# link an executable.  This should really be fixed in autoconf
X+# itself.
X+
X+
X+
X+
X+
X+
X+
X+# Extract the first word of "gcc", so it can be a program name with args.
X+set dummy gcc; ac_word=$2
X+echo "$as_me:$LINENO: checking for $ac_word" >&5
X+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
X+if test "${ac_cv_prog_CC+set}" = set; then
X+  echo $ECHO_N "(cached) $ECHO_C" >&6
X+else
X+  if test -n "$CC"; then
X+  ac_cv_prog_CC="$CC" # Let the user override the test.
X+else
X+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
X+for as_dir in $PATH
X+do
X+  IFS=$as_save_IFS
X+  test -z "$as_dir" && as_dir=.
X+  for ac_exec_ext in '' $ac_executable_extensions; do
X+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
X+    ac_cv_prog_CC="gcc"
X+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
X+    break 2
X+  fi
X+done
X+done
X+
X+fi
X+fi
X+CC=$ac_cv_prog_CC
X+if test -n "$CC"; then
X+  echo "$as_me:$LINENO: result: $CC" >&5
X+echo "${ECHO_T}$CC" >&6
X+else
X+  echo "$as_me:$LINENO: result: no" >&5
X+echo "${ECHO_T}no" >&6
X+fi
X+
X+
X+depcc="$CC"   am_compiler_list=
X+
X+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
X+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
X+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
X+  echo $ECHO_N "(cached) $ECHO_C" >&6
X+else
X+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
X+  # We make a subdir and do the tests there.  Otherwise we can end up
X+  # making bogus files that we don't know about and never remove.  For
X+  # instance it was reported that on HP-UX the gcc test will end up
X+  # making a dummy file named `D' -- because `-MD' means `put the output
X+  # in D'.
X+  mkdir conftest.dir
X+  # Copy depcomp to subdir because otherwise we won't find it if we're
X+  # using a relative directory.
X+  cp "$am_depcomp" conftest.dir
X+  cd conftest.dir
X+  # We will build objects and dependencies in a subdirectory because
X+  # it helps to detect inapplicable dependency modes.  For instance
X+  # both Tru64's cc and ICC support -MD to output dependencies as a
X+  # side effect of compilation, but ICC will put the dependencies in
X+  # the current directory while Tru64 will put them in the object
X+  # directory.
X+  mkdir sub
X+
X+  am_cv_CC_dependencies_compiler_type=none
X+  if test "$am_compiler_list" = ""; then
X+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
X+  fi
X+  for depmode in $am_compiler_list; do
X+    # Setup a source with many dependencies, because some compilers
X+    # like to wrap large dependency lists on column 80 (with \), and
X+    # we should not choose a depcomp mode which is confused by this.
X+    #
X+    # We need to recreate these files for each test, as the compiler may
X+    # overwrite some of them when testing with obscure command lines.
X+    # This happens at least with the AIX C compiler.
X+    : > sub/conftest.c
X+    for i in 1 2 3 4 5 6; do
X+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
X+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
X+      # Solaris 8's {/usr,}/bin/sh.
X+      touch sub/conftst$i.h
X+    done
X+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
X+
X+    case $depmode in
X+    nosideeffect)
X+      # after this tag, mechanisms are not by side-effect, so they'll
X+      # only be used when explicitly requested
X+      if test "x$enable_dependency_tracking" = xyes; then
X+	continue
X+      else
X+	break
X+      fi
X+      ;;
X+    none) break ;;
X+    esac
X+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
X+    # mode.  It turns out that the SunPro C++ compiler does not properly
X+    # handle `-M -o', and we need to detect this.
X+    if depmode=$depmode \
X+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
X+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
X+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
X+         >/dev/null 2>conftest.err &&
X+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
X+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
X+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
X+      # icc doesn't choke on unknown options, it will just issue warnings
X+      # or remarks (even with -Werror).  So we grep stderr for any message
X+      # that says an option was ignored or not supported.
X+      # When given -MP, icc 7.0 and 7.1 complain thusly:
X+      #   icc: Command line warning: ignoring option '-M'; no argument required
X+      # The diagnosis changed in icc 8.0:
X+      #   icc: Command line remark: option '-MP' not supported
X+      if (grep 'ignoring option' conftest.err ||
X+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
X+        am_cv_CC_dependencies_compiler_type=$depmode
X+        break
X+      fi
X+    fi
X+  done
X+
X+  cd ..
X+  rm -rf conftest.dir
X+else
X+  am_cv_CC_dependencies_compiler_type=none
X+fi
X+
X+fi
X+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
X+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
X+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
X+
X+
X+
X+if
X+  test "x$enable_dependency_tracking" != xno \
X+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
X+  am__fastdepCC_TRUE=
X+  am__fastdepCC_FALSE='#'
X+else
X+  am__fastdepCC_TRUE='#'
X+  am__fastdepCC_FALSE=
X+fi
X+
X+
X+if test -z "$CC"; then
X+  # Extract the first word of "cc", so it can be a program name with args.
X+set dummy cc; ac_word=$2
X+echo "$as_me:$LINENO: checking for $ac_word" >&5
X+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
X+if test "${ac_cv_prog_CC+set}" = set; then
X+  echo $ECHO_N "(cached) $ECHO_C" >&6
X+else
X+  if test -n "$CC"; then
X+  ac_cv_prog_CC="$CC" # Let the user override the test.
X+else
X+  ac_prog_rejected=no
X+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
X+for as_dir in $PATH
X+do
X+  IFS=$as_save_IFS
X+  test -z "$as_dir" && as_dir=.
X+  for ac_exec_ext in '' $ac_executable_extensions; do
X+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
X+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
X+       ac_prog_rejected=yes
X+       continue
X+     fi
X+    ac_cv_prog_CC="cc"
X+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
X+    break 2
X+  fi
X+done
X+done
X+
X+if test $ac_prog_rejected = yes; then
X+  # We found a bogon in the path, so make sure we never use it.
X+  set dummy $ac_cv_prog_CC
X+  shift
X+  if test $# != 0; then
X+    # We chose a different compiler from the bogus one.
X+    # However, it has the same basename, so the bogon will be chosen
X+    # first if we set CC to just the basename; use the full file name.
X+    shift
X+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
X+  fi
X+fi
X+fi
X+fi
X+CC=$ac_cv_prog_CC
X+if test -n "$CC"; then
X+  echo "$as_me:$LINENO: result: $CC" >&5
X+echo "${ECHO_T}$CC" >&6
X+else
X+  echo "$as_me:$LINENO: result: no" >&5
X+echo "${ECHO_T}no" >&6
X+fi
X+
X+  test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5
X+echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
X+   { (exit 1); exit 1; }; }
X+fi
X+
X+echo "$as_me:$LINENO: checking whether we are using GNU C" >&5
X+echo $ECHO_N "checking whether we are using GNU C... $ECHO_C" >&6
X+if test "${ac_cv_c_compiler_gnu+set}" = set; then
X+  echo $ECHO_N "(cached) $ECHO_C" >&6
X+else
X+  cat > conftest.c <<EOF
X+#ifdef __GNUC__
X+  yes;
X+#endif
X+EOF
X+if { ac_try='${CC-cc} -E conftest.c'
X+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
X+  (eval $ac_try) 2>&5
X+  ac_status=$?
X+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
X+  (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then
X+  ac_cv_c_compiler_gnu=yes
X+else
X+  ac_cv_c_compiler_gnu=no
X+fi
X+fi
X+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
X+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
X+
X+if test $ac_cv_c_compiler_gnu = yes; then
X+  GCC=yes
X+  ac_test_CFLAGS="${CFLAGS+set}"
X+  ac_save_CFLAGS="$CFLAGS"
X+  CFLAGS=
X+  ac_test_CFLAGS=${CFLAGS+set}
X+ac_save_CFLAGS=$CFLAGS
X+CFLAGS="-g"
X+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
X+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
X+if test "${ac_cv_prog_cc_g+set}" = set; then
X+  echo $ECHO_N "(cached) $ECHO_C" >&6
X+else
X+  cat >conftest.$ac_ext <<_ACEOF
X+/* confdefs.h.  */
X+_ACEOF
X+cat confdefs.h >>conftest.$ac_ext
X+cat >>conftest.$ac_ext <<_ACEOF
X+/* end confdefs.h.  */
X+
X+int
X+main ()
X+{
X+
X+  ;
X+  return 0;
X+}
X+_ACEOF
X+rm -f conftest.$ac_objext
X+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
X+  (eval $ac_compile) 2>conftest.er1
X+  ac_status=$?
X+  grep -v '^ *+' conftest.er1 >conftest.err
X+  rm -f conftest.er1
X+  cat conftest.err >&5
X+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
X+  (exit $ac_status); } &&
X+	 { ac_try='test -z "$ac_c_werror_flag"
X+			 || test ! -s conftest.err'
X+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
X+  (eval $ac_try) 2>&5
X+  ac_status=$?
X+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
X+  (exit $ac_status); }; } &&
X+	 { ac_try='test -s conftest.$ac_objext'
X+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
X+  (eval $ac_try) 2>&5
X+  ac_status=$?
X+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
X+  (exit $ac_status); }; }; then
X+  ac_cv_prog_cc_g=yes
X+else
X+  echo "$as_me: failed program was:" >&5
X+sed 's/^/| /' conftest.$ac_ext >&5
X+
X+ac_cv_prog_cc_g=no
X+fi
X+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
X+fi
X+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
X+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
X+if test "$ac_test_CFLAGS" = set; then
X+  CFLAGS=$ac_save_CFLAGS
X+elif test $ac_cv_prog_cc_g = yes; then
X+  if test "$GCC" = yes; then
X+    CFLAGS="-g -O2"
X+  else
X+    CFLAGS="-g"
X+  fi
X+else
X+  if test "$GCC" = yes; then
X+    CFLAGS="-O2"
X+  else
X+    CFLAGS=
X+  fi
X+fi
X+  if test "$ac_test_CFLAGS" = set; then
X+    CFLAGS="$ac_save_CFLAGS"
X+  elif test $ac_cv_prog_cc_g = yes; then
X+    CFLAGS="-g -O2"
X+  else
X+    CFLAGS="-O2"
X+  fi
X+else
X+  GCC=
X+  test "${CFLAGS+set}" = set || CFLAGS="-g"
X+fi
X+
X+
X+if test -n "$ac_tool_prefix"; then
X+  # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
X+set dummy ${ac_tool_prefix}as; ac_word=$2
X+echo "$as_me:$LINENO: checking for $ac_word" >&5
X+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
X+if test "${ac_cv_prog_AS+set}" = set; then
X+  echo $ECHO_N "(cached) $ECHO_C" >&6
X+else
X+  if test -n "$AS"; then
X+  ac_cv_prog_AS="$AS" # Let the user override the test.
X+else
X+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
X+for as_dir in $PATH
X+do
X+  IFS=$as_save_IFS
X+  test -z "$as_dir" && as_dir=.
X+  for ac_exec_ext in '' $ac_executable_extensions; do
X+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
X+    ac_cv_prog_AS="${ac_tool_prefix}as"
X+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
X+    break 2
X+  fi
X+done
X+done
X+
X+fi
X+fi
X+AS=$ac_cv_prog_AS
X+if test -n "$AS"; then
X+  echo "$as_me:$LINENO: result: $AS" >&5
X+echo "${ECHO_T}$AS" >&6
X+else
X+  echo "$as_me:$LINENO: result: no" >&5
X+echo "${ECHO_T}no" >&6
X+fi
X+
X+fi
X+if test -z "$ac_cv_prog_AS"; then
X+  ac_ct_AS=$AS
X+  # Extract the first word of "as", so it can be a program name with args.
X+set dummy as; ac_word=$2
X+echo "$as_me:$LINENO: checking for $ac_word" >&5
X+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
X+if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
X+  echo $ECHO_N "(cached) $ECHO_C" >&6
X+else
X+  if test -n "$ac_ct_AS"; then
X+  ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
X+else
X+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
X+for as_dir in $PATH
X+do
X+  IFS=$as_save_IFS
X+  test -z "$as_dir" && as_dir=.
X+  for ac_exec_ext in '' $ac_executable_extensions; do
X+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
X+    ac_cv_prog_ac_ct_AS="as"
X+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
X+    break 2
X+  fi
X+done
X+done
X+
X+fi
X+fi
X+ac_ct_AS=$ac_cv_prog_ac_ct_AS
X+if test -n "$ac_ct_AS"; then
X+  echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
X+echo "${ECHO_T}$ac_ct_AS" >&6
X+else
X+  echo "$as_me:$LINENO: result: no" >&5
X+echo "${ECHO_T}no" >&6
X+fi
X+
X+  AS=$ac_ct_AS
X+else
X+  AS="$ac_cv_prog_AS"
X+fi
X+
X+if test -n "$ac_tool_prefix"; then
X+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
X+set dummy ${ac_tool_prefix}ar; ac_word=$2
X+echo "$as_me:$LINENO: checking for $ac_word" >&5
X+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
X+if test "${ac_cv_prog_AR+set}" = set; then
X+  echo $ECHO_N "(cached) $ECHO_C" >&6
X+else
X+  if test -n "$AR"; then
X+  ac_cv_prog_AR="$AR" # Let the user override the test.
X+else
X+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
X+for as_dir in $PATH
X+do
X+  IFS=$as_save_IFS
X+  test -z "$as_dir" && as_dir=.
X+  for ac_exec_ext in '' $ac_executable_extensions; do
X+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
X+    ac_cv_prog_AR="${ac_tool_prefix}ar"
X+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
X+    break 2
X+  fi
X+done
X+done
X+
X+fi
X+fi
X+AR=$ac_cv_prog_AR
X+if test -n "$AR"; then
X+  echo "$as_me:$LINENO: result: $AR" >&5
X+echo "${ECHO_T}$AR" >&6
X+else
X+  echo "$as_me:$LINENO: result: no" >&5
X+echo "${ECHO_T}no" >&6
X+fi
X+
X+fi
X+if test -z "$ac_cv_prog_AR"; then
X+  ac_ct_AR=$AR
X+  # Extract the first word of "ar", so it can be a program name with args.
X+set dummy ar; ac_word=$2
X+echo "$as_me:$LINENO: checking for $ac_word" >&5
X+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
X+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
X+  echo $ECHO_N "(cached) $ECHO_C" >&6
X+else
X+  if test -n "$ac_ct_AR"; then
X+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
X+else
X+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
X+for as_dir in $PATH
X+do
X+  IFS=$as_save_IFS
X+  test -z "$as_dir" && as_dir=.
X+  for ac_exec_ext in '' $ac_executable_extensions; do
X+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
X+    ac_cv_prog_ac_ct_AR="ar"
X+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
X+    break 2
X+  fi
X+done
X+done
X+
X+fi
X+fi
X+ac_ct_AR=$ac_cv_prog_ac_ct_AR
X+if test -n "$ac_ct_AR"; then
X+  echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
X+echo "${ECHO_T}$ac_ct_AR" >&6
X+else
X+  echo "$as_me:$LINENO: result: no" >&5
X+echo "${ECHO_T}no" >&6
X+fi
X+
X+  AR=$ac_ct_AR
X+else
X+  AR="$ac_cv_prog_AR"
X+fi
X+
X+if test -n "$ac_tool_prefix"; then
X+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
X+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
X+echo "$as_me:$LINENO: checking for $ac_word" >&5
X+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
X+if test "${ac_cv_prog_RANLIB+set}" = set; then
X+  echo $ECHO_N "(cached) $ECHO_C" >&6
X+else
X+  if test -n "$RANLIB"; then
X+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
X+else
X+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
X+for as_dir in $PATH
X+do
X+  IFS=$as_save_IFS
X+  test -z "$as_dir" && as_dir=.
X+  for ac_exec_ext in '' $ac_executable_extensions; do
X+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
X+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
X+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
X+    break 2
X+  fi
X+done
X+done
X+
X+fi
X+fi
X+RANLIB=$ac_cv_prog_RANLIB
X+if test -n "$RANLIB"; then
X+  echo "$as_me:$LINENO: result: $RANLIB" >&5
X+echo "${ECHO_T}$RANLIB" >&6
X+else
X+  echo "$as_me:$LINENO: result: no" >&5
X+echo "${ECHO_T}no" >&6
X+fi
X+
X+fi
X+if test -z "$ac_cv_prog_RANLIB"; then
X+  ac_ct_RANLIB=$RANLIB
X+  # Extract the first word of "ranlib", so it can be a program name with args.
X+set dummy ranlib; ac_word=$2
X+echo "$as_me:$LINENO: checking for $ac_word" >&5
X+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
X+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
X+  echo $ECHO_N "(cached) $ECHO_C" >&6
X+else
X+  if test -n "$ac_ct_RANLIB"; then
X+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
X+else
X+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
X+for as_dir in $PATH
X+do
X+  IFS=$as_save_IFS
X+  test -z "$as_dir" && as_dir=.
X+  for ac_exec_ext in '' $ac_executable_extensions; do
X+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
X+    ac_cv_prog_ac_ct_RANLIB="ranlib"
X+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
X+    break 2
X+  fi
X+done
X+done
X+
X+  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
X+fi
X+fi
X+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
X+if test -n "$ac_ct_RANLIB"; then
X+  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
X+echo "${ECHO_T}$ac_ct_RANLIB" >&6
X+else
X+  echo "$as_me:$LINENO: result: no" >&5
X+echo "${ECHO_T}no" >&6
X+fi
X+
X+  RANLIB=$ac_ct_RANLIB
X+else
X+  RANLIB="$ac_cv_prog_RANLIB"
X+fi
X+
X+if test -n "$ac_tool_prefix"; then
X+  # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args.
X+set dummy ${ac_tool_prefix}readelf; ac_word=$2
X+echo "$as_me:$LINENO: checking for $ac_word" >&5
X+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
X+if test "${ac_cv_prog_READELF+set}" = set; then
X+  echo $ECHO_N "(cached) $ECHO_C" >&6
X+else
X+  if test -n "$READELF"; then
X+  ac_cv_prog_READELF="$READELF" # Let the user override the test.
X+else
X+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
X+for as_dir in $PATH
X+do
X+  IFS=$as_save_IFS
X+  test -z "$as_dir" && as_dir=.
X+  for ac_exec_ext in '' $ac_executable_extensions; do
X+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
X+    ac_cv_prog_READELF="${ac_tool_prefix}readelf"
X+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
X+    break 2
X+  fi
X+done
X+done
X+
X+fi
X+fi
X+READELF=$ac_cv_prog_READELF
X+if test -n "$READELF"; then
X+  echo "$as_me:$LINENO: result: $READELF" >&5
X+echo "${ECHO_T}$READELF" >&6
X+else
X+  echo "$as_me:$LINENO: result: no" >&5
X+echo "${ECHO_T}no" >&6
X+fi
X+
X+fi
X+if test -z "$ac_cv_prog_READELF"; then
X+  ac_ct_READELF=$READELF
X+  # Extract the first word of "readelf", so it can be a program name with args.
X+set dummy readelf; ac_word=$2
X+echo "$as_me:$LINENO: checking for $ac_word" >&5
X+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
X+if test "${ac_cv_prog_ac_ct_READELF+set}" = set; then
X+  echo $ECHO_N "(cached) $ECHO_C" >&6
X+else
X+  if test -n "$ac_ct_READELF"; then
X+  ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
X+else
X+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
X+for as_dir in $PATH
X+do
X+  IFS=$as_save_IFS
X+  test -z "$as_dir" && as_dir=.
X+  for ac_exec_ext in '' $ac_executable_extensions; do
X+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
X+    ac_cv_prog_ac_ct_READELF="readelf"
X+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
X+    break 2
X+  fi
X+done
X+done
X+
X+  test -z "$ac_cv_prog_ac_ct_READELF" && ac_cv_prog_ac_ct_READELF=":"
X+fi
X+fi
X+ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
X+if test -n "$ac_ct_READELF"; then
X+  echo "$as_me:$LINENO: result: $ac_ct_READELF" >&5
X+echo "${ECHO_T}$ac_ct_READELF" >&6
X+else
X+  echo "$as_me:$LINENO: result: no" >&5
X+echo "${ECHO_T}no" >&6
X+fi
X+
X+  READELF=$ac_ct_READELF
X+else
X+  READELF="$ac_cv_prog_READELF"
X+fi
X+
X+
X+# Find a good install program.  We prefer a C program (faster),
X+# so one script is as good as another.  But avoid the broken or
X+# incompatible versions:
X+# SysV /etc/install, /usr/sbin/install
X+# SunOS /usr/etc/install
X+# IRIX /sbin/install
X+# AIX /bin/install
X+# AmigaOS /C/install, which installs bootblocks on floppy discs
X+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
X+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
X+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
X+# OS/2's system install, which has a completely different semantic
X+# ./install, which can be erroneously created by make from ./install.sh.
X+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
X+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
X+if test -z "$INSTALL"; then
X+if test "${ac_cv_path_install+set}" = set; then
X+  echo $ECHO_N "(cached) $ECHO_C" >&6
X+else
X+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
X+for as_dir in $PATH
X+do
X+  IFS=$as_save_IFS
X+  test -z "$as_dir" && as_dir=.
X+  # Account for people who put trailing slashes in PATH elements.
X+case $as_dir/ in
X+  ./ | .// | /cC/* | \
X+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
X+  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
X+  /usr/ucb/* ) ;;
X+  *)
X+    # OSF1 and SCO ODT 3.0 have their own names for install.
X+    # Don't use installbsd from OSF since it installs stuff as root
X+    # by default.
X+    for ac_prog in ginstall scoinst install; do
X+      for ac_exec_ext in '' $ac_executable_extensions; do
X+	if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
X+	  if test $ac_prog = install &&
X+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
X+	    # AIX install.  It has an incompatible calling convention.
X+	    :
X+	  elif test $ac_prog = install &&
X+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
X+	    # program-specific install script used by HP pwplus--don't use.
X+	    :
X+	  else
X+	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
X+	    break 3
X+	  fi
X+	fi
X+      done
X+    done
X+    ;;
X+esac
X+done
X+
X+
X+fi
X+  if test "${ac_cv_path_install+set}" = set; then
X+    INSTALL=$ac_cv_path_install
X+  else
X+    # As a last resort, use the slow shell script.  We don't cache a
X+    # path for INSTALL within a source directory, because that will
X+    # break other packages using the cache if that directory is
X+    # removed, or if the path is relative.
X+    INSTALL=$ac_install_sh
X+  fi
X+fi
X+echo "$as_me:$LINENO: result: $INSTALL" >&5
X+echo "${ECHO_T}$INSTALL" >&6
X+
X+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
X+# It thinks the first close brace ends the variable substitution.
X+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
X+
X+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
X+
X+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
X+
X+
X+# Hack to ensure that INSTALL won't be set to "../" with autoconf 2.13.  */
X+ac_given_INSTALL=$INSTALL
X+
X+echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
X+echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
X+    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
X+if test "${enable_maintainer_mode+set}" = set; then
X+  enableval="$enable_maintainer_mode"
X+  USE_MAINTAINER_MODE=$enableval
X+else
X+  USE_MAINTAINER_MODE=no
X+fi;
X+  echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
X+echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
X+
X+
X+if test $USE_MAINTAINER_MODE = yes; then
X+  MAINTAINER_MODE_TRUE=
X+  MAINTAINER_MODE_FALSE='#'
X+else
X+  MAINTAINER_MODE_TRUE='#'
X+  MAINTAINER_MODE_FALSE=
X+fi
X+
X+  MAINT=$MAINTAINER_MODE_TRUE
X+
X+
X+# By default we simply use the C compiler to build assembly code.
X+
X+test "${CCAS+set}" = set || CCAS=$CC
X+test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
X+
X+
X+
X+
X+# We need AC_EXEEXT to keep automake happy in cygnus mode.  However,
X+# at least currently, we never actually build a program, so we never
X+# need to use $(EXEEXT).  Moreover, the test for EXEEXT normally
X+# fails, because we are probably configuring with a cross compiler
X+# which can't create executables.  So we include AC_EXEEXT to keep
X+# automake happy, but we don't execute it, since we don't care about
X+# the result.
X+if false; then
X+
X+  dummy_var=1
X+fi
X+
X+. ${newlib_basedir}/configure.host
X+
X+newlib_cflags="${newlib_cflags} -fno-builtin"
X+
X+NEWLIB_CFLAGS=${newlib_cflags}
X+
X+
X+LDFLAGS=${ldflags}
X+
X+
X+
X+
X+if test x${newlib_elix_level} = x0; then
X+  ELIX_LEVEL_0_TRUE=
X+  ELIX_LEVEL_0_FALSE='#'
X+else
X+  ELIX_LEVEL_0_TRUE='#'
X+  ELIX_LEVEL_0_FALSE=
X+fi
X+
X+
X+
X+if test x${newlib_elix_level} = x1; then
X+  ELIX_LEVEL_1_TRUE=
X+  ELIX_LEVEL_1_FALSE='#'
X+else
X+  ELIX_LEVEL_1_TRUE='#'
X+  ELIX_LEVEL_1_FALSE=
X+fi
X+
X+
X+
X+if test x${newlib_elix_level} = x2; then
X+  ELIX_LEVEL_2_TRUE=
X+  ELIX_LEVEL_2_FALSE='#'
X+else
X+  ELIX_LEVEL_2_TRUE='#'
X+  ELIX_LEVEL_2_FALSE=
X+fi
X+
X+
X+
X+if test x${newlib_elix_level} = x3; then
X+  ELIX_LEVEL_3_TRUE=
X+  ELIX_LEVEL_3_FALSE='#'
X+else
X+  ELIX_LEVEL_3_TRUE='#'
X+  ELIX_LEVEL_3_FALSE=
X+fi
X+
X+
X+
X+if test x${newlib_elix_level} = x4; then
X+  ELIX_LEVEL_4_TRUE=
X+  ELIX_LEVEL_4_FALSE='#'
X+else
X+  ELIX_LEVEL_4_TRUE='#'
X+  ELIX_LEVEL_4_FALSE=
X+fi
X+
X+
X+
X+
X+if test x${use_libtool} = xyes; then
X+  USE_LIBTOOL_TRUE=
X+  USE_LIBTOOL_FALSE='#'
X+else
X+  USE_LIBTOOL_TRUE='#'
X+  USE_LIBTOOL_FALSE=
X+fi
X+
X+
X+# Hard-code OBJEXT.  Normally it is set by AC_OBJEXT, but we
X+# use oext, which is set in configure.host based on the target platform.
X+OBJEXT=${oext}
X+
X+
X+
X+
X+
X+
X+
X+
X+
X+
X+
X+          ac_config_files="$ac_config_files Makefile"
X+
X+cat >confcache <<\_ACEOF
X+# This file is a shell script that caches the results of configure
X+# tests run on this system so they can be shared between configure
X+# scripts and configure runs, see configure's option --config-cache.
X+# It is not useful on other systems.  If it contains results you don't
X+# want to keep, you may remove or edit it.
X+#
X+# config.status only pays attention to the cache file if you give it
X+# the --recheck option to rerun configure.
X+#
X+# `ac_cv_env_foo' variables (set or unset) will be overridden when
X+# loading this file, other *unset* `ac_cv_foo' will be assigned the
X+# following values.
X+
X+_ACEOF
X+
X+# The following way of writing the cache mishandles newlines in values,
X+# but we know of no workaround that is simple, portable, and efficient.
X+# So, don't put newlines in cache variables' values.
X+# Ultrix sh set writes to stderr and can't be redirected directly,
X+# and sets the high bit in the cache file unless we assign to the vars.
X+{
X+  (set) 2>&1 |
X+    case `(ac_space=' '; set | grep ac_space) 2>&1` in
X+    *ac_space=\ *)
X+      # `set' does not quote correctly, so add quotes (double-quote
X+      # substitution turns \\\\ into \\, and sed turns \\ into \).
X+      sed -n \
X+	"s/'/'\\\\''/g;
X+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
X+      ;;
X+    *)
X+      # `set' quotes correctly as required by POSIX, so do not add quotes.
X+      sed -n \
X+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
X+      ;;
X+    esac;
X+} |
X+  sed '
X+     t clear
X+     : clear
X+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
X+     t end
X+     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
X+     : end' >>confcache
X+if diff $cache_file confcache >/dev/null 2>&1; then :; else
X+  if test -w $cache_file; then
X+    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
X+    cat confcache >$cache_file
X+  else
X+    echo "not updating unwritable cache $cache_file"
X+  fi
X+fi
X+rm -f confcache
X+
X+test "x$prefix" = xNONE && prefix=$ac_default_prefix
X+# Let make expand exec_prefix.
X+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
X+
X+# VPATH may cause trouble with some makes, so we remove $(srcdir),
X+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
X+# trailing colons and then remove the whole line if VPATH becomes empty
X+# (actually we leave an empty line to preserve line numbers).
X+if test "x$srcdir" = x.; then
X+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
X+s/:*\$(srcdir):*/:/;
X+s/:*\${srcdir}:*/:/;
X+s/:*@srcdir@:*/:/;
X+s/^\([^=]*=[	 ]*\):*/\1/;
X+s/:*$//;
X+s/^[^=]*=[	 ]*$//;
X+}'
X+fi
X+
X+# Transform confdefs.h into DEFS.
X+# Protect against shell expansion while executing Makefile rules.
X+# Protect against Makefile macro expansion.
X+#
X+# If the first sed substitution is executed (which looks for macros that
X+# take arguments), then we branch to the quote section.  Otherwise,
X+# look for a macro that doesn't take arguments.
X+cat >confdef2opt.sed <<\_ACEOF
X+t clear
X+: clear
X+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\),-D\1=\2,g
X+t quote
X+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\),-D\1=\2,g
X+t quote
X+d
X+: quote
X+s,[	 `~#$^&*(){}\\|;'"<>?],\\&,g
X+s,\[,\\&,g
X+s,\],\\&,g
X+s,\$,$$,g
X+p
X+_ACEOF
X+# We use echo to avoid assuming a particular line-breaking character.
X+# The extra dot is to prevent the shell from consuming trailing
X+# line-breaks from the sub-command output.  A line-break within
X+# single-quotes doesn't work because, if this script is created in a
X+# platform that uses two characters for line-breaks (e.g., DOS), tr
X+# would break.
X+ac_LF_and_DOT=`echo; echo .`
X+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
X+rm -f confdef2opt.sed
X+
X+
X+ac_libobjs=
X+ac_ltlibobjs=
X+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
X+  # 1. Remove the extension, and $U if already installed.
X+  ac_i=`echo "$ac_i" |
X+	 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
X+  # 2. Add them.
X+  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
X+  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
X+done
X+LIBOBJS=$ac_libobjs
X+
X+LTLIBOBJS=$ac_ltlibobjs
X+
X+
X+if test -z "${MAY_SUPPLY_SYSCALLS_TRUE}" && test -z "${MAY_SUPPLY_SYSCALLS_FALSE}"; then
X+  { { echo "$as_me:$LINENO: error: conditional \"MAY_SUPPLY_SYSCALLS\" was never defined.
X+Usually this means the macro was only invoked conditionally." >&5
X+echo "$as_me: error: conditional \"MAY_SUPPLY_SYSCALLS\" was never defined.
X+Usually this means the macro was only invoked conditionally." >&2;}
X+   { (exit 1); exit 1; }; }
X+fi
X+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
X+  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
X+Usually this means the macro was only invoked conditionally." >&5
X+echo "$as_me: error: conditional \"AMDEP\" was never defined.
X+Usually this means the macro was only invoked conditionally." >&2;}
X+   { (exit 1); exit 1; }; }
X+fi
X+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
X+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
X+Usually this means the macro was only invoked conditionally." >&5
X+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
X+Usually this means the macro was only invoked conditionally." >&2;}
X+   { (exit 1); exit 1; }; }
X+fi
X+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
X+  { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
X+Usually this means the macro was only invoked conditionally." >&5
X+echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
X+Usually this means the macro was only invoked conditionally." >&2;}
X+   { (exit 1); exit 1; }; }
X+fi
X+if test -z "${ELIX_LEVEL_0_TRUE}" && test -z "${ELIX_LEVEL_0_FALSE}"; then
X+  { { echo "$as_me:$LINENO: error: conditional \"ELIX_LEVEL_0\" was never defined.
X+Usually this means the macro was only invoked conditionally." >&5
X+echo "$as_me: error: conditional \"ELIX_LEVEL_0\" was never defined.
X+Usually this means the macro was only invoked conditionally." >&2;}
X+   { (exit 1); exit 1; }; }
X+fi
X+if test -z "${ELIX_LEVEL_1_TRUE}" && test -z "${ELIX_LEVEL_1_FALSE}"; then
X+  { { echo "$as_me:$LINENO: error: conditional \"ELIX_LEVEL_1\" was never defined.
X+Usually this means the macro was only invoked conditionally." >&5
X+echo "$as_me: error: conditional \"ELIX_LEVEL_1\" was never defined.
X+Usually this means the macro was only invoked conditionally." >&2;}
X+   { (exit 1); exit 1; }; }
X+fi
X+if test -z "${ELIX_LEVEL_2_TRUE}" && test -z "${ELIX_LEVEL_2_FALSE}"; then
X+  { { echo "$as_me:$LINENO: error: conditional \"ELIX_LEVEL_2\" was never defined.
X+Usually this means the macro was only invoked conditionally." >&5
X+echo "$as_me: error: conditional \"ELIX_LEVEL_2\" was never defined.
X+Usually this means the macro was only invoked conditionally." >&2;}
X+   { (exit 1); exit 1; }; }
X+fi
X+if test -z "${ELIX_LEVEL_3_TRUE}" && test -z "${ELIX_LEVEL_3_FALSE}"; then
X+  { { echo "$as_me:$LINENO: error: conditional \"ELIX_LEVEL_3\" was never defined.
X+Usually this means the macro was only invoked conditionally." >&5
X+echo "$as_me: error: conditional \"ELIX_LEVEL_3\" was never defined.
X+Usually this means the macro was only invoked conditionally." >&2;}
X+   { (exit 1); exit 1; }; }
X+fi
X+if test -z "${ELIX_LEVEL_4_TRUE}" && test -z "${ELIX_LEVEL_4_FALSE}"; then
X+  { { echo "$as_me:$LINENO: error: conditional \"ELIX_LEVEL_4\" was never defined.
X+Usually this means the macro was only invoked conditionally." >&5
X+echo "$as_me: error: conditional \"ELIX_LEVEL_4\" was never defined.
X+Usually this means the macro was only invoked conditionally." >&2;}
X+   { (exit 1); exit 1; }; }
X+fi
X+if test -z "${USE_LIBTOOL_TRUE}" && test -z "${USE_LIBTOOL_FALSE}"; then
X+  { { echo "$as_me:$LINENO: error: conditional \"USE_LIBTOOL\" was never defined.
X+Usually this means the macro was only invoked conditionally." >&5
X+echo "$as_me: error: conditional \"USE_LIBTOOL\" was never defined.
X+Usually this means the macro was only invoked conditionally." >&2;}
X+   { (exit 1); exit 1; }; }
X+fi
X+
X+: ${CONFIG_STATUS=./config.status}
X+ac_clean_files_save=$ac_clean_files
X+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
X+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
X+echo "$as_me: creating $CONFIG_STATUS" >&6;}
X+cat >$CONFIG_STATUS <<_ACEOF
X+#! $SHELL
X+# Generated by $as_me.
X+# Run this file to recreate the current configuration.
X+# Compiler output produced by configure, useful for debugging
X+# configure, is in config.log if it exists.
X+
X+debug=false
X+ac_cs_recheck=false
X+ac_cs_silent=false
X+SHELL=\${CONFIG_SHELL-$SHELL}
X+_ACEOF
X+
X+cat >>$CONFIG_STATUS <<\_ACEOF
X+## --------------------- ##
X+## M4sh Initialization.  ##
X+## --------------------- ##
X+
X+# Be Bourne compatible
X+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
X+  emulate sh
X+  NULLCMD=:
X+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
X+  # is contrary to our usage.  Disable this feature.
X+  alias -g '${1+"$@"}'='"$@"'
X+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
X+  set -o posix
X+fi
X+DUALCASE=1; export DUALCASE # for MKS sh
X+
X+# Support unset when possible.
X+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
X+  as_unset=unset
X+else
X+  as_unset=false
X+fi
X+
X+
X+# Work around bugs in pre-3.0 UWIN ksh.
X+$as_unset ENV MAIL MAILPATH
X+PS1='$ '
X+PS2='> '
X+PS4='+ '
X+
X+# NLS nuisances.
X+for as_var in \
X+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
X+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
X+  LC_TELEPHONE LC_TIME
X+do
X+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
X+    eval $as_var=C; export $as_var
X+  else
X+    $as_unset $as_var
X+  fi
X+done
X+
X+# Required to use basename.
X+if expr a : '\(a\)' >/dev/null 2>&1; then
X+  as_expr=expr
X+else
X+  as_expr=false
X+fi
X+
X+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
X+  as_basename=basename
X+else
X+  as_basename=false
X+fi
X+
X+
X+# Name of the executable.
X+as_me=`$as_basename "$0" ||
X+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X+	 X"$0" : 'X\(//\)$' \| \
X+	 X"$0" : 'X\(/\)$' \| \
X+	 .     : '\(.\)' 2>/dev/null ||
X+echo X/"$0" |
X+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
X+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
X+  	  /^X\/\(\/\).*/{ s//\1/; q; }
X+  	  s/.*/./; q'`
X+
X+
X+# PATH needs CR, and LINENO needs CR and PATH.
X+# Avoid depending upon Character Ranges.
X+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
X+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
X+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
X+as_cr_digits='0123456789'
X+as_cr_alnum=$as_cr_Letters$as_cr_digits
X+
X+# The user is always right.
X+if test "${PATH_SEPARATOR+set}" != set; then
X+  echo "#! /bin/sh" >conf$$.sh
X+  echo  "exit 0"   >>conf$$.sh
X+  chmod +x conf$$.sh
X+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
X+    PATH_SEPARATOR=';'
X+  else
X+    PATH_SEPARATOR=:
X+  fi
X+  rm -f conf$$.sh
X+fi
X+
X+
X+  as_lineno_1=$LINENO
X+  as_lineno_2=$LINENO
X+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
X+  test "x$as_lineno_1" != "x$as_lineno_2" &&
X+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
X+  # Find who we are.  Look in the path if we contain no path at all
X+  # relative or not.
X+  case $0 in
X+    *[\\/]* ) as_myself=$0 ;;
X+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
X+for as_dir in $PATH
X+do
X+  IFS=$as_save_IFS
X+  test -z "$as_dir" && as_dir=.
X+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
X+done
X+
X+       ;;
X+  esac
X+  # We did not find ourselves, most probably we were run as `sh COMMAND'
X+  # in which case we are not to be found in the path.
X+  if test "x$as_myself" = x; then
X+    as_myself=$0
X+  fi
X+  if test ! -f "$as_myself"; then
X+    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
X+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
X+   { (exit 1); exit 1; }; }
X+  fi
X+  case $CONFIG_SHELL in
X+  '')
X+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
X+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
X+do
X+  IFS=$as_save_IFS
X+  test -z "$as_dir" && as_dir=.
X+  for as_base in sh bash ksh sh5; do
X+	 case $as_dir in
X+	 /*)
X+	   if ("$as_dir/$as_base" -c '
X+  as_lineno_1=$LINENO
X+  as_lineno_2=$LINENO
X+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
X+  test "x$as_lineno_1" != "x$as_lineno_2" &&
X+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
X+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
X+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
X+	     CONFIG_SHELL=$as_dir/$as_base
X+	     export CONFIG_SHELL
X+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
X+	   fi;;
X+	 esac
X+       done
X+done
X+;;
X+  esac
X+
X+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
X+  # uniformly replaced by the line number.  The first 'sed' inserts a
X+  # line-number line before each line; the second 'sed' does the real
X+  # work.  The second script uses 'N' to pair each line-number line
X+  # with the numbered line, and appends trailing '-' during
X+  # substitution so that $LINENO is not a special case at line end.
X+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
X+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
X+  sed '=' <$as_myself |
X+    sed '
X+      N
X+      s,$,-,
X+      : loop
X+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
X+      t loop
X+      s,-$,,
X+      s,^['$as_cr_digits']*\n,,
X+    ' >$as_me.lineno &&
X+  chmod +x $as_me.lineno ||
X+    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
X+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
X+   { (exit 1); exit 1; }; }
X+
X+  # Don't try to exec as it changes $[0], causing all sort of problems
X+  # (the dirname of $[0] is not the place where we might find the
X+  # original and so on.  Autoconf is especially sensible to this).
X+  . ./$as_me.lineno
X+  # Exit status is that of the last command.
X+  exit
X+}
X+
X+
X+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
X+  *c*,-n*) ECHO_N= ECHO_C='
X+' ECHO_T='	' ;;
X+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
X+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
X+esac
X+
X+if expr a : '\(a\)' >/dev/null 2>&1; then
X+  as_expr=expr
X+else
X+  as_expr=false
X+fi
X+
X+rm -f conf$$ conf$$.exe conf$$.file
X+echo >conf$$.file
X+if ln -s conf$$.file conf$$ 2>/dev/null; then
X+  # We could just check for DJGPP; but this test a) works b) is more generic
X+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
X+  if test -f conf$$.exe; then
X+    # Don't use ln at all; we don't have any links
X+    as_ln_s='cp -p'
X+  else
X+    as_ln_s='ln -s'
X+  fi
X+elif ln conf$$.file conf$$ 2>/dev/null; then
X+  as_ln_s=ln
X+else
X+  as_ln_s='cp -p'
X+fi
X+rm -f conf$$ conf$$.exe conf$$.file
X+
X+if mkdir -p . 2>/dev/null; then
X+  as_mkdir_p=:
X+else
X+  test -d ./-p && rmdir ./-p
X+  as_mkdir_p=false
X+fi
X+
X+as_executable_p="test -f"
X+
X+# Sed expression to map a string onto a valid CPP name.
X+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
X+
X+# Sed expression to map a string onto a valid variable name.
X+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
X+
X+
X+# IFS
X+# We need space, tab and new line, in precisely that order.
X+as_nl='
X+'
X+IFS=" 	$as_nl"
X+
X+# CDPATH.
X+$as_unset CDPATH
X+
X+exec 6>&1
X+
X+# Open the log real soon, to keep \$[0] and so on meaningful, and to
X+# report actual input values of CONFIG_FILES etc. instead of their
X+# values after options handling.  Logging --version etc. is OK.
X+exec 5>>config.log
X+{
X+  echo
X+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
X+## Running $as_me. ##
X+_ASBOX
X+} >&5
X+cat >&5 <<_CSEOF
X+
X+This file was extended by newlib $as_me 1.15.0, which was
X+generated by GNU Autoconf 2.59.  Invocation command line was
X+
X+  CONFIG_FILES    = $CONFIG_FILES
X+  CONFIG_HEADERS  = $CONFIG_HEADERS
X+  CONFIG_LINKS    = $CONFIG_LINKS
X+  CONFIG_COMMANDS = $CONFIG_COMMANDS
X+  $ $0 $@
X+
X+_CSEOF
X+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
X+echo >&5
X+_ACEOF
X+
X+# Files that config.status was made for.
X+if test -n "$ac_config_files"; then
X+  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
X+fi
X+
X+if test -n "$ac_config_headers"; then
X+  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
X+fi
X+
X+if test -n "$ac_config_links"; then
X+  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
X+fi
X+
X+if test -n "$ac_config_commands"; then
X+  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
X+fi
X+
X+cat >>$CONFIG_STATUS <<\_ACEOF
X+
X+ac_cs_usage="\
X+\`$as_me' instantiates files from templates according to the
X+current configuration.
X+
X+Usage: $0 [OPTIONS] [FILE]...
X+
X+  -h, --help       print this help, then exit
X+  -V, --version    print version number, then exit
X+  -q, --quiet      do not print progress messages
X+  -d, --debug      don't remove temporary files
X+      --recheck    update $as_me by reconfiguring in the same conditions
X+  --file=FILE[:TEMPLATE]
X+		   instantiate the configuration file FILE
X+
X+Configuration files:
X+$config_files
X+
X+Configuration commands:
X+$config_commands
X+
X+Report bugs to <bug-autoconf at gnu.org>."
X+_ACEOF
X+
X+cat >>$CONFIG_STATUS <<_ACEOF
X+ac_cs_version="\\
X+newlib config.status 1.15.0
X+configured by $0, generated by GNU Autoconf 2.59,
X+  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
X+
X+Copyright (C) 2003 Free Software Foundation, Inc.
X+This config.status script is free software; the Free Software Foundation
X+gives unlimited permission to copy, distribute and modify it."
X+srcdir=$srcdir
X+INSTALL="$INSTALL"
X+_ACEOF
X+
X+cat >>$CONFIG_STATUS <<\_ACEOF
X+# If no file are specified by the user, then we need to provide default
X+# value.  By we need to know if files were specified by the user.
X+ac_need_defaults=:
X+while test $# != 0
X+do
X+  case $1 in
X+  --*=*)
X+    ac_option=`expr "x$1" : 'x\([^=]*\)='`
X+    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
X+    ac_shift=:
X+    ;;
X+  -*)
X+    ac_option=$1
X+    ac_optarg=$2
X+    ac_shift=shift
X+    ;;
X+  *) # This is not an option, so the user has probably given explicit
X+     # arguments.
X+     ac_option=$1
X+     ac_need_defaults=false;;
X+  esac
X+
X+  case $ac_option in
X+  # Handling of the options.
X+_ACEOF
X+cat >>$CONFIG_STATUS <<\_ACEOF
X+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
X+    ac_cs_recheck=: ;;
X+  --version | --vers* | -V )
X+    echo "$ac_cs_version"; exit 0 ;;
X+  --he | --h)
X+    # Conflict between --help and --header
X+    { { echo "$as_me:$LINENO: error: ambiguous option: $1
X+Try \`$0 --help' for more information." >&5
X+echo "$as_me: error: ambiguous option: $1
X+Try \`$0 --help' for more information." >&2;}
X+   { (exit 1); exit 1; }; };;
X+  --help | --hel | -h )
X+    echo "$ac_cs_usage"; exit 0 ;;
X+  --debug | --d* | -d )
X+    debug=: ;;
X+  --file | --fil | --fi | --f )
X+    $ac_shift
X+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
X+    ac_need_defaults=false;;
X+  --header | --heade | --head | --hea )
X+    $ac_shift
X+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
X+    ac_need_defaults=false;;
X+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
X+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
X+    ac_cs_silent=: ;;
X+
X+  # This is an error.
X+  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
X+Try \`$0 --help' for more information." >&5
X+echo "$as_me: error: unrecognized option: $1
X+Try \`$0 --help' for more information." >&2;}
X+   { (exit 1); exit 1; }; } ;;
X+
X+  *) ac_config_targets="$ac_config_targets $1" ;;
X+
X+  esac
X+  shift
X+done
X+
X+ac_configure_extra_args=
X+
X+if $ac_cs_silent; then
X+  exec 6>/dev/null
X+  ac_configure_extra_args="$ac_configure_extra_args --silent"
X+fi
X+
X+_ACEOF
X+cat >>$CONFIG_STATUS <<_ACEOF
X+if \$ac_cs_recheck; then
X+  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
X+  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
X+fi
X+
X+_ACEOF
X+
X+cat >>$CONFIG_STATUS <<_ACEOF
X+#
X+# INIT-COMMANDS section.
X+#
X+
X+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
X+
X+_ACEOF
X+
X+
X+
X+cat >>$CONFIG_STATUS <<\_ACEOF
X+for ac_config_target in $ac_config_targets
X+do
X+  case "$ac_config_target" in
X+  # Handling of arguments.
X+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
X+  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
X+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
X+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
X+   { (exit 1); exit 1; }; };;
X+  esac
X+done
X+
X+# If the user did not use the arguments to specify the items to instantiate,
X+# then the envvar interface is used.  Set only those that are not.
X+# We use the long form for the default assignment because of an extremely
X+# bizarre bug on SunOS 4.1.3.
X+if $ac_need_defaults; then
X+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
X+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
X+fi
X+
X+# Have a temporary directory for convenience.  Make it in the build tree
X+# simply because there is no reason to put it here, and in addition,
X+# creating and moving files from /tmp can sometimes cause problems.
X+# Create a temporary directory, and hook for its removal unless debugging.
X+$debug ||
X+{
X+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
X+  trap '{ (exit 1); exit 1; }' 1 2 13 15
X+}
X+
X+# Create a (secure) tmp directory for tmp files.
X+
X+{
X+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
X+  test -n "$tmp" && test -d "$tmp"
X+}  ||
X+{
X+  tmp=./confstat$$-$RANDOM
X+  (umask 077 && mkdir $tmp)
X+} ||
X+{
X+   echo "$me: cannot create a temporary directory in ." >&2
X+   { (exit 1); exit 1; }
X+}
X+
X+_ACEOF
X+
X+cat >>$CONFIG_STATUS <<_ACEOF
X+
X+#
X+# CONFIG_FILES section.
X+#
X+
X+# No need to generate the scripts if there are no CONFIG_FILES.
X+# This happens for instance when ./config.status config.h
X+if test -n "\$CONFIG_FILES"; then
X+  # Protect against being on the right side of a sed subst in config.status.
X+  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
X+   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
X+s, at SHELL@,$SHELL,;t t
X+s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
X+s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t
X+s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
X+s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
X+s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t
X+s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
X+s, at exec_prefix@,$exec_prefix,;t t
X+s, at prefix@,$prefix,;t t
X+s, at program_transform_name@,$program_transform_name,;t t
X+s, at bindir@,$bindir,;t t
X+s, at sbindir@,$sbindir,;t t
X+s, at libexecdir@,$libexecdir,;t t
X+s, at datadir@,$datadir,;t t
X+s, at sysconfdir@,$sysconfdir,;t t
X+s, at sharedstatedir@,$sharedstatedir,;t t
X+s, at localstatedir@,$localstatedir,;t t
X+s, at libdir@,$libdir,;t t
X+s, at includedir@,$includedir,;t t
X+s, at oldincludedir@,$oldincludedir,;t t
X+s, at infodir@,$infodir,;t t
X+s, at mandir@,$mandir,;t t
X+s, at build_alias@,$build_alias,;t t
X+s, at host_alias@,$host_alias,;t t
X+s, at target_alias@,$target_alias,;t t
X+s, at DEFS@,$DEFS,;t t
X+s, at ECHO_C@,$ECHO_C,;t t
X+s, at ECHO_N@,$ECHO_N,;t t
X+s, at ECHO_T@,$ECHO_T,;t t
X+s, at LIBS@,$LIBS,;t t
X+s, at MAY_SUPPLY_SYSCALLS_TRUE@,$MAY_SUPPLY_SYSCALLS_TRUE,;t t
X+s, at MAY_SUPPLY_SYSCALLS_FALSE@,$MAY_SUPPLY_SYSCALLS_FALSE,;t t
X+s, at newlib_basedir@,$newlib_basedir,;t t
X+s, at build@,$build,;t t
X+s, at build_cpu@,$build_cpu,;t t
X+s, at build_vendor@,$build_vendor,;t t
X+s, at build_os@,$build_os,;t t
X+s, at host@,$host,;t t
X+s, at host_cpu@,$host_cpu,;t t
X+s, at host_vendor@,$host_vendor,;t t
X+s, at host_os@,$host_os,;t t
X+s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
X+s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
X+s, at INSTALL_DATA@,$INSTALL_DATA,;t t
X+s, at CYGPATH_W@,$CYGPATH_W,;t t
X+s, at PACKAGE@,$PACKAGE,;t t
X+s, at VERSION@,$VERSION,;t t
X+s, at ACLOCAL@,$ACLOCAL,;t t
X+s, at AUTOCONF@,$AUTOCONF,;t t
X+s, at AUTOMAKE@,$AUTOMAKE,;t t
X+s, at AUTOHEADER@,$AUTOHEADER,;t t
X+s, at MAKEINFO@,$MAKEINFO,;t t
X+s, at install_sh@,$install_sh,;t t
X+s, at STRIP@,$STRIP,;t t
X+s, at ac_ct_STRIP@,$ac_ct_STRIP,;t t
X+s, at INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
X+s, at mkdir_p@,$mkdir_p,;t t
X+s, at AWK@,$AWK,;t t
X+s, at SET_MAKE@,$SET_MAKE,;t t
X+s, at am__leading_dot@,$am__leading_dot,;t t
X+s, at AMTAR@,$AMTAR,;t t
X+s, at am__tar@,$am__tar,;t t
X+s, at am__untar@,$am__untar,;t t
X+s, at CC@,$CC,;t t
X+s, at DEPDIR@,$DEPDIR,;t t
X+s, at am__include@,$am__include,;t t
X+s, at am__quote@,$am__quote,;t t
X+s, at AMDEP_TRUE@,$AMDEP_TRUE,;t t
X+s, at AMDEP_FALSE@,$AMDEP_FALSE,;t t
X+s, at AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
X+s, at CCDEPMODE@,$CCDEPMODE,;t t
X+s, at am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
X+s, at am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
X+s, at AS@,$AS,;t t
X+s, at ac_ct_AS@,$ac_ct_AS,;t t
X+s, at AR@,$AR,;t t
X+s, at ac_ct_AR@,$ac_ct_AR,;t t
X+s, at RANLIB@,$RANLIB,;t t
X+s, at ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
X+s, at READELF@,$READELF,;t t
X+s, at ac_ct_READELF@,$ac_ct_READELF,;t t
X+s, at MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
X+s, at MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
X+s, at MAINT@,$MAINT,;t t
X+s, at CCAS@,$CCAS,;t t
X+s, at CCASFLAGS@,$CCASFLAGS,;t t
X+s, at NEWLIB_CFLAGS@,$NEWLIB_CFLAGS,;t t
X+s, at LDFLAGS@,$LDFLAGS,;t t
X+s, at ELIX_LEVEL_0_TRUE@,$ELIX_LEVEL_0_TRUE,;t t
X+s, at ELIX_LEVEL_0_FALSE@,$ELIX_LEVEL_0_FALSE,;t t
X+s, at ELIX_LEVEL_1_TRUE@,$ELIX_LEVEL_1_TRUE,;t t
X+s, at ELIX_LEVEL_1_FALSE@,$ELIX_LEVEL_1_FALSE,;t t
X+s, at ELIX_LEVEL_2_TRUE@,$ELIX_LEVEL_2_TRUE,;t t
X+s, at ELIX_LEVEL_2_FALSE@,$ELIX_LEVEL_2_FALSE,;t t
X+s, at ELIX_LEVEL_3_TRUE@,$ELIX_LEVEL_3_TRUE,;t t
X+s, at ELIX_LEVEL_3_FALSE@,$ELIX_LEVEL_3_FALSE,;t t
X+s, at ELIX_LEVEL_4_TRUE@,$ELIX_LEVEL_4_TRUE,;t t
X+s, at ELIX_LEVEL_4_FALSE@,$ELIX_LEVEL_4_FALSE,;t t
X+s, at USE_LIBTOOL_TRUE@,$USE_LIBTOOL_TRUE,;t t
X+s, at USE_LIBTOOL_FALSE@,$USE_LIBTOOL_FALSE,;t t
X+s, at OBJEXT@,$OBJEXT,;t t
X+s, at oext@,$oext,;t t
X+s, at aext@,$aext,;t t
X+s, at lpfx@,$lpfx,;t t
X+s, at libm_machine_dir@,$libm_machine_dir,;t t
X+s, at machine_dir@,$machine_dir,;t t
X+s, at sys_dir@,$sys_dir,;t t
X+s, at LIBOBJS@,$LIBOBJS,;t t
X+s, at LTLIBOBJS@,$LTLIBOBJS,;t t
X+CEOF
X+
X+_ACEOF
X+
X+  cat >>$CONFIG_STATUS <<\_ACEOF
X+  # Split the substitutions into bite-sized pieces for seds with
X+  # small command number limits, like on Digital OSF/1 and HP-UX.
X+  ac_max_sed_lines=48
X+  ac_sed_frag=1 # Number of current file.
X+  ac_beg=1 # First line for current file.
X+  ac_end=$ac_max_sed_lines # Line after last line for current file.
X+  ac_more_lines=:
X+  ac_sed_cmds=
X+  while $ac_more_lines; do
X+    if test $ac_beg -gt 1; then
X+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
X+    else
X+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
X+    fi
X+    if test ! -s $tmp/subs.frag; then
X+      ac_more_lines=false
X+    else
X+      # The purpose of the label and of the branching condition is to
X+      # speed up the sed processing (if there are no `@' at all, there
X+      # is no need to browse any of the substitutions).
X+      # These are the two extra sed commands mentioned above.
X+      (echo ':t
X+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
X+      if test -z "$ac_sed_cmds"; then
X+	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
X+      else
X+	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
X+      fi
X+      ac_sed_frag=`expr $ac_sed_frag + 1`
X+      ac_beg=$ac_end
X+      ac_end=`expr $ac_end + $ac_max_sed_lines`
X+    fi
X+  done
X+  if test -z "$ac_sed_cmds"; then
X+    ac_sed_cmds=cat
X+  fi
X+fi # test -n "$CONFIG_FILES"
X+
X+_ACEOF
X+cat >>$CONFIG_STATUS <<\_ACEOF
X+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
X+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
X+  case $ac_file in
X+  - | *:- | *:-:* ) # input from stdin
X+	cat >$tmp/stdin
X+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
X+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
X+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
X+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
X+  * )   ac_file_in=$ac_file.in ;;
X+  esac
X+
X+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
X+  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
X+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X+	 X"$ac_file" : 'X\(//\)[^/]' \| \
X+	 X"$ac_file" : 'X\(//\)$' \| \
X+	 X"$ac_file" : 'X\(/\)' \| \
X+	 .     : '\(.\)' 2>/dev/null ||
X+echo X"$ac_file" |
X+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
X+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
X+  	  /^X\(\/\/\)$/{ s//\1/; q; }
X+  	  /^X\(\/\).*/{ s//\1/; q; }
X+  	  s/.*/./; q'`
X+  { if $as_mkdir_p; then
X+    mkdir -p "$ac_dir"
X+  else
X+    as_dir="$ac_dir"
X+    as_dirs=
X+    while test ! -d "$as_dir"; do
X+      as_dirs="$as_dir $as_dirs"
X+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
X+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X+	 X"$as_dir" : 'X\(//\)[^/]' \| \
X+	 X"$as_dir" : 'X\(//\)$' \| \
X+	 X"$as_dir" : 'X\(/\)' \| \
X+	 .     : '\(.\)' 2>/dev/null ||
X+echo X"$as_dir" |
X+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
X+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
X+  	  /^X\(\/\/\)$/{ s//\1/; q; }
X+  	  /^X\(\/\).*/{ s//\1/; q; }
X+  	  s/.*/./; q'`
X+    done
X+    test ! -n "$as_dirs" || mkdir $as_dirs
X+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
X+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
X+   { (exit 1); exit 1; }; }; }
X+
X+  ac_builddir=.
X+
X+if test "$ac_dir" != .; then
X+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
X+  # A "../" for each directory in $ac_dir_suffix.
X+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
X+else
X+  ac_dir_suffix= ac_top_builddir=
X+fi
X+
X+case $srcdir in
X+  .)  # No --srcdir option.  We are building in place.
X+    ac_srcdir=.
X+    if test -z "$ac_top_builddir"; then
X+       ac_top_srcdir=.
X+    else
X+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
X+    fi ;;
X+  [\\/]* | ?:[\\/]* )  # Absolute path.
X+    ac_srcdir=$srcdir$ac_dir_suffix;
X+    ac_top_srcdir=$srcdir ;;
X+  *) # Relative path.
X+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
X+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
X+esac
X+
X+# Do not use `cd foo && pwd` to compute absolute paths, because
X+# the directories may not exist.
X+case `pwd` in
X+.) ac_abs_builddir="$ac_dir";;
X+*)
X+  case "$ac_dir" in
X+  .) ac_abs_builddir=`pwd`;;
X+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
X+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
X+  esac;;
X+esac
X+case $ac_abs_builddir in
X+.) ac_abs_top_builddir=${ac_top_builddir}.;;
X+*)
X+  case ${ac_top_builddir}. in
X+  .) ac_abs_top_builddir=$ac_abs_builddir;;
X+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
X+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
X+  esac;;
X+esac
X+case $ac_abs_builddir in
X+.) ac_abs_srcdir=$ac_srcdir;;
X+*)
X+  case $ac_srcdir in
X+  .) ac_abs_srcdir=$ac_abs_builddir;;
X+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
X+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
X+  esac;;
X+esac
X+case $ac_abs_builddir in
X+.) ac_abs_top_srcdir=$ac_top_srcdir;;
X+*)
X+  case $ac_top_srcdir in
X+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
X+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
X+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
X+  esac;;
X+esac
X+
X+
X+  case $INSTALL in
X+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
X+  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
X+  esac
X+
X+  if test x"$ac_file" != x-; then
X+    { echo "$as_me:$LINENO: creating $ac_file" >&5
X+echo "$as_me: creating $ac_file" >&6;}
X+    rm -f "$ac_file"
X+  fi
X+  # Let's still pretend it is `configure' which instantiates (i.e., don't
X+  # use $as_me), people would be surprised to read:
X+  #    /* config.h.  Generated by config.status.  */
X+  if test x"$ac_file" = x-; then
X+    configure_input=
X+  else
X+    configure_input="$ac_file.  "
X+  fi
X+  configure_input=$configure_input"Generated from `echo $ac_file_in |
X+				     sed 's,.*/,,'` by configure."
X+
X+  # First look for the input files in the build tree, otherwise in the
X+  # src tree.
X+  ac_file_inputs=`IFS=:
X+    for f in $ac_file_in; do
X+      case $f in
X+      -) echo $tmp/stdin ;;
X+      [\\/$]*)
X+	 # Absolute (can't be DOS-style, as IFS=:)
X+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
X+echo "$as_me: error: cannot find input file: $f" >&2;}
X+   { (exit 1); exit 1; }; }
X+	 echo "$f";;
X+      *) # Relative
X+	 if test -f "$f"; then
X+	   # Build tree
X+	   echo "$f"
X+	 elif test -f "$srcdir/$f"; then
X+	   # Source tree
X+	   echo "$srcdir/$f"
X+	 else
X+	   # /dev/null tree
X+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
X+echo "$as_me: error: cannot find input file: $f" >&2;}
X+   { (exit 1); exit 1; }; }
X+	 fi;;
X+      esac
X+    done` || { (exit 1); exit 1; }
X+_ACEOF
X+cat >>$CONFIG_STATUS <<_ACEOF
X+  sed "$ac_vpsub
X+$extrasub
X+_ACEOF
X+cat >>$CONFIG_STATUS <<\_ACEOF
X+:t
X+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
X+s, at configure_input@,$configure_input,;t t
X+s, at srcdir@,$ac_srcdir,;t t
X+s, at abs_srcdir@,$ac_abs_srcdir,;t t
X+s, at top_srcdir@,$ac_top_srcdir,;t t
X+s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t
X+s, at builddir@,$ac_builddir,;t t
X+s, at abs_builddir@,$ac_abs_builddir,;t t
X+s, at top_builddir@,$ac_top_builddir,;t t
X+s, at abs_top_builddir@,$ac_abs_top_builddir,;t t
X+s, at INSTALL@,$ac_INSTALL,;t t
X+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
X+  rm -f $tmp/stdin
X+  if test x"$ac_file" != x-; then
X+    mv $tmp/out $ac_file
X+  else
X+    cat $tmp/out
X+    rm -f $tmp/out
X+  fi
X+
X+done
X+_ACEOF
X+cat >>$CONFIG_STATUS <<\_ACEOF
X+
X+#
X+# CONFIG_COMMANDS section.
X+#
X+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
X+  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
X+  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
X+  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
X+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X+	 X"$ac_dest" : 'X\(//\)[^/]' \| \
X+	 X"$ac_dest" : 'X\(//\)$' \| \
X+	 X"$ac_dest" : 'X\(/\)' \| \
X+	 .     : '\(.\)' 2>/dev/null ||
X+echo X"$ac_dest" |
X+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
X+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
X+  	  /^X\(\/\/\)$/{ s//\1/; q; }
X+  	  /^X\(\/\).*/{ s//\1/; q; }
X+  	  s/.*/./; q'`
X+  { if $as_mkdir_p; then
X+    mkdir -p "$ac_dir"
X+  else
X+    as_dir="$ac_dir"
X+    as_dirs=
X+    while test ! -d "$as_dir"; do
X+      as_dirs="$as_dir $as_dirs"
X+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
X+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X+	 X"$as_dir" : 'X\(//\)[^/]' \| \
X+	 X"$as_dir" : 'X\(//\)$' \| \
X+	 X"$as_dir" : 'X\(/\)' \| \
X+	 .     : '\(.\)' 2>/dev/null ||
X+echo X"$as_dir" |
X+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
X+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
X+  	  /^X\(\/\/\)$/{ s//\1/; q; }
X+  	  /^X\(\/\).*/{ s//\1/; q; }
X+  	  s/.*/./; q'`
X+    done
X+    test ! -n "$as_dirs" || mkdir $as_dirs
X+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
X+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
X+   { (exit 1); exit 1; }; }; }
X+
X+  ac_builddir=.
X+
X+if test "$ac_dir" != .; then
X+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
X+  # A "../" for each directory in $ac_dir_suffix.
X+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
X+else
X+  ac_dir_suffix= ac_top_builddir=
X+fi
X+
X+case $srcdir in
X+  .)  # No --srcdir option.  We are building in place.
X+    ac_srcdir=.
X+    if test -z "$ac_top_builddir"; then
X+       ac_top_srcdir=.
X+    else
X+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
X+    fi ;;
X+  [\\/]* | ?:[\\/]* )  # Absolute path.
X+    ac_srcdir=$srcdir$ac_dir_suffix;
X+    ac_top_srcdir=$srcdir ;;
X+  *) # Relative path.
X+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
X+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
X+esac
X+
X+# Do not use `cd foo && pwd` to compute absolute paths, because
X+# the directories may not exist.
X+case `pwd` in
X+.) ac_abs_builddir="$ac_dir";;
X+*)
X+  case "$ac_dir" in
X+  .) ac_abs_builddir=`pwd`;;
X+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
X+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
X+  esac;;
X+esac
X+case $ac_abs_builddir in
X+.) ac_abs_top_builddir=${ac_top_builddir}.;;
X+*)
X+  case ${ac_top_builddir}. in
X+  .) ac_abs_top_builddir=$ac_abs_builddir;;
X+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
X+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
X+  esac;;
X+esac
X+case $ac_abs_builddir in
X+.) ac_abs_srcdir=$ac_srcdir;;
X+*)
X+  case $ac_srcdir in
X+  .) ac_abs_srcdir=$ac_abs_builddir;;
X+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
X+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
X+  esac;;
X+esac
X+case $ac_abs_builddir in
X+.) ac_abs_top_srcdir=$ac_top_srcdir;;
X+*)
X+  case $ac_top_srcdir in
X+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
X+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
X+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
X+  esac;;
X+esac
X+
X+
X+  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
X+echo "$as_me: executing $ac_dest commands" >&6;}
X+  case $ac_dest in
X+    depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
X+  # Strip MF so we end up with the name of the file.
X+  mf=`echo "$mf" | sed -e 's/:.*$//'`
X+  # Check whether this is an Automake generated Makefile or not.
X+  # We used to match only the files named `Makefile.in', but
X+  # some people rename them; so instead we look at the file content.
X+  # Grep'ing the first line is not enough: some people post-process
X+  # each Makefile.in and add a new line on top of each file to say so.
X+  # So let's grep whole file.
X+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
X+    dirpart=`(dirname "$mf") 2>/dev/null ||
X+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X+	 X"$mf" : 'X\(//\)[^/]' \| \
X+	 X"$mf" : 'X\(//\)$' \| \
X+	 X"$mf" : 'X\(/\)' \| \
X+	 .     : '\(.\)' 2>/dev/null ||
X+echo X"$mf" |
X+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
X+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
X+  	  /^X\(\/\/\)$/{ s//\1/; q; }
X+  	  /^X\(\/\).*/{ s//\1/; q; }
X+  	  s/.*/./; q'`
X+  else
X+    continue
X+  fi
X+  # Extract the definition of DEPDIR, am__include, and am__quote
X+  # from the Makefile without running `make'.
X+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
X+  test -z "$DEPDIR" && continue
X+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
X+  test -z "am__include" && continue
X+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
X+  # When using ansi2knr, U may be empty or an underscore; expand it
X+  U=`sed -n 's/^U = //p' < "$mf"`
X+  # Find all dependency output files, they are included files with
X+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
X+  # simplest approach to changing $(DEPDIR) to its actual value in the
X+  # expansion.
X+  for file in `sed -n "
X+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
X+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
X+    # Make sure the directory exists.
X+    test -f "$dirpart/$file" && continue
X+    fdir=`(dirname "$file") 2>/dev/null ||
X+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X+	 X"$file" : 'X\(//\)[^/]' \| \
X+	 X"$file" : 'X\(//\)$' \| \
X+	 X"$file" : 'X\(/\)' \| \
X+	 .     : '\(.\)' 2>/dev/null ||
X+echo X"$file" |
X+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
X+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
X+  	  /^X\(\/\/\)$/{ s//\1/; q; }
X+  	  /^X\(\/\).*/{ s//\1/; q; }
X+  	  s/.*/./; q'`
X+    { if $as_mkdir_p; then
X+    mkdir -p $dirpart/$fdir
X+  else
X+    as_dir=$dirpart/$fdir
X+    as_dirs=
X+    while test ! -d "$as_dir"; do
X+      as_dirs="$as_dir $as_dirs"
X+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
X+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X+	 X"$as_dir" : 'X\(//\)[^/]' \| \
X+	 X"$as_dir" : 'X\(//\)$' \| \
X+	 X"$as_dir" : 'X\(/\)' \| \
X+	 .     : '\(.\)' 2>/dev/null ||
X+echo X"$as_dir" |
X+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
X+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
X+  	  /^X\(\/\/\)$/{ s//\1/; q; }
X+  	  /^X\(\/\).*/{ s//\1/; q; }
X+  	  s/.*/./; q'`
X+    done
X+    test ! -n "$as_dirs" || mkdir $as_dirs
X+  fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
X+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
X+   { (exit 1); exit 1; }; }; }
X+
X+    # echo "creating $dirpart/$file"
X+    echo '# dummy' > "$dirpart/$file"
X+  done
X+done
X+ ;;
X+  esac
X+done
X+_ACEOF
X+
X+cat >>$CONFIG_STATUS <<\_ACEOF
X+
X+{ (exit 0); exit 0; }
X+_ACEOF
X+chmod +x $CONFIG_STATUS
X+ac_clean_files=$ac_clean_files_save
X+
X+
X+# configure is writing to config.log, and then calls config.status.
X+# config.status does its own redirection, appending to config.log.
X+# Unfortunately, on DOS this fails, as config.log is still kept open
X+# by configure, so config.status won't be able to write to it; its
X+# output is simply discarded.  So we exec the FD to /dev/null,
X+# effectively closing config.log, so it can be properly (re)opened and
X+# appended to by config.status.  When coming back to configure, we
X+# need to make the FD available again.
X+if test "$no_create" != yes; then
X+  ac_cs_success=:
X+  ac_config_status_args=
X+  test "$silent" = yes &&
X+    ac_config_status_args="$ac_config_status_args --quiet"
X+  exec 5>/dev/null
X+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
X+  exec 5>>config.log
X+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
X+  # would make configure fail if this is the last instruction.
X+  $ac_cs_success || { (exit 1); exit 1; }
X+fi
X+
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-configure
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-fdman.c
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-fdman.c << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-fdman.c'
X--- newlib/libc/sys/psp/fdman.c.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/fdman.c	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,115 @@
X+/*
X+ * PSP Software Development Kit - http://www.pspdev.org
X+ * -----------------------------------------------------------------------
X+ * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
X+ *
X+ * fdman.c - File descriptor management.
X+ *
X+ * Copyright (c) 2006 Rafael Cabezas <rafpsp at gmail.com>
X+ */
X+#include <psptypes.h>
X+#include <errno.h>
X+#include "fdman.h"
X+
X+extern int  pspDisableInterrupts();
X+extern void pspEnableInterrupts(int); 
X+
X+static __psp_descriptormap_type  __psp_descriptor_data_pool[__PSP_FILENO_MAX];
X+__psp_descriptormap_type        *__psp_descriptormap       [__PSP_FILENO_MAX];
X+
X+void __psp_fdman_init()
X+{
X+	int scefd;
X+
X+	/* Initialize descriptor data*/
X+	memset(__psp_descriptor_data_pool, 0, sizeof(__psp_descriptormap_type) *__PSP_FILENO_MAX);
X+	/* Initialize descriptor map*/
X+	memset(__psp_descriptormap,        0, sizeof(__psp_descriptormap_type*)*__PSP_FILENO_MAX);
X+
X+	scefd = sceKernelStdin();
X+	if ((scefd >= 0) && (scefd < __PSP_FILENO_MAX)) {
X+		__psp_descriptormap[0] = &__psp_descriptor_data_pool[0];
X+		__psp_descriptormap[0]->sce_descriptor = scefd;
X+		__psp_descriptormap[0]->type = __PSP_DESCRIPTOR_TYPE_TTY;
X+	}
X+	scefd = sceKernelStdout();
X+	if ((scefd >= 0) && (scefd < __PSP_FILENO_MAX)) {
X+		__psp_descriptormap[1] = &__psp_descriptor_data_pool[1];
X+		__psp_descriptormap[1]->sce_descriptor = scefd;
X+		__psp_descriptormap[1]->type = __PSP_DESCRIPTOR_TYPE_TTY;
X+	}
X+	scefd = sceKernelStderr();
X+	if ((scefd >= 0) && (scefd < __PSP_FILENO_MAX)) {
X+		__psp_descriptormap[2] = &__psp_descriptor_data_pool[2];
X+		__psp_descriptormap[2]->sce_descriptor = scefd;
X+		__psp_descriptormap[2]->type = __PSP_DESCRIPTOR_TYPE_TTY;
X+	}
X+}
X+
X+int __psp_fdman_get_new_descriptor()
X+{
X+	int i = 0;
X+	int inten;
X+
X+	inten = pspDisableInterrupts(); /* lock here to make thread safe */
X+	for (i = 0; i < __PSP_FILENO_MAX; i++) {
X+		if (__psp_descriptormap[i] == NULL) {
X+			__psp_descriptormap[i] = &__psp_descriptor_data_pool[i];
X+			__psp_descriptormap[i]->ref_count++;
X+			pspEnableInterrupts(inten); /* release lock */
X+			return i;
X+		}
X+	}
X+	pspEnableInterrupts(inten); /* release lock */
X+		
X+	errno = ENOMEM;
X+	return -1;
X+}
X+
X+int __psp_fdman_get_dup_descriptor(int fd)
X+{
X+	int i = 0;
X+	int inten;
X+	
X+	if (!__PSP_IS_FD_VALID(fd)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+
X+	inten = pspDisableInterrupts(); /* lock here to make thread safe */
X+	for (i = 0; i < __PSP_FILENO_MAX; i++) {
X+		if (__psp_descriptormap[i] == NULL) {
X+			__psp_descriptormap[i] = &__psp_descriptor_data_pool[fd];
X+			__psp_descriptormap[i]->ref_count++;
X+			pspEnableInterrupts(inten); /* release lock */
X+			return i;
X+		}
X+	}
X+	pspEnableInterrupts(inten); /* release lock */
X+	
X+	errno = ENOMEM;
X+	return -1;
X+}
X+
X+void __psp_fdman_release_descriptor(int fd)
X+{
X+	if (!__PSP_IS_FD_VALID(fd)) {
X+		errno = EBADF;
X+		return;
X+	}
X+
X+	__psp_descriptormap[fd]->ref_count--;
X+	
X+	if (__psp_descriptormap[fd]->ref_count == 0) {
X+		
X+		if (__psp_descriptormap[fd]->filename != NULL) {
X+			free(__psp_descriptormap[fd]->filename);
X+		}
X+		__psp_descriptormap[fd]->filename       = NULL;
X+		__psp_descriptormap[fd]->sce_descriptor = 0;
X+		__psp_descriptormap[fd]->type           = 0;
X+		__psp_descriptormap[fd]->flags          = 0;
X+		
X+	}
X+	__psp_descriptormap[fd] = NULL;
X+}
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-fdman.c
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-interrupt.S
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-interrupt.S << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-interrupt.S'
X--- newlib/libc/sys/psp/interrupt.S.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/interrupt.S	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,66 @@
X+
X+	.set noreorder
X+	.set noat
X+
X+	.global pspDisableInterrupts
X+	.ent    pspDisableInterrupts
X+
X+pspDisableInterrupts:
X+	mfic	$v0, $0
X+	mtic	$0, $0
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	jr		$ra
X+	nop
X+
X+	.end pspDisableInterrupts
X+
X+	.global pspEnableInterrupts
X+	.ent    pspEnableInterrupts
X+
X+pspEnableInterrupts:
X+	mtic	$a0, $0
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	nop
X+	jr		$ra
X+	nop
X+
X+	.end pspEnableInterrupts
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-interrupt.S
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-netinet-in.h
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-netinet-in.h << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-netinet-in.h'
X--- newlib/libc/sys/psp/netinet/in.h.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/netinet/in.h	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,271 @@
X+/*	$NetBSD: in.h,v 1.71 2005/08/05 09:21:25 elad Exp $	*/
X+
X+/*
X+ * Copyright (c) 1982, 1986, 1990, 1993
X+ *	The Regents of the University of California.  All rights reserved.
X+ *
X+ * Redistribution and use in source and binary forms, with or without
X+ * modification, are permitted provided that the following conditions
X+ * are met:
X+ * 1. Redistributions of source code must retain the above copyright
X+ *    notice, this list of conditions and the following disclaimer.
X+ * 2. Redistributions in binary form must reproduce the above copyright
X+ *    notice, this list of conditions and the following disclaimer in the
X+ *    documentation and/or other materials provided with the distribution.
X+ * 3. Neither the name of the University nor the names of its contributors
X+ *    may be used to endorse or promote products derived from this software
X+ *    without specific prior written permission.
X+ *
X+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
X+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
X+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
X+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
X+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X+ * SUCH DAMAGE.
X+ *
X+ *	@(#)in.h	8.3 (Berkeley) 1/3/94
X+ */
X+
X+/*
X+ * Constants and structures defined by the internet system,
X+ * Per RFC 790, September 1981, and numerous additions.
X+ */
X+
X+#ifndef _NETINET_IN_H_
X+#define	_NETINET_IN_H_
X+
X+#ifdef __cplusplus
X+extern "C" {
X+#endif
X+
X+#include <sys/socket.h>
X+
X+typedef uint32_t in_addr_t;
X+typedef uint16_t	in_port_t;
X+
X+/*
X+ * Protocols
X+ */
X+#define	IPPROTO_IP		0		/* dummy for IP */
X+#define	IPPROTO_HOPOPTS		0		/* IP6 hop-by-hop options */
X+#define	IPPROTO_ICMP		1		/* control message protocol */
X+#define	IPPROTO_IGMP		2		/* group mgmt protocol */
X+#define	IPPROTO_GGP		3		/* gateway^2 (deprecated) */
X+#define	IPPROTO_IPV4		4 		/* IP header */
X+#define	IPPROTO_IPIP		4		/* IP inside IP */
X+#define	IPPROTO_TCP		6		/* tcp */
X+#define	IPPROTO_EGP		8		/* exterior gateway protocol */
X+#define	IPPROTO_PUP		12		/* pup */
X+#define	IPPROTO_UDP		17		/* user datagram protocol */
X+#define	IPPROTO_IDP		22		/* xns idp */
X+#define	IPPROTO_TP		29 		/* tp-4 w/ class negotiation */
X+#define	IPPROTO_IPV6		41		/* IP6 header */
X+#define	IPPROTO_ROUTING		43		/* IP6 routing header */
X+#define	IPPROTO_FRAGMENT	44		/* IP6 fragmentation header */
X+#define	IPPROTO_RSVP		46		/* resource reservation */
X+#define	IPPROTO_GRE		47		/* GRE encaps RFC 1701 */
X+#define	IPPROTO_ESP		50 		/* encap. security payload */
X+#define	IPPROTO_AH		51 		/* authentication header */
X+#define	IPPROTO_MOBILE		55		/* IP Mobility RFC 2004 */
X+#define	IPPROTO_IPV6_ICMP	58		/* IPv6 ICMP */
X+#define	IPPROTO_ICMPV6		58		/* ICMP6 */
X+#define	IPPROTO_NONE		59		/* IP6 no next header */
X+#define	IPPROTO_DSTOPTS		60		/* IP6 destination option */
X+#define	IPPROTO_EON		80		/* ISO cnlp */
X+#define	IPPROTO_ETHERIP		97		/* Ethernet-in-IP */
X+#define	IPPROTO_ENCAP		98		/* encapsulation header */
X+#define	IPPROTO_PIM		103		/* Protocol indep. multicast */
X+#define	IPPROTO_IPCOMP		108		/* IP Payload Comp. Protocol */
X+#define	IPPROTO_VRRP		112		/* VRRP RFC 2338 */
X+
X+#define	IPPROTO_RAW		255		/* raw IP packet */
X+#define	IPPROTO_MAX		256
X+
X+/* last return value of *_input(), meaning "all job for this pkt is done".  */
X+#define	IPPROTO_DONE		257
X+
X+/* sysctl placeholder for (FAST_)IPSEC */
X+#define CTL_IPPROTO_IPSEC	258
X+
X+
X+/*
X+ * Local port number conventions:
X+ *
X+ * Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root),
X+ * unless a kernel is compiled with IPNOPRIVPORTS defined.
X+ *
X+ * When a user does a bind(2) or connect(2) with a port number of zero,
X+ * a non-conflicting local port address is chosen.
X+ *
X+ * The default range is IPPORT_ANONMIN to IPPORT_ANONMAX, although
X+ * that is settable by sysctl(3); net.inet.ip.anonportmin and
X+ * net.inet.ip.anonportmax respectively.
X+ *
X+ * A user may set the IPPROTO_IP option IP_PORTRANGE to change this
X+ * default assignment range.
X+ *
X+ * The value IP_PORTRANGE_DEFAULT causes the default behavior.
X+ *
X+ * The value IP_PORTRANGE_HIGH is the same as IP_PORTRANGE_DEFAULT,
X+ * and exists only for FreeBSD compatibility purposes.
X+ *
X+ * The value IP_PORTRANGE_LOW changes the range to the "low" are
X+ * that is (by convention) restricted to privileged processes.
X+ * This convention is based on "vouchsafe" principles only.
X+ * It is only secure if you trust the remote host to restrict these ports.
X+ * The range is IPPORT_RESERVEDMIN to IPPORT_RESERVEDMAX.
X+ */
X+
X+#define	IPPORT_RESERVED		1024
X+#define	IPPORT_ANONMIN		49152
X+#define	IPPORT_ANONMAX		65535
X+#define	IPPORT_RESERVEDMIN	600
X+#define	IPPORT_RESERVEDMAX	(IPPORT_RESERVED-1)
X+
X+/*
X+ * Internet address (a structure for historical reasons)
X+ */
X+struct in_addr {
X+	in_addr_t s_addr;
X+} __attribute__((__packed__));
X+
X+#define	__IPADDR(x)	((uint32_t)(x))
X+
X+#define	IN_CLASSA(i)		(((uint32_t)(i) & __IPADDR(0x80000000)) == \
X+				 __IPADDR(0x00000000))
X+#define	IN_CLASSA_NET		__IPADDR(0xff000000)
X+#define	IN_CLASSA_NSHIFT	24
X+#define	IN_CLASSA_HOST		__IPADDR(0x00ffffff)
X+#define	IN_CLASSA_MAX		128
X+
X+#define	IN_CLASSB(i)		(((uint32_t)(i) & __IPADDR(0xc0000000)) == \
X+				 __IPADDR(0x80000000))
X+#define	IN_CLASSB_NET		__IPADDR(0xffff0000)
X+#define	IN_CLASSB_NSHIFT	16
X+#define	IN_CLASSB_HOST		__IPADDR(0x0000ffff)
X+#define	IN_CLASSB_MAX		65536
X+
X+#define	IN_CLASSC(i)		(((uint32_t)(i) & __IPADDR(0xe0000000)) == \
X+				 __IPADDR(0xc0000000))
X+#define	IN_CLASSC_NET		__IPADDR(0xffffff00)
X+#define	IN_CLASSC_NSHIFT	8
X+#define	IN_CLASSC_HOST		__IPADDR(0x000000ff)
X+
X+#define	IN_CLASSD(i)		(((uint32_t)(i) & __IPADDR(0xf0000000)) == \
X+				 __IPADDR(0xe0000000))
X+/* These ones aren't really net and host fields, but routing needn't know. */
X+#define	IN_CLASSD_NET		__IPADDR(0xf0000000)
X+#define	IN_CLASSD_NSHIFT	28
X+#define	IN_CLASSD_HOST		__IPADDR(0x0fffffff)
X+#define	IN_MULTICAST(i)		IN_CLASSD(i)
X+
X+#define	IN_EXPERIMENTAL(i)	(((uint32_t)(i) & __IPADDR(0xf0000000)) == \
X+				 __IPADDR(0xf0000000))
X+#define	IN_BADCLASS(i)		(((uint32_t)(i) & __IPADDR(0xf0000000)) == \
X+				 __IPADDR(0xf0000000))
X+
X+#define	IN_LOCAL_GROUP(i)	(((uint32_t)(i) & __IPADDR(0xffffff00)) == \
X+				 __IPADDR(0xe0000000))
X+
X+#define	INADDR_ANY		__IPADDR(0x00000000)
X+#define	INADDR_LOOPBACK		__IPADDR(0x7f000001)
X+#define	INADDR_BROADCAST	__IPADDR(0xffffffff)	/* must be masked */
X+
X+#define	INADDR_UNSPEC_GROUP	__IPADDR(0xe0000000)	/* 224.0.0.0 */
X+#define	INADDR_ALLHOSTS_GROUP	__IPADDR(0xe0000001)	/* 224.0.0.1 */
X+#define	INADDR_ALLRTRS_GROUP	__IPADDR(0xe0000002)	/* 224.0.0.2 */
X+#define	INADDR_MAX_LOCAL_GROUP	__IPADDR(0xe00000ff)	/* 224.0.0.255 */
X+
X+#define	IN_LOOPBACKNET		127			/* official! */
X+
X+/*
X+ * Socket address, internet style.
X+ */
X+struct sockaddr_in {
X+	uint8_t		sin_len;
X+	sa_family_t	sin_family;
X+	in_port_t	sin_port;
X+	struct in_addr	sin_addr;
X+	int8_t	sin_zero[8];
X+};
X+
X+#define	INET_ADDRSTRLEN                 16
X+
X+/*
X+ * Structure used to describe IP options.
X+ * Used to store options internally, to pass them to a process,
X+ * or to restore options retrieved earlier.
X+ * The ip_dst is used for the first-hop gateway when using a source route
X+ * (this gets put into the header proper).
X+ */
X+struct ip_opts {
X+	struct in_addr	ip_dst;		/* first hop, 0 w/o src rt */
X+#if defined(__cplusplus)
X+	int8_t	Ip_opts[40];	/* actually variable in size */
X+#else
X+	int8_t	ip_opts[40];	/* actually variable in size */
X+#endif
X+};
X+
X+/*
X+ * Options for use with [gs]etsockopt at the IP level.
X+ * First word of comment is data type; bool is stored in int.
X+ */
X+#define	IP_OPTIONS		1    /* buf/ip_opts; set/get IP options */
X+#define	IP_HDRINCL		2    /* int; header is included with data */
X+#define	IP_TOS			3    /* int; IP type of service and preced. */
X+#define	IP_TTL			4    /* int; IP time to live */
X+#define	IP_RECVOPTS		5    /* bool; receive all IP opts w/dgram */
X+#define	IP_RECVRETOPTS		6    /* bool; receive IP opts for response */
X+#define	IP_RECVDSTADDR		7    /* bool; receive IP dst addr w/dgram */
X+#define	IP_RETOPTS		8    /* ip_opts; set/get IP options */
X+#define	IP_MULTICAST_IF		9    /* in_addr; set/get IP multicast i/f  */
X+#define	IP_MULTICAST_TTL	10   /* u_char; set/get IP multicast ttl */
X+#define	IP_MULTICAST_LOOP	11   /* u_char; set/get IP multicast loopback */
X+#define	IP_ADD_MEMBERSHIP	12   /* ip_mreq; add an IP group membership */
X+#define	IP_DROP_MEMBERSHIP	13   /* ip_mreq; drop an IP group membership */
X+#define	IP_PORTRANGE		19   /* int; range to use for ephemeral port */
X+#define	IP_RECVIF		20   /* bool; receive reception if w/dgram */
X+#define	IP_ERRORMTU		21   /* int; get MTU of last xmit = EMSGSIZE */
X+#if 1 /*IPSEC*/
X+#define	IP_IPSEC_POLICY		22 /* struct; get/set security policy */
X+#endif
X+
X+/*
X+ * Defaults and limits for options
X+ */
X+#define	IP_DEFAULT_MULTICAST_TTL  1	/* normally limit m'casts to 1 hop  */
X+#define	IP_DEFAULT_MULTICAST_LOOP 1	/* normally hear sends if a member  */
X+#define	IP_MAX_MEMBERSHIPS	20	/* per socket; must fit in one mbuf */
X+
X+/*
X+ * Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
X+ */
X+struct ip_mreq {
X+	struct	in_addr imr_multiaddr;	/* IP multicast address of group */
X+	struct	in_addr imr_interface;	/* local IP address of interface */
X+};
X+
X+/*
X+ * Argument for IP_PORTRANGE:
X+ * - which range to search when port is unspecified at bind() or connect()
X+ */
X+#define	IP_PORTRANGE_DEFAULT	0	/* default range */
X+#define	IP_PORTRANGE_HIGH	1	/* same as DEFAULT (FreeBSD compat) */
X+#define	IP_PORTRANGE_LOW	2	/* use privileged range */
X+
X+#define ntohs(x) __builtin_allegrex_wsbh(x)
X+#define ntohl(x) __builtin_allegrex_wsbw(x)
X+#define htons(x) __builtin_allegrex_wsbh(x)
X+#define htonl(x) __builtin_allegrex_wsbw(x)
X+
X+#ifdef __cplusplus
X+}
X+#endif
X+
X+#endif /* !_NETINET_IN_H_ */
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-netinet-in.h
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-pspcwd.c
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-pspcwd.c << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-pspcwd.c'
X--- newlib/libc/sys/psp/pspcwd.c.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/pspcwd.c	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,166 @@
X+/*
X+ * PSP Software Development Kit - http://www.pspdev.org
X+ * -----------------------------------------------------------------------
X+ * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
X+ *
X+ * pspcwd.c - Current working directory emulation helper functions
X+ *
X+ * Copyright (c) 2005 Marcus R. Brown <mrbrown at ocgnet.org>
X+ * Copyright (c) 2005 James Forshaw <tyranid at gmail.com>
X+ * Copyright (c) 2005 John Kelley <ps2dev at kelley.ca>
X+ * Copyright (c) 2005 Jim Paris <jim at jtan.com>
X+ *
X+ */
X+#include <string.h>
X+#include <sys/types.h>
X+#include <sys/unistd.h>
X+
X+#include <psptypes.h>
X+#include <pspiofilemgr.h>
X+
X+char __psp_cwd[MAXPATHLEN + 1] = { 0 };
X+
X+/* Set the current working directory (CWD) to the path where the module was launched. */
X+void __psp_init_cwd(char *argv_0)
X+{
X+	if (argv_0 != NULL) {
X+		char base_path[MAXPATHLEN + 1];
X+		char *end;
X+
X+		strncpy(base_path, argv_0, sizeof(base_path) - 1);
X+		base_path[sizeof(base_path) - 1] = '\0';
X+		end = strrchr(base_path, '/');
X+		if (end != NULL) {
X+			*(end + 1) = '\0';
X+			chdir(base_path);
X+		}
X+	}
X+}
X+
X+/* Return the number of bytes taken up by the "drive:" prefix,
X+   or -1 if it's not found */
X+int __psp_get_drive(const char *d)
X+{
X+	int i;
X+	for(i=0; d[i]; i++) {
X+		if(! ((d[i] >= 'a' && d[i] <= 'z') ||
X+		      (d[i] >= '0' && d[i] <= '9') ))
X+			break;
X+	}
X+	if(d[i] == ':') return i+1;
X+	return -1;
X+}
X+
X+/* Like strcpy, but returns 0 if the string doesn't fit */
X+int __psp_safe_strcpy(char *out, const char *in, int maxlen)
X+{
X+	for( ; maxlen > 0 && *in ; maxlen-- )
X+		*(out++) = *(in++);
X+	if(maxlen < 1) return 0;
X+	*out = 0;
X+	return 1;
X+}
X+
X+/* Like strcat, but returns 0 if the string doesn't fit */
X+int __psp_safe_strcat(char *out, const char *in, int maxlen)
X+{
X+	for( ; *out ; out++,maxlen-- )
X+		continue;
X+	return __psp_safe_strcpy(out, in, maxlen);
X+}
X+
X+/* Normalize a pathname (without leading "drive:") by removing
X+   . and .. components, duplicated /, etc. */
X+int __psp_path_normalize(char *out, int len)
X+{
X+	int i, j;
X+	int first, next;
X+
X+	/* First append "/" to make the rest easier */
X+	if(!__psp_safe_strcat(out,"/",len)) return -10;
X+
X+	/* Convert "//" to "/" */
X+	for(i=0; out[i+1]; i++) {
X+		if(out[i]=='/' && out[i+1]=='/') {
X+			for(j=i+1; out[j]; j++)
X+				out[j] = out[j+1];
X+			i--;
X+		}
X+	}
X+
X+	/* Convert "/./" to "/" */
X+	for(i=0; out[i] && out[i+1] && out[i+2]; i++) {
X+		if(out[i]=='/' && out[i+1]=='.' && out[i+2]=='/') {
X+			for(j=i+1; out[j]; j++)
X+				out[j] = out[j+2];
X+			i--;
X+		}
X+	}
X+
X+	/* Convert "/asdf/../" to "/" until we can't anymore.  Also
X+	 * convert leading "/../" to "/" */
X+	first = next = 0;
X+	while(1) {
X+		/* If a "../" follows, remove it and the parent */
X+		if(out[next+1] && out[next+1]=='.' && 
X+		   out[next+2] && out[next+2]=='.' &&
X+		   out[next+3] && out[next+3]=='/') {
X+			for(j=0; out[first+j+1]; j++)
X+				out[first+j+1] = out[next+j+4];
X+			first = next = 0;
X+			continue;
X+		}
X+
X+		/* Find next slash */
X+		first = next;
X+		for(next=first+1; out[next] && out[next] != '/'; next++)
X+			continue;
X+		if(!out[next]) break;
X+	}
X+
X+	/* Remove trailing "/" */
X+	for(i=1; out[i]; i++)
X+		continue;
X+	if(i >= 1 && out[i-1] == '/') 
X+		out[i-1] = 0;
X+
X+	return 0;
X+}
X+
X+/* Convert relative path to absolute path. */
X+int __psp_path_absolute(const char *in, char *out, int len)
X+{
X+	int dr;
X+
X+	/* See what the relative URL starts with */
X+	dr = __psp_get_drive(in);
X+	if(dr > 0 && in[dr] == '/') {
X+		/* It starts with "drive:/", so it's already absolute */
X+		if(!__psp_safe_strcpy(out, in, len))
X+			return -1;
X+	} else if(in[0] == '/') {
X+		/* It's absolute, but missing the drive, so use cwd's drive */
X+		if(strlen(__psp_cwd) >= len)
X+			return -2;
X+		strcpy(out, __psp_cwd);
X+		dr = __psp_get_drive(out);
X+		out[dr] = 0;
X+		if(!__psp_safe_strcat(out, in, len))
X+			return -3;
X+	} else {
X+		/* It's not absolute, so append it to the current cwd */
X+		if(strlen(__psp_cwd) >= len)
X+			return -4;
X+		strcpy(out, __psp_cwd);
X+		if(!__psp_safe_strcat(out, "/", len)) 
X+			return -6;
X+		if(!__psp_safe_strcat(out, in, len)) 
X+			return -7;
X+	}
X+
X+	/* Now normalize the pathname portion */
X+	dr = __psp_get_drive(out);
X+	if(dr < 0) dr = 0;
X+	return __psp_path_normalize(out + dr, len - dr);
X+}
X+
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-pspcwd.c
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-Makefile.am
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-Makefile.am << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-Makefile.am'
X--- newlib/libc/sys/psp/Makefile.am.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/Makefile.am	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,71 @@
X+## Process this file with automake to generate Makefile.in
X+
X+AUTOMAKE_OPTIONS = cygnus
X+
X+INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
X+
X+AM_CCASFLAGS = $(INCLUDES) $(CFLAGS)
X+
X+noinst_LIBRARIES = lib.a
X+
X+LIBCGLUE_MULT_OBJS = _close.o _exit.o _fork.o _fstat.o _getpid.o    \
X+                     _gettimeofday.o _kill.o _lseek.o _open.o _read.o   \
X+                     _sbrk.o _wait.o _write.o clock.o isatty.o time.o   \
X+                     _link.o _unlink.o sleep.o opendir.o readdir.o  \
X+                     closedir.o getcwd.o chdir.o mkdir.o rmdir.o    \
X+                     realpath.o _stat.o truncate.o access.o tzset.o \
X+                     __psp_set_errno.o mlock.o _fcntl.o _rename.o nanosleep.o
X+
X+SOCKET_MULT_OBJS = socket.o accept.o bind.o connect.o getsockopt.o \
X+                   listen.o recv.o recvfrom.o send.o sendto.o \
X+                   setsockopt.o shutdown.o getsockname.o getpeername.o \
X+                   inet_ntoa.o
X+
X+PE_OBJS = pipe.o
X+
X+FDMAN_OBJS = fdman.o
X+
X+SELECT_OBJS = select.o
X+
X+INTERRUPT_OBJS = interrupt.o
X+
X+XPRINTF_MULT_OBJS = vxprintf.o _xprintf.o __sout.o vsnprintf.o snprintf.o \
X+                    vsprintf.o sprintf.o __mout.o mprintf.o vmprintf.o asprintf.o \
X+                    vasprintf.o __fout.o fprintf.o vfprintf.o printf.o vprintf.o \
X+                    _sprintf_r.o
X+
X+NETDB_MULT_OBJS = h_errno.o gethostbyaddr.o gethostbyname.o
X+
X+
X+lib_a_SOURCES = libcglue.c socket.c pspcwd.c xprintf.c netdb.c pipe.c fdman.c select.c syscalls.c interrupt.S
X+lib_a_LIBADD  = $(LIBCGLUE_MULT_OBJS) $(SOCKET_MULT_OBJS) $(XPRINTF_MULT_OBJS) \
X+                $(NETDB_MULT_OBJS) $(PIPE_OBJS) $(FDMAN_OBJS) $(SELECT_OBJS) $(INTERRUPT_OBJS)
X+
X+all: crt0.o
X+
X+$(LIBCGLUE_MULT_OBJS): libcglue.c
X+	$(COMPILE) -DF_$* $< -c -o $@
X+
X+$(SOCKET_MULT_OBJS): socket.c
X+	$(COMPILE) -DF_$* $< -c -o $@
X+
X+$(XPRINTF_MULT_OBJS): xprintf.c
X+	$(COMPILE) -DF_$* $< -c -o $@
X+
X+$(NETDB_MULT_OBJS): netdb.c
X+	$(COMPILE) -DF_$* $< -c -o $@
X+
X+$(PIPE_OBJS): pipe.c
X+	$(COMPILE) -DF_$* $< -c -o $@
X+
X+$(FDMAN_OBJS): fdman.c
X+	$(COMPILE) -DF_$* $< -c -o $@
X+
X+$(SELECT_OBJS): select.c
X+	$(COMPILE) -DF_$* $< -c -o $@
X+
X+$(INTERRUPT_OBJS): interrupt.S
X+	$(COMPILE) -DF_$* $< -c -o $@
X+
X+ACLOCAL_AMFLAGS = -I ../../..
X+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-Makefile.am
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-dirent.h
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-dirent.h << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-dirent.h'
X--- newlib/libc/sys/psp/sys/dirent.h.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/sys/dirent.h	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,39 @@
X+#ifndef _SYS_DIRENT_H
X+#define _SYS_DIRENT_H
X+
X+/* PSP dirent.h, based on pspiofilemgr_dirent.h
X+   by Jim Paris <jim at jtan.com> */
X+
X+#ifdef __cplusplus
X+extern "C" {
X+#endif
X+	
X+#include <pspiofilemgr_dirent.h> 
X+	
X+#define MAXNAMLEN 255
X+	
X+/* Same as SceIoDirent, just with a different name. */
X+struct dirent {
X+	/** File status. */
X+	SceIoStat 	d_stat;
X+	/** File name. */
X+	char 		d_name[256];
X+	/** Device-specific data. */
X+	void * 		d_private;
X+	int 		dummy;
X+};
X+
X+typedef struct {
X+	SceUID		uid;
X+	struct dirent	de;
X+} DIR;
X+
X+DIR *opendir (const char *);
X+struct dirent *readdir (DIR *);
X+int closedir (DIR *);
X+
X+#ifdef __cplusplus
X+}
X+#endif
X+
X+#endif
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-dirent.h
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-ioctl.h
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-ioctl.h << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-ioctl.h'
X--- newlib/libc/sys/psp/sys/ioctl.h.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/sys/ioctl.h	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1 @@
X+/* Empty file, here for compatibility */
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-ioctl.h
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-syscalls.c
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-syscalls.c << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-syscalls.c'
X--- newlib/libc/sys/psp/syscalls.c.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/syscalls.c	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,19 @@
X+/*
X+ * PSP Software Development Kit - http://www.pspdev.org
X+ * -----------------------------------------------------------------------
X+ * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
X+ *
X+ * syscalls.c - functions in systeam namespace goes here
X+ *
X+ * Copyright (c) 2007 Alper Akcan "anhanguera" <distchx at yahoo.com>
X+ * 
X+ */
X+
X+#include <stdio.h>
X+
X+int __psp_set_errno (int code);
X+
X+time_t _times (time_t *t)
X+{
X+       return __psp_set_errno(sceKernelLibcTime(t));
X+} 
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-syscalls.c
echo x - psptoolchain-newlib/files/patch-config.sub
sed 's/^X//' >psptoolchain-newlib/files/patch-config.sub << 'END-of-psptoolchain-newlib/files/patch-config.sub'
X--- config.sub.orig	2006-12-11 06:12:46.000000000 +0200
X+++ config.sub	2007-06-01 12:22:26.000000000 +0300
X@@ -267,6 +267,7 @@
X 	| mipsisa64sb1 | mipsisa64sb1el \
X 	| mipsisa64sr71k | mipsisa64sr71kel \
X 	| mipstx39 | mipstx39el \
X+	| mipsallegrex | mipsallegrexel \
X 	| mn10200 | mn10300 \
X 	| mt \
X 	| msp430 \
X@@ -348,6 +349,7 @@
X 	| mipsisa64sb1-* | mipsisa64sb1el-* \
X 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
X 	| mipstx39-* | mipstx39el-* \
X+	| mipsallegrex-* | mipsallegrexel-* \
X 	| mmix-* \
X 	| mt-* \
X 	| msp430-* \
X@@ -690,6 +692,10 @@
X 		basic_machine=m68k-atari
X 		os=-mint
X 		;;
X+	psp)
X+		basic_machine=mipsallegrexel-psp
X+		os=-elf
X+		;;
X 	mips3*-*)
X 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
X 		;;
END-of-psptoolchain-newlib/files/patch-config.sub
echo x - psptoolchain-newlib/files/patch-configure
sed 's/^X//' >psptoolchain-newlib/files/patch-configure << 'END-of-psptoolchain-newlib/files/patch-configure'
X--- configure.orig	2006-12-12 03:38:04.000000000 +0200
X+++ configure	2007-06-01 12:22:26.000000000 +0300
X@@ -1561,6 +1561,9 @@
X   mips*-*-linux*)
X     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
X     ;;
X+  mipsallegrex*-*-*)
X+    noconfigdirs="$noconfigdirs target-libgloss"
X+    ;;
X   mips*-*-*)
X     noconfigdirs="$noconfigdirs gprof ${libgcj}"
X     ;;
END-of-psptoolchain-newlib/files/patch-configure
echo x - psptoolchain-newlib/files/patch-newlib-Makefile.am
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-Makefile.am << 'END-of-psptoolchain-newlib/files/patch-newlib-Makefile.am'
X--- newlib/Makefile.am.orig	2006-06-05 20:42:57.000000000 +0300
X+++ newlib/Makefile.am	2007-06-01 12:22:26.000000000 +0300
X@@ -267,6 +267,18 @@
X 	     $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/machine/`basename $$i`; \
X 	    else true; fi ; \
X 	  done; \
X+	  $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/netinet; \
X+	  for i in $(srcdir)/libc/sys/$(sys_dir)/netinet/*.h; do \
X+	    if [ -f $$i ]; then \
X+	     $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/netinet/`basename $$i`; \
X+	    else true; fi ; \
X+	  done ; \
X+	  $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/arpa; \
X+	  for i in $(srcdir)/libc/sys/$(sys_dir)/arpa/*.h; do \
X+	    if [ -f $$i ]; then \
X+	     $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/arpa/`basename $$i`; \
X+	    else true; fi ; \
X+	  done ; \
X 	  $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/sys; \
X 	  for i in $(srcdir)/libc/include/sys/*.h; do \
X 	   $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/sys/`basename $$i`; \
END-of-psptoolchain-newlib/files/patch-newlib-Makefile.am
echo x - psptoolchain-newlib/files/patch-newlib-configure.host
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-configure.host << 'END-of-psptoolchain-newlib/files/patch-newlib-configure.host'
X--- newlib/configure.host.orig	2006-12-18 23:49:14.000000000 +0200
X+++ newlib/configure.host	2007-06-01 12:22:26.000000000 +0300
X@@ -510,7 +510,7 @@
X #  NOTE: When newlib malloc uses a semaphore, RTEMS will switch to that.
X   *-*-rtems*)
X 	default_newlib_io_long_long="yes"
X-	newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED -DEXIT_PROVIDED -DMISSING_SYSCALL_NAMES -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_OPENDIR -DNO_EXEC -DHAVE_FCNTL"
X+	newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED -DEXIT_PROVIDED -DMISSING_SYSCALL_NAMES -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_OPENDIR -DNO_EXEC -DHAVE_FCNTL -DHAVE_RENAME -DHAVE_NANOSLEEP"
X 	;;
X # VxWorks supplies its own version of malloc, and the newlib one
X # doesn't work because VxWorks does not have sbrk.
X@@ -632,7 +632,14 @@
X 	;;
X   mips*-*-elf*)
X 	default_newlib_io_long_long="yes"
X-	newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
X+	case "${host}" in
X+	  mipsallegrex*-psp-*)
X+		sys_dir=psp
X+		syscall_dir=syscalls
X+		newlib_cflags="${newlib_cflags} -G0 -mno-explicit-relocs -DCOMPACT_CTYPE -DCLOCK_PROVIDED -DHAVE_FCNTL -DMALLOC_ALIGNMENT=16 -I${prefix}/psp/sdk/include" ;;
X+	  *)
X+		newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES" ;;
X+	esac
X 	;;
X   mmix-*)
X 	syscall_dir=syscalls
END-of-psptoolchain-newlib/files/patch-newlib-configure.host
echo x - psptoolchain-newlib/files/patch-newlib-libc-include-machine-time.h
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-include-machine-time.h << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-include-machine-time.h'
X--- newlib/libc/include/machine/time.h.orig	2000-12-04 21:06:37.000000000 +0200
X+++ newlib/libc/include/machine/time.h	2007-06-01 12:22:26.000000000 +0300
X@@ -9,6 +9,10 @@
X #endif
X #endif /* !__rtems__ */
X 
X+#if defined(__psp__)
X+#define _CLOCKS_PER_SEC_  1000000
X+#endif
X+
X #endif	/* _MACHTIME_H_ */
X 
X 
END-of-psptoolchain-newlib/files/patch-newlib-libc-include-machine-time.h
echo x - psptoolchain-newlib/files/patch-newlib-libc-include-sys-types.h
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-include-sys-types.h << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-include-sys-types.h'
X--- newlib/libc/include/sys/types.h.orig	2006-09-14 01:09:27.000000000 +0300
X+++ newlib/libc/include/sys/types.h	2007-06-01 12:22:26.000000000 +0300
X@@ -199,52 +199,6 @@
X 
X typedef unsigned short nlink_t;
X 
X-/* We don't define fd_set and friends if we are compiling POSIX
X-   source, or if we have included (or may include as indicated
X-   by __USE_W32_SOCKETS) the W32api winsock[2].h header which
X-   defines Windows versions of them.   Note that a program which
X-   includes the W32api winsock[2].h header must know what it is doing;
X-   it must not call the cygwin32 select function.
X-*/
X-# if !(defined (_POSIX_SOURCE) || defined (_WINSOCK_H) || defined (__USE_W32_SOCKETS)) 
X-#  define _SYS_TYPES_FD_SET
X-#  define	NBBY	8		/* number of bits in a byte */
X-/*
X- * Select uses bit masks of file descriptors in longs.
X- * These macros manipulate such bit fields (the filesystem macros use chars).
X- * FD_SETSIZE may be defined by the user, but the default here
X- * should be >= NOFILE (param.h).
X- */
X-#  ifndef	FD_SETSIZE
X-#	define	FD_SETSIZE	64
X-#  endif
X-
X-typedef	long	fd_mask;
X-#  define	NFDBITS	(sizeof (fd_mask) * NBBY)	/* bits per mask */
X-#  ifndef	howmany
X-#	define	howmany(x,y)	(((x)+((y)-1))/(y))
X-#  endif
X-
X-/* We use a macro for fd_set so that including Sockets.h afterwards
X-   can work.  */
X-typedef	struct _types_fd_set {
X-	fd_mask	fds_bits[howmany(FD_SETSIZE, NFDBITS)];
X-} _types_fd_set;
X-
X-#define fd_set _types_fd_set
X-
X-#  define	FD_SET(n, p)	((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS)))
X-#  define	FD_CLR(n, p)	((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS)))
X-#  define	FD_ISSET(n, p)	((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS)))
X-#  define	FD_ZERO(p)	(__extension__ (void)({ \
X-     size_t __i; \
X-     char *__tmp = (char *)p; \
X-     for (__i = 0; __i < sizeof (*(p)); ++__i) \
X-       *__tmp++ = 0; \
X-}))
X-
X-# endif	/* !(defined (_POSIX_SOURCE) || defined (_WINSOCK_H) || defined (__USE_W32_SOCKETS)) */
X-
X #undef __MS_types__
X #undef _ST_INT32
X 
END-of-psptoolchain-newlib/files/patch-newlib-libc-include-sys-types.h
echo x - psptoolchain-newlib/files/patch-newlib-libc-include-time.h
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-include-time.h << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-include-time.h'
X--- newlib/libc/include/time.h.orig	2005-11-18 17:57:24.000000000 +0200
X+++ newlib/libc/include/time.h	2007-06-01 12:22:26.000000000 +0300
X@@ -174,6 +174,16 @@
X }
X #endif
X #endif /* _POSIX_TIMERS */
X+#if defined(__psp__)
X+#ifdef __cplusplus
X+extern "C" {
X+#endif
X+int _EXFUN(nanosleep, (const struct timespec  *rqtp, struct timespec *rmtp));
X+#ifdef __cplusplus
X+}
X+#endif
X+#endif /*  __psp__ */
X+
X 
X #ifdef __cplusplus
X extern "C" {
END-of-psptoolchain-newlib/files/patch-newlib-libc-include-time.h
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-configure.in
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-configure.in << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-configure.in'
X--- newlib/libc/sys/configure.in.orig	2006-04-13 22:56:27.000000000 +0300
X+++ newlib/libc/sys/configure.in	2007-06-01 12:22:26.000000000 +0300
X@@ -32,6 +32,7 @@
X 	mmixware) AC_CONFIG_SUBDIRS(mmixware) ;;
X 	netware) AC_CONFIG_SUBDIRS(netware) ;;
X 	rdos) AC_CONFIG_SUBDIRS(rdos) ;;
X+	psp) AC_CONFIG_SUBDIRS(psp) ;;
X 	rtems) AC_CONFIG_SUBDIRS(rtems) ;;
X 	sh) AC_CONFIG_SUBDIRS(sh) ;;
X 	sparc64) AC_CONFIG_SUBDIRS(sparc64) ;;
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-configure.in
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-Makefile.in
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-Makefile.in << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-Makefile.in'
X--- newlib/libc/sys/psp/Makefile.in.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/Makefile.in	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,464 @@
X+# Makefile.in generated by automake 1.9.6 from Makefile.am.
X+# @configure_input@
X+
X+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
X+# 2003, 2004, 2005  Free Software Foundation, Inc.
X+# This Makefile.in is free software; the Free Software Foundation
X+# gives unlimited permission to copy and/or distribute it,
X+# with or without modifications, as long as this notice is preserved.
X+
X+# This program is distributed in the hope that it will be useful,
X+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
X+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
X+# PARTICULAR PURPOSE.
X+
X+ at SET_MAKE@
X+
X+srcdir = @srcdir@
X+top_srcdir = @top_srcdir@
X+VPATH = @srcdir@
X+pkgdatadir = $(datadir)/@PACKAGE@
X+pkglibdir = $(libdir)/@PACKAGE@
X+pkgincludedir = $(includedir)/@PACKAGE@
X+top_builddir = .
X+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
X+INSTALL = @INSTALL@
X+install_sh_DATA = $(install_sh) -c -m 644
X+install_sh_PROGRAM = $(install_sh) -c
X+install_sh_SCRIPT = $(install_sh) -c
X+INSTALL_HEADER = $(INSTALL_DATA)
X+transform = $(program_transform_name)
X+NORMAL_INSTALL = :
X+PRE_INSTALL = :
X+POST_INSTALL = :
X+NORMAL_UNINSTALL = :
X+PRE_UNINSTALL = :
X+POST_UNINSTALL = :
X+build_triplet = @build@
X+host_triplet = @host@
X+DIST_COMMON = $(srcdir)/../../../../config.guess \
X+	$(srcdir)/../../../../config.sub README $(srcdir)/Makefile.in \
X+	$(srcdir)/Makefile.am $(top_srcdir)/configure \
X+	$(am__configure_deps) $(srcdir)/../../../../mkinstalldirs
X+subdir = .
X+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
X+am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \
X+	$(top_srcdir)/configure.in
X+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
X+	$(ACLOCAL_M4)
X+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
X+ configure.lineno configure.status.lineno
X+mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
X+CONFIG_CLEAN_FILES =
X+LIBRARIES = $(noinst_LIBRARIES)
X+ARFLAGS = cru
X+lib_a_AR = $(AR) $(ARFLAGS)
X+am__DEPENDENCIES_1 = _close.o _exit.o _fork.o _fstat.o _getpid.o \
X+	_gettimeofday.o _kill.o _lseek.o _open.o _read.o _sbrk.o \
X+	_wait.o _write.o clock.o isatty.o time.o _link.o _unlink.o \
X+	sleep.o opendir.o readdir.o closedir.o getcwd.o chdir.o \
X+	mkdir.o rmdir.o realpath.o _stat.o truncate.o access.o tzset.o \
X+	__psp_set_errno.o mlock.o _fcntl.o _rename.o nanosleep.o
X+am__DEPENDENCIES_2 = socket.o accept.o bind.o connect.o getsockopt.o \
X+	listen.o recv.o recvfrom.o send.o sendto.o setsockopt.o \
X+	shutdown.o getsockname.o getpeername.o inet_ntoa.o
X+am__DEPENDENCIES_3 = vxprintf.o _xprintf.o __sout.o vsnprintf.o \
X+	snprintf.o vsprintf.o sprintf.o __mout.o mprintf.o vmprintf.o \
X+	asprintf.o vasprintf.o __fout.o fprintf.o vfprintf.o printf.o \
X+	vprintf.o _sprintf_r.o
X+am__DEPENDENCIES_4 = h_errno.o gethostbyaddr.o gethostbyname.o
X+am__DEPENDENCIES_5 = fdman.o
X+am__DEPENDENCIES_6 = select.o
X+am__DEPENDENCIES_7 = interrupt.o
X+lib_a_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
X+	$(am__DEPENDENCIES_3) $(am__DEPENDENCIES_4) \
X+	$(am__DEPENDENCIES_5) $(am__DEPENDENCIES_6) \
X+	$(am__DEPENDENCIES_7)
X+am_lib_a_OBJECTS = libcglue.$(OBJEXT) socket.$(OBJEXT) \
X+	pspcwd.$(OBJEXT) xprintf.$(OBJEXT) netdb.$(OBJEXT) \
X+	pipe.$(OBJEXT) fdman.$(OBJEXT) select.$(OBJEXT) \
X+	syscalls.$(OBJEXT) interrupt.$(OBJEXT)
X+lib_a_OBJECTS = $(am_lib_a_OBJECTS)
X+DEFAULT_INCLUDES = -I. -I$(srcdir)
X+depcomp =
X+am__depfiles_maybe =
X+CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)
X+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
X+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
X+CCLD = $(CC)
X+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
X+SOURCES = $(lib_a_SOURCES)
X+ETAGS = etags
X+CTAGS = ctags
X+ACLOCAL = @ACLOCAL@
X+AMDEP_FALSE = @AMDEP_FALSE@
X+AMDEP_TRUE = @AMDEP_TRUE@
X+AMTAR = @AMTAR@
X+AR = @AR@
X+AS = @AS@
X+AUTOCONF = @AUTOCONF@
X+AUTOHEADER = @AUTOHEADER@
X+AUTOMAKE = @AUTOMAKE@
X+AWK = @AWK@
X+CC = @CC@
X+CCAS = @CCAS@
X+CCASFLAGS = @CCASFLAGS@
X+CCDEPMODE = @CCDEPMODE@
X+CYGPATH_W = @CYGPATH_W@
X+DEFS = @DEFS@
X+DEPDIR = @DEPDIR@
X+ECHO_C = @ECHO_C@
X+ECHO_N = @ECHO_N@
X+ECHO_T = @ECHO_T@
X+ELIX_LEVEL_0_FALSE = @ELIX_LEVEL_0_FALSE@
X+ELIX_LEVEL_0_TRUE = @ELIX_LEVEL_0_TRUE@
X+ELIX_LEVEL_1_FALSE = @ELIX_LEVEL_1_FALSE@
X+ELIX_LEVEL_1_TRUE = @ELIX_LEVEL_1_TRUE@
X+ELIX_LEVEL_2_FALSE = @ELIX_LEVEL_2_FALSE@
X+ELIX_LEVEL_2_TRUE = @ELIX_LEVEL_2_TRUE@
X+ELIX_LEVEL_3_FALSE = @ELIX_LEVEL_3_FALSE@
X+ELIX_LEVEL_3_TRUE = @ELIX_LEVEL_3_TRUE@
X+ELIX_LEVEL_4_FALSE = @ELIX_LEVEL_4_FALSE@
X+ELIX_LEVEL_4_TRUE = @ELIX_LEVEL_4_TRUE@
X+INSTALL_DATA = @INSTALL_DATA@
X+INSTALL_PROGRAM = @INSTALL_PROGRAM@
X+INSTALL_SCRIPT = @INSTALL_SCRIPT@
X+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
X+LDFLAGS = @LDFLAGS@
X+LIBOBJS = @LIBOBJS@
X+LIBS = @LIBS@
X+LTLIBOBJS = @LTLIBOBJS@
X+MAINT = @MAINT@
X+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
X+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
X+MAKEINFO = @MAKEINFO@
X+MAY_SUPPLY_SYSCALLS_FALSE = @MAY_SUPPLY_SYSCALLS_FALSE@
X+MAY_SUPPLY_SYSCALLS_TRUE = @MAY_SUPPLY_SYSCALLS_TRUE@
X+NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
X+OBJEXT = @OBJEXT@
X+PACKAGE = @PACKAGE@
X+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
X+PACKAGE_NAME = @PACKAGE_NAME@
X+PACKAGE_STRING = @PACKAGE_STRING@
X+PACKAGE_TARNAME = @PACKAGE_TARNAME@
X+PACKAGE_VERSION = @PACKAGE_VERSION@
X+PATH_SEPARATOR = @PATH_SEPARATOR@
X+RANLIB = @RANLIB@
X+READELF = @READELF@
X+SET_MAKE = @SET_MAKE@
X+SHELL = @SHELL@
X+STRIP = @STRIP@
X+USE_LIBTOOL_FALSE = @USE_LIBTOOL_FALSE@
X+USE_LIBTOOL_TRUE = @USE_LIBTOOL_TRUE@
X+VERSION = @VERSION@
X+aext = @aext@
X+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
X+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
X+am__include = @am__include@
X+am__leading_dot = @am__leading_dot@
X+am__quote = @am__quote@
X+am__tar = @am__tar@
X+am__untar = @am__untar@
X+bindir = @bindir@
X+build = @build@
X+build_alias = @build_alias@
X+build_cpu = @build_cpu@
X+build_os = @build_os@
X+build_vendor = @build_vendor@
X+datadir = @datadir@
X+datarootdir = @datarootdir@
X+docdir = @docdir@
X+dvidir = @dvidir@
X+exec_prefix = @exec_prefix@
X+host = @host@
X+host_alias = @host_alias@
X+host_cpu = @host_cpu@
X+host_os = @host_os@
X+host_vendor = @host_vendor@
X+htmldir = @htmldir@
X+includedir = @includedir@
X+infodir = @infodir@
X+install_sh = @install_sh@
X+libdir = @libdir@
X+libexecdir = @libexecdir@
X+libm_machine_dir = @libm_machine_dir@
X+localedir = @localedir@
X+localstatedir = @localstatedir@
X+lpfx = @lpfx@
X+machine_dir = @machine_dir@
X+mandir = @mandir@
X+mkdir_p = @mkdir_p@
X+newlib_basedir = @newlib_basedir@
X+oext = @oext@
X+oldincludedir = @oldincludedir@
X+pdfdir = @pdfdir@
X+prefix = @prefix@
X+program_transform_name = @program_transform_name@
X+psdir = @psdir@
X+sbindir = @sbindir@
X+sharedstatedir = @sharedstatedir@
X+sys_dir = @sys_dir@
X+sysconfdir = @sysconfdir@
X+target_alias = @target_alias@
X+AUTOMAKE_OPTIONS = cygnus
X+INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
X+AM_CCASFLAGS = $(INCLUDES) $(CFLAGS)
X+noinst_LIBRARIES = lib.a
X+LIBCGLUE_MULT_OBJS = _close.o _exit.o _fork.o _fstat.o _getpid.o    \
X+                     _gettimeofday.o _kill.o _lseek.o _open.o _read.o   \
X+                     _sbrk.o _wait.o _write.o clock.o isatty.o time.o   \
X+                     _link.o _unlink.o sleep.o opendir.o readdir.o  \
X+                     closedir.o getcwd.o chdir.o mkdir.o rmdir.o    \
X+                     realpath.o _stat.o truncate.o access.o tzset.o \
X+                     __psp_set_errno.o mlock.o _fcntl.o _rename.o nanosleep.o
X+
X+SOCKET_MULT_OBJS = socket.o accept.o bind.o connect.o getsockopt.o \
X+                   listen.o recv.o recvfrom.o send.o sendto.o \
X+                   setsockopt.o shutdown.o getsockname.o getpeername.o \
X+                   inet_ntoa.o
X+
X+PE_OBJS = pipe.o
X+FDMAN_OBJS = fdman.o
X+SELECT_OBJS = select.o
X+INTERRUPT_OBJS = interrupt.o
X+XPRINTF_MULT_OBJS = vxprintf.o _xprintf.o __sout.o vsnprintf.o snprintf.o \
X+                    vsprintf.o sprintf.o __mout.o mprintf.o vmprintf.o asprintf.o \
X+                    vasprintf.o __fout.o fprintf.o vfprintf.o printf.o vprintf.o \
X+                    _sprintf_r.o
X+
X+NETDB_MULT_OBJS = h_errno.o gethostbyaddr.o gethostbyname.o
X+lib_a_SOURCES = libcglue.c socket.c pspcwd.c xprintf.c netdb.c pipe.c fdman.c select.c syscalls.c interrupt.S
X+lib_a_LIBADD = $(LIBCGLUE_MULT_OBJS) $(SOCKET_MULT_OBJS) $(XPRINTF_MULT_OBJS) \
X+                $(NETDB_MULT_OBJS) $(PIPE_OBJS) $(FDMAN_OBJS) $(SELECT_OBJS) $(INTERRUPT_OBJS)
X+
X+ACLOCAL_AMFLAGS = -I ../../..
X+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
X+all: all-am
X+
X+.SUFFIXES:
X+.SUFFIXES: .S .c .o .obj
X+am--refresh:
X+	@:
X+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
X+	@for dep in $?; do \
X+	  case '$(am__configure_deps)' in \
X+	    *$$dep*) \
X+	      echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus '; \
X+	      cd $(srcdir) && $(AUTOMAKE) --cygnus  \
X+		&& exit 0; \
X+	      exit 1;; \
X+	  esac; \
X+	done; \
X+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus  Makefile'; \
X+	cd $(top_srcdir) && \
X+	  $(AUTOMAKE) --cygnus  Makefile
X+.PRECIOUS: Makefile
X+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
X+	@case '$?' in \
X+	  *config.status*) \
X+	    echo ' $(SHELL) ./config.status'; \
X+	    $(SHELL) ./config.status;; \
X+	  *) \
X+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
X+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
X+	esac;
X+
X+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
X+	$(SHELL) ./config.status --recheck
X+
X+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
X+	cd $(srcdir) && $(AUTOCONF)
X+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
X+	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
X+
X+clean-noinstLIBRARIES:
X+	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
X+lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES) 
X+	-rm -f lib.a
X+	$(lib_a_AR) lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
X+	$(RANLIB) lib.a
X+
X+mostlyclean-compile:
X+	-rm -f *.$(OBJEXT)
X+
X+distclean-compile:
X+	-rm -f *.tab.c
X+
X+.S.o:
X+	$(CCASCOMPILE) -c $<
X+
X+.S.obj:
X+	$(CCASCOMPILE) -c `$(CYGPATH_W) '$<'`
X+
X+.c.o:
X+	$(COMPILE) -c $<
X+
X+.c.obj:
X+	$(COMPILE) -c `$(CYGPATH_W) '$<'`
X+uninstall-info-am:
X+
X+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
X+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
X+	unique=`for i in $$list; do \
X+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
X+	  done | \
X+	  $(AWK) '    { files[$$0] = 1; } \
X+	       END { for (i in files) print i; }'`; \
X+	mkid -fID $$unique
X+tags: TAGS
X+
X+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
X+		$(TAGS_FILES) $(LISP)
X+	tags=; \
X+	here=`pwd`; \
X+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
X+	unique=`for i in $$list; do \
X+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
X+	  done | \
X+	  $(AWK) '    { files[$$0] = 1; } \
X+	       END { for (i in files) print i; }'`; \
X+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
X+	  test -n "$$unique" || unique=$$empty_fix; \
X+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
X+	    $$tags $$unique; \
X+	fi
X+ctags: CTAGS
X+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
X+		$(TAGS_FILES) $(LISP)
X+	tags=; \
X+	here=`pwd`; \
X+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
X+	unique=`for i in $$list; do \
X+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
X+	  done | \
X+	  $(AWK) '    { files[$$0] = 1; } \
X+	       END { for (i in files) print i; }'`; \
X+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
X+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
X+	     $$tags $$unique
X+
X+GTAGS:
X+	here=`$(am__cd) $(top_builddir) && pwd` \
X+	  && cd $(top_srcdir) \
X+	  && gtags -i $(GTAGS_ARGS) $$here
X+
X+distclean-tags:
X+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
X+check-am:
X+check: check-am
X+all-am: Makefile $(LIBRARIES)
X+installdirs:
X+install: install-am
X+install-exec: install-exec-am
X+install-data: install-data-am
X+uninstall: uninstall-am
X+
X+install-am: all-am
X+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
X+
X+installcheck: installcheck-am
X+install-strip:
X+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
X+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
X+	  `test -z '$(STRIP)' || \
X+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
X+mostlyclean-generic:
X+
X+clean-generic:
X+
X+distclean-generic:
X+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
X+
X+maintainer-clean-generic:
X+	@echo "This command is intended for maintainers to use"
X+	@echo "it deletes files that may require special tools to rebuild."
X+clean: clean-am
X+
X+clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
X+
X+distclean: distclean-am
X+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
X+	-rm -f Makefile
X+distclean-am: clean-am distclean-compile distclean-generic \
X+	distclean-tags
X+
X+dvi: dvi-am
X+
X+dvi-am:
X+
X+html: html-am
X+
X+info: info-am
X+
X+info-am:
X+
X+install-data-am:
X+
X+install-exec-am:
X+
X+install-info: install-info-am
X+
X+install-man:
X+
X+installcheck-am:
X+
X+maintainer-clean: maintainer-clean-am
X+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
X+	-rm -rf $(top_srcdir)/autom4te.cache
X+	-rm -f Makefile
X+maintainer-clean-am: distclean-am maintainer-clean-generic
X+
X+mostlyclean: mostlyclean-am
X+
X+mostlyclean-am: mostlyclean-compile mostlyclean-generic
X+
X+pdf: pdf-am
X+
X+pdf-am:
X+
X+ps: ps-am
X+
X+ps-am:
X+
X+uninstall-am:
X+
X+.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
X+	clean-generic clean-noinstLIBRARIES ctags distclean \
X+	distclean-compile distclean-generic distclean-tags dvi dvi-am \
X+	html html-am info info-am install install-am install-data \
X+	install-data-am install-exec install-exec-am install-info \
X+	install-info-am install-man install-strip installcheck \
X+	installcheck-am installdirs maintainer-clean \
X+	maintainer-clean-generic mostlyclean mostlyclean-compile \
X+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
X+	uninstall-am uninstall-info-am
X+
X+
X+all: crt0.o
X+
X+$(LIBCGLUE_MULT_OBJS): libcglue.c
X+	$(COMPILE) -DF_$* $< -c -o $@
X+
X+$(SOCKET_MULT_OBJS): socket.c
X+	$(COMPILE) -DF_$* $< -c -o $@
X+
X+$(XPRINTF_MULT_OBJS): xprintf.c
X+	$(COMPILE) -DF_$* $< -c -o $@
X+
X+$(NETDB_MULT_OBJS): netdb.c
X+	$(COMPILE) -DF_$* $< -c -o $@
X+
X+$(PIPE_OBJS): pipe.c
X+	$(COMPILE) -DF_$* $< -c -o $@
X+
X+$(FDMAN_OBJS): fdman.c
X+	$(COMPILE) -DF_$* $< -c -o $@
X+
X+$(SELECT_OBJS): select.c
X+	$(COMPILE) -DF_$* $< -c -o $@
X+
X+$(INTERRUPT_OBJS): interrupt.S
X+	$(COMPILE) -DF_$* $< -c -o $@
X+# Tell versions [3.59,3.63) of GNU make to not export all variables.
X+# Otherwise a system limit (for SysV at least) may be exceeded.
X+.NOEXPORT:
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-Makefile.in
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-README
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-README << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-README'
X--- newlib/libc/sys/psp/README.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/README	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,16 @@
X+Newlib for PSP
X+--
X+
X+This sys/psp directory depends on PSPSDK headers.  It expects them to live in
X+${prefix}/psp/sdk/include (see newlib/configure.host).
X+
X+I used automake 1.4-p6 to generate aclocal.m4 and Makefile.in:
X+
X+	aclocal -I ../../..
X+	automake --cygnus
X+
X+Autoconf refused to work for me, so I copied configure from sys/sh and modified
X+$ac_unique_file to point libcglue.c.
X+
X+--
X+Marcus R. Brown <mrbrown at ocgnet.org>
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-README
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-arpa-inet.h
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-arpa-inet.h << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-arpa-inet.h'
X--- newlib/libc/sys/psp/arpa/inet.h.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/arpa/inet.h	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,26 @@
X+/* arpa/inet.h - Functions for converting IP addresses between strings and numbers */
X+
X+#ifndef _ARPA_INET_H_
X+#define _ARPA_INET_H_
X+
X+#ifdef __cplusplus
X+extern "C" {
X+#endif
X+
X+#include <netinet/in.h>
X+
X+in_addr_t sceNetInetInetAddr(const char *ip);
X+int sceNetInetInetAton(const char *ip, struct in_addr *in);
X+const char* sceNetInetInetNtop(int af, const void *src, char *dst, socklen_t cnt);
X+int sceNetInetInetPton(int af, const char *src, void *dst);
X+
X+char *inet_ntoa(struct in_addr in);
X+#define inet_addr sceNetInetInetAddr
X+#define inet_aton sceNetInetInetAton
X+#define inet_ntop sceNetInetInetNtop
X+#define inet_pton sceNetInetInetPton
X+
X+#ifdef __cplusplus
X+}
X+#endif
X+#endif /* _ARPA_INET_H_ */
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-arpa-inet.h
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-confdefs.h
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-confdefs.h << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-confdefs.h'
X--- newlib/libc/sys/psp/confdefs.h.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/confdefs.h	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1 @@
X+
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-confdefs.h
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-configure.in
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-configure.in << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-configure.in'
X--- newlib/libc/sys/psp/configure.in.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/configure.in	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,14 @@
X+dnl This is the newlib/libc/sys/sun4 configure.in file.
X+dnl Process this file with autoconf to produce a configure script.
X+
X+AC_PREREQ(2.59)
X+AC_INIT([newlib],[NEWLIB_VERSION])
X+AC_CONFIG_SRCDIR([libcglue.c])
X+
X+dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake. 
X+AC_CONFIG_AUX_DIR(../../../..)
X+
X+NEWLIB_CONFIGURE(../../..)
X+
X+AC_CONFIG_FILES(Makefile)
X+AC_OUTPUT
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-configure.in
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-crt0.c
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-crt0.c << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-crt0.c'
X--- newlib/libc/sys/psp/crt0.c.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/crt0.c	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,3 @@
X+/* The real crt0.c lives in PSPSDK. */
X+
X+void _start() { }
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-crt0.c
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-fdman.h
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-fdman.h << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-fdman.h'
X--- newlib/libc/sys/psp/fdman.h.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/fdman.h	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,44 @@
X+/*
X+ * PSP Software Development Kit - http://www.pspdev.org
X+ * -----------------------------------------------------------------------
X+ * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
X+ *
X+ * fdman.h - File descriptor management.
X+ *
X+ * Copyright (c) 2006 Rafael Cabezas <rafpsp at gmail.com>
X+ */
X+
X+#ifndef _FDMAN_H_
X+	#define _FDMAN_H_
X+	
X+	#define __PSP_FILENO_MAX 1024
X+
X+	#define __PSP_IS_FD_VALID(FD) \
X+			( (FD >= 0) && (FD < __PSP_FILENO_MAX) && (__psp_descriptormap[FD] != NULL) )
X+
X+	#define __PSP_IS_FD_OF_TYPE(FD, TYPE) \
X+			( (__PSP_IS_FD_VALID(FD)) && (__psp_descriptormap[FD]->type == TYPE) )
X+			
X+	typedef enum {
X+		__PSP_DESCRIPTOR_TYPE_FILE  ,
X+		__PSP_DESCRIPTOR_TYPE_PIPE ,
X+		__PSP_DESCRIPTOR_TYPE_SOCKET,
X+		__PSP_DESCRIPTOR_TYPE_TTY
X+	} __psp_fdman_fd_types;
X+	
X+	typedef struct {
X+		char * filename;
X+		u8     type;
X+		u32    sce_descriptor;
X+		u32    flags;
X+		u32    ref_count;
X+	} __psp_descriptormap_type;
X+	 
X+	extern __psp_descriptormap_type *__psp_descriptormap[__PSP_FILENO_MAX];
X+	
X+	void __psp_fdman_init();
X+	int  __psp_fdman_get_new_descriptor();
X+	int  __psp_fdman_get_dup_descriptor(int fd);
X+	void __psp_fdman_release_descriptor(int fd);
X+
X+#endif
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-fdman.h
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-include-netdb.h
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-include-netdb.h << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-include-netdb.h'
X--- newlib/libc/sys/psp/include/netdb.h.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/include/netdb.h	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,36 @@
X+/* Simple gethostbyname and gethostbyaddr replacements, note not thread safe */
X+#ifndef __NETDB_H__
X+#define __NETDB_H__
X+
X+#ifdef __cplusplus
X+extern "C" {
X+#endif
X+
X+#define	NETDB_INTERNAL	-1	/* see errno */
X+#define	NETDB_SUCCESS	0	/* no problem */
X+#define	HOST_NOT_FOUND	1 /* Authoritative Answer Host not found */
X+#define	TRY_AGAIN	2 /* Non-Authoritative Host not found, or SERVERFAIL */
X+#define	NO_RECOVERY	3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
X+#define	NO_DATA		4 /* Valid name, no data record of requested type */
X+#define	NO_ADDRESS	NO_DATA		/* no address, look for MX record */
X+
X+extern int h_errno;
X+
X+struct hostent
X+{
X+	char *h_name;
X+	char **h_aliases;
X+	int  h_addrtype;
X+	int  h_length;
X+	char **h_addr_list;
X+	char *h_addr;
X+};
X+
X+struct hostent *gethostbyaddr(const void *addr, int len, int type);
X+struct hostent *gethostbyname(const char *name);
X+
X+#ifdef __cplusplus
X+}
X+#endif
X+
X+#endif
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-include-netdb.h
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-libcglue.c
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-libcglue.c << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-libcglue.c'
X--- newlib/libc/sys/psp/libcglue.c.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/libcglue.c	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,936 @@
X+/*
X+ * PSP Software Development Kit - http://www.pspdev.org
X+ * -----------------------------------------------------------------------
X+ * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
X+ *
X+ * libcglue.c - Newlib-compatible system calls.
X+ *
X+ * Copyright (c) 2005 Marcus R. Brown <mrbrown at ocgnet.org>
X+ * Copyright (c) 2005 James Forshaw <tyranid at gmail.com>
X+ * Copyright (c) 2005 John Kelley <ps2dev at kelley.ca>
X+ * Copyright (c) 2005 Jim Paris <jim at jtan.com>
X+ * 
X+ */
X+#include <errno.h>
X+#include <malloc.h>
X+#include <reent.h>
X+#include <stdarg.h>
X+#include <stdlib.h>
X+#include <string.h>
X+#include <time.h>
X+#include <sys/fcntl.h>
X+#include <sys/stat.h>
X+#include <sys/time.h>
X+#include <sys/types.h>
X+#include <sys/unistd.h>
X+#include <sys/dirent.h>
X+#include <sys/socket.h>
X+
X+#include <psptypes.h>
X+#include <pspiofilemgr.h>
X+#include <pspmodulemgr.h>
X+#include <pspsysmem.h>
X+#include <pspthreadman.h>
X+#include <psputils.h>
X+#include <psputility.h>
X+#include <pspstdio.h>
X+#include <pspintrman.h>
X+#include "fdman.h"
X+
X+extern char __psp_cwd[MAXPATHLEN + 1];
X+extern void __psp_init_cwd(char *argv_0);
X+extern int __psp_path_absolute(const char *in, char *out, int len);
X+extern int  pspDisableInterrupts();
X+extern void pspEnableInterrupts(int); 
X+
X+/* The following functions are defined in socket.c.  They have weak linkage so
X+   that the user doesn't have to link against the PSP network libraries if they
X+   don't use the sockets API. */
X+extern int __psp_socket_close(int s) __attribute__((weak));
X+extern ssize_t __psp_socket_recv(int s, void *buf, size_t len, int flags) __attribute__((weak));
X+extern ssize_t __psp_socket_send(int s, const void *buf, size_t len, int flags) __attribute__((weak));
X+
X+extern int pipe(int fildes[2]);
X+extern int __psp_pipe_close(int filedes);
X+extern int __psp_pipe_nonblocking_read(int fd, void *buf, size_t len);
X+extern int __psp_pipe_read(int fd, void *buf, size_t len);
X+extern int __psp_pipe_write(int fd, const void *buf, size_t size);
X+extern int __psp_pipe_nonblocking_write(int fd, const void *buf, size_t len);
X+
X+int __psp_set_errno(int code);
X+
X+#ifdef F___psp_set_errno
X+int __psp_set_errno(int code)
X+{
X+	if ((code & 0x80010000) == 0x80010000) {
X+		errno = code & 0xFFFF;
X+		return -1;
X+	}
X+	return code;
X+}
X+#endif
X+
X+#ifdef F_getcwd
X+char *getcwd(char *buf, size_t size)
X+{
X+	if(!buf) {
X+		errno = EINVAL;
X+		return NULL;
X+	}		
X+
X+	if(strlen(__psp_cwd) >= size) {
X+		errno = ERANGE;
X+		return NULL;
X+	}
X+
X+	strcpy(buf, __psp_cwd);
X+	return buf;
X+}
X+#endif
X+
X+#ifdef F_chdir
X+int chdir(const char *path)
X+{
X+	char dest[MAXPATHLEN + 1];
X+	SceUID uid;
X+
X+	if(__psp_path_absolute(path, dest, MAXPATHLEN) < 0) {
X+		errno = ENAMETOOLONG;
X+		return -1;
X+	}
X+
X+	/* sceIoChdir doesn't give an indication of whether it worked,
X+	   so test for existence by attempting to open the dir */
X+	uid = sceIoDopen(dest);
X+	if(uid < 0) {
X+		errno = ENOTDIR;
X+		return -1;
X+	}
X+	sceIoDclose(uid);
X+
X+	sceIoChdir(dest);
X+	strcpy(__psp_cwd, dest);
X+	return 0;
X+}
X+#endif
X+
X+#ifdef F_mkdir
X+int mkdir(const char *pathname, mode_t mode)
X+{
X+	char dest[MAXPATHLEN + 1];
X+
X+	if(__psp_path_absolute(pathname, dest, MAXPATHLEN) < 0) {
X+		errno = ENAMETOOLONG;
X+		return -1;
X+	}
X+
X+	return __psp_set_errno(sceIoMkdir(dest, mode));
X+}
X+#endif
X+
X+#ifdef F_rmdir
X+int rmdir(const char *pathname)
X+{
X+	char dest[MAXPATHLEN + 1];
X+
X+	if(__psp_path_absolute(pathname, dest, MAXPATHLEN) < 0) {
X+		errno = ENAMETOOLONG;
X+		return -1;
X+	}
X+
X+	return __psp_set_errno(sceIoRmdir(dest));
X+}
X+#endif
X+
X+#ifdef F_realpath
X+char *realpath(const char *path, char *resolved_path)
X+{
X+	if(!path || !resolved_path) {
X+		errno = EINVAL;
X+		return NULL;
X+	}
X+	if(__psp_path_absolute(path, resolved_path, MAXPATHLEN) < 0) {
X+		errno = ENAMETOOLONG;
X+		return NULL;
X+	}
X+	if(access(resolved_path, F_OK) < 0) {
X+		errno = ENOENT;
X+		return NULL;
X+	}
X+	return resolved_path;
X+}
X+#endif
X+
X+/* Wrappers of the standard open(), close(), read(), write(), unlink() and lseek() routines. */
X+#ifdef F__open
X+int _open(const char *name, int flags, int mode)
X+{
X+	int scefd, fd;
X+	int sce_flags;
X+	char dest[MAXPATHLEN + 1];
X+
X+	if(__psp_path_absolute(name, dest, MAXPATHLEN) < 0) {
X+		errno = ENAMETOOLONG;
X+		return -1;
X+	}
X+
X+	/* O_RDONLY starts at 0, where PSP_O_RDONLY starts at 1, so remap the read/write
X+	   flags by adding 1. */
X+	sce_flags = (flags & O_ACCMODE) + 1;
X+
X+	/* Translate standard open flags into the flags understood by the PSP kernel. */
X+	if (flags & O_APPEND) {
X+		sce_flags |= PSP_O_APPEND;
X+	}
X+	if (flags & O_CREAT) {
X+		sce_flags |= PSP_O_CREAT;
X+	}
X+	if (flags & O_TRUNC) {
X+		sce_flags |= PSP_O_TRUNC;
X+	}
X+	if (flags & O_EXCL) {
X+		sce_flags |= PSP_O_EXCL;
X+	}
X+	if (flags & O_NONBLOCK) {
X+		sce_flags |= PSP_O_NBLOCK;
X+	}
X+	
X+	scefd = sceIoOpen(dest, sce_flags, mode);
X+	if (scefd >= 0) {
X+		fd = __psp_fdman_get_new_descriptor();
X+		if (fd != -1) {
X+			__psp_descriptormap[fd]->sce_descriptor = scefd;
X+			__psp_descriptormap[fd]->type     		= __PSP_DESCRIPTOR_TYPE_FILE;
X+			__psp_descriptormap[fd]->flags    		= flags;
X+			__psp_descriptormap[fd]->filename 		= strdup(dest);
X+			return fd;
X+		}
X+		else {
X+			sceIoClose(scefd);
X+			errno = ENOMEM;
X+			return -1;
X+		}
X+	} 
X+	else {
X+		return __psp_set_errno(scefd);
X+	}
X+	
X+}
X+#endif
X+
X+#ifdef F__close
X+int _close(int fd)
X+{
X+	int ret = 0;
X+
X+	if (!__PSP_IS_FD_VALID(fd)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+
X+	switch(__psp_descriptormap[fd]->type)
X+	{
X+		case __PSP_DESCRIPTOR_TYPE_FILE:
X+		case __PSP_DESCRIPTOR_TYPE_TTY:
X+			if (__psp_descriptormap[fd]->ref_count == 1) {
X+				ret = __psp_set_errno(sceIoClose(__psp_descriptormap[fd]->sce_descriptor));
X+			}
X+			__psp_fdman_release_descriptor(fd);
X+			return ret;
X+			break;
X+		case __PSP_DESCRIPTOR_TYPE_PIPE:
X+			return __psp_pipe_close(fd);
X+			break;
X+		case __PSP_DESCRIPTOR_TYPE_SOCKET:
X+			if (__psp_socket_close != NULL) {
X+				ret = __psp_socket_close(fd);
X+				return ret;
X+			}
X+			break;
X+		default:
X+			break;
X+	}
X+
X+	errno = EBADF;
X+	return -1;
X+}
X+#endif
X+
X+#ifdef F__read
X+int _read(int fd, void *buf, size_t size)
X+{
X+	if (!__PSP_IS_FD_VALID(fd)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+
X+	switch(__psp_descriptormap[fd]->type)
X+	{
X+		case __PSP_DESCRIPTOR_TYPE_FILE:
X+		case __PSP_DESCRIPTOR_TYPE_TTY:
X+			return __psp_set_errno(sceIoRead(__psp_descriptormap[fd]->sce_descriptor, buf, size));
X+			break;
X+		case __PSP_DESCRIPTOR_TYPE_PIPE:
X+			if (__psp_descriptormap[fd]->flags & O_NONBLOCK) {
X+				return __psp_pipe_nonblocking_read(fd, buf, size);
X+			}
X+			else {
X+				return __psp_pipe_read(fd, buf, size);
X+			}
X+			break;
X+		case __PSP_DESCRIPTOR_TYPE_SOCKET:
X+			if (__psp_socket_recv != NULL) {
X+				return __psp_socket_recv(fd, buf, size, 0);
X+			}
X+			break;
X+		default:
X+			break;
X+	}
X+
X+	errno = EBADF;
X+	return -1;
X+
X+}
X+#endif
X+
X+#ifdef F__write
X+int _write(int fd, const void *buf, size_t size)
X+{
X+	if (!__PSP_IS_FD_VALID(fd)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+
X+	switch(__psp_descriptormap[fd]->type)
X+	{
X+		case __PSP_DESCRIPTOR_TYPE_FILE:
X+		case __PSP_DESCRIPTOR_TYPE_TTY:
X+			return __psp_set_errno(sceIoWrite(__psp_descriptormap[fd]->sce_descriptor, buf, size));
X+			break;
X+		case __PSP_DESCRIPTOR_TYPE_PIPE:
X+			if (__psp_descriptormap[fd]->flags & O_NONBLOCK) {
X+				return __psp_pipe_nonblocking_write(fd, buf, size);
X+			}
X+			else {
X+				return __psp_pipe_write(fd, buf, size);
X+			}
X+			break;
X+			break;
X+		case __PSP_DESCRIPTOR_TYPE_SOCKET:
X+			if (__psp_socket_send != NULL) {
X+				return __psp_socket_send(fd, buf, size, 0);
X+			}
X+			break;
X+		default:
X+			break;
X+	}
X+
X+	errno = EBADF;
X+	return -1;
X+}
X+#endif
X+
X+#ifdef F__lseek
X+off_t _lseek(int fd, off_t offset, int whence)
X+{
X+	if (!__PSP_IS_FD_VALID(fd)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+
X+	switch(__psp_descriptormap[fd]->type)
X+	{
X+		case __PSP_DESCRIPTOR_TYPE_FILE:
X+			/* We don't have to do anything with the whence argument because SEEK_* == PSP_SEEK_*. */
X+			return (off_t) __psp_set_errno(sceIoLseek(__psp_descriptormap[fd]->sce_descriptor, offset, whence));
X+			break;
X+		case __PSP_DESCRIPTOR_TYPE_PIPE:
X+			break;
X+		case __PSP_DESCRIPTOR_TYPE_SOCKET:
X+			break;
X+		default:
X+			break;
X+	}
X+
X+	errno = EBADF;
X+	return -1;
X+
X+}
X+#endif
X+
X+#ifdef F__unlink
X+int _unlink(const char *path)
X+{
X+	char dest[MAXPATHLEN + 1];
X+
X+	if(__psp_path_absolute(path, dest, MAXPATHLEN) < 0) {
X+		errno = ENAMETOOLONG;
X+		return -1;
X+	}
X+
X+	return __psp_set_errno(sceIoRemove(dest));
X+}
X+#endif
X+
X+#ifdef F__link
X+int _link(const char *name1, const char *name2)
X+{
X+	errno = ENOSYS;
X+	return -1; /* not supported */
X+}
X+#endif
X+
X+#ifdef F_opendir
X+DIR *opendir(const char *filename)
X+{
X+	char dest[MAXPATHLEN + 1];
X+	DIR *dirp;
X+	SceUID uid;
X+
X+	/* Normalize pathname so that opendir(".") works */
X+	if(__psp_path_absolute(filename, dest, MAXPATHLEN) < 0) {
X+		errno = ENOENT;
X+		return NULL;
X+	}
X+
X+	dirp = (DIR *)malloc(sizeof(DIR));
X+
X+	uid = sceIoDopen(dest);
X+
X+	if (uid < 0)
X+	{
X+		free(dirp);
X+		(void) __psp_set_errno(uid);
X+		return NULL;
X+	}
X+
X+	dirp->uid = uid;
X+
X+	return dirp;
X+}
X+#endif
X+
X+#ifdef F_readdir
X+struct dirent *readdir(DIR *dirp)
X+{
X+	int ret;
X+
X+	/* Zero the dirent, to avoid possible problems with sceIoDread */
X+	memset(&dirp->de, 0, sizeof(struct dirent));
X+
X+	ret = sceIoDread(dirp->uid, (SceIoDirent *)&dirp->de);
X+	if (ret == 0) {
X+		/* EOF */
X+		errno = 0;
X+		return NULL;
X+	}
X+	if (ret < 0) {
X+		(void) __psp_set_errno(ret);
X+		return NULL;
X+	}
X+
X+	return &dirp->de;
X+}
X+#endif
X+
X+#ifdef F_closedir
X+int closedir(DIR *dirp)
X+{
X+	if (dirp != NULL)
X+	{
X+		int uid;
X+		uid = dirp->uid;
X+		free (dirp);
X+		return __psp_set_errno(sceIoDclose(uid));
X+	}
X+	errno = EBADF;
X+	return -1; 
X+}
X+#endif
X+
X+/* Time routines.  These wrap around the routines provided by the kernel. */
X+#ifdef F__gettimeofday
X+int _gettimeofday(struct timeval *tp, struct timezone *tzp)
X+{
X+	return __psp_set_errno(sceKernelLibcGettimeofday(tp, tzp));
X+}
X+
X+#endif
X+
X+#if defined(F_clock)
X+clock_t clock(void)
X+{
X+	return sceKernelLibcClock();
X+}
X+#endif
X+
X+#if defined(F_time)
X+time_t time(time_t *t)
X+{
X+	return __psp_set_errno(sceKernelLibcTime(t));
X+}
X+#endif
X+
X+#if defined(F_sleep)
X+unsigned int sleep(unsigned int secs) {
X+	while(secs--) {	
X+		sceKernelDelayThreadCB(1000000);
X+	}
X+	return 0;
X+}
X+#endif
X+
X+/* PSP-compatible sbrk(). */
X+#if defined(F__sbrk) || defined(F_glue__sbrk)
X+/* TODO: Currently our default heap is set to the maximum available block size
X+   when sbrk() is first called.  Sony seems to always use a default of 64KB,
X+   with the expectation that user programs will override the default size with
X+   their own desired size.  The only reason I can think of them doing this is
X+   to allow each PRX to have their own seperate heap.  I think that their
X+   method is overkill for most user programs.
X+
X+   What I'd like to do instead is to use the default of 64KB for PRXes as Sony
X+   does, but use the maximum available block size for executables.  This avoids
X+   the requirement of specifying the heap size manually in user programs.
X+   However, we currently don't have a clean way to distinguish PRXes and normal
X+   executables, so this code needs to be revisited once we do come up with a
X+   way. */
X+#define DEFAULT_PRX_HEAP_SIZE_KB 64
X+
X+/* If defined it specifies the desired size of the heap, in KB. */
X+extern unsigned int sce_newlib_heap_kb_size __attribute__((weak));
X+extern int __pspsdk_is_prx __attribute__((weak));
X+
X+/* UID of the memory block that represents the heap. */
X+static SceUID __psp_heap_blockid;
X+
X+void * _sbrk(ptrdiff_t incr)
X+{
X+	static void * heap_bottom = NULL;
X+	static void * heap_top = NULL;
X+	static void * heap_ptr = NULL;
X+
X+	/* Has our heap been initialized? */
X+	if (heap_bottom == NULL) {
X+		/* No, initialize the heap. */
X+		SceSize heap_size;
X+
X+		if (&sce_newlib_heap_kb_size != NULL) {
X+			heap_size = sce_newlib_heap_kb_size * 1024;
X+		} else {
X+			if (&__pspsdk_is_prx != NULL) {
X+				heap_size = DEFAULT_PRX_HEAP_SIZE_KB * 1024;
X+			} else {
X+				heap_size = sceKernelMaxFreeMemSize();
X+			}
X+		}
X+
X+		__psp_heap_blockid = sceKernelAllocPartitionMemory(2, "block", PSP_SMEM_Low, heap_size, NULL);
X+		if (__psp_heap_blockid > 0) {
X+			heap_bottom = sceKernelGetBlockHeadAddr(__psp_heap_blockid);
X+			heap_ptr = heap_bottom;
X+			heap_top = (unsigned char *) heap_bottom + heap_size;
X+		}
X+	}
X+
X+	void * heap_addr = (void *) -1;
X+	void * next_heap_ptr = (void *) ((ptrdiff_t) heap_ptr + incr);
X+	if ((heap_bottom != NULL) && (next_heap_ptr >= heap_bottom) && (next_heap_ptr < heap_top)) {
X+		heap_addr = heap_ptr;
X+		heap_ptr = next_heap_ptr;
X+	}
X+
X+	return heap_addr;
X+}
X+
X+/* Free the heap. */
X+int __psp_free_heap(void)
X+{
X+	if (__psp_heap_blockid > 0) {
X+		return sceKernelFreePartitionMemory(__psp_heap_blockid);
X+	}
X+
X+	return __psp_heap_blockid;
X+}
X+#endif
X+
X+/* Other POSIX routines that must be defined. */
X+#ifdef F__fstat
X+int _fstat(int fd, struct stat *sbuf)
X+{
X+	int ret;
X+	SceOff oldpos;
X+	if (!__PSP_IS_FD_VALID(fd)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+
X+	switch(__psp_descriptormap[fd]->type)
X+	{
X+		case __PSP_DESCRIPTOR_TYPE_TTY:
X+			memset(sbuf, '\0', sizeof(struct stat));
X+			sbuf->st_mode = S_IFCHR;
X+			return 0;
X+			break;		
X+		case __PSP_DESCRIPTOR_TYPE_FILE:
X+			if (__psp_descriptormap[fd]->filename != NULL) {
X+				ret = stat(__psp_descriptormap[fd]->filename, sbuf);
X+				
X+				/* Find true size of the open file */
X+				oldpos = sceIoLseek(__psp_descriptormap[fd]->sce_descriptor, 0, SEEK_CUR);
X+				if (oldpos != (off_t) -1) {
X+					sbuf->st_size = (off_t) sceIoLseek(__psp_descriptormap[fd]->sce_descriptor, 0, SEEK_END);
X+					sceIoLseek(__psp_descriptormap[fd]->sce_descriptor, oldpos, SEEK_SET);
X+				}
X+				return ret;
X+			}
X+			break;
X+		case __PSP_DESCRIPTOR_TYPE_PIPE:
X+		case __PSP_DESCRIPTOR_TYPE_SOCKET:
X+		default:
X+			break;
X+	}
X+
X+	errno = EBADF;
X+	return -1;
X+}
X+#endif
X+
X+#ifdef F_isatty
X+int isatty(int fd)
X+{
X+	if (!__PSP_IS_FD_VALID(fd)) {
X+		errno = EBADF;
X+		return 0;
X+	}
X+
X+	if (__psp_descriptormap[fd]->type == __PSP_DESCRIPTOR_TYPE_TTY) {
X+		return 1;
X+	}
X+	else {
X+		return 0;
X+	}
X+}
X+#endif
X+
X+#ifdef F__stat
X+static time_t psp_to_epoch_time(ScePspDateTime psp_time)
X+{
X+	struct tm conv_time;
X+	conv_time.tm_year = psp_time.year;
X+	conv_time.tm_mon = psp_time.month;
X+	conv_time.tm_mday = psp_time.day;
X+	conv_time.tm_hour = psp_time.hour;
X+	conv_time.tm_min = psp_time.minute;
X+	conv_time.tm_sec = psp_time.second;
X+	conv_time.tm_isdst = -1;
X+	return mktime(&conv_time);
X+}
X+
X+int _stat(const char *filename, struct stat *buf)
X+{
X+	SceIoStat psp_stat;
X+	char dest[MAXPATHLEN + 1];
X+	int ret;
X+
X+	if(__psp_path_absolute(filename, dest, MAXPATHLEN) < 0) {
X+		errno = ENAMETOOLONG;
X+		return -1;
X+	}
X+
X+	memset(buf, '\0', sizeof(struct stat));
X+	ret = sceIoGetstat(dest, &psp_stat);
X+	if (ret < 0) {
X+		return __psp_set_errno(ret);
X+	}
X+	
X+	buf->st_ctime = psp_to_epoch_time(psp_stat.st_ctime);
X+	buf->st_atime = psp_to_epoch_time(psp_stat.st_atime);
X+	buf->st_mtime = psp_to_epoch_time(psp_stat.st_mtime);
X+
X+	buf->st_mode = (psp_stat.st_mode & 0xfff) |
X+		       ((FIO_S_ISLNK(psp_stat.st_mode))?(S_IFLNK):(0)) |
X+		       ((FIO_S_ISREG(psp_stat.st_mode))?(S_IFREG):(0)) |
X+		       ((FIO_S_ISDIR(psp_stat.st_mode))?(S_IFDIR):(0));
X+	buf->st_size = psp_stat.st_size;
X+	return 0;
X+}
X+#endif
X+
X+/* from stat.h in ps2sdk, this function may be correct */
X+#define FIO_CST_SIZE	0x0004
X+
X+#ifdef F_truncate
X+int truncate(const char *filename, off_t length)
X+{
X+	SceIoStat psp_stat;
X+	char dest[MAXPATHLEN + 1];
X+
X+	if(__psp_path_absolute(filename, dest, MAXPATHLEN) < 0) {
X+		errno = ENAMETOOLONG;
X+		return -1;
X+	}
X+
X+	psp_stat.st_size = length;
X+	if(length < 0)
X+	{
X+		errno = EINVAL;
X+		return -1;
X+	}
X+	return __psp_set_errno(sceIoChstat(dest, &psp_stat, FIO_CST_SIZE));
X+}
X+#endif
X+
X+/* Unsupported newlib system calls. */
X+#ifdef F__fork
X+pid_t fork(void)
X+{
X+	errno = ENOSYS;
X+	return (pid_t) -1;
X+}
X+#endif
X+
X+#ifdef F__getpid
X+pid_t _getpid(void)
X+{
X+	errno = ENOSYS;
X+	return (pid_t) -1;
X+}
X+#endif
X+
X+#ifdef F__kill
X+int _kill(int unused, int unused2)
X+{
X+	errno = ENOSYS;
X+	return -1;
X+}
X+#endif
X+
X+#ifdef F__wait
X+pid_t _wait(int *unused)
X+{
X+	errno = ENOSYS;
X+	return (pid_t) -1;
X+}
X+#endif
X+
X+#ifdef F_access
X+int access(const char *fn, int flags)
X+{
X+	struct stat s;
X+	if (stat(fn, &s))
X+		return -1;
X+	if (s.st_mode & S_IFDIR)
X+		return 0;
X+	if (flags & W_OK)
X+	{
X+		if (s.st_mode & S_IWRITE)
X+			return 0;
X+		errno = EACCES;
X+		return -1;
X+	}
X+	return 0;
X+}
X+#endif
X+
X+#ifdef F__fcntl
X+int _fcntl(int fd, int cmd, ...)
X+{
X+	if (!__PSP_IS_FD_VALID(fd)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+
X+	switch (cmd)
X+	{
X+		case F_DUPFD:
X+		{
X+			return __psp_fdman_get_dup_descriptor(fd);
X+			break;
X+		}
X+		case F_GETFL:
X+		{
X+			return __psp_descriptormap[fd]->flags;
X+			break;
X+		}
X+		case F_SETFL:
X+		{
X+			int newfl;
X+			va_list args;
X+	
X+			va_start (args, cmd);         /* Initialize the argument list. */
X+			newfl =  va_arg(args, int);
X+			va_end (args);                /* Clean up. */
X+
X+			__psp_descriptormap[fd]->flags = newfl;
X+
X+			switch(__psp_descriptormap[fd]->type)
X+			{
X+				case __PSP_DESCRIPTOR_TYPE_FILE:
X+					break;
X+				case __PSP_DESCRIPTOR_TYPE_PIPE:
X+					break;
X+				case __PSP_DESCRIPTOR_TYPE_SOCKET:
X+					if (newfl & O_NONBLOCK)
X+					{
X+						int one = 1;
X+						return setsockopt(fd, SOL_SOCKET, SO_NONBLOCK, (char *)&one, sizeof(one));
X+					}
X+					else
X+					{
X+						int zero = 0;
X+						return setsockopt(fd, SOL_SOCKET, SO_NONBLOCK, (char *)&zero, sizeof(zero));
X+					}
X+					break;
X+				default:
X+					break;
X+			}
X+			return 0;
X+			break;
X+		}
X+	}
X+
X+	errno = EBADF;
X+	return -1;
X+}
X+#endif /* F__fcntl */
X+
X+#ifdef F_tzset
X+void tzset(void)
X+{
X+	static int initialized = 0;
X+
X+	if (!initialized)
X+	{
X+		initialized = 1;
X+
X+		/* Don't init if TZ has already been set once, this probably means the user
X+		   wanted to override what we would set below. */
X+		if (getenv("TZ") == NULL)
X+		{
X+			/* Initialize timezone from PSP configuration */
X+			int tzOffset = 0;
X+			sceUtilityGetSystemParamInt(PSP_SYSTEMPARAM_ID_INT_TIMEZONE, &tzOffset);
X+			int tzOffsetAbs = tzOffset < 0 ? -tzOffset : tzOffset;
X+			int hours = tzOffsetAbs / 60;
X+			int minutes = tzOffsetAbs - hours * 60;
X+			int pspDaylight = 0;
X+			sceUtilityGetSystemParamInt(PSP_SYSTEMPARAM_ID_INT_DAYLIGHTSAVINGS, &pspDaylight);
X+			static char tz[18];
X+			sprintf(tz, "GMT%s%02i:%02i%s", tzOffset < 0 ? "+" : "-", hours, minutes, pspDaylight ? "daylight" : "");
X+			setenv("TZ", tz, 1);
X+		}
X+	}
X+
X+	_tzset_r(_REENT);
X+}
X+#endif
X+
X+#ifdef F_mlock
X+static unsigned int lock_count = 0;
X+static unsigned int intr_flags = 0;
X+
X+void __malloc_lock(struct _reent *ptr)
X+{
X+	unsigned int flags = pspDisableInterrupts();
X+
X+	if (lock_count == 0) {
X+		intr_flags = flags;
X+	}
X+
X+	lock_count++;
X+}
X+
X+void __malloc_unlock(struct _reent *ptr)
X+{
X+	if (--lock_count == 0) {
X+		pspEnableInterrupts(intr_flags);
X+	}
X+}
X+#endif
X+
X+/* Exit. */
X+#if defined(F__exit) || defined(F_glue__exit)
X+extern int sce_newlib_nocreate_thread_in_start __attribute__((weak));
X+
X+extern int __psp_free_heap(void);
X+
X+void _exit(int status)
X+{
X+	if (&sce_newlib_nocreate_thread_in_start == NULL) {
X+		/* Free the heap created by _sbrk(). */
X+		__psp_free_heap();
X+
X+		sceKernelSelfStopUnloadModule(1, 0, NULL);
X+	} else {
X+		if (status == 0) {
X+			/* Free the heap created by _sbrk(). */
X+			__psp_free_heap();
X+		}
X+
X+		sceKernelExitThread(status);
X+	}
X+
X+	while (1) ;
X+}
X+
X+/* Note: This function is being linked into _exit.o.  
X+
X+   Because __psp_libc_init is a weak import in crt0.c, the linker
X+   chooses to ignore an object file in libc.a that contains just this
X+   function, since it's not necessary for successful compilation.
X+
X+   By putting it instead in _exit.o, which is already used by crt0.c,
X+   the linker sees __psp_libc_init and resolves the symbol properly.
X+*/
X+void __psp_libc_init(int argc, char *argv[])
X+{
X+	(void) argc;
X+
X+	/* Initialize cwd from this program's path */
X+	__psp_init_cwd(argv[0]);
X+
X+	/* Initialize filedescriptor management */
X+	__psp_fdman_init();
X+}
X+
X+#endif /* F__exit */
X+
X+#ifdef F__rename
X+int _rename(const char *old, const char *new)
X+{
X+   char oldname[MAXPATHLEN + 1];
X+   char newname[MAXPATHLEN + 1];
X+
X+   if(__psp_path_absolute(old, oldname, MAXPATHLEN) < 0) {
X+       errno = ENAMETOOLONG;
X+       return -1;
X+   }
X+
X+   if(__psp_path_absolute(new, newname, MAXPATHLEN) < 0) {
X+       errno = ENAMETOOLONG;
X+       return -1;
X+   }
X+
X+   return __psp_set_errno(sceIoRename(oldname, newname));
X+}
X+#endif
X+
X+#ifdef F_nanosleep
X+/* note: we don't use rem as we have no signals */
X+int nanosleep(const struct timespec *req, struct timespec *rem)
X+{
X+    if( req == NULL )
X+        return EFAULT;
X+
X+    if( rem != NULL ) {
X+        rem->tv_sec = 0;
X+        rem->tv_nsec = 0;
X+    }
X+
X+    sceKernelDelayThreadCB( 1000000 * req->tv_sec + (req->tv_nsec / 1000) );
X+
X+    return 0;
X+}
X+#endif
X+
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-libcglue.c
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-netdb.c
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-netdb.c << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-netdb.c'
X--- newlib/libc/sys/psp/netdb.c.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/netdb.c	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,103 @@
X+/* Simple gethostbyname and gethostbyaddr replacements using the resolver lib */
X+#include <stdio.h>
X+#include <netdb.h>
X+#include <netinet/in.h>
X+#include <arpa/inet.h>
X+#include <sys/socket.h>
X+#include <pspkerneltypes.h>
X+#include <pspnet_resolver.h>
X+
X+#define MAX_NAME 512
X+
X+#ifdef F_h_errno
X+int h_errno = NETDB_SUCCESS;
X+#endif
X+
X+#ifdef F_gethostbyaddr
X+struct hostent *gethostbyaddr(const void *addr, int len, int type)
X+{
X+	static struct hostent ent;
X+    static char * aliases[1] = { NULL };
X+	char buf[1024];
X+	static char sname[MAX_NAME] = "";
X+	static struct in_addr saddr = { 0 };
X+	static char *addrlist[2] = { (char *) &saddr, NULL };
X+	int rid;
X+	int err;
X+
X+	if((len != sizeof(struct in_addr)) || (type != AF_INET) || (addr == NULL))
X+	{
X+		h_errno = HOST_NOT_FOUND;
X+		return NULL;
X+	}
X+
X+	memcpy(&saddr, addr, len);
X+
X+	if(sceNetResolverCreate(&rid, buf, sizeof(buf)) < 0)
X+	{
X+		h_errno = NO_RECOVERY;
X+		return NULL;
X+	}
X+
X+	err = sceNetResolverStartAtoN(rid, &saddr, sname, sizeof(sname), 2, 3);
X+	sceNetResolverStop(rid);
X+	sceNetResolverDelete(rid);
X+	if(err < 0)
X+	{
X+		h_errno = HOST_NOT_FOUND;
X+		return NULL;
X+	}
X+
X+	ent.h_name = sname;
X+	ent.h_aliases = aliases;
X+	ent.h_addrtype = AF_INET;
X+	ent.h_length = sizeof(struct in_addr);
X+	ent.h_addr_list = addrlist;
X+	ent.h_addr = (char *) &saddr;
X+
X+	return &ent;
X+}
X+#endif
X+
X+#ifdef F_gethostbyname
X+struct hostent *gethostbyname(const char *name)
X+{
X+	static struct hostent ent;
X+	char buf[1024];
X+	static char sname[MAX_NAME] = "";
X+	static struct in_addr saddr = { 0 };
X+	static char *addrlist[2] = { (char *) &saddr, NULL };
X+	int rid;
X+
X+	if(sceNetInetInetAton(name, &saddr) == 0)
X+	{
X+		int err;
X+
X+		if(sceNetResolverCreate(&rid, buf, sizeof(buf)) < 0)
X+		{
X+			h_errno = NO_RECOVERY;
X+			return NULL;
X+		}
X+
X+		err = sceNetResolverStartNtoA(rid, name, &saddr, 2, 3);
X+		sceNetResolverDelete(rid);
X+		if(err < 0)
X+		{
X+			h_errno = HOST_NOT_FOUND;
X+			return NULL;
X+		}
X+
X+	}
X+
X+	snprintf(sname, MAX_NAME, "%s", name);
X+	ent.h_name = sname;
X+	ent.h_aliases = 0;
X+	ent.h_addrtype = AF_INET;
X+	ent.h_length = sizeof(struct in_addr);
X+	ent.h_addr_list = addrlist;
X+	ent.h_addr = (char *) &saddr;
X+
X+	return &ent;
X+}
X+
X+#endif
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-netdb.c
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-pipe.c
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-pipe.c << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-pipe.c'
X--- newlib/libc/sys/psp/pipe.c.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/pipe.c	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,305 @@
X+/*
X+ * PSP Software Development Kit - http://www.pspdev.org
X+ * -----------------------------------------------------------------------
X+ * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
X+ *
X+ * pipe.c - Socket wrappers to provide similar functions to normal unix
X+ *
X+ * Copyright (c) 2006 Rafael Cabezas <rafpsp at gmail.com>
X+ *
X+ * - 20070630 Alper Akcan "anhanguera" <distchx at yahoo.com>
X+ *            [non]blocking read/write() fix
X+ *            illegal size fix for read/write()
X+ * 
X+ */
X+#include <stdio.h>
X+#include <errno.h>
X+#include <sys/syslimits.h>
X+#include <sys/fd_set.h>
X+
X+#include <psptypes.h>
X+#include <pspthreadman.h>
X+#include <pspmodulemgr.h>
X+#include <pspkerror.h>
X+#include "fdman.h"
X+
X+/* Pipe functions */
X+/* Returns how many bytes are in the pipe -- waiting to be read */
X+size_t __psp_pipe_peekmsgsize(int fd)
X+{
X+	SceKernelMppInfo info;
X+	info.size = sizeof(info);
X+	
X+	if (!__PSP_IS_FD_OF_TYPE(fd, __PSP_DESCRIPTOR_TYPE_PIPE)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+	
X+	if (sceKernelReferMsgPipeStatus(__psp_descriptormap[fd]->sce_descriptor, &info) == 0) {
X+		return (info.bufSize - info.freeSize);
X+	}
X+	else {
X+		return -1;
X+	}
X+}
X+
X+int pipe(int fildes[2])
X+{
X+	static int iIndex = 0;
X+	char name[32];
X+	iIndex++;
X+
X+	sprintf(name, "__psp_pipe_%02d", iIndex);
X+
X+	SceUID uid = sceKernelCreateMsgPipe(name, PSP_MEMORY_PARTITION_USER, 0, (void *)PIPE_BUF, NULL);
X+
X+	if (uid >= 0) {
X+		fildes[0] = __psp_fdman_get_new_descriptor();
X+		if (fildes[0] != -1) {
X+			__psp_descriptormap[fildes[0]]->sce_descriptor = uid;
X+			__psp_descriptormap[fildes[0]]->type = __PSP_DESCRIPTOR_TYPE_PIPE;
X+		} 
X+		else {
X+			sceKernelDeleteMsgPipe(uid);
X+			errno = EFAULT;
X+			return -1;
X+		}
X+		
X+		fildes[1] = __psp_fdman_get_dup_descriptor(fildes[0]);
X+		if (fildes[1] != -1) {
X+			__psp_descriptormap[fildes[1]]->sce_descriptor = uid;
X+			return 0;
X+		} 
X+		else {
X+			sceKernelDeleteMsgPipe(uid);
X+			errno = EFAULT;
X+			return -1;
X+		}
X+		
X+	}
X+	else {
X+		errno = EFAULT;
X+		return -1;
X+	}
X+}
X+
X+int __psp_pipe_close(int fd)
X+{
X+	int ret = 0;
X+
X+	if (!__PSP_IS_FD_OF_TYPE(fd, __PSP_DESCRIPTOR_TYPE_PIPE)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+	
X+		
X+	if ( __psp_descriptormap[fd]->ref_count == 1 ) {
X+			/**
X+			* Delete a message pipe
X+			*
X+			* @param uid - The UID of the pipe
X+			*
X+			* @return 0 on success, < 0 on error
X+			*/
X+			ret = sceKernelDeleteMsgPipe(__psp_descriptormap[fd]->sce_descriptor);
X+	}
X+	
X+	__psp_fdman_release_descriptor(fd);
X+			
X+	if(ret < 0) {
X+		return __psp_set_errno(ret);
X+	}
X+	
X+	return 0;
X+}
X+
X+int __psp_pipe_nonblocking_read(int fd, void *buf, size_t len)
X+{
X+	int ret;
X+	int sceuid;
X+	int size;
X+	
X+	if (!__PSP_IS_FD_OF_TYPE(fd, __PSP_DESCRIPTOR_TYPE_PIPE)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+	
X+	sceuid = __psp_descriptormap[fd]->sce_descriptor;
X+
X+	size = __psp_pipe_peekmsgsize(fd);
X+	if (size > 0) {
X+		if (size < len) {
X+			len = size;
X+		}
X+	}
X+	else if (size == 0) {
X+		errno = EAGAIN;
X+		return -1;
X+	}
X+	else {
X+		errno = EBADF;
X+		return -1;
X+	}
X+ 
X+	/**
X+	* Receive a message from a pipe
X+	*
X+	* @param uid - The UID of the pipe
X+	* @param message - Pointer to the message
X+	* @param size - Size of the message
X+	* @param unk1 - Unknown
X+	* @param unk2 - Unknown
X+	* @param timeout - Timeout for receive
X+	*
X+	* @return 0 on success, < 0 on error
X+	*/
X+	ret = sceKernelTryReceiveMsgPipe(sceuid, buf, len, 0, 0);
X+	
X+	if (ret == 0) {/* Success - Data */
X+		return len;
X+	}
X+	else if (ret == SCE_KERNEL_ERROR_MPP_EMPTY) {/* No data */
X+		errno = EAGAIN;
X+		return -1;
X+	}
X+	else {/* Error */
X+		return __psp_set_errno(ret);
X+	}
X+}
X+
X+int __psp_pipe_read(int fd, void *buf, size_t len)
X+{
X+	int ret;
X+	int sceuid;
X+	int size;
X+	
X+	if (!__PSP_IS_FD_OF_TYPE(fd, __PSP_DESCRIPTOR_TYPE_PIPE)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+	
X+	sceuid = __psp_descriptormap[fd]->sce_descriptor;
X+
X+#if 0
X+	/* we should block until there is some data (or maybe for enough data),
X+	 * peeking the msg size should be only for nonblocking reads
X+	 */
X+	size = __psp_pipe_peekmsgsize(fd);
X+	if (size > 0) {
X+		if (size < len) {
X+			len = size;
X+		}
X+	}
X+	else {
X+		errno = EBADF;
X+		return -1;
X+	}
X+#endif
X+	/* if len is greater than PIPE_BUF then, MsgPipe functions returns
X+	 * SCE_KERNEL_ERROR_ILLEGAL_SIZE, but it should read at least
X+	 * PIPE_BUF bytes, and return the number of bytes read.
X+	 */
X+	if (len > PIPE_BUF) {
X+		len = PIPE_BUF;
X+	}
X+
X+	/**
X+	* Receive a message from a pipe
X+	*
X+	* @param uid - The UID of the pipe
X+	* @param message - Pointer to the message
X+	* @param size - Size of the message
X+	* @param unk1 - Unknown
X+	* @param unk2 - Unknown
X+	* @param timeout - Timeout for receive
X+	*
X+	* @return 0 on success, < 0 on error
X+	*/
X+	ret = sceKernelReceiveMsgPipe(sceuid, buf, len, 0, NULL, NULL);
X+	
X+	if (ret == 0) {/* Success - Data */
X+		return len;
X+	}
X+	else {/* Error */
X+		return __psp_set_errno(ret);
X+	}
X+}
X+
X+int __psp_pipe_write(int fd, const void *buf, size_t len)
X+{
X+	int ret;
X+	int sceuid;
X+	char *cbuf;
X+	
X+	if (!__PSP_IS_FD_OF_TYPE(fd, __PSP_DESCRIPTOR_TYPE_PIPE)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+	
X+	sceuid = __psp_descriptormap[fd]->sce_descriptor;
X+
X+	/* if len is greater than PIPE_BUF then, MsgPipe functions returns
X+	 * SCE_KERNEL_ERROR_ILLEGAL_SIZE, but it should write at least
X+	 * PIPE_BUF bytes, and return the number of bytes written.
X+	 */
X+	if (len > PIPE_BUF) {
X+		len = PIPE_BUF;
X+	}
X+
X+	/**
X+	* Send a message to a pipe
X+	*
X+	* @param uid - The UID of the pipe
X+	* @param message - Pointer to the message
X+	* @param size - Size of the message
X+	* @param unk1 - Unknown
X+	* @param unk2 - Unknown
X+	* @param timeout - Timeout for send
X+	*
X+	* @return 0 on success, < 0 on error
X+	*/
X+	cbuf = (char *)buf;
X+	ret = sceKernelSendMsgPipe(sceuid, cbuf, len, 0, NULL, NULL);
X+	if (ret == 0) {/* Success - Data */
X+		return len;
X+	}
X+	else {/* Error */
X+		return __psp_set_errno(ret);
X+	}
X+}
X+
X+int __psp_pipe_nonblocking_write(int fd, const void *buf, size_t len)
X+{
X+	int ret;
X+	int sceuid;
X+	char *cbuf;
X+	
X+	if (!__PSP_IS_FD_OF_TYPE(fd, __PSP_DESCRIPTOR_TYPE_PIPE)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+	
X+	sceuid = __psp_descriptormap[fd]->sce_descriptor;
X+
X+	/* if len is greater than PIPE_BUF then, MsgPipe functions returns
X+	 * SCE_KERNEL_ERROR_ILLEGAL_SIZE, but it should write at least
X+	 * PIPE_BUF bytes, and return the number of bytes written.
X+	 */
X+	if (len > PIPE_BUF) {
X+		len = PIPE_BUF;
X+	}
X+
X+	cbuf = (char *)buf;
X+	ret = sceKernelTrySendMsgPipe(sceuid, cbuf, len, 0, 0);
X+	
X+	if (ret == 0) {/* Success - Data */
X+		return len;
X+	}
X+	else if (ret == SCE_KERNEL_ERROR_MPP_FULL) {
X+		errno = EAGAIN;
X+		return -1;
X+	}
X+	else {/* Error */
X+		return __psp_set_errno(ret);
X+	}
X+}
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-pipe.c
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-netinet-tcp.h
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-netinet-tcp.h << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-netinet-tcp.h'
X--- newlib/libc/sys/psp/netinet/tcp.h.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/netinet/tcp.h	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,12 @@
X+#ifndef __NETINET_TCP_H__
X+#define __NETINET_TCP_H__
X+
X+#include <netinet/in.h>
X+
X+#define SOL_TCP    IPPROTO_TCP
X+
X+/* Socket options */
X+#define	TCP_NODELAY	0x01	/* don't delay send to coalesce packets */
X+#define	TCP_MAXSEG	0x02	/* set maximum segment size */
X+
X+#endif
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-netinet-tcp.h
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-select.c
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-select.c << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-select.c'
X--- newlib/libc/sys/psp/select.c.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/select.c	2007-06-01 17:45:11.000000000 +0300
X@@ -0,0 +1,199 @@
X+/*
X+ * PSP Software Development Kit - http://www.pspdev.org
X+ * -----------------------------------------------------------------------
X+ * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
X+ *
X+ * select.c - Socket wrappers to provide similar functions to normal unix
X+ *
X+ * Copyright (c) 2006 Rafael Cabezas <rafpsp at gmail.com>
X+ *
X+ * - 20070701 Alper Akcan "anhanguera" <distchx at yahoo.com>
X+ *            select EBADF fix
X+ * 
X+ */
X+#include <fcntl.h>
X+#include <errno.h>
X+#include <sys/select.h>
X+#include <psptypes.h>
X+#include <pspthreadman.h>
X+
X+#include "fdman.h"
X+
X+#define SELECT_POLLING_DELAY_IN_us	100
X+
X+static int __psp_poll_select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds);
X+
X+int	select(int n, fd_set *readfds, fd_set *writefds,
X+		   fd_set *exceptfds, struct timeval *timeout)
X+{
X+	int count;
X+	clock_t start_time, time;
X+	
X+	start_time = clock();
X+
X+	count = 0;
X+	
X+	if (timeout) {
X+		time = (timeout->tv_sec * CLOCKS_PER_SEC) + (timeout->tv_usec * (1*1000*1000/CLOCKS_PER_SEC));
X+	} 
X+	else {
X+		time = 0; 
X+	}
X+	
X+	for (;;) {
X+		count = __psp_poll_select(n, readfds, writefds, exceptfds);
X+		/* If timeout == NULL, then don't timeout! */
X+		if ( (count > 0) || ((timeout != NULL) && ((clock() - start_time) >= time)) ) {
X+			break;
X+		}
X+		if (count < 0) {
X+			/* anhanguera - 20070701
X+			 * error, lets let the caller to handle error state
X+			 */
X+			break;
X+		}
X+		else {
X+			/* Nothing found, and not timed-out yet; let's yield for SELECT_POLLING_DELAY_IN_us, so we're not in a busy loop */
X+			sceKernelDelayThread(SELECT_POLLING_DELAY_IN_us);
X+		} 
X+	}
X+	
X+	return count;
X+}
X+
X+#define SCE_FD_SET(n, p) \
X+	((p)->fds_bits[((n) & 0xFF) /__NFDBITS] |= (1 << ((n) % __NFDBITS)))
X+
X+static int __psp_poll_select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds)
X+{
X+	int fd, count;
X+	fd_set ready_readfds, ready_writefds, ready_exceptfds;
X+	fd_set scereadfds, scewritefds, sceexceptfds;
X+	SceKernelMppInfo info;
X+	struct timeval scetv;
X+
X+	FD_ZERO(&ready_readfds);
X+	FD_ZERO(&ready_writefds);
X+	FD_ZERO(&ready_exceptfds);
X+
X+	info.size = sizeof(info);
X+	scetv.tv_sec = 0;
X+	scetv.tv_usec = 0;
X+	count = 0;
X+
X+	for (fd = 0; fd < n; fd++)
X+	{
X+		if (__psp_descriptormap[fd] != NULL) {
X+			switch(__psp_descriptormap[fd]->type)
X+			{
X+				case __PSP_DESCRIPTOR_TYPE_PIPE:
X+					if (readfds && FD_ISSET(fd, readfds)) {
X+						if (sceKernelReferMsgPipeStatus(__psp_descriptormap[fd]->sce_descriptor, &info) == 0) {
X+							if (info.bufSize != info.freeSize) {
X+								FD_SET(fd, &ready_readfds);
X+								count++;
X+							}
X+						}
X+						else {
X+							FD_SET(fd, &ready_exceptfds);
X+							count++;
X+						}
X+					}
X+					if (writefds && FD_ISSET(fd, writefds)) {
X+						if (sceKernelReferMsgPipeStatus(__psp_descriptormap[fd]->sce_descriptor, &info) == 0) {
X+							if (info.freeSize > 0) {
X+								FD_SET(fd, &ready_writefds);
X+								count++;
X+							}
X+						}
X+						else {
X+							FD_SET(fd, &ready_exceptfds);
X+							count++;
X+						}
X+					}
X+					break;
X+				case __PSP_DESCRIPTOR_TYPE_FILE:
X+					if (readfds && FD_ISSET(fd, readfds)) {
X+						if (readfds && FD_ISSET(fd, readfds)) {
X+							/** Just set it for now */
X+							FD_SET(fd, &ready_readfds);
X+							count++;
X+						}
X+					} 
X+					break;
X+				case __PSP_DESCRIPTOR_TYPE_SOCKET:
X+					if (readfds && FD_ISSET(fd, readfds)) {
X+						int sce_ret, sce_fd;
X+						sce_fd = __psp_descriptormap[fd]->sce_descriptor;
X+						FD_ZERO(&scereadfds);
X+						SCE_FD_SET(sce_fd, &scereadfds);
X+						errno = 0;
X+						sce_ret = sceNetInetSelect (sce_fd+1, &scereadfds, NULL, NULL, &scetv);
X+						if (sce_ret>0) {
X+							FD_SET(fd, &ready_readfds);
X+							count++;
X+						}
X+						else if (sce_ret == -1) {
X+							errno = sceNetInetGetErrno();
X+							if (exceptfds && FD_ISSET(fd, exceptfds)) {
X+								FD_SET(fd, &ready_exceptfds);
X+								count++;
X+							} else {
X+								count = -1;
X+							}
X+						}
X+					}
X+					if (writefds && FD_ISSET(fd, writefds)) {
X+						int sce_ret;
X+						FD_ZERO(&scewritefds);
X+						SCE_FD_SET(__psp_descriptormap[fd]->sce_descriptor, &scewritefds);
X+						sce_ret = sceNetInetSelect (__psp_descriptormap[fd]->sce_descriptor+1, NULL, &scewritefds, NULL, &scetv);
X+						if (sce_ret>0) {
X+							FD_SET(fd, &ready_writefds);
X+							count++;
X+						}
X+						else if (sce_ret == -1) {
X+							if (exceptfds && FD_ISSET(fd, exceptfds)) {
X+								FD_SET(fd, &ready_exceptfds);
X+								count++;
X+							} 
X+							else {
X+								count = -1;
X+							}
X+						}
X+					}
X+					break;
X+			}
X+		} else {
X+			/* anhanguera - 20070701
X+			 *
X+			 * here we know that, system has no idea about 'fd'. if caller requested
X+			 * information about 'fd', return '-1' and set errno to 'EBADF'. we should
X+			 * increse the count and set exceptfd for fd, but it is safe to obey select
X+			 * manual.
X+			 *
X+			 * from manual;
X+			 * On error, -1 is returned, and errno is set appropriately; the sets and
X+			 * timeout become undefined, so do not rely on their contents after an error.
X+			 */
X+			if ((readfds && FD_ISSET(fd, readfds)) ||
X+			    (writefds && FD_ISSET(fd, writefds)) ||
X+			    (exceptfds && FD_ISSET(fd, exceptfds))) {
X+				errno = EBADF;
X+				return -1;
X+			}
X+		}
X+	}
X+
X+	if (count > 0) {
X+		if (readfds)
X+			*readfds   = ready_readfds;
X+		if (writefds)
X+			*writefds  = ready_writefds;
X+		if (exceptfds)
X+			*exceptfds = ready_exceptfds;
X+	}
X+
X+	return count;
X+}
X+
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-select.c
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-socket.c
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-socket.c << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-socket.c'
X--- newlib/libc/sys/psp/socket.c.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/socket.c	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,390 @@
X+/*
X+ * PSP Software Development Kit - http://www.pspdev.org
X+ * -----------------------------------------------------------------------
X+ * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
X+ *
X+ * socket.c - Socket wrappers to provide similar functions to normal unix
X+ *
X+ * Copyright (c) 2005 Marcus R. Brown <mrbrown at ocgnet.org>
X+ * Copyright (c) 2005 James Forshaw <tyranid at gmail.com>
X+ * 
X+ */
X+#include <fcntl.h>
X+#include <errno.h>
X+#include <sys/socket.h>
X+#include <sys/select.h>
X+#include <netinet/in.h>
X+#include <arpa/inet.h>
X+
X+#include <psptypes.h>
X+#include "fdman.h"
X+
X+#ifdef F_socket
X+int	socket(int domain, int type, int protocol)
X+{
X+	int sock, scesock;
X+	int i;
X+
X+	scesock = sceNetInetSocket(domain, type, protocol);
X+	if(scesock < 0)	{
X+		errno = sceNetInetGetErrno();
X+		return -1;
X+	}
X+
X+	sock = __psp_fdman_get_new_descriptor();
X+	if( sock != -1 )	{
X+		__psp_descriptormap[sock]->sce_descriptor = scesock;
X+		__psp_descriptormap[sock]->type = __PSP_DESCRIPTOR_TYPE_SOCKET;
X+	}
X+	else {
X+		sceNetInetClose(scesock);
X+		errno = ENOENT;
X+		return -1;
X+	}
X+
X+	return sock;
X+}
X+
X+/* These are glue routines that are called from _close(), _read(), and
X+   _write().  They are here so that any program that uses socket() will pull
X+   them in and have expanded socket capability. */
X+
X+int __psp_socket_close(int sock)
X+{
X+	int ret = 0;
X+
X+	if (__psp_descriptormap[sock]->ref_count == 1) {
X+		ret = sceNetInetClose(__psp_descriptormap[sock]->sce_descriptor);
X+	}
X+
X+	__psp_fdman_release_descriptor(sock);
X+
X+	if(ret < 0)
X+	{
X+		/* If close is defined likely errno is */
X+		errno = sceNetInetGetErrno();
X+		return -1;
X+	}
X+
X+	return 0;
X+}
X+
X+ssize_t __psp_socket_recv(int s, void *buf, size_t len, int flags)
X+{
X+	return recv(s, buf, len, flags);
X+}
X+
X+ssize_t __psp_socket_send(int s, const void *buf, size_t len, int flags)
X+{
X+	return send(s, buf, len, flags);
X+}
X+#endif
X+
X+#ifdef F_accept
X+int	accept(int s, struct sockaddr *addr, socklen_t *addrlen)
X+{
X+	int newscesock, newsock;
X+
X+	if (!__PSP_IS_FD_OF_TYPE(s, __PSP_DESCRIPTOR_TYPE_SOCKET)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+
X+	newscesock = sceNetInetAccept(__psp_descriptormap[s]->sce_descriptor, addr, addrlen);
X+	if( (newscesock >= 0) ) {
X+		newsock = __psp_fdman_get_new_descriptor();
X+		if ( newsock != -1 ) {
X+			__psp_descriptormap[newsock]->sce_descriptor = newscesock;
X+			__psp_descriptormap[newsock]->type = __PSP_DESCRIPTOR_TYPE_SOCKET;
X+		}
X+		else {
X+			sceNetInetClose(newscesock);
X+			errno = ENOENT;
X+			return -1;
X+		}
X+	}
X+	else {
X+		errno = ENOENT;
X+		return -1;
X+	}
X+
X+	return newsock;
X+}
X+#endif
X+
X+#ifdef F_bind
X+int	bind(int s, const struct sockaddr *my_addr, socklen_t addrlen)
X+{
X+	int ret;
X+	
X+	if (!__PSP_IS_FD_OF_TYPE(s, __PSP_DESCRIPTOR_TYPE_SOCKET)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+
X+	ret = sceNetInetBind(__psp_descriptormap[s]->sce_descriptor, my_addr, addrlen);
X+	if(ret < 0)
X+	{
X+		errno = sceNetInetGetErrno();
X+		return -1;
X+	}
X+
X+	return 0;
X+}
X+#endif
X+
X+#ifdef F_connect
X+int	connect(int s, const struct sockaddr *serv_addr, socklen_t addrlen)
X+{
X+	int ret;
X+
X+	if (!__PSP_IS_FD_OF_TYPE(s, __PSP_DESCRIPTOR_TYPE_SOCKET)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+
X+	ret = sceNetInetConnect(__psp_descriptormap[s]->sce_descriptor, serv_addr, addrlen);
X+	if(ret < 0)
X+	{
X+		errno = sceNetInetGetErrno();
X+		return -1;
X+	}
X+	
X+	return 0;
X+}
X+#endif
X+
X+#ifdef F_setsockopt
X+int	getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen)
X+{
X+	int ret;
X+
X+	if (!__PSP_IS_FD_OF_TYPE(s, __PSP_DESCRIPTOR_TYPE_SOCKET)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+
X+	ret = sceNetInetGetsockopt(__psp_descriptormap[s]->sce_descriptor, level, optname, optval, optlen);
X+	if(ret < 0)
X+	{
X+		errno = sceNetInetGetErrno();
X+		return -1;
X+	}
X+	
X+	return 0;
X+}
X+#endif
X+
X+#ifdef F_listen
X+int	listen(int s, int backlog)
X+{
X+	int ret;
X+
X+	if (!__PSP_IS_FD_OF_TYPE(s, __PSP_DESCRIPTOR_TYPE_SOCKET)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+
X+	ret = sceNetInetListen(__psp_descriptormap[s]->sce_descriptor, backlog);
X+	if(ret < 0)
X+	{
X+		errno = sceNetInetGetErrno();
X+		return -1;
X+	}
X+
X+	return 0;
X+}
X+#endif
X+
X+#ifdef F_recv
X+ssize_t	recv(int s, void *buf, size_t len, int flags)
X+{
X+	int ret;
X+
X+	if (!__PSP_IS_FD_OF_TYPE(s, __PSP_DESCRIPTOR_TYPE_SOCKET)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+
X+	ret = sceNetInetRecv(__psp_descriptormap[s]->sce_descriptor, buf, len, flags);
X+	if(ret < 0)
X+	{
X+		errno = sceNetInetGetErrno();
X+		return -1;
X+	}
X+
X+	return ret;
X+}
X+#endif
X+
X+#ifdef F_recvfrom
X+ssize_t	recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen)
X+{
X+	int ret;
X+
X+	if (!__PSP_IS_FD_OF_TYPE(s, __PSP_DESCRIPTOR_TYPE_SOCKET)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+
X+	ret = sceNetInetRecvfrom(__psp_descriptormap[s]->sce_descriptor, buf, len, flags, from, fromlen);
X+	if(ret < 0)
X+	{
X+		errno = sceNetInetGetErrno();
X+		return -1;
X+	}
X+
X+	return ret;
X+}
X+#endif
X+
X+#ifdef F_send
X+ssize_t	send(int s, const void *buf, size_t len, int flags)
X+{
X+	int ret;
X+
X+	if (!__PSP_IS_FD_OF_TYPE(s, __PSP_DESCRIPTOR_TYPE_SOCKET)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+
X+	ret = sceNetInetSend(__psp_descriptormap[s]->sce_descriptor, buf, len, flags);
X+	if(ret < 0)
X+	{
X+		errno = sceNetInetGetErrno();
X+		return -1;
X+	}
X+
X+	return ret;
X+}
X+#endif
X+
X+#ifdef F_sendto
X+ssize_t	sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen)
X+{
X+	int ret;
X+
X+	if (!__PSP_IS_FD_OF_TYPE(s, __PSP_DESCRIPTOR_TYPE_SOCKET)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+
X+	ret = sceNetInetSendto(__psp_descriptormap[s]->sce_descriptor, buf, len, flags, to, tolen);
X+	if(ret < 0)
X+	{
X+		errno = sceNetInetGetErrno();
X+		return -1;
X+	}
X+
X+	return ret;
X+}
X+#endif
X+
X+#ifdef F_setsockopt
X+int	setsockopt(int s, int level, int optname, const void *optval, socklen_t optlen)
X+{
X+	int ret;
X+
X+	if (!__PSP_IS_FD_OF_TYPE(s, __PSP_DESCRIPTOR_TYPE_SOCKET)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+
X+	ret = sceNetInetSetsockopt(__psp_descriptormap[s]->sce_descriptor, level, optname, optval, optlen);
X+	if(ret < 0)
X+	{
X+		errno = sceNetInetGetErrno();
X+		return -1;
X+	}
X+	else
X+	{
X+		if ( (level == SOL_SOCKET) && (optname == SO_NONBLOCK) ) {
X+			if (*((int*)optval) == 1) {
X+				__psp_descriptormap[s]->flags |= O_NONBLOCK;
X+			}
X+			else {
X+				__psp_descriptormap[s]->flags &= ~O_NONBLOCK;
X+			}	
X+		}
X+	}
X+
X+	return 0;
X+}
X+#endif
X+
X+#ifdef F_shutdown
X+int	shutdown(int s, int how)
X+{
X+	int ret;
X+
X+	if (!__PSP_IS_FD_OF_TYPE(s, __PSP_DESCRIPTOR_TYPE_SOCKET)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+
X+	ret = sceNetInetShutdown(__psp_descriptormap[s]->sce_descriptor, how);
X+	if(ret < 0)
X+	{
X+		errno = sceNetInetGetErrno();
X+		return -1;
X+	}
X+
X+	return 0;
X+}
X+#endif
X+
X+#ifdef F_getpeername
X+int	getpeername(int s, struct sockaddr *name, socklen_t *namelen)
X+{
X+	int ret;
X+
X+	if (!__PSP_IS_FD_OF_TYPE(s, __PSP_DESCRIPTOR_TYPE_SOCKET)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+
X+	ret = sceNetInetGetpeername(__psp_descriptormap[s]->sce_descriptor, name, namelen);
X+	if(ret < 0)
X+	{
X+		errno = sceNetInetGetErrno();
X+		return -1;
X+	}
X+
X+	return 0;
X+}
X+#endif
X+
X+#ifdef F_getsockname
X+int	getsockname(int s, struct sockaddr *name, socklen_t *namelen)
X+{
X+	int ret;
X+
X+	if (!__PSP_IS_FD_OF_TYPE(s, __PSP_DESCRIPTOR_TYPE_SOCKET)) {
X+		errno = EBADF;
X+		return -1;
X+	}
X+
X+	ret = sceNetInetGetsockname(__psp_descriptormap[s]->sce_descriptor, name, namelen);
X+	if(ret < 0)
X+	{
X+		errno = sceNetInetGetErrno();
X+		return -1;
X+	}
X+
X+	return 0;
X+}
X+#endif
X+
X+#ifdef F_inet_ntoa
X+char *inet_ntoa(struct in_addr in)
X+{
X+	static char ip_addr[INET_ADDRSTRLEN+1];
X+
X+	if(sceNetInetInetNtop(AF_INET, &in, ip_addr, INET_ADDRSTRLEN) == NULL)
X+	{
X+		strcpy(ip_addr, "Invalid");
X+	}
X+
X+	return ip_addr;
X+}
X+#endif
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-socket.c
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-errno.h
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-errno.h << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-errno.h'
X--- newlib/libc/sys/psp/sys/errno.h.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/sys/errno.h	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,158 @@
X+/* errno.h for PSP, based on newlib/libc/include/sys/errno.h. */
X+
X+#ifndef _SYS_ERRNO_H_
X+#ifdef __cplusplus
X+extern "C" {
X+#endif
X+#define _SYS_ERRNO_H_
X+
X+#include <sys/reent.h>
X+
X+#ifndef _REENT_ONLY
X+#define errno (*__errno())
X+extern int *__errno _PARAMS ((void));
X+#endif
X+
X+/* Please don't use these variables directly.
X+   Use strerror instead. */
X+extern __IMPORT _CONST char * _CONST _sys_errlist[];
X+extern __IMPORT int _sys_nerr;
X+#ifdef __CYGWIN__
X+extern __IMPORT const char * const sys_errlist[];
X+extern __IMPORT int sys_nerr;
X+#endif
X+
X+#define __errno_r(ptr) ((ptr)->_errno)
X+
X+#define	EPERM 1		/* Not super-user */
X+#define	ENOENT 2	/* No such file or directory */
X+#define	ESRCH 3		/* No such process */
X+#define	EINTR 4		/* Interrupted system call */
X+#define	EIO 5		/* I/O error */
X+#define	ENXIO 6		/* No such device or address */
X+#define	E2BIG 7		/* Arg list too long */
X+#define	ENOEXEC 8	/* Exec format error */
X+#define	EBADF 9		/* Bad file number */
X+#define	ECHILD 10	/* No children */
X+#define	EAGAIN 11	/* No more processes */
X+#define	ENOMEM 12	/* Not enough core */
X+#define	EACCES 13	/* Permission denied */
X+#define	EFAULT 14	/* Bad address */
X+#define	ENOTBLK 15	/* Block device required */
X+#define	EBUSY 16	/* Mount device busy */
X+#define	EEXIST 17	/* File exists */
X+#define	EXDEV 18	/* Cross-device link */
X+#define	ENODEV 19	/* No such device */
X+#define	ENOTDIR 20	/* Not a directory */
X+#define	EISDIR 21	/* Is a directory */
X+#define	EINVAL 22	/* Invalid argument */
X+#define	ENFILE 23	/* Too many open files in system */
X+#define	EMFILE 24	/* Too many open files */
X+#define	ENOTTY 25	/* Not a typewriter */
X+#define	ETXTBSY 26	/* Text file busy */
X+#define	EFBIG 27	/* File too large */
X+#define	ENOSPC 28	/* No space left on device */
X+#define	ESPIPE 29	/* Illegal seek */
X+#define	EROFS 30	/* Read only file system */
X+#define	EMLINK 31	/* Too many links */
X+#define	EPIPE 32	/* Broken pipe */
X+#define	EDOM 33		/* Math arg out of domain of func */
X+#define	ERANGE 34	/* Math result not representable */
X+#define	ENOMSG 35	/* No message of desired type */
X+#define	EIDRM 36	/* Identifier removed */
X+#define	ECHRNG 37	/* Channel number out of range */
X+#define	EL2NSYNC 38	/* Level 2 not synchronized */
X+#define	EL3HLT 39	/* Level 3 halted */
X+#define	EL3RST 40	/* Level 3 reset */
X+#define	ELNRNG 41	/* Link number out of range */
X+#define	EUNATCH 42	/* Protocol driver not attached */
X+#define	ENOCSI 43	/* No CSI structure available */
X+#define	EL2HLT 44	/* Level 2 halted */
X+#define	EDEADLK 45	/* Deadlock condition */
X+#define	ENOLCK 46	/* No record locks available */
X+#define EBADE 50	/* Invalid exchange */
X+#define EBADR 51	/* Invalid request descriptor */
X+#define EXFULL 52	/* Exchange full */
X+#define ENOANO 53	/* No anode */
X+#define EBADRQC 54	/* Invalid request code */
X+#define EBADSLT 55	/* Invalid slot */
X+#define EDEADLOCK 56	/* File locking deadlock error */
X+#define EBFONT 57	/* Bad font file fmt */
X+#define ENOSTR 60	/* Device not a stream */
X+#define ENODATA 61	/* No data (for no delay io) */
X+#define ETIME 62	/* Timer expired */
X+#define ENOSR 63	/* Out of streams resources */
X+#define ENONET 64	/* Machine is not on the network */
X+#define ENOPKG 65	/* Package not installed */
X+#define EREMOTE 66	/* The object is remote */
X+#define ENOLINK 67	/* The link has been severed */
X+#define EADV 68		/* Advertise error */
X+#define ESRMNT 69	/* Srmount error */
X+#define	ECOMM 70	/* Communication error on send */
X+#define EPROTO 71	/* Protocol error */
X+#define	EMULTIHOP 74	/* Multihop attempted */
X+#define	ELBIN 75	/* Inode is remote (not really error) */
X+#define	EDOTDOT 76	/* Cross mount point (not really error) */
X+#define EBADMSG 77	/* Trying to read unreadable message */
X+#define EFTYPE 79	/* Inappropriate file type or format */
X+#define ENOTUNIQ 80	/* Given log. name not unique */
X+#define EBADFD 81	/* f.d. invalid for this operation */
X+#define EREMCHG 82	/* Remote address changed */
X+#define ELIBACC 83	/* Can't access a needed shared lib */
X+#define ELIBBAD 84	/* Accessing a corrupted shared lib */
X+#define ELIBSCN 85	/* .lib section in a.out corrupted */
X+#define ELIBMAX 86	/* Attempting to link in too many libs */
X+#define ELIBEXEC 87	/* Attempting to exec a shared library */
X+#define ENOSYS 88	/* Function not implemented */
X+#define ENMFILE 89      /* No more files */
X+#define ENOTEMPTY 90	/* Directory not empty */
X+#define ENAMETOOLONG 91	/* File or path name too long */
X+#define ELOOP 92	/* Too many symbolic links */
X+#define EOPNOTSUPP 95	/* Operation not supported on transport endpoint */
X+#define EPFNOSUPPORT 96 /* Protocol family not supported */
X+#define ECONNRESET 104  /* Connection reset by peer */
X+#define ENOBUFS 105	/* No buffer space available */
X+#define EAFNOSUPPORT 106 /* Address family not supported by protocol family */
X+#define EPROTOTYPE 107	/* Protocol wrong type for socket */
X+#define ENOTSOCK 108	/* Socket operation on non-socket */
X+#define ENOPROTOOPT 109	/* Protocol not available */
X+#define ESHUTDOWN 110	/* Can't send after socket shutdown */
X+#define ECONNREFUSED 111	/* Connection refused */
X+#define EADDRINUSE 112		/* Address already in use */
X+#define ECONNABORTED 113	/* Connection aborted */
X+#define ENETUNREACH 114		/* Network is unreachable */
X+#define ENETDOWN 115		/* Network interface is not configured */
X+#define ETIMEDOUT 116		/* Connection timed out */
X+#define EHOSTDOWN 117		/* Host is down */
X+#define EHOSTUNREACH 118	/* Host is unreachable */
X+#define EINPROGRESS 119		/* Connection already in progress */
X+#define EALREADY 120		/* Socket already connected */
X+#define EDESTADDRREQ 121	/* Destination address required */
X+#define EMSGSIZE 122		/* Message too long */
X+#define EPROTONOSUPPORT 123	/* Unknown protocol */
X+#define ESOCKTNOSUPPORT 124	/* Socket type not supported */
X+#define EADDRNOTAVAIL 125	/* Address not available */
X+#define ENETRESET 126
X+#define EISCONN 127		/* Socket is already connected */
X+#define ENOTCONN 128		/* Socket is not connected */
X+#define ETOOMANYREFS 129
X+#define EPROCLIM 130
X+#define EUSERS 131
X+#define EDQUOT 132
X+#define ESTALE 133
X+#define ENOTSUP 134		/* Not supported */
X+#define ENOMEDIUM 135   /* No medium (in tape drive) */
X+#define ENOSHARE 136    /* No such host or network path */
X+#define ECASECLASH 137  /* Filename exists with different case */
X+#define EILSEQ 138
X+#define EOVERFLOW 139	/* Value too large for defined data type */
X+
X+/* From cygwin32.  */
X+#define EWOULDBLOCK EAGAIN	/* Operation would block */
X+
X+#define __ELASTERROR 2000	/* Users can add values starting here */
X+
X+#ifdef __cplusplus
X+}
X+#endif
X+#endif /* _SYS_ERRNO_H */
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-errno.h
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-fd_set.h
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-fd_set.h << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-fd_set.h'
X--- newlib/libc/sys/psp/sys/fd_set.h.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/sys/fd_set.h	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,69 @@
X+/*	$NetBSD: fd_set.h,v 1.1 2005/05/22 12:44:24 kleink Exp $	*/
X+
X+/*-
X+ * Copyright (c) 1992, 1993
X+ *	The Regents of the University of California.  All rights reserved.
X+ *
X+ * Redistribution and use in source and binary forms, with or without
X+ * modification, are permitted provided that the following conditions
X+ * are met:
X+ * 1. Redistributions of source code must retain the above copyright
X+ *    notice, this list of conditions and the following disclaimer.
X+ * 2. Redistributions in binary form must reproduce the above copyright
X+ *    notice, this list of conditions and the following disclaimer in the
X+ *    documentation and/or other materials provided with the distribution.
X+ * 3. Neither the name of the University nor the names of its contributors
X+ *    may be used to endorse or promote products derived from this software
X+ *    without specific prior written permission.
X+ *
X+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
X+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
X+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
X+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
X+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X+ * SUCH DAMAGE.
X+ *
X+ *	from: @(#)types.h	8.4 (Berkeley) 1/21/94
X+ */
X+
X+#ifndef _SYS_FD_SET_H_
X+#define	_SYS_FD_SET_H_
X+
X+#include <sys/socket.h>
X+#include <stdint.h>
X+
X+/*
X+ * Implementation dependent defines, hidden from user space. X/Open does not
X+ * specify them.
X+ */
X+#define	__NBBY		8		/* number of bits in a byte */
X+typedef uint32_t	__fd_mask;
X+
X+/* bits per mask */
X+#define __NFDBITS	((unsigned int)sizeof(__fd_mask) * __NBBY)
X+
X+#define	__howmany(x, y)	(((x) + ((y) - 1)) / (y))
X+
X+#define	FD_SETSIZE	256
X+
X+typedef	struct fd_set {
X+	__fd_mask	fds_bits[__howmany(FD_SETSIZE, __NFDBITS)];
X+} fd_set;
X+
X+#define	FD_SET(n, p)	\
X+	((p)->fds_bits[(n) /__NFDBITS] |= (1 << ((n) % __NFDBITS)))
X+
X+#define	FD_CLR(n, p)	\
X+	((p)->fds_bits[(n) /__NFDBITS] &= ~(1 << ((n) % __NFDBITS)))
X+
X+#define	FD_ISSET(n, p)	\
X+	((p)->fds_bits[(n) /__NFDBITS] & (1 << ((n) % __NFDBITS)))
X+
X+#define	FD_ZERO(p)	(void)__builtin_memset((p), 0, sizeof(*(p)))
X+
X+#endif /* _SYS_FD_SET_H_ */
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-fd_set.h
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-select.h
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-select.h << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-select.h'
X--- newlib/libc/sys/psp/sys/select.h.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/sys/select.h	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,54 @@
X+/*	$NetBSD: select.h,v 1.24 2005/05/22 12:44:24 kleink Exp $	*/
X+
X+/*-
X+ * Copyright (c) 1992, 1993
X+ *	The Regents of the University of California.  All rights reserved.
X+ *
X+ * Redistribution and use in source and binary forms, with or without
X+ * modification, are permitted provided that the following conditions
X+ * are met:
X+ * 1. Redistributions of source code must retain the above copyright
X+ *    notice, this list of conditions and the following disclaimer.
X+ * 2. Redistributions in binary form must reproduce the above copyright
X+ *    notice, this list of conditions and the following disclaimer in the
X+ *    documentation and/or other materials provided with the distribution.
X+ * 3. Neither the name of the University nor the names of its contributors
X+ *    may be used to endorse or promote products derived from this software
X+ *    without specific prior written permission.
X+ *
X+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
X+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
X+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
X+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
X+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X+ * SUCH DAMAGE.
X+ *
X+ *	@(#)select.h	8.2 (Berkeley) 1/4/94
X+ */
X+
X+#ifndef _SYS_SELECT_H_
X+#define	_SYS_SELECT_H_
X+
X+#ifdef __cplusplus
X+extern "C" {
X+#endif
X+
X+#include <sys/fd_set.h>
X+#include <sys/time.h>
X+
X+int	sceNetInetSelect(int n, fd_set *readfds, fd_set *writefds,
X+	    fd_set *exceptfds, struct timeval *timeout);
X+
X+int	select(int n, fd_set *readfds, fd_set *writefds,
X+	    fd_set *exceptfds, struct timeval *timeout);
X+
X+#ifdef __cplusplus
X+}
X+#endif
X+
X+#endif /* !_SYS_SELECT_H_ */
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-select.h
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-socket.h
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-socket.h << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-socket.h'
X--- newlib/libc/sys/psp/sys/socket.h.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/sys/socket.h	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,294 @@
X+/*	$NetBSD: socket.h,v 1.77 2005/11/29 03:12:16 christos Exp $	*/
X+
X+/*
X+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
X+ * All rights reserved.
X+ *
X+ * Redistribution and use in source and binary forms, with or without
X+ * modification, are permitted provided that the following conditions
X+ * are met:
X+ * 1. Redistributions of source code must retain the above copyright
X+ *    notice, this list of conditions and the following disclaimer.
X+ * 2. Redistributions in binary form must reproduce the above copyright
X+ *    notice, this list of conditions and the following disclaimer in the
X+ *    documentation and/or other materials provided with the distribution.
X+ * 3. Neither the name of the project nor the names of its contributors
X+ *    may be used to endorse or promote products derived from this software
X+ *    without specific prior written permission.
X+ *
X+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
X+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
X+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
X+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
X+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X+ * SUCH DAMAGE.
X+ */
X+
X+/*
X+ * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994
X+ *	The Regents of the University of California.  All rights reserved.
X+ *
X+ * Redistribution and use in source and binary forms, with or without
X+ * modification, are permitted provided that the following conditions
X+ * are met:
X+ * 1. Redistributions of source code must retain the above copyright
X+ *    notice, this list of conditions and the following disclaimer.
X+ * 2. Redistributions in binary form must reproduce the above copyright
X+ *    notice, this list of conditions and the following disclaimer in the
X+ *    documentation and/or other materials provided with the distribution.
X+ * 3. Neither the name of the University nor the names of its contributors
X+ *    may be used to endorse or promote products derived from this software
X+ *    without specific prior written permission.
X+ *
X+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
X+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
X+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
X+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
X+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X+ * SUCH DAMAGE.
X+ *
X+ *	@(#)socket.h	8.6 (Berkeley) 5/3/95
X+ */
X+
X+#ifndef _SYS_SOCKET_H_
X+#define	_SYS_SOCKET_H_
X+
X+#ifdef __cplusplus
X+extern "C" {
X+#endif
X+
X+#include <stdint.h>
X+#include <stddef.h>
X+#include <sys/types.h>
X+
X+typedef uint8_t sa_family_t;
X+typedef uint32_t socklen_t;
X+
X+/*
X+ * Socket types.
X+ */
X+#define	SOCK_STREAM	1		/* stream socket */
X+#define	SOCK_DGRAM	2		/* datagram socket */
X+#define	SOCK_RAW	3		/* raw-protocol interface */
X+#define	SOCK_RDM	4		/* reliably-delivered message */
X+#define	SOCK_SEQPACKET	5		/* sequenced packet stream */
X+
X+/*
X+ * Option flags per-socket.
X+ */
X+#define	SO_DEBUG	0x0001		/* turn on debugging info recording */
X+#define	SO_ACCEPTCONN	0x0002		/* socket has had listen() */
X+#define	SO_REUSEADDR	0x0004		/* allow local address reuse */
X+#define	SO_KEEPALIVE	0x0008		/* keep connections alive */
X+#define	SO_DONTROUTE	0x0010		/* just use interface addresses */
X+#define	SO_BROADCAST	0x0020		/* permit sending of broadcast msgs */
X+#define	SO_USELOOPBACK	0x0040		/* bypass hardware when possible */
X+#define	SO_LINGER	0x0080		/* linger on close if data present */
X+#define	SO_OOBINLINE	0x0100		/* leave received OOB data in line */
X+#define	SO_REUSEPORT	0x0200		/* allow local address & port reuse */
X+#define	SO_TIMESTAMP	0x0400		/* timestamp received dgram traffic */
X+
X+/*
X+ * Additional options, not kept in so_options.
X+ */
X+#define SO_SNDBUF	0x1001		/* send buffer size */
X+#define SO_RCVBUF	0x1002		/* receive buffer size */
X+#define SO_SNDLOWAT	0x1003		/* send low-water mark */
X+#define SO_RCVLOWAT	0x1004		/* receive low-water mark */
X+#define SO_SNDTIMEO	0x1005		/* send timeout */
X+#define SO_RCVTIMEO	0x1006		/* receive timeout */
X+#define	SO_ERROR	0x1007		/* get error status and clear */
X+#define	SO_TYPE		0x1008		/* get socket type */
X+#define	SO_OVERFLOWED	0x1009		/* datagrams: return packets dropped */
X+#define	SO_NONBLOCK     0x1009		/* non-blocking I/O */
X+
X+/*
X+ * Structure used for manipulating linger option.
X+ */
X+struct	linger {
X+	int	l_onoff;		/* option on/off */
X+	int	l_linger;		/* linger time in seconds */
X+};
X+
X+/*
X+ * Level number for (get/set)sockopt() to apply to socket itself.
X+ */
X+#define	SOL_SOCKET	0xffff		/* options for socket level */
X+
X+/*
X+ * Address families.
X+ */
X+#define	AF_UNSPEC	0		/* unspecified */
X+#define	AF_LOCAL	1		/* local to host (pipes, portals) */
X+#define	AF_UNIX		AF_LOCAL	/* backward compatibility */
X+#define	AF_INET		2		/* internetwork: UDP, TCP, etc. */
X+#define	AF_IMPLINK	3		/* arpanet imp addresses */
X+#define	AF_PUP		4		/* pup protocols: e.g. BSP */
X+#define	AF_CHAOS	5		/* mit CHAOS protocols */
X+#define	AF_NS		6		/* XEROX NS protocols */
X+#define	AF_ISO		7		/* ISO protocols */
X+#define	AF_OSI		AF_ISO
X+#define	AF_ECMA		8		/* european computer manufacturers */
X+#define	AF_DATAKIT	9		/* datakit protocols */
X+#define	AF_CCITT	10		/* CCITT protocols, X.25 etc */
X+#define	AF_SNA		11		/* IBM SNA */
X+#define AF_DECnet	12		/* DECnet */
X+#define AF_DLI		13		/* DEC Direct data link interface */
X+#define AF_LAT		14		/* LAT */
X+#define	AF_HYLINK	15		/* NSC Hyperchannel */
X+#define	AF_APPLETALK	16		/* Apple Talk */
X+#define	AF_ROUTE	17		/* Internal Routing Protocol */
X+#define	AF_LINK		18		/* Link layer interface */
X+#define	AF_COIP		20		/* connection-oriented IP, aka ST II */
X+#define	AF_CNT		21		/* Computer Network Technology */
X+#define	AF_IPX		23		/* Novell Internet Protocol */
X+#define	AF_INET6	24		/* IP version 6 */
X+#define AF_ISDN		26		/* Integrated Services Digital Network*/
X+#define AF_E164		AF_ISDN		/* CCITT E.164 recommendation */
X+#define AF_NATM		27		/* native ATM access */
X+#define AF_ARP		28		/* (rev.) addr. res. prot. (RFC 826) */
X+#define	AF_MAX		31
X+
X+/*
X+ * Structure used by kernel to store most
X+ * addresses.
X+ */
X+struct sockaddr {
X+	uint8_t	sa_len;		/* total length */
X+	sa_family_t	sa_family;	/* address family */
X+	char		sa_data[14];	/* actually longer; address value */
X+};
X+
X+/*
X+ * Protocol families, same as address families for now.
X+ */
X+#define	PF_UNSPEC	AF_UNSPEC
X+#define	PF_LOCAL	AF_LOCAL
X+#define	PF_UNIX		PF_LOCAL	/* backward compatibility */
X+#define	PF_INET		AF_INET
X+#define	PF_IMPLINK	AF_IMPLINK
X+#define	PF_PUP		AF_PUP
X+#define	PF_CHAOS	AF_CHAOS
X+#define	PF_NS		AF_NS
X+#define	PF_ISO		AF_ISO
X+#define	PF_OSI		AF_ISO
X+#define	PF_ECMA		AF_ECMA
X+#define	PF_DATAKIT	AF_DATAKIT
X+#define	PF_CCITT	AF_CCITT
X+#define	PF_SNA		AF_SNA
X+#define PF_DECnet	AF_DECnet
X+#define PF_DLI		AF_DLI
X+#define PF_LAT		AF_LAT
X+#define	PF_HYLINK	AF_HYLINK
X+#define	PF_APPLETALK	AF_APPLETALK
X+#define	PF_ROUTE	AF_ROUTE
X+#define	PF_LINK		AF_LINK
X+#if defined(_NETBSD_SOURCE)
X+#define	PF_XTP		pseudo_AF_XTP	/* really just proto family, no AF */
X+#endif
X+#define	PF_COIP		AF_COIP
X+#define	PF_CNT		AF_CNT
X+#define	PF_INET6	AF_INET6
X+#define	PF_IPX		AF_IPX		/* same format as AF_NS */
X+#if defined(_NETBSD_SOURCE)
X+#define PF_RTIP		pseudo_AF_RTIP	/* same format as AF_INET */
X+#define PF_PIP		pseudo_AF_PIP
X+#endif
X+#define PF_ISDN		AF_ISDN		/* same as E164 */
X+#define PF_E164		AF_E164
X+#define PF_NATM		AF_NATM
X+#define PF_ARP		AF_ARP
X+#if defined(_NETBSD_SOURCE)
X+#define PF_KEY 		pseudo_AF_KEY	/* like PF_ROUTE, only for key mgmt */
X+#endif
X+
X+#define	PF_MAX		AF_MAX
X+
X+#define	MSG_OOB		0x1		/* process out-of-band data */
X+#define	MSG_PEEK	0x2		/* peek at incoming message */
X+#define	MSG_DONTROUTE	0x4		/* send without using routing tables */
X+#define	MSG_EOR		0x8		/* data completes record */
X+#define	MSG_TRUNC	0x10		/* data discarded before delivery */
X+#define	MSG_CTRUNC	0x20		/* control data lost before delivery */
X+#define	MSG_WAITALL	0x40		/* wait for full request or error */
X+#define	MSG_DONTWAIT	0x80		/* this message should be nonblocking */
X+#define	MSG_BCAST	0x100		/* this message was rcvd using link-level brdcst */
X+#define	MSG_MCAST	0x200		/* this message was rcvd using link-level mcast */
X+
X+/*
X+ * Types of socket shutdown(2).
X+ */
X+#define	SHUT_RD		0		/* Disallow further receives. */
X+#define	SHUT_WR		1		/* Disallow further sends. */
X+#define	SHUT_RDWR	2		/* Disallow further sends/receives. */
X+
X+struct iovec {
X+	void	*iov_base;	/* Base address. */
X+	size_t	 iov_len;	/* Length. */
X+};
X+
X+struct msghdr {
X+	void		*msg_name;	/* optional address */
X+	socklen_t	msg_namelen;	/* size of address */
X+	struct iovec	*msg_iov;	/* scatter/gather array */
X+	int		msg_iovlen;	/* # elements in msg_iov */
X+	void		*msg_control;	/* ancillary data, see below */
X+	socklen_t	msg_controllen;	/* ancillary data buffer len */
X+	int		msg_flags;	/* flags on received message */
X+};
X+
X+/* BSD-compatible socket API. */
X+int	accept(int, struct sockaddr * __restrict, socklen_t * __restrict);
X+int	bind(int, const struct sockaddr *, socklen_t);
X+int	connect(int, const struct sockaddr *, socklen_t);
X+int	getpeername(int, struct sockaddr * __restrict, socklen_t * __restrict);
X+int	getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict);
X+int	getsockopt(int, int, int, void * __restrict, socklen_t * __restrict);
X+int	listen(int, int);
X+ssize_t	recv(int, void *, size_t, int);
X+ssize_t	recvfrom(int, void * __restrict, size_t, int,
X+	    struct sockaddr * __restrict, socklen_t * __restrict);
X+ssize_t recvmsg(int s, struct msghdr *msg, int flags);
X+ssize_t	send(int, const void *, size_t, int);
X+ssize_t	sendto(int, const void *,
X+	    size_t, int, const struct sockaddr *, socklen_t);
X+ssize_t sendmsg(int s, const struct msghdr *msg, int flags);
X+int	setsockopt(int, int, int, const void *, socklen_t);
X+int	shutdown(int, int);
X+int	socket(int, int, int);
X+
X+/* sceNetInet socket API. */
X+int	sceNetInetAccept(int s, struct sockaddr *addr, socklen_t *addrlen);
X+int	sceNetInetBind(int s, const struct sockaddr *my_addr, socklen_t addrlen);
X+int	sceNetInetConnect(int s, const struct sockaddr *serv_addr, socklen_t addrlen);
X+int	sceNetInetGetsockopt(int s, int level, int optname, void *optval, socklen_t *optlen);
X+int	sceNetInetListen(int s, int backlog);
X+ssize_t	sceNetInetRecv(int s, void *buf, size_t len, int flags);
X+ssize_t	sceNetInetRecvfrom(int s, void *buf, size_t flags, int, struct sockaddr *from, socklen_t *fromlen);
X+ssize_t sceNetInetRecvmsg(int s, struct msghdr *msg, int flags);
X+ssize_t	sceNetInetSend(int s, const void *buf, size_t len, int flags);
X+ssize_t	sceNetInetSendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen);
X+ssize_t sceNetInetSendmsg(int s, const struct msghdr *msg, int flags);
X+int	sceNetInetSetsockopt(int s, int level, int optname, const void *optval, socklen_t optlen);
X+int	sceNetInetShutdown(int s, int how);
X+int	sceNetInetSocket(int domain, int type, int protocol);
X+int sceNetInetClose(int s);
X+int sceNetInetGetErrno(void);
X+int sceNetInetGetsockname(int s, struct sockaddr *name, socklen_t *namelen);
X+int sceNetInetGetpeername(int s, struct sockaddr *name, socklen_t *namelen);
X+
X+#ifdef __cplusplus
X+}
X+#endif
X+
X+#endif /* !_SYS_SOCKET_H_ */
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-sys-socket.h
echo x - psptoolchain-newlib/files/patch-newlib-libc-sys-psp-xprintf.c
sed 's/^X//' >psptoolchain-newlib/files/patch-newlib-libc-sys-psp-xprintf.c << 'END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-xprintf.c'
X--- newlib/libc/sys/psp/xprintf.c.orig	1970-01-01 02:00:00.000000000 +0200
X+++ newlib/libc/sys/psp/xprintf.c	2007-06-01 12:22:26.000000000 +0300
X@@ -0,0 +1,984 @@
X+/*
X+ * PSP Software Development Kit - http://www.pspdev.org
X+ * -----------------------------------------------------------------------
X+ * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
X+ *
X+ * xprintf.c - Various *printf functions.
X+ *
X+ * Copyright (c) 2005 Marcus R. Brown <mrbrown at ocgnet.org>
X+ * Copyright (c) 2005 James Forshaw <tyranid at gmail.com>
X+ * Copyright (c) 2005 John Kelley <ps2dev at kelley.ca>
X+ *
X+ * $Id: newlib-1.13.0.patch 1891 2006-05-02 15:32:28Z raf $
X+ */
X+/* Code borrowed from mysql's xprintf.c, by Richard Hipp */
X+/* This xprintf.c file on which this one is based is in public domain. */
X+
X+#include <stdio.h>
X+#include <string.h>
X+#include <malloc.h>
X+
X+#include <stdarg.h>
X+#include <stddef.h>
X+
X+/*
X+** The maximum number of digits of accuracy in a floating-point conversion.
X+*/
X+#define MAXDIG 20
X+
X+/* Instead of including ctype.h, use the isdigit() prototype because psplibc doesn't
X+   know about newlib, and newlib defines isdigit as a macro that uses _ctype_. */
X+int isdigit(int __c);
X+
X+int vxprintf(void (*func)(char *, int, void *), void *arg, const char *format, va_list ap);
X+
X+#ifdef F_vxprintf
X+/*
X+** Conversion types fall into various categories as defined by the
X+** following enumeration.
X+*/
X+
X+enum e_type {    /* The type of the format field */
X+   RADIX,            /* Integer types.  %d, %x, %o, and so forth */
X+   FLOAT,            /* Floating point.  %f */
X+   EXP,              /* Exponentional notation. %e and %E */
X+   GENERIC,          /* Floating or exponential, depending on exponent. %g */
X+   SIZE,             /* Return number of characters processed so far. %n */
X+   STRING,           /* Strings. %s */
X+   PERCENT,          /* Percent symbol. %% */
X+   CHAR,             /* Characters. %c */
X+   ERROR,            /* Used to indicate no such conversion type */
X+/* The rest are extensions, not normally found in printf() */
X+   CHARLIT,          /* Literal characters.  %' */
X+   SEEIT,            /* Strings with visible control characters. %S */
X+   MEM_STRING,       /* A string which should be deleted after use. %z */
X+   ORDINAL,          /* 1st, 2nd, 3rd and so forth */
X+};
X+
X+/*
X+** Each builtin conversion character (ex: the 'd' in "%d") is described
X+** by an instance of the following structure
X+*/
X+typedef struct s_info {   /* Information about each format field */
X+  int  fmttype;              /* The format field code letter */
X+  int  base;                 /* The base for radix conversion */
X+  char *charset;             /* The character set for conversion */
X+  int  flag_signed;          /* Is the quantity signed? */
X+  char *prefix;              /* Prefix on non-zero values in alt format */
X+  enum e_type type;          /* Conversion paradigm */
X+} info;
X+
X+/*
X+** The following table is searched linearly, so it is good to put the
X+** most frequently used conversion types first.
X+*/
X+static info fmtinfo[] = {
X+  { 'd',  10,  "0123456789",       1,    0, RADIX,      },
X+  { 's',   0,  0,                  0,    0, STRING,     },
X+  { 'S',   0,  0,                  0,    0, SEEIT,      },
X+  { 'z',   0,  0,                  0,    0, MEM_STRING, },
X+  { 'c',   0,  0,                  0,    0, CHAR,       },
X+  { 'o',   8,  "01234567",         0,  "0", RADIX,      },
X+  { 'u',  10,  "0123456789",       0,    0, RADIX,      },
X+  { 'x',  16,  "0123456789abcdef", 0, "x0", RADIX,      },
X+  { 'X',  16,  "0123456789ABCDEF", 0, "X0", RADIX,      },
X+  { 'r',  10,  "0123456789",       0,    0, ORDINAL,    },
X+  { 'f',   0,  0,                  1,    0, FLOAT,      },
X+  { 'e',   0,  "e",                1,    0, EXP,        },
X+  { 'E',   0,  "E",                1,    0, EXP,        },
X+  { 'g',   0,  "e",                1,    0, GENERIC,    },
X+  { 'G',   0,  "E",                1,    0, GENERIC,    },
X+  { 'i',  10,  "0123456789",       1,    0, RADIX,      },
X+  { 'n',   0,  0,                  0,    0, SIZE,       },
X+  { 'S',   0,  0,                  0,    0, SEEIT,      },
X+  { '%',   0,  0,                  0,    0, PERCENT,    },
X+  { 'b',   2,  "01",               0, "b0", RADIX,      }, /* Binary notation */
X+  { 'p',  16,  "0123456789ABCDEF", 0, "x0", RADIX,      }, /* Pointers */
X+  { '\'',  0,  0,                  0,    0, CHARLIT,    }, /* Literal char */
X+};
X+#define NINFO  (sizeof(fmtinfo)/sizeof(info))  /* Size of the fmtinfo table */
X+
X+/*
X+** If NOFLOATINGPOINT is defined, then none of the floating point
X+** conversions will work.
X+*/
X+#ifndef NOFLOATINGPOINT
X+/*
X+** "*val" is a double such that 0.1 <= *val < 10.0
X+** Return the ascii code for the leading digit of *val, then
X+** multiply "*val" by 10.0 to renormalize.
X+**
X+** Example:
X+**     input:     *val = 3.14159
X+**     output:    *val = 1.4159    function return = '3'
X+**
X+** The counter *cnt is incremented each time.  After counter exceeds
X+** 16 (the number of significant digits in a 64-bit float) '0' is
X+** always returned.
X+*/
X+static int getdigit(long double *val, int *cnt){
X+  int digit;
X+  long double d;
X+  if( (*cnt)++ >= MAXDIG ) return '0';
X+  digit = (int)*val;
X+  d = digit;
X+  digit += '0';
X+  *val = (*val - d)*10.0;
X+  return digit;
X+}
X+#endif
X+
X+/*
X+** Setting the size of the BUFFER involves trade-offs.  No %d or %f
X+** conversion can have more than BUFSIZE characters.  If the field
X+** width is larger than BUFSIZE, it is silently shortened.  On the
X+** other hand, this routine consumes more stack space with larger
X+** BUFSIZEs.  If you have some threads for which you want to minimize
X+** stack space, you should keep BUFSIZE small.
X+*/
X+#define BUFSIZE 100  /* Size of the output buffer */
X+
X+/*
X+** The root program.  All variations call this core.
X+**
X+** INPUTS:
X+**   func   This is a pointer to a function taking three arguments
X+**            1. A pointer to the list of characters to be output
X+**               (Note, this list is NOT null terminated.)
X+**            2. An integer number of characters to be output.
X+**               (Note: This number might be zero.)
X+**            3. A pointer to anything.  Same as the "arg" parameter.
X+**
X+**   arg    This is the pointer to anything which will be passed as the
X+**          third argument to "func".  Use it for whatever you like.
X+**
X+**   fmt    This is the format string, as in the usual print.
X+**
X+**   ap     This is a pointer to a list of arguments.  Same as in
X+**          vfprint.
X+**
X+** OUTPUTS:
X+**          The return value is the total number of characters sent to
X+**          the function "func".  Returns -1 on a error.
X+**
X+** Note that the order in which automatic variables are declared below
X+** seems to make a big difference in determining how fast this beast
X+** will run.
X+*/
X+
X+int vxprintf(func,arg,format,ap)
X+  void (*func)(char*,int,void*);
X+  void *arg;
X+  const char *format;
X+  va_list ap;
X+{
X+  register const char *fmt; /* The format string. */
X+  register int c;           /* Next character in the format string */
X+  register char *bufpt;     /* Pointer to the conversion buffer */
X+  register int  precision;  /* Precision of the current field */
X+  register int  length;     /* Length of the field */
X+  register int  idx;        /* A general purpose loop counter */
X+  int count;                /* Total number of characters output */
X+  int width;                /* Width of the current field */
X+  int flag_leftjustify;     /* True if "-" flag is present */
X+  int flag_plussign;        /* True if "+" flag is present */
X+  int flag_blanksign;       /* True if " " flag is present */
X+  int flag_alternateform;   /* True if "#" flag is present */
X+  int flag_zeropad;         /* True if field width constant starts with zero */
X+  int flag_long;            /* True if "l" flag is present */
X+  int flag_center;          /* True if "=" flag is present */
X+  unsigned long long longvalue;  /* Value for integer types */
X+
X+  long double realvalue;    /* Value for real types */
X+  info *infop;              /* Pointer to the appropriate info structure */
X+  char buf[BUFSIZE];        /* Conversion buffer */
X+  char prefix;              /* Prefix character.  "+" or "-" or " " or '\0'. */
X+  int  errorflag = 0;       /* True if an error is encountered */
X+  enum e_type xtype;        /* Conversion paradigm */
X+  char *zMem = 0;           /* String to be freed */
X+  static char spaces[] =
X+     "                                                    ";
X+#define SPACESIZE (sizeof(spaces)-1)
X+#ifndef NOFLOATINGPOINT
X+  int  exp;                 /* exponent of real numbers */
X+  long double rounder;      /* Used for rounding floating point values */
X+  int flag_dp;              /* True if decimal point should be shown */
X+  int flag_rtz;             /* True if trailing zeros should be removed */
X+  int flag_exp;             /* True to force display of the exponent */
X+  int nsd;                  /* Number of significant digits returned */
X+#endif
X+
X+  fmt = format;                     /* Put in a register for speed */
X+  count = length = 0;
X+  bufpt = 0;
X+  for(; (c=(*fmt))!=0; ++fmt){
X+    if( c!='%' ){
X+      register int amt;
X+      bufpt = (char *)fmt;
X+      amt = 1;
X+      while( (c=(*++fmt))!='%' && c!=0 ) amt++;
X+      (*func)(bufpt,amt,arg);
X+      count += amt;
X+      if( c==0 ) break;
X+    }
X+    if( (c=(*++fmt))==0 ){
X+      errorflag = 1;
X+      (*func)("%",1,arg);
X+      count++;
X+      break;
X+    }
X+    /* Find out what flags are present */
X+    flag_leftjustify = flag_plussign = flag_blanksign =
X+     flag_alternateform = flag_zeropad = flag_center = 0;
X+    do{
X+      switch( c ){
X+        case '-':   flag_leftjustify = 1;     c = 0;   break;
X+        case '+':   flag_plussign = 1;        c = 0;   break;
X+        case ' ':   flag_blanksign = 1;       c = 0;   break;
X+        case '#':   flag_alternateform = 1;   c = 0;   break;
X+        case '0':   flag_zeropad = 1;         c = 0;   break;
X+        case '=':   flag_center = 1;          c = 0;   break;
X+        default:                                       break;
X+      }
X+    }while( c==0 && (c=(*++fmt))!=0 );
X+    if( flag_center ) flag_leftjustify = 0;
X+    /* Get the field width */
X+    width = 0;
X+    if( c=='*' ){
X+      width = va_arg(ap,int);
X+      if( width<0 ){
X+        flag_leftjustify = 1;
X+        width = -width;
X+      }
X+      c = *++fmt;
X+    }else{
X+      while( isdigit(c) ){
X+        width = width*10 + c - '0';
X+        c = *++fmt;
X+      }
X+    }
X+    if( width > BUFSIZE-10 ){
X+      width = BUFSIZE-10;
X+    }
X+    /* Get the precision */
X+    if( c=='.' ){
X+      precision = 0;
X+      c = *++fmt;
X+      if( c=='*' ){
X+        precision = va_arg(ap,int);
X+#ifndef COMPATIBILITY
X+        /* This is sensible, but SUN OS 4.1 doesn't do it. */
X+        if( precision<0 ) precision = -precision;
X+#endif
X+        c = *++fmt;
X+      }else{
X+        while( isdigit(c) ){
X+          precision = precision*10 + c - '0';
X+          c = *++fmt;
X+        }
X+      }
X+      /* Limit the precision to prevent overflowing buf[] during conversion */
X+      if( precision>BUFSIZE-40 ) precision = BUFSIZE-40;
X+    }else{
X+      precision = -1;
X+    }
X+    /* Get the conversion type modifier */
X+    if( c=='l' ){
X+      flag_long = 1;
X+      c = *++fmt;
X+      if( c == 'l' ){
X+	flag_long = 2;
X+	c = *++fmt;
X+      }
X+    }else{
X+      flag_long = 0;
X+    }
X+    /* Fetch the info entry for the field */
X+    infop = 0;
X+    for(idx=0; idx<NINFO; idx++){
X+      if( c==fmtinfo[idx].fmttype ){
X+        infop = &fmtinfo[idx];
X+        break;
X+      }
X+    }
X+    /* No info entry found.  It must be an error. */
X+    if( infop==0 ){
X+      xtype = ERROR;
X+    }else{
X+      xtype = infop->type;
X+    }
X+
X+    /*
X+    ** At this point, variables are initialized as follows:
X+    **
X+    **   flag_alternateform          TRUE if a '#' is present.
X+    **   flag_plussign               TRUE if a '+' is present.
X+    **   flag_leftjustify            TRUE if a '-' is present or if the
X+    **                               field width was negative.
X+    **   flag_zeropad                TRUE if the width began with 0.
X+    **   flag_long                   TRUE if the letter 'l' (ell) prefixed
X+    **                               the conversion character.
X+    **   flag_blanksign              TRUE if a ' ' is present.
X+    **   width                       The specified field width.  This is
X+    **                               always non-negative.  Zero is the default.
X+    **   precision                   The specified precision.  The default
X+    **                               is -1.
X+    **   xtype                       The class of the conversion.
X+    **   infop                       Pointer to the appropriate info struct.
X+    */
X+    switch( xtype ){
X+      case ORDINAL:
X+      case RADIX:
X+        if(( flag_long>1 )&&( infop->flag_signed )){
X+	    signed long long t = va_arg(ap,signed long long);
X+	    longvalue = t;
X+	}else if(( flag_long>1 )&&( !infop->flag_signed )){
X+	    unsigned long long t = va_arg(ap,unsigned long long);
X+	    longvalue = t;
X+	}else if(( flag_long )&&( infop->flag_signed )){
X+	    signed long t = va_arg(ap,signed long);
X+	    longvalue = t;
X+	}else if(( flag_long )&&( !infop->flag_signed )){
X+	    unsigned long t = va_arg(ap,unsigned long);
X+	    longvalue = t;
X+	}else if(( !flag_long )&&( infop->flag_signed )){
X+	    signed int t = va_arg(ap,signed int) & ((unsigned long) 0xffffffff);
X+	    longvalue = t;
X+	}else{
X+	    unsigned int t = va_arg(ap,unsigned int) & ((unsigned long) 0xffffffff);
X+	    longvalue = t;
X+	}
X+#ifdef COMPATIBILITY
X+        /* For the format %#x, the value zero is printed "0" not "0x0".
X+        ** I think this is stupid. */
X+        if( longvalue==0 ) flag_alternateform = 0;
X+#else
X+        /* More sensible: turn off the prefix for octal (to prevent "00"),
X+        ** but leave the prefix for hex. */
X+        if( longvalue==0 && infop->base==8 ) flag_alternateform = 0;
X+#endif
X+        if( infop->flag_signed ){
X+          if( *(long long*)&longvalue<0 ){
X+	    longvalue = -*(long long*)&longvalue;
X+            prefix = '-';
X+          }else if( flag_plussign )  prefix = '+';
X+          else if( flag_blanksign )  prefix = ' ';
X+          else                       prefix = 0;
X+        }else                        prefix = 0;
X+        if( flag_zeropad && precision<width-(prefix!=0) ){
X+          precision = width-(prefix!=0);
X+	}
X+        bufpt = &buf[BUFSIZE];
X+        if( xtype==ORDINAL ){
X+          long a,b;
X+          a = longvalue%10;
X+          b = longvalue%100;
X+          bufpt -= 2;
X+          if( a==0 || a>3 || (b>10 && b<14) ){
X+            bufpt[0] = 't';
X+            bufpt[1] = 'h';
X+          }else if( a==1 ){
X+            bufpt[0] = 's';
X+            bufpt[1] = 't';
X+          }else if( a==2 ){
X+            bufpt[0] = 'n';
X+            bufpt[1] = 'd';
X+          }else if( a==3 ){
X+            bufpt[0] = 'r';
X+            bufpt[1] = 'd';
X+          }
X+        }
X+        {
X+          register char *cset;      /* Use registers for speed */
X+          register int base;
X+          cset = infop->charset;
X+          base = infop->base;
X+          do{                                           /* Convert to ascii */
X+            *(--bufpt) = cset[longvalue%base];
X+            longvalue = longvalue/base;
X+          }while( longvalue>0 );
X+	}
X+        length = (int)(&buf[BUFSIZE]-bufpt);
X+	if(infop->fmttype == 'p')
X+        {
X+		precision = 8;
X+		flag_alternateform = 1;
X+        }
X+
X+        for(idx=precision-length; idx>0; idx--){
X+          *(--bufpt) = '0';                             /* Zero pad */
X+	}
X+        if( prefix ) *(--bufpt) = prefix;               /* Add sign */
X+        if( flag_alternateform && infop->prefix ){      /* Add "0" or "0x" */
X+          char *pre, x;
X+          pre = infop->prefix;
X+          if( *bufpt!=pre[0] ){
X+            for(pre=infop->prefix; (x=(*pre))!=0; pre++) *(--bufpt) = x;
X+	  }
X+        }
X+
X+        length = (int)(&buf[BUFSIZE]-bufpt);
X+        break;
X+      case FLOAT:
X+      case EXP:
X+      case GENERIC:
X+        realvalue = va_arg(ap,double);
X+#ifndef NOFLOATINGPOINT
X+        if( precision<0 ) precision = 6;         /* Set default precision */
X+        if( precision>BUFSIZE-10 ) precision = BUFSIZE-10;
X+        if( realvalue<0.0 ){
X+          realvalue = -realvalue;
X+          prefix = '-';
X+	}else{
X+          if( flag_plussign )          prefix = '+';
X+          else if( flag_blanksign )    prefix = ' ';
X+          else                         prefix = 0;
X+	}
X+        if( infop->type==GENERIC && precision>0 ) precision--;
X+        rounder = 0.0;
X+#ifdef COMPATIBILITY
X+        /* Rounding works like BSD when the constant 0.4999 is used.  Wierd! */
X+        for(idx=precision, rounder=0.4999; idx>0; idx--, rounder*=0.1);
X+#else
X+        /* It makes more sense to use 0.5 */
X+        if( precision>MAXDIG-1 ) idx = MAXDIG-1;
X+        else                     idx = precision;
X+        for(rounder=0.5; idx>0; idx--, rounder*=0.1);
X+#endif
X+        if( infop->type==FLOAT ) realvalue += rounder;
X+        /* Normalize realvalue to within 10.0 > realvalue >= 1.0 */
X+        exp = 0;
X+        if( realvalue>0.0 ){
X+          int k = 0;
X+          while( realvalue>=1e8 && k++<100 ){ realvalue *= 1e-8; exp+=8; }
X+          while( realvalue>=10.0 && k++<100 ){ realvalue *= 0.1; exp++; }
X+          while( realvalue<1e-8 && k++<100 ){ realvalue *= 1e8; exp-=8; }
X+          while( realvalue<1.0 && k++<100 ){ realvalue *= 10.0; exp--; }
X+          if( k>=100 ){
X+            bufpt = "NaN";
X+            length = 3;
X+            break;
X+          }
X+	}
X+        bufpt = buf;
X+        /*
X+        ** If the field type is GENERIC, then convert to either EXP
X+        ** or FLOAT, as appropriate.
X+        */
X+        flag_exp = xtype==EXP;
X+        if( xtype!=FLOAT ){
X+          realvalue += rounder;
X+          if( realvalue>=10.0 ){ realvalue *= 0.1; exp++; }
X+        }
X+        if( xtype==GENERIC ){
X+          flag_rtz = !flag_alternateform;
X+          if( exp<-4 || exp>precision ){
X+            xtype = EXP;
X+          }else{
X+            precision = precision - exp;
X+            xtype = FLOAT;
X+          }
X+	}else{
X+          flag_rtz = 0;
X+	}
X+        /*
X+        ** The "exp+precision" test causes output to be of type EXP if
X+        ** the precision is too large to fit in buf[].
X+        */
X+        nsd = 0;
X+        if( xtype==FLOAT && exp+precision<BUFSIZE-30 ){
X+          flag_dp = (precision>0 || flag_alternateform);
X+          if( prefix ) *(bufpt++) = prefix;         /* Sign */
X+          if( exp<0 )  *(bufpt++) = '0';            /* Digits before "." */
X+          else for(; exp>=0; exp--) *(bufpt++) = getdigit(&realvalue,&nsd);
X+          if( flag_dp ) *(bufpt++) = '.';           /* The decimal point */
X+          for(exp++; exp<0 && precision>0; precision--, exp++){
X+            *(bufpt++) = '0';
X+          }
X+          while( (precision--)>0 ) *(bufpt++) = getdigit(&realvalue,&nsd);
X+          *(bufpt--) = 0;                           /* Null terminate */
X+          if( flag_rtz && flag_dp ){     /* Remove trailing zeros and "." */
X+            while( bufpt>=buf && *bufpt=='0' ) *(bufpt--) = 0;
X+            if( bufpt>=buf && *bufpt=='.' ) *(bufpt--) = 0;
X+          }
X+          bufpt++;                            /* point to next free slot */
X+	}else{    /* EXP or GENERIC */
X+          flag_dp = (precision>0 || flag_alternateform);
X+          if( prefix ) *(bufpt++) = prefix;   /* Sign */
X+          *(bufpt++) = getdigit(&realvalue,&nsd);  /* First digit */
X+          if( flag_dp ) *(bufpt++) = '.';     /* Decimal point */
X+          while( (precision--)>0 ) *(bufpt++) = getdigit(&realvalue,&nsd);
X+          bufpt--;                            /* point to last digit */
X+          if( flag_rtz && flag_dp ){          /* Remove tail zeros */
X+            while( bufpt>=buf && *bufpt=='0' ) *(bufpt--) = 0;
X+            if( bufpt>=buf && *bufpt=='.' ) *(bufpt--) = 0;
X+          }
X+          bufpt++;                            /* point to next free slot */
X+          if( exp || flag_exp ){
X+            *(bufpt++) = infop->charset[0];
X+            if( exp<0 ){ *(bufpt++) = '-'; exp = -exp; } /* sign of exp */
X+            else       { *(bufpt++) = '+'; }
X+            if( exp>=100 ){
X+              *(bufpt++) = (exp/100)+'0';                /* 100's digit */
X+              exp %= 100;
X+  	    }
X+            *(bufpt++) = exp/10+'0';                     /* 10's digit */
X+            *(bufpt++) = exp%10+'0';                     /* 1's digit */
X+          }
X+	}
X+        /* The converted number is in buf[] and zero terminated. Output it.
X+        ** Note that the number is in the usual order, not reversed as with
X+        ** integer conversions. */
X+        length = (int)(bufpt-buf);
X+        bufpt = buf;
X+
X+        /* Special case:  Add leading zeros if the flag_zeropad flag is
X+        ** set and we are not left justified */
X+        if( flag_zeropad && !flag_leftjustify && length < width){
X+          int i;
X+          int nPad = width - length;
X+          for(i=width; i>=nPad; i--){
X+            bufpt[i] = bufpt[i-nPad];
X+          }
X+          i = prefix!=0;
X+          while( nPad-- ) bufpt[i++] = '0';
X+          length = width;
X+        }
X+#endif
X+        break;
X+      case SIZE:
X+        *(va_arg(ap,int*)) = count;
X+        length = width = 0;
X+        break;
X+      case PERCENT:
X+        buf[0] = '%';
X+        bufpt = buf;
X+        length = 1;
X+        break;
X+      case CHARLIT:
X+      case CHAR:
X+        c = buf[0] = (xtype==CHAR ? va_arg(ap,int) : *++fmt);
X+        if( precision>=0 ){
X+          for(idx=1; idx<precision; idx++) buf[idx] = c;
X+          length = precision;
X+	}else{
X+          length =1;
X+	}
X+        bufpt = buf;
X+        break;
X+      case STRING:
X+      case MEM_STRING:
X+        zMem = bufpt = va_arg(ap,char*);
X+        if( bufpt==0 ) bufpt = "(null)";
X+        length = strlen(bufpt);
X+        if( precision>=0 && precision<length ) length = precision;
X+        break;
X+      case SEEIT:
X+        {
X+          int i;
X+          int c;
X+          char *arg = va_arg(ap,char*);
X+          for(i=0; i<BUFSIZE-1 && (c = *arg++)!=0; i++){
X+            if( c<0x20 || c>=0x7f ){
X+              buf[i++] = '^';
X+              buf[i] = (c&0x1f)+0x40;
X+            }else{
X+              buf[i] = c;
X+            }
X+          }
X+          bufpt = buf;
X+          length = i;
X+          if( precision>=0 && precision<length ) length = precision;
X+        }
X+        break;
X+      case ERROR:
X+        buf[0] = '%';
X+        buf[1] = c;
X+        errorflag = 0;
X+        idx = 1+(c!=0);
X+        (*func)("%",idx,arg);
X+        count += idx;
X+        if( c==0 ) fmt--;
X+        break;
X+    }/* End switch over the format type */
X+    /*
X+    ** The text of the conversion is pointed to by "bufpt" and is
X+    ** "length" characters long.  The field width is "width".  Do
X+    ** the output.
X+    */
X+    if( !flag_leftjustify ){
X+      register int nspace;
X+      nspace = width-length;
X+      if( nspace>0 ){
X+        if( flag_center ){
X+          nspace = nspace/2;
X+          width -= nspace;
X+          flag_leftjustify = 1;
X+	}
X+        count += nspace;
X+        while( nspace>=SPACESIZE ){
X+          (*func)(spaces,SPACESIZE,arg);
X+          nspace -= SPACESIZE;
X+        }
X+        if( nspace>0 ) (*func)(spaces,nspace,arg);
X+      }
X+    }
X+    if( length>0 ){
X+      (*func)(bufpt,length,arg);
X+      count += length;
X+    }
X+    if( xtype==MEM_STRING && zMem ){
X+      free(zMem);
X+    }
X+    if( flag_leftjustify ){
X+      register int nspace;
X+      nspace = width-length;
X+      if( nspace>0 ){
X+        count += nspace;
X+        while( nspace>=SPACESIZE ){
X+          (*func)(spaces,SPACESIZE,arg);
X+          nspace -= SPACESIZE;
X+        }
X+        if( nspace>0 ) (*func)(spaces,nspace,arg);
X+      }
X+    }
X+  }/* End for loop over the format string */
X+  return errorflag ? -1 : count;
X+} /* End of function */
X+#endif
X+
X+#ifdef F__xprintf
X+/*
X+** This non-standard function is still occasionally useful....
X+*/
X+int xprintf(
X+  void (*func)(char*,int,void*),
X+  void *arg,
X+  const char *format,
X+  ...
X+){
X+  va_list ap;
X+  va_start(ap,format);
X+  return vxprintf(func,arg,format,ap);
X+}
X+#endif
X+
X+/*
X+** Now for string-print, also as found in any standard library.
X+** Add to this the snprint function which stops added characters
X+** to the string at a given length.
X+**
X+** Note that snprint returns the length of the string as it would
X+** be if there were no limit on the output.
X+*/
X+struct s_strargument {    /* Describes the string being written to */
X+  char *next;                   /* Next free slot in the string */
X+  char *last;                   /* Last available slot in the string */
X+};
X+
X+void __sout(char *, int, void *);
X+#ifdef F___sout
X+void __sout(txt,amt,arg)
X+  char *txt;
X+  int amt;
X+  void *arg;
X+{
X+  register char *head;
X+  register const char *t;
X+  register int a;
X+  register char *tail;
X+  a = amt;
X+  t = txt;
X+  head = ((struct s_strargument*)arg)->next;
X+  tail = ((struct s_strargument*)arg)->last;
X+  if( tail ){
X+    while( a-- >0 && head<tail ) *(head++) = *(t++);
X+  }else{
X+    while( a-- >0 ) *(head++) = *(t++);
X+  }
X+  *head = 0;
X+  ((struct s_strargument*)arg)->next = head;
X+}
X+#endif
X+
X+#ifdef F_vsnprintf
X+int vsnprintf(char *buf, size_t n, const char *fmt, va_list ap){
X+  struct s_strargument arg;
X+  arg.next = buf;
X+  arg.last = &buf[n-1];
X+  *buf = 0;
X+  return vxprintf(__sout,&arg,fmt,ap);
X+}
X+#endif
X+
X+#ifdef F_snprintf
X+int snprintf(char *str, size_t sz, const char *format, ...)
X+{
X+	va_list args;
X+	struct s_strargument arg;
X+	int ret;
X+
X+	arg.next = str;
X+	arg.last = &str[sz-1];
X+
X+	va_start(args, format);
X+	ret = vxprintf(__sout, &arg, format, args);
X+	va_end(args);
X+
X+	return ret;
X+}
X+#endif
X+
X+#ifdef F_vsprintf
X+int vsprintf(char *buf, const char *fmt, va_list ap){
X+  struct s_strargument arg;
X+  arg.next = buf;
X+  arg.last = NULL;
X+  *buf = 0;
X+  return vxprintf(__sout,&arg,fmt,ap);
X+}
X+#endif
X+
X+#ifdef F_sprintf
X+int sprintf (char *str, const char *format, ...)
X+{
X+	va_list args;
X+	struct s_strargument arg;
X+	int ret;
X+
X+	arg.next = str;
X+	arg.last = NULL;
X+ 
X+	va_start(args, format);
X+	ret = vxprintf(__sout, &arg, format, args);
X+	va_end(args);
X+
X+	return ret;
X+}
X+#endif
X+
X+/*
X+** The following section of code handles the mprintf routine, that
X+** writes to memory obtained from malloc().
X+*/
X+
X+/* This structure is used to store state information about the
X+** write in progress
X+*/
X+struct sgMprintf {
X+  char *zBase;     /* A base allocation */
X+  char *zText;     /* The string collected so far */
X+  int  nChar;      /* Length of the string so far */
X+  int  nAlloc;     /* Amount of space allocated in zText */
X+};
X+
X+void __mout(char *, int, void*);
X+
X+#ifdef F___mout
X+/* The xprintf callback function. */
X+void __mout(zNewText,nNewChar,arg)
X+  char *zNewText;
X+  int nNewChar;
X+  void *arg;
X+{
X+  struct sgMprintf *pM = (struct sgMprintf*)arg;
X+  if( pM->nChar + nNewChar + 1 > pM->nAlloc ){
X+    pM->nAlloc = pM->nChar + nNewChar*2 + 1;
X+    if( pM->zText==pM->zBase ){
X+      pM->zText = malloc(pM->nAlloc);
X+      if( pM->zText && pM->nChar ) memcpy(pM->zText,pM->zBase,pM->nChar);
X+    }else{
X+      pM->zText = realloc(pM->zText, pM->nAlloc);
X+    }
X+  }
X+  if( pM->zText ){
X+    memcpy(&pM->zText[pM->nChar], zNewText, nNewChar);
X+    pM->nChar += nNewChar;
X+    pM->zText[pM->nChar] = 0;
X+  }
X+}
X+#endif
X+
X+/*
X+** mprintf() works like printf(), but allocations memory to hold the
X+** resulting string and returns a pointer to the allocated memory.
X+**
X+** We changed the name to TclMPrint() to conform with the Tcl private
X+** routine naming conventions.
X+*/
X+
X+#ifdef F_mprintf
X+char *mprintf(const char *zFormat, ...){
X+  va_list ap;
X+  struct sgMprintf sMprintf;
X+  char *zNew;
X+  char zBuf[200];
X+
X+  va_start(ap,zFormat);
X+  sMprintf.nChar = 0;
X+  sMprintf.nAlloc = sizeof(zBuf);
X+  sMprintf.zText = zBuf;
X+  sMprintf.zBase = zBuf;
X+  vxprintf(__mout,&sMprintf,zFormat,ap);
X+  va_end(ap);
X+  if( sMprintf.zText==sMprintf.zBase ){
X+    zNew = malloc( sMprintf.nChar+1 );
X+    if( zNew ) strcpy(zNew,zBuf);
X+  }else{
X+    zNew = realloc(sMprintf.zText,sMprintf.nChar+1);
X+  }
X+
X+  return zNew;
X+}
X+#endif
X+
X+/* This is the varargs version of mprintf.
X+**
X+** The name is changed to TclVMPrintf() to conform with Tcl naming
X+** conventions.
X+*/
X+#ifdef F_vmprintf
X+char *vmprintf(const char *zFormat,va_list ap){
X+  struct sgMprintf sMprintf;
X+  char zBuf[200];
X+  sMprintf.nChar = 0;
X+  sMprintf.zText = zBuf;
X+  sMprintf.nAlloc = sizeof(zBuf);
X+  sMprintf.zBase = zBuf;
X+  vxprintf(__mout,&sMprintf,zFormat,ap);
X+  if( sMprintf.zText==sMprintf.zBase ){
X+    sMprintf.zText = malloc( strlen(zBuf)+1 );
X+    if( sMprintf.zText ) strcpy(sMprintf.zText,zBuf);
X+  }else{
X+    sMprintf.zText = realloc(sMprintf.zText,sMprintf.nChar+1);
X+  }
X+  return sMprintf.zText;
X+}
X+#endif
X+
X+#ifdef F_asprintf
X+int asprintf(char ** strp, const char *zFormat, ...){
X+  va_list ap;
X+  struct sgMprintf sMprintf;
X+  char *zNew;
X+  char zBuf[200];
X+
X+  va_start(ap,zFormat);
X+  sMprintf.nChar = 0;
X+  sMprintf.nAlloc = sizeof(zBuf);
X+  sMprintf.zText = zBuf;
X+  sMprintf.zBase = zBuf;
X+  vxprintf(__mout,&sMprintf,zFormat,ap);
X+  va_end(ap);
X+  if( sMprintf.zText==sMprintf.zBase ){
X+    zNew = malloc( sMprintf.nChar+1 );
X+    if( zNew ) strcpy(zNew,zBuf);
X+  }else{
X+    zNew = realloc(sMprintf.zText,sMprintf.nChar+1);
X+  }
X+
X+  *strp = zNew;
X+
X+  return sMprintf.nChar+1;
X+}
X+#endif
X+
X+#ifdef F_vasprintf
X+int vasprintf(char **strp, const char *format, va_list ap) {
X+  struct sgMprintf sMprintf;
X+  char zBuf[200];
X+  sMprintf.nChar = 0;
X+  sMprintf.zText = zBuf;
X+  sMprintf.nAlloc = sizeof(zBuf);
X+  sMprintf.zBase = zBuf;
X+  vxprintf(__mout,&sMprintf,format,ap);
X+  if( sMprintf.zText==sMprintf.zBase ){
X+    sMprintf.zText = malloc( strlen(zBuf)+1 );
X+    if( sMprintf.zText ) strcpy(sMprintf.zText,zBuf);
X+  }else{
X+    sMprintf.zText = realloc(sMprintf.zText,sMprintf.nChar+1);
X+  }
X+  *strp = sMprintf.zText;
X+  return sMprintf.nChar;
X+}
X+#endif
X+
X+/*
X+** The following section of code handles the standard fprintf routines
X+** for pthreads.
X+*/
X+
X+void __fout(char *, int, void *);
X+
X+#ifdef F___fout
X+void __fout(zNewText,nNewChar,arg)
X+  char *zNewText;
X+  int nNewChar;
X+  void *arg;
X+{
X+	fwrite(zNewText,1,nNewChar,(FILE*)arg);
X+}
X+#endif
X+
X+#ifdef F_fprintf
X+/* The public interface routines */
X+int fprintf(FILE *pOut, const char *zFormat, ...){
X+  va_list ap;
X+  int retc;
X+
X+  va_start(ap,zFormat);
X+  retc = vxprintf(__fout,pOut,zFormat,ap);
X+  va_end(ap);
X+  return retc;
X+}
X+#endif
X+
X+#ifdef F_vfprintf
X+int vfprintf(FILE *pOut, const char *zFormat, va_list ap){
X+  return vxprintf(__fout,pOut,zFormat,ap);
X+}
X+#endif
X+
X+
X+#ifdef F_printf
X+int printf(const char *format, ...)
X+{
X+	va_list args;
X+	int ret;
X+
X+	va_start(args, format);
X+	ret = vprintf(format, args);
X+	va_end(args);
X+
X+	return ret;
X+}
X+#endif
X+
X+#ifdef F_vprintf
X+int vprintf(const char *format, va_list args)
X+{
X+	return vxprintf(__fout, stdout, format, args);
X+}
X+#endif
X+
X+#ifdef F__sprintf_r
X+/* Idiotic kludge to get around newlib stupidity.  tmpnam() calls this
X+   directly, but since sprintf() above replaces newlib's sprintf() (and
X+   _sprintf_r()) we have to define this in order to link tmpnam(). */
X+int _sprintf_r(struct _reent *unused, char *str, const char *format, ...)
X+{
X+	va_list args;
X+	struct s_strargument arg;
X+	int ret;
X+
X+	(void) unused;
X+	arg.next = str;
X+	arg.last = NULL;
X+ 
X+	va_start(args, format);
X+	ret = vxprintf(__sout, &arg, format, args);
X+	va_end(args);
X+
X+	return ret;
X+}
X+#endif
END-of-psptoolchain-newlib/files/patch-newlib-libc-sys-psp-xprintf.c
echo x - psptoolchain-newlib/distinfo
sed 's/^X//' >psptoolchain-newlib/distinfo << 'END-of-psptoolchain-newlib/distinfo'
XMD5 (newlib-1.15.0.tar.gz) = 4020004b1b7a56ca4cf7f6d35b40a4cb
XSHA256 (newlib-1.15.0.tar.gz) = c4496102d38c59d1a47ddd5481af35caa1f65b76e2a94d9607737e17fd9e4465
XSIZE (newlib-1.15.0.tar.gz) = 10709842
END-of-psptoolchain-newlib/distinfo
echo x - psptoolchain-newlib/pkg-plist
sed 's/^X//' >psptoolchain-newlib/pkg-plist << 'END-of-psptoolchain-newlib/pkg-plist'
Xpsp/lib/libm.a
Xpsp/lib/libg.a
Xpsp/lib/libc.a
Xpsp/lib/crt0.o
Xpsp/include/wctype.h
Xpsp/include/wchar.h
Xpsp/include/utmp.h
Xpsp/include/utime.h
Xpsp/include/unistd.h
Xpsp/include/unctrl.h
Xpsp/include/time.h
Xpsp/include/termios.h
Xpsp/include/sys/wait.h
Xpsp/include/sys/utime.h
Xpsp/include/sys/unistd.h
Xpsp/include/sys/types.h
Xpsp/include/sys/times.h
Xpsp/include/sys/timeb.h
Xpsp/include/sys/time.h
Xpsp/include/sys/syslimits.h
Xpsp/include/sys/string.h
Xpsp/include/sys/stdio.h
Xpsp/include/sys/stat.h
Xpsp/include/sys/socket.h
Xpsp/include/sys/signal.h
Xpsp/include/sys/select.h
Xpsp/include/sys/sched.h
Xpsp/include/sys/resource.h
Xpsp/include/sys/reent.h
Xpsp/include/sys/queue.h
Xpsp/include/sys/param.h
Xpsp/include/sys/lock.h
Xpsp/include/sys/ioctl.h
Xpsp/include/sys/iconvnls.h
Xpsp/include/sys/file.h
Xpsp/include/sys/features.h
Xpsp/include/sys/fd_set.h
Xpsp/include/sys/fcntl.h
Xpsp/include/sys/errno.h
Xpsp/include/sys/dirent.h
Xpsp/include/sys/config.h
Xpsp/include/sys/cdefs.h
Xpsp/include/sys/_types.h
Xpsp/include/string.h
Xpsp/include/stdlib.h
Xpsp/include/stdio.h
Xpsp/include/stdint.h
Xpsp/include/signal.h
Xpsp/include/setjmp.h
Xpsp/include/search.h
Xpsp/include/regdef.h
Xpsp/include/reent.h
Xpsp/include/pwd.h
Xpsp/include/pthread.h
Xpsp/include/process.h
Xpsp/include/paths.h
Xpsp/include/newlib.h
Xpsp/include/netinet/tcp.h
Xpsp/include/netinet/in.h
Xpsp/include/netdb.h
Xpsp/include/math.h
Xpsp/include/malloc.h
Xpsp/include/machine/types.h
Xpsp/include/machine/time.h
Xpsp/include/machine/termios.h
Xpsp/include/machine/stdlib.h
Xpsp/include/machine/setjmp.h
Xpsp/include/machine/setjmp-dj.h
Xpsp/include/machine/regdef.h
Xpsp/include/machine/param.h
Xpsp/include/machine/malloc.h
Xpsp/include/machine/ieeefp.h
Xpsp/include/machine/fastmath.h
Xpsp/include/machine/endian.h
Xpsp/include/machine/ansi.h
Xpsp/include/machine/_types.h
Xpsp/include/locale.h
Xpsp/include/limits.h
Xpsp/include/libgen.h
Xpsp/include/langinfo.h
Xpsp/include/inttypes.h
Xpsp/include/ieeefp.h
Xpsp/include/iconv.h
Xpsp/include/grp.h
Xpsp/include/getopt.h
Xpsp/include/fcntl.h
Xpsp/include/fastmath.h
Xpsp/include/errno.h
Xpsp/include/envz.h
Xpsp/include/dirent.h
Xpsp/include/ctype.h
Xpsp/include/assert.h
Xpsp/include/arpa/inet.h
Xpsp/include/argz.h
Xpsp/include/ar.h
Xpsp/include/alloca.h
Xpsp/include/_syslist.h
Xpsp/include/_ansi.h
X at dirrm psp/include/sys
X at dirrm psp/include/netinet
X at dirrm psp/include/machine
X at dirrm psp/include/bits
X at dirrm psp/include/arpa
END-of-psptoolchain-newlib/pkg-plist
exit
--- psptoolchain-newlib.shar ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list