[23969] branches/release_1_4/base

source_changes at macosforge.org source_changes at macosforge.org
Fri Apr 13 20:46:40 PDT 2007


Revision: 23969
          http://trac.macosforge.org/projects/macports/changeset/23969
Author:   jberry at macports.org
Date:     2007-04-13 20:46:37 -0700 (Fri, 13 Apr 2007)

Log Message:
-----------
Mass merge of changes from trunk @ r23968 to release_1_4 branch in preparation for 1.4.1 release

Modified Paths:
--------------
    branches/release_1_4/base/ChangeLog
    branches/release_1_4/base/aclocal.m4
    branches/release_1_4/base/config/dp_version
    branches/release_1_4/base/configure
    branches/release_1_4/base/configure.ac
    branches/release_1_4/base/doc/portfile.7
    branches/release_1_4/base/portmgr/IndexRegen.sh
    branches/release_1_4/base/src/config.h.in
    branches/release_1_4/base/src/darwinports1.0/darwinports.tcl
    branches/release_1_4/base/src/package1.0/portarchive.tcl
    branches/release_1_4/base/src/package1.0/portunarchive.tcl
    branches/release_1_4/base/src/pextlib1.0/Pextlib.c
    branches/release_1_4/base/src/pextlib1.0/curl.c
    branches/release_1_4/base/src/port/port.tcl
    branches/release_1_4/base/src/port1.0/portbuild.tcl
    branches/release_1_4/base/src/port1.0/portconfigure.tcl
    branches/release_1_4/base/src/port1.0/portdestroot.tcl
    branches/release_1_4/base/src/port1.0/portextract.tcl
    branches/release_1_4/base/src/port1.0/portfetch.tcl
    branches/release_1_4/base/src/port1.0/portlivecheck.tcl
    branches/release_1_4/base/src/port1.0/portmain.tcl
    branches/release_1_4/base/src/port1.0/portpatch.tcl
    branches/release_1_4/base/src/port1.0/porttest.tcl
    branches/release_1_4/base/src/port1.0/portutil.tcl
    branches/release_1_4/base/src/port1.0/resources/fetch/mirror_sites.tcl
    branches/release_1_4/base/src/port1.0/resources/group/ruby-1.0.tcl
    branches/release_1_4/base/src/programs/mtree/config.h.in
    branches/release_1_4/base/src/programs/mtree/configure
    branches/release_1_4/base/tests/Makefile
    branches/release_1_4/base/tests/sources.conf
    branches/release_1_4/base/tests/test-ports.conf

Added Paths:
-----------
    branches/release_1_4/base/src/programs/xar/
    branches/release_1_4/base/src/programs/xar/INSTALL
    branches/release_1_4/base/src/programs/xar/LICENSE
    branches/release_1_4/base/src/programs/xar/Makefile.in
    branches/release_1_4/base/src/programs/xar/TODO
    branches/release_1_4/base/src/programs/xar/cfghdrs.stamp.in
    branches/release_1_4/base/src/programs/xar/cfgoutputs.stamp.in
    branches/release_1_4/base/src/programs/xar/config.guess
    branches/release_1_4/base/src/programs/xar/config.sub
    branches/release_1_4/base/src/programs/xar/configure
    branches/release_1_4/base/src/programs/xar/configure.ac
    branches/release_1_4/base/src/programs/xar/include/
    branches/release_1_4/base/src/programs/xar/include/config.h.in
    branches/release_1_4/base/src/programs/xar/include/xar.h.in
    branches/release_1_4/base/src/programs/xar/install-sh
    branches/release_1_4/base/src/programs/xar/lib/
    branches/release_1_4/base/src/programs/xar/lib/Makefile.inc.in
    branches/release_1_4/base/src/programs/xar/lib/appledouble.h
    branches/release_1_4/base/src/programs/xar/lib/archive.c
    branches/release_1_4/base/src/programs/xar/lib/archive.h
    branches/release_1_4/base/src/programs/xar/lib/arcmod.c
    branches/release_1_4/base/src/programs/xar/lib/arcmod.h
    branches/release_1_4/base/src/programs/xar/lib/asprintf.h
    branches/release_1_4/base/src/programs/xar/lib/b64.c
    branches/release_1_4/base/src/programs/xar/lib/b64.h
    branches/release_1_4/base/src/programs/xar/lib/bzxar.c
    branches/release_1_4/base/src/programs/xar/lib/bzxar.h
    branches/release_1_4/base/src/programs/xar/lib/darwinattr.c
    branches/release_1_4/base/src/programs/xar/lib/darwinattr.h
    branches/release_1_4/base/src/programs/xar/lib/data.c
    branches/release_1_4/base/src/programs/xar/lib/data.h
    branches/release_1_4/base/src/programs/xar/lib/err.c
    branches/release_1_4/base/src/programs/xar/lib/ext2.c
    branches/release_1_4/base/src/programs/xar/lib/ext2.h
    branches/release_1_4/base/src/programs/xar/lib/fbsdattr.c
    branches/release_1_4/base/src/programs/xar/lib/fbsdattr.h
    branches/release_1_4/base/src/programs/xar/lib/filetree.c
    branches/release_1_4/base/src/programs/xar/lib/filetree.h
    branches/release_1_4/base/src/programs/xar/lib/io.c
    branches/release_1_4/base/src/programs/xar/lib/io.h
    branches/release_1_4/base/src/programs/xar/lib/linuxattr.c
    branches/release_1_4/base/src/programs/xar/lib/linuxattr.h
    branches/release_1_4/base/src/programs/xar/lib/macho.c
    branches/release_1_4/base/src/programs/xar/lib/macho.h
    branches/release_1_4/base/src/programs/xar/lib/md5.c
    branches/release_1_4/base/src/programs/xar/lib/md5.h
    branches/release_1_4/base/src/programs/xar/lib/script.c
    branches/release_1_4/base/src/programs/xar/lib/script.h
    branches/release_1_4/base/src/programs/xar/lib/stat.c
    branches/release_1_4/base/src/programs/xar/lib/stat.h
    branches/release_1_4/base/src/programs/xar/lib/subdoc.c
    branches/release_1_4/base/src/programs/xar/lib/subdoc.h
    branches/release_1_4/base/src/programs/xar/lib/util.c
    branches/release_1_4/base/src/programs/xar/lib/util.h
    branches/release_1_4/base/src/programs/xar/lib/zxar.c
    branches/release_1_4/base/src/programs/xar/lib/zxar.h
    branches/release_1_4/base/src/programs/xar/src/
    branches/release_1_4/base/src/programs/xar/src/Makefile.inc.in
    branches/release_1_4/base/src/programs/xar/src/xar.1
    branches/release_1_4/base/src/programs/xar/src/xar.c
    branches/release_1_4/base/src/programs/xar/test/
    branches/release_1_4/base/src/programs/xar/test/attr
    branches/release_1_4/base/src/programs/xar/test/checksums
    branches/release_1_4/base/src/programs/xar/test/compression
    branches/release_1_4/base/src/programs/xar/test/data
    branches/release_1_4/base/src/programs/xar/test/data.xsl
    branches/release_1_4/base/src/programs/xar/test/functions
    branches/release_1_4/base/src/programs/xar/test/hardlink
    branches/release_1_4/base/src/programs/xar/test/heap
    branches/release_1_4/base/src/programs/xar/test/heap1.xsl
    branches/release_1_4/base/src/programs/xar/test/validate.c
    branches/release_1_4/base/src/programs/xar/xar.spec
    branches/release_1_4/base/tests/test/
    branches/release_1_4/base/tests/test/checksums-1/
    branches/release_1_4/base/tests/test/checksums-1/Portfile
    branches/release_1_4/base/tests/test/checksums-1/master
    branches/release_1_4/base/tests/test/cvs-and-patchsites/
    branches/release_1_4/base/tests/test/cvs-and-patchsites/Portfile
    branches/release_1_4/base/tests/test/cvs-and-patchsites/master
    branches/release_1_4/base/tests/test/dependencies-a/
    branches/release_1_4/base/tests/test/dependencies-a/Portfile
    branches/release_1_4/base/tests/test/dependencies-b/
    branches/release_1_4/base/tests/test/dependencies-b/Portfile
    branches/release_1_4/base/tests/test/dependencies-c/
    branches/release_1_4/base/tests/test/dependencies-c/Portfile
    branches/release_1_4/base/tests/test/dependencies-c/master
    branches/release_1_4/base/tests/test/envvariables/
    branches/release_1_4/base/tests/test/envvariables/Makefile
    branches/release_1_4/base/tests/test/envvariables/Portfile
    branches/release_1_4/base/tests/test/envvariables/master
    branches/release_1_4/base/tests/test/site-tags/
    branches/release_1_4/base/tests/test/site-tags/Portfile
    branches/release_1_4/base/tests/test/site-tags/master
    branches/release_1_4/base/tests/test/trace/
    branches/release_1_4/base/tests/test/trace/Makefile
    branches/release_1_4/base/tests/test/trace/Portfile
    branches/release_1_4/base/tests/test/trace/master
    branches/release_1_4/base/tests/test/universal/
    branches/release_1_4/base/tests/test/universal/Makefile
    branches/release_1_4/base/tests/test/universal/Portfile
    branches/release_1_4/base/tests/test/universal/master
    branches/release_1_4/base/tests/test/universal-2/
    branches/release_1_4/base/tests/test/universal-2/Makefile
    branches/release_1_4/base/tests/test/universal-2/Portfile
    branches/release_1_4/base/tests/test/universal-2/master
    branches/release_1_4/base/tests/test/xcodeversion/
    branches/release_1_4/base/tests/test/xcodeversion/Portfile
    branches/release_1_4/base/tests/test/xcodeversion/master

Removed Paths:
-------------
    branches/release_1_4/base/src/programs/xar/INSTALL
    branches/release_1_4/base/src/programs/xar/LICENSE
    branches/release_1_4/base/src/programs/xar/Makefile.in
    branches/release_1_4/base/src/programs/xar/TODO
    branches/release_1_4/base/src/programs/xar/cfghdrs.stamp.in
    branches/release_1_4/base/src/programs/xar/cfgoutputs.stamp.in
    branches/release_1_4/base/src/programs/xar/config.guess
    branches/release_1_4/base/src/programs/xar/config.sub
    branches/release_1_4/base/src/programs/xar/configure
    branches/release_1_4/base/src/programs/xar/configure.ac
    branches/release_1_4/base/src/programs/xar/include/
    branches/release_1_4/base/src/programs/xar/include/config.h.in
    branches/release_1_4/base/src/programs/xar/include/xar.h.in
    branches/release_1_4/base/src/programs/xar/install-sh
    branches/release_1_4/base/src/programs/xar/lib/
    branches/release_1_4/base/src/programs/xar/lib/Makefile.inc.in
    branches/release_1_4/base/src/programs/xar/lib/appledouble.h
    branches/release_1_4/base/src/programs/xar/lib/archive.c
    branches/release_1_4/base/src/programs/xar/lib/archive.h
    branches/release_1_4/base/src/programs/xar/lib/arcmod.c
    branches/release_1_4/base/src/programs/xar/lib/arcmod.h
    branches/release_1_4/base/src/programs/xar/lib/asprintf.h
    branches/release_1_4/base/src/programs/xar/lib/b64.c
    branches/release_1_4/base/src/programs/xar/lib/b64.h
    branches/release_1_4/base/src/programs/xar/lib/bzxar.c
    branches/release_1_4/base/src/programs/xar/lib/bzxar.h
    branches/release_1_4/base/src/programs/xar/lib/darwinattr.c
    branches/release_1_4/base/src/programs/xar/lib/darwinattr.h
    branches/release_1_4/base/src/programs/xar/lib/data.c
    branches/release_1_4/base/src/programs/xar/lib/data.h
    branches/release_1_4/base/src/programs/xar/lib/err.c
    branches/release_1_4/base/src/programs/xar/lib/ext2.c
    branches/release_1_4/base/src/programs/xar/lib/ext2.h
    branches/release_1_4/base/src/programs/xar/lib/fbsdattr.c
    branches/release_1_4/base/src/programs/xar/lib/fbsdattr.h
    branches/release_1_4/base/src/programs/xar/lib/filetree.c
    branches/release_1_4/base/src/programs/xar/lib/filetree.h
    branches/release_1_4/base/src/programs/xar/lib/io.c
    branches/release_1_4/base/src/programs/xar/lib/io.h
    branches/release_1_4/base/src/programs/xar/lib/linuxattr.c
    branches/release_1_4/base/src/programs/xar/lib/linuxattr.h
    branches/release_1_4/base/src/programs/xar/lib/macho.c
    branches/release_1_4/base/src/programs/xar/lib/macho.h
    branches/release_1_4/base/src/programs/xar/lib/md5.c
    branches/release_1_4/base/src/programs/xar/lib/md5.h
    branches/release_1_4/base/src/programs/xar/lib/script.c
    branches/release_1_4/base/src/programs/xar/lib/script.h
    branches/release_1_4/base/src/programs/xar/lib/stat.c
    branches/release_1_4/base/src/programs/xar/lib/stat.h
    branches/release_1_4/base/src/programs/xar/lib/subdoc.c
    branches/release_1_4/base/src/programs/xar/lib/subdoc.h
    branches/release_1_4/base/src/programs/xar/lib/util.c
    branches/release_1_4/base/src/programs/xar/lib/util.h
    branches/release_1_4/base/src/programs/xar/lib/zxar.c
    branches/release_1_4/base/src/programs/xar/lib/zxar.h
    branches/release_1_4/base/src/programs/xar/src/
    branches/release_1_4/base/src/programs/xar/src/Makefile.inc.in
    branches/release_1_4/base/src/programs/xar/src/xar.1
    branches/release_1_4/base/src/programs/xar/src/xar.c
    branches/release_1_4/base/src/programs/xar/test/
    branches/release_1_4/base/src/programs/xar/test/attr
    branches/release_1_4/base/src/programs/xar/test/checksums
    branches/release_1_4/base/src/programs/xar/test/compression
    branches/release_1_4/base/src/programs/xar/test/data
    branches/release_1_4/base/src/programs/xar/test/data.xsl
    branches/release_1_4/base/src/programs/xar/test/functions
    branches/release_1_4/base/src/programs/xar/test/hardlink
    branches/release_1_4/base/src/programs/xar/test/heap
    branches/release_1_4/base/src/programs/xar/test/heap1.xsl
    branches/release_1_4/base/src/programs/xar/test/validate.c
    branches/release_1_4/base/src/programs/xar/xar.spec
    branches/release_1_4/base/tests/checksums-1/
    branches/release_1_4/base/tests/cvs-and-patchsites/
    branches/release_1_4/base/tests/envvariables/
    branches/release_1_4/base/tests/site-tags/
    branches/release_1_4/base/tests/test/checksums-1/
    branches/release_1_4/base/tests/test/checksums-1/Portfile
    branches/release_1_4/base/tests/test/checksums-1/master
    branches/release_1_4/base/tests/test/cvs-and-patchsites/
    branches/release_1_4/base/tests/test/cvs-and-patchsites/Portfile
    branches/release_1_4/base/tests/test/cvs-and-patchsites/master
    branches/release_1_4/base/tests/test/dependencies-a/
    branches/release_1_4/base/tests/test/dependencies-a/Portfile
    branches/release_1_4/base/tests/test/dependencies-b/
    branches/release_1_4/base/tests/test/dependencies-b/Portfile
    branches/release_1_4/base/tests/test/dependencies-c/
    branches/release_1_4/base/tests/test/dependencies-c/Portfile
    branches/release_1_4/base/tests/test/dependencies-c/master
    branches/release_1_4/base/tests/test/envvariables/
    branches/release_1_4/base/tests/test/envvariables/Makefile
    branches/release_1_4/base/tests/test/envvariables/Portfile
    branches/release_1_4/base/tests/test/envvariables/master
    branches/release_1_4/base/tests/test/site-tags/
    branches/release_1_4/base/tests/test/site-tags/Portfile
    branches/release_1_4/base/tests/test/site-tags/master
    branches/release_1_4/base/tests/test/trace/
    branches/release_1_4/base/tests/test/trace/Makefile
    branches/release_1_4/base/tests/test/trace/Portfile
    branches/release_1_4/base/tests/test/trace/master
    branches/release_1_4/base/tests/test/universal/
    branches/release_1_4/base/tests/test/universal/Makefile
    branches/release_1_4/base/tests/test/universal/Portfile
    branches/release_1_4/base/tests/test/universal/master
    branches/release_1_4/base/tests/test/universal-2/
    branches/release_1_4/base/tests/test/universal-2/Makefile
    branches/release_1_4/base/tests/test/universal-2/Portfile
    branches/release_1_4/base/tests/test/universal-2/master
    branches/release_1_4/base/tests/test/xcodeversion/
    branches/release_1_4/base/tests/test/xcodeversion/Portfile
    branches/release_1_4/base/tests/test/xcodeversion/master
    branches/release_1_4/base/tests/trace/
    branches/release_1_4/base/tests/xcodeversion/

Property Changed:
----------------
    branches/release_1_4/base/


Property changes on: branches/release_1_4/base
___________________________________________________________________
Name: svn:ignore
   - config.log
config.status
Makefile

   + config.log
config.status
Makefile

Modified: branches/release_1_4/base/ChangeLog
===================================================================
--- branches/release_1_4/base/ChangeLog	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/ChangeLog	2007-04-14 03:46:37 UTC (rev 23969)
@@ -5,6 +5,18 @@
 #
 
 	
+Release 1.5 (Unreleased):
+
+    - Add -I${prefix}/include -L${prefix}/lib to the default configure flags (pguyot in r23246 and r23291).
+
+    - New options for configure flags (C|CPP|CXX|LD)FLAGS and logic to handle that and backward compatibility
+      (pguyot in r23089, r23125, r23238, r23248 and r23249).
+
+    - "port sync" now updates svn repos too (eridius in r22784).
+
+    - Default +universal variant for configure-based ports (pguyot in r22313).
+
+
 Release 1.4.1 (Unreleased):
 
     - Add responsive, reasonably fast http mirrors to openbsd group (pipping in r23343).

Modified: branches/release_1_4/base/aclocal.m4
===================================================================
--- branches/release_1_4/base/aclocal.m4	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/aclocal.m4	2007-04-14 03:46:37 UTC (rev 23969)
@@ -491,13 +491,27 @@
 	if test "x$MTREE" = "x" ; then
 		AC_CONFIG_SUBDIRS([src/programs/mtree])
 		MTREE='$(TOPSRCDIR)/src/programs/mtree/mtree'
-#		MTREE='${prefix}/bin/mtree'
 		REPLACEMENT_PROGS="$REPLACEMENT_PROGS mtree"
 	fi
 
 	AC_SUBST(MTREE)
 ])
 
+# OD_PROG_XAR
+#---------------------------------------
+AC_DEFUN([OD_PROG_XAR],[
+
+	AC_PATH_PROG([XAR], [xar], ,  [/usr/bin:/usr/sbin:/bin:/sbin])
+
+	if test "x$XAR" = "x" ; then
+		AC_CONFIG_SUBDIRS([src/programs/xar])
+		XAR='$(TOPSRCDIR)/src/programs/xar/xar'
+		REPLACEMENT_PROGS="$REPLACEMENT_PROGS xar"
+	fi
+
+	AC_SUBST(XAR)
+])
+
 # OD_PROG_DAEMONDO
 #---------------------------------------
 AC_DEFUN([OD_PROG_DAEMONDO],[

Modified: branches/release_1_4/base/config/dp_version
===================================================================
--- branches/release_1_4/base/config/dp_version	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/config/dp_version	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1 +1 @@
-1.410
+1.500

Modified: branches/release_1_4/base/configure
===================================================================
--- branches/release_1_4/base/configure	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/configure	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for MacPorts 1.4.
+# Generated by GNU Autoconf 2.60 for MacPorts 1.5.
 #
 # Report bugs to <macports-dev at lists.macosforge.org>.
 #
@@ -12,8 +12,7 @@
 ## M4sh Initialization.  ##
 ## --------------------- ##
 
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
+# Be Bourne compatible
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
@@ -22,15 +21,12 @@
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
 fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
 
 
-
-
 # PATH needs CR
 # Avoid depending upon Character Ranges.
 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
@@ -221,7 +217,7 @@
 else
   as_candidate_shells=
     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
@@ -239,6 +235,7 @@
 	 # Try only shells that exist, to save several forks.
 	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 		{ ("$as_shell") 2> /dev/null <<\_ASEOF
+# Be Bourne compatible
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
@@ -247,19 +244,18 @@
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
 fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
 
-
 :
 _ASEOF
 }; then
   CONFIG_SHELL=$as_shell
 	       as_have_required=yes
 	       if { "$as_shell" 2> /dev/null <<\_ASEOF
+# Be Bourne compatible
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
@@ -268,13 +264,11 @@
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
 fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
 
-
 :
 (as_func_return () {
   (exit $1)
@@ -520,28 +514,19 @@
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
+# Find out whether ``test -x'' works.  Don't use a zero-byte file, as
+# systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  as_executable_p="test -x"
 else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-	case $1 in
-        -*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
+  as_executable_p=:
 fi
-as_executable_p=$as_test_x
+rm -f conf$$.file
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -574,8 +559,8 @@
 # Identity of this package.
 PACKAGE_NAME='MacPorts'
 PACKAGE_TARNAME='macports'
-PACKAGE_VERSION='1.4'
-PACKAGE_STRING='MacPorts 1.4'
+PACKAGE_VERSION='1.5'
+PACKAGE_STRING='MacPorts 1.5'
 PACKAGE_BUGREPORT='macports-dev at lists.macosforge.org'
 
 ac_unique_file="src/pextlib1.0/Pextlib.c"
@@ -583,36 +568,36 @@
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
+#if HAVE_SYS_TYPES_H
 # include <sys/types.h>
 #endif
-#ifdef HAVE_SYS_STAT_H
+#if HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif
-#ifdef STDC_HEADERS
+#if STDC_HEADERS
 # include <stdlib.h>
 # include <stddef.h>
 #else
-# ifdef HAVE_STDLIB_H
+# if HAVE_STDLIB_H
 #  include <stdlib.h>
 # endif
 #endif
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
 #  include <memory.h>
 # endif
 # include <string.h>
 #endif
-#ifdef HAVE_STRINGS_H
+#if HAVE_STRINGS_H
 # include <strings.h>
 #endif
-#ifdef HAVE_INTTYPES_H
+#if HAVE_INTTYPES_H
 # include <inttypes.h>
 #endif
-#ifdef HAVE_STDINT_H
+#if HAVE_STDINT_H
 # include <stdint.h>
 #endif
-#ifdef HAVE_UNISTD_H
+#if HAVE_UNISTD_H
 # include <unistd.h>
 #endif"
 
@@ -689,6 +674,7 @@
 CFLAGS_QUICHEEATERS
 MTREE
 subdirs
+XAR
 ENABLE_LAUNCHD_SUPPORT
 HAVE_FRAMEWORK_COREFOUNDATION
 HAVE_FRAMEWORK_SYSTEMCONFIGURATION
@@ -750,7 +736,6 @@
 CC
 CFLAGS
 LDFLAGS
-LIBS
 CPPFLAGS
 CVS
 RSYNC
@@ -760,6 +745,7 @@
 CPP
 XMKMF'
 ac_subdirs_all='src/programs/mtree
+src/programs/xar
 src/thread2.6'
 
 # Initialize some variables set by options.
@@ -865,10 +851,10 @@
   -disable-* | --disable-*)
     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
    { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
     eval enable_$ac_feature=no ;;
 
   -docdir | --docdir | --docdi | --doc | --do)
@@ -884,10 +870,10 @@
   -enable-* | --enable-*)
     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
    { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
     eval enable_$ac_feature=\$ac_optarg ;;
 
   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
@@ -1081,19 +1067,19 @@
   -with-* | --with-*)
     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
       { echo "$as_me: error: invalid package name: $ac_package" >&2
    { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
     eval with_$ac_package=\$ac_optarg ;;
 
   -without-* | --without-*)
     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
       { echo "$as_me: error: invalid package name: $ac_package" >&2
    { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
     eval with_$ac_package=no ;;
 
   --x)
@@ -1262,7 +1248,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures MacPorts 1.4 to adapt to many kinds of systems.
+\`configure' configures MacPorts 1.5 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1332,7 +1318,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of MacPorts 1.4:";;
+     short | recursive ) echo "Configuration of MacPorts 1.5:";;
    esac
   cat <<\_ACEOF
 
@@ -1366,7 +1352,6 @@
   CFLAGS      C compiler flags
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
               nonstandard directory <lib dir>
-  LIBS        libraries to pass to the linker, e.g. -l<library>
   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
   CVS         path to cvs command
@@ -1441,8 +1426,8 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-MacPorts configure 1.4
-generated by GNU Autoconf 2.61
+MacPorts configure 1.5
+generated by GNU Autoconf 2.60
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -1455,8 +1440,8 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by MacPorts $as_me 1.4, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
+It was created by MacPorts $as_me 1.5, which was
+generated by GNU Autoconf 2.60.  Invocation command line was
 
   $ $0 $@
 
@@ -2017,7 +2002,7 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2057,7 +2042,7 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_CC="gcc"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2114,7 +2099,7 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2155,7 +2140,7 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
        continue
@@ -2213,7 +2198,7 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2257,7 +2242,7 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2398,7 +2383,7 @@
 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
 # so that the user can short-circuit this test for compilers unknown to
 # Autoconf.
-for ac_file in $ac_files ''
+for ac_file in $ac_files
 do
   test -f "$ac_file" || continue
   case $ac_file in
@@ -2426,12 +2411,6 @@
 test "$ac_cv_exeext" = no && ac_cv_exeext=
 
 else
-  ac_file=''
-fi
-
-{ echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6; }
-if test -z "$ac_file"; then
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
@@ -2443,6 +2422,8 @@
 fi
 
 ac_exeext=$ac_cv_exeext
+{ echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6; }
 
 # Check that the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
@@ -2620,10 +2601,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_compiler_gnu=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -2678,10 +2676,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_prog_cc_g=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -2716,10 +2731,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   :
 else
   echo "$as_me: failed program was:" >&5
@@ -2755,10 +2787,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_prog_cc_g=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -2874,10 +2923,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_prog_cc_c89=$ac_arg
 else
   echo "$as_me: failed program was:" >&5
@@ -2950,7 +3016,7 @@
     # by default.
     for ac_prog in ginstall scoinst install; do
       for ac_exec_ext in '' $ac_executable_extensions; do
-	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then
 	  if test $ac_prog = install &&
 	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
 	    # AIX install.  It has an incompatible calling convention.
@@ -3053,7 +3119,7 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_CVS="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3093,7 +3159,7 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_RSYNC="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3131,7 +3197,7 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_HAVE_LAUNCHD="yes"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3170,7 +3236,7 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_LAUNCHCTL="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3210,7 +3276,7 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3250,7 +3316,7 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_BZIP2="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3299,7 +3365,7 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3339,7 +3405,7 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_GNUTAR="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3418,10 +3484,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
 
 cat >>confdefs.h <<\_ACEOF
 #define UNUSED __attribute__((unused))
@@ -3465,7 +3548,7 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_MTREE="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3492,12 +3575,64 @@
 		subdirs="$subdirs src/programs/mtree"
 
 		MTREE='$(TOPSRCDIR)/src/programs/mtree/mtree'
-#		MTREE='${prefix}/bin/mtree'
 		REPLACEMENT_PROGS="$REPLACEMENT_PROGS mtree"
 	fi
 
 
 
+
+
+	# Extract the first word of "xar", so it can be a program name with args.
+set dummy xar; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_XAR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $XAR in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_XAR="$XAR" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="/usr/bin:/usr/sbin:/bin:/sbin"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_XAR="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+XAR=$ac_cv_path_XAR
+if test -n "$XAR"; then
+  { echo "$as_me:$LINENO: result: $XAR" >&5
+echo "${ECHO_T}$XAR" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+
+	if test "x$XAR" = "x" ; then
+		subdirs="$subdirs src/programs/xar"
+
+		XAR='$(TOPSRCDIR)/src/programs/xar/xar'
+		REPLACEMENT_PROGS="$REPLACEMENT_PROGS xar"
+	fi
+
+
+
 # Check whether --enable-launchd-support was given.
 if test "${enable_launchd_support+set}" = set; then
   enableval=$enable_launchd_support;
@@ -3555,11 +3690,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
 
 				od_cv_have_framework_corefoundation="yes"
 
@@ -3573,7 +3724,7 @@
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 
 		LIBS="$ac_save_LIBS"
@@ -3642,11 +3793,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
 
 				od_cv_have_framework_systemconfiguration="yes"
 
@@ -3660,7 +3827,7 @@
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 
 		LIBS="$ac_save_LIBS"
@@ -3729,11 +3896,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
 
 				od_cv_have_framework_iokit="yes"
 
@@ -3747,7 +3930,7 @@
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 
 		LIBS="$ac_save_LIBS"
@@ -3815,11 +3998,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
 
 				od_cv_have_function_cfnotificationcentergetdarwinnotifycenter="yes"
 
@@ -3833,7 +4032,7 @@
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 
 		LIBS="$ac_save_LIBS"
@@ -4095,10 +4294,17 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
   :
 else
   echo "$as_me: failed program was:" >&5
@@ -4132,10 +4338,17 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
   # Broken: success on invalid input.
 continue
 else
@@ -4200,10 +4413,17 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
   :
 else
   echo "$as_me: failed program was:" >&5
@@ -4237,10 +4457,17 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
   # Broken: success on invalid input.
 continue
 else
@@ -4295,7 +4522,7 @@
   for ac_prog in grep ggrep; do
   for ac_exec_ext in '' $ac_executable_extensions; do
     ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+    { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue
     # Check for GNU ac_path_GREP and select it if it is found.
   # Check for GNU $ac_path_GREP
 case `"$ac_path_GREP" --version 2>&1` in
@@ -4377,7 +4604,7 @@
   for ac_prog in egrep; do
   for ac_exec_ext in '' $ac_executable_extensions; do
     ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+    { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue
     # Check for GNU ac_path_EGREP and select it if it is found.
   # Check for GNU $ac_path_EGREP
 case `"$ac_path_EGREP" --version 2>&1` in
@@ -4473,10 +4700,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_header_stdc=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -4654,10 +4898,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   eval "$as_ac_Header=yes"
 else
   echo "$as_me: failed program was:" >&5
@@ -4730,11 +4991,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_search_opendir=$ac_res
 else
   echo "$as_me: failed program was:" >&5
@@ -4743,7 +5020,7 @@
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext
   if test "${ac_cv_search_opendir+set}" = set; then
   break
@@ -4814,11 +5091,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_search_opendir=$ac_res
 else
   echo "$as_me: failed program was:" >&5
@@ -4827,7 +5120,7 @@
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext
   if test "${ac_cv_search_opendir+set}" = set; then
   break
@@ -4894,10 +5187,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_header_sys_wait_h=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -4933,48 +5243,38 @@
 #include <sys/stat.h>
 
 #if defined S_ISBLK && defined S_IFDIR
-extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
+# if S_ISBLK (S_IFDIR)
+You lose.
+# endif
 #endif
 
 #if defined S_ISBLK && defined S_IFCHR
-extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
+# if S_ISBLK (S_IFCHR)
+You lose.
+# endif
 #endif
 
 #if defined S_ISLNK && defined S_IFREG
-extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
+# if S_ISLNK (S_IFREG)
+You lose.
+# endif
 #endif
 
 #if defined S_ISSOCK && defined S_IFREG
-extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
+# if S_ISSOCK (S_IFREG)
+You lose.
+# endif
 #endif
 
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "You lose" >/dev/null 2>&1; then
+  ac_cv_header_stat_broken=yes
+else
   ac_cv_header_stat_broken=no
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_header_stat_broken=yes
 fi
+rm -f conftest*
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 { echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5
 echo "${ECHO_T}$ac_cv_header_stat_broken" >&6; }
@@ -5028,10 +5328,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   eval "$as_ac_Header=yes"
 else
   echo "$as_me: failed program was:" >&5
@@ -5108,10 +5425,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -5147,10 +5481,17 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
   ac_header_preproc=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -5327,10 +5668,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_type_pid_t=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -5392,10 +5750,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -5431,10 +5806,17 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
   ac_header_preproc=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -5566,11 +5948,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
@@ -5579,7 +5977,7 @@
 	eval "$as_ac_var=no"
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 fi
 ac_res=`eval echo '${'$as_ac_var'}'`
@@ -5692,7 +6090,7 @@
 /* Thanks to Paul Eggert for this test.  */
 $ac_includes_default
 #include <sys/wait.h>
-#ifdef HAVE_VFORK_H
+#if HAVE_VFORK_H
 # include <vfork.h>
 #endif
 /* On some sparc systems, changes by the child to local and incoming
@@ -5860,7 +6258,8 @@
 main ()
 {
 #ifndef strerror_r
-  (void) strerror_r;
+  char *p = (char *) strerror_r;
+  return !p;
 #endif
 
   ;
@@ -5880,10 +6279,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_have_decl_strerror_r=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -5979,11 +6395,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
@@ -5992,7 +6424,7 @@
 	eval "$as_ac_var=no"
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 fi
 ac_res=`eval echo '${'$as_ac_var'}'`
@@ -6047,10 +6479,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_func_strerror_r_char_p=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -6213,11 +6662,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
@@ -6226,7 +6691,7 @@
 	eval "$as_ac_var=no"
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 fi
 ac_res=`eval echo '${'$as_ac_var'}'`
@@ -6282,10 +6747,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
 
 				dp_cv_readlink_is_posix_1003_1a="yes"
 
@@ -6364,11 +6846,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_lib_md_MD5Update=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -6377,7 +6875,7 @@
 	ac_cv_lib_md_MD5Update=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
@@ -6424,10 +6922,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -6463,10 +6978,17 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
   ac_header_preproc=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -6599,11 +7121,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_lib_crypto_MD5_Update=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -6612,7 +7150,7 @@
 	ac_cv_lib_crypto_MD5_Update=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
@@ -6659,10 +7197,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -6698,10 +7253,17 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
   ac_header_preproc=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -6927,10 +7489,17 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
   # We can compile using X headers with no special include directory.
 ac_x_includes=
 else
@@ -6953,7 +7522,7 @@
   # See if we find them without any special options.
   # Don't add to $LIBS permanently.
   ac_save_LIBS=$LIBS
-  LIBS="-lX11 $LIBS"
+  LIBS="-lXt $LIBS"
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -6982,11 +7551,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   LIBS=$ac_save_LIBS
 # We can link X programs with no special library path.
 ac_x_libraries=
@@ -6999,7 +7584,7 @@
 do
   # Don't even attempt the hair of trying to link an X program!
   for ac_extension in a so sl; do
-    if test -r "$ac_dir/libX11.$ac_extension"; then
+    if test -r "$ac_dir/libXt.$ac_extension"; then
       ac_x_libraries=$ac_dir
       break 2
     fi
@@ -7007,7 +7592,7 @@
 done
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 fi # $ac_x_libraries = no
 
@@ -7064,12 +7649,12 @@
     X_LIBS="$X_LIBS -L$x_libraries"
     # For Solaris; some versions of Sun CC require a space after -R and
     # others require no space.  Words are not sufficient . . . .
-    { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
+    case `(uname -sr) 2>/dev/null` in
+    "SunOS 5"*)
+      { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; }
-    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
-    ac_xsave_c_werror_flag=$ac_c_werror_flag
-    ac_c_werror_flag=yes
-    cat >conftest.$ac_ext <<_ACEOF
+      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
+      cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -7097,20 +7682,44 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-       X_LIBS="$X_LIBS -R$x_libraries"
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_R_nospace=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+	ac_R_nospace=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+      if test $ac_R_nospace = yes; then
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+	X_LIBS="$X_LIBS -R$x_libraries"
+      else
 	LIBS="$ac_xsave_LIBS -R $x_libraries"
-       cat >conftest.$ac_ext <<_ACEOF
+	cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -7138,30 +7747,48 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-	  X_LIBS="$X_LIBS -R $x_libraries"
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_R_space=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ echo "$as_me:$LINENO: result: neither works" >&5
-echo "${ECHO_T}neither works" >&6; }
+	ac_R_space=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-    ac_c_werror_flag=$ac_xsave_c_werror_flag
-    LIBS=$ac_xsave_LIBS
+	if test $ac_R_space = yes; then
+	  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	  X_LIBS="$X_LIBS -R $x_libraries"
+	else
+	  { echo "$as_me:$LINENO: result: neither works" >&5
+echo "${ECHO_T}neither works" >&6; }
+	fi
+      fi
+      LIBS=$ac_xsave_LIBS
+    esac
   fi
 
   # Check for system-dependent libraries X programs must link with.
@@ -7210,11 +7837,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   :
 else
   echo "$as_me: failed program was:" >&5
@@ -7262,11 +7905,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_lib_dnet_dnet_ntoa=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -7275,7 +7934,7 @@
 	ac_cv_lib_dnet_dnet_ntoa=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
@@ -7328,11 +7987,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_lib_dnet_stub_dnet_ntoa=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -7341,7 +8016,7 @@
 	ac_cv_lib_dnet_stub_dnet_ntoa=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
@@ -7354,7 +8029,7 @@
     fi
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
     LIBS="$ac_xsave_LIBS"
 
@@ -7429,11 +8104,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_func_gethostbyname=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -7442,7 +8133,7 @@
 	ac_cv_func_gethostbyname=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 fi
 { echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
@@ -7491,11 +8182,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_lib_nsl_gethostbyname=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -7504,7 +8211,7 @@
 	ac_cv_lib_nsl_gethostbyname=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
@@ -7557,11 +8264,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_lib_bsd_gethostbyname=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -7570,7 +8293,7 @@
 	ac_cv_lib_bsd_gethostbyname=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
@@ -7653,11 +8376,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_func_connect=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -7666,7 +8405,7 @@
 	ac_cv_func_connect=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 fi
 { echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
@@ -7715,11 +8454,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_lib_socket_connect=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -7728,7 +8483,7 @@
 	ac_cv_lib_socket_connect=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
@@ -7804,11 +8559,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_func_remove=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -7817,7 +8588,7 @@
 	ac_cv_func_remove=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 fi
 { echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
@@ -7866,11 +8637,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_lib_posix_remove=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -7879,7 +8666,7 @@
 	ac_cv_lib_posix_remove=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
@@ -7955,11 +8742,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_func_shmat=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -7968,7 +8771,7 @@
 	ac_cv_func_shmat=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 fi
 { echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
@@ -8017,11 +8820,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_lib_ipc_shmat=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -8030,7 +8849,7 @@
 	ac_cv_lib_ipc_shmat=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
@@ -8094,11 +8913,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_lib_ICE_IceConnectionNumber=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -8107,7 +8942,7 @@
 	ac_cv_lib_ICE_IceConnectionNumber=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
@@ -8165,11 +9000,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_lib_X11_XOpenDisplay=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -8178,7 +9029,7 @@
 	ac_cv_lib_X11_XOpenDisplay=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
@@ -8319,11 +9170,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_lib_readline_readline=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -8332,7 +9199,7 @@
 	ac_cv_lib_readline_readline=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
@@ -8369,7 +9236,8 @@
 main ()
 {
 #ifndef rl_username_completion_function
-  (void) rl_username_completion_function;
+  char *p = (char *) rl_username_completion_function;
+  return !p;
 #endif
 
   ;
@@ -8389,10 +9257,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_have_decl_rl_username_completion_function=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -8441,7 +9326,8 @@
 main ()
 {
 #ifndef rl_filename_completion_function
-  (void) rl_filename_completion_function;
+  char *p = (char *) rl_filename_completion_function;
+  return !p;
 #endif
 
   ;
@@ -8461,10 +9347,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_have_decl_rl_filename_completion_function=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -8513,7 +9416,8 @@
 main ()
 {
 #ifndef rl_completion_matches
-  (void) rl_completion_matches;
+  char *p = (char *) rl_completion_matches;
+  return !p;
 #endif
 
   ;
@@ -8533,10 +9437,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_have_decl_rl_completion_matches=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -8585,7 +9506,8 @@
 main ()
 {
 #ifndef username_completion_function
-  (void) username_completion_function;
+  char *p = (char *) username_completion_function;
+  return !p;
 #endif
 
   ;
@@ -8605,10 +9527,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_have_decl_username_completion_function=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -8657,7 +9596,8 @@
 main ()
 {
 #ifndef filename_completion_function
-  (void) filename_completion_function;
+  char *p = (char *) filename_completion_function;
+  return !p;
 #endif
 
   ;
@@ -8677,10 +9617,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_have_decl_filename_completion_function=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -8729,7 +9686,8 @@
 main ()
 {
 #ifndef completion_matches
-  (void) completion_matches;
+  char *p = (char *) completion_matches;
+  return !p;
 #endif
 
   ;
@@ -8749,10 +9707,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_have_decl_completion_matches=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -8782,6 +9757,18 @@
 
 
 
+# Lowest non-system-reserved uid and gid (Apple claims <500)
+
+cat >>confdefs.h <<\_ACEOF
+#define MIN_USABLE_UID 500
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define MIN_USABLE_GID 500
+_ACEOF
+
+
 # Load tclConfig.sh
 
     #
@@ -9029,7 +10016,7 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -9072,7 +10059,7 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -9225,7 +10212,7 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_CURL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -9266,7 +10253,7 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_CURL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -9350,11 +10337,27 @@
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_lib_curl_curl_easy_strerror=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -9363,7 +10366,7 @@
 	ac_cv_lib_curl_curl_easy_strerror=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
@@ -9622,8 +10625,7 @@
 ## M4sh Initialization.  ##
 ## --------------------- ##
 
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
+# Be Bourne compatible
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
@@ -9632,15 +10634,12 @@
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
 fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
 
 
-
-
 # PATH needs CR
 # Avoid depending upon Character Ranges.
 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
@@ -9862,28 +10861,19 @@
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
+# Find out whether ``test -x'' works.  Don't use a zero-byte file, as
+# systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  as_executable_p="test -x"
 else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-	case $1 in
-        -*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
+  as_executable_p=:
 fi
-as_executable_p=$as_test_x
+rm -f conf$$.file
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -9898,8 +10888,8 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by MacPorts $as_me 1.4, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
+This file was extended by MacPorts $as_me 1.5, which was
+generated by GNU Autoconf 2.60.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -9927,7 +10917,7 @@
 Usage: $0 [OPTIONS] [FILE]...
 
   -h, --help       print this help, then exit
-  -V, --version    print version number and configuration settings, then exit
+  -V, --version    print version number, then exit
   -q, --quiet      do not print progress messages
   -d, --debug      don't remove temporary files
       --recheck    update $as_me by reconfiguring in the same conditions
@@ -9947,8 +10937,8 @@
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-MacPorts config.status 1.4
-configured by $0, generated by GNU Autoconf 2.61,
+MacPorts config.status 1.5
+configured by $0, generated by GNU Autoconf 2.60,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
 Copyright (C) 2006 Free Software Foundation, Inc.
@@ -10202,6 +11192,7 @@
 CFLAGS_QUICHEEATERS!$CFLAGS_QUICHEEATERS$ac_delim
 MTREE!$MTREE$ac_delim
 subdirs!$subdirs$ac_delim
+XAR!$XAR$ac_delim
 ENABLE_LAUNCHD_SUPPORT!$ENABLE_LAUNCHD_SUPPORT$ac_delim
 HAVE_FRAMEWORK_COREFOUNDATION!$HAVE_FRAMEWORK_COREFOUNDATION$ac_delim
 HAVE_FRAMEWORK_SYSTEMCONFIGURATION!$HAVE_FRAMEWORK_SYSTEMCONFIGURATION$ac_delim
@@ -10225,7 +11216,6 @@
 X_PRE_LIBS!$X_PRE_LIBS$ac_delim
 X_LIBS!$X_LIBS$ac_delim
 X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim
-TCL_VERSION!$TCL_VERSION$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -10267,6 +11257,7 @@
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+TCL_VERSION!$TCL_VERSION$ac_delim
 TCL_BIN_DIR!$TCL_BIN_DIR$ac_delim
 TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim
 TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim
@@ -10299,7 +11290,7 @@
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 30; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 31; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -10776,13 +11767,8 @@
   case $ac_arg in
   *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
   esac
-  ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
+  ac_sub_configure_args="$ac_arg $ac_sub_configure_args"
 
-  # Pass --silent
-  if test "$silent" = yes; then
-    ac_sub_configure_args="--silent $ac_sub_configure_args"
-  fi
-
   ac_popdir=`pwd`
   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
 

Modified: branches/release_1_4/base/configure.ac
===================================================================
--- branches/release_1_4/base/configure.ac	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/configure.ac	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.52)
-AC_INIT([MacPorts], [1.4], [macports-dev at lists.macosforge.org], [macports])
+AC_INIT([MacPorts], [1.5], [macports-dev at lists.macosforge.org], [macports])
 AC_CONFIG_SRCDIR([src/pextlib1.0/Pextlib.c])
 AC_CONFIG_HEADERS([src/config.h])
 AC_CANONICAL_SYSTEM
@@ -38,6 +38,7 @@
 OD_COMPILER_ATTRIBUTE_UNUSED
 
 OD_PROG_MTREE
+OD_PROG_XAR
 AC_ARG_ENABLE(launchd-support,
 	AC_HELP_STRING([--disable-launchd-support], [disable support for launchd startupitems]),
 	[], [enable_launchd_support=yes])
@@ -93,6 +94,10 @@
 #endif
 ])
 
+# Lowest non-system-reserved uid and gid (Apple claims <500)
+AC_DEFINE([MIN_USABLE_UID], [500], [Lowest non-system-reserved UID.])
+AC_DEFINE([MIN_USABLE_GID], [500], [Lowest non-system-reserved GID.])
+
 # Load tclConfig.sh
 SC_PATH_TCLCONFIG
 SC_LOAD_TCLCONFIG

Modified: branches/release_1_4/base/doc/portfile.7
===================================================================
--- branches/release_1_4/base/doc/portfile.7	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/doc/portfile.7	2007-04-14 03:46:37 UTC (rev 23969)
@@ -316,7 +316,7 @@
 basis.
 .br
 .Sy Example:
-.Dl configure.env CFLAGS=-O
+.Dl configure.env CPP=/usr/bin/cpp-4.0
 .It Va target Ns Ic .pre_args
 Additional arguments passed before the main arguments.
 .br
@@ -651,6 +651,15 @@
 .Sy Default:
 .Em yes
 .br
+.It Ic fetch.ignore_sslcrt
+Whether to ignore the host SSL certificate (for HTTPS).
+.br
+.Sy Type:
+.Em optional
+.br
+.Sy Default:
+.Em no
+.br
 .El
 .Ss FETCHING FROM CVS
 As an alternative to fetching distribution files, pulling the sources
@@ -760,6 +769,86 @@
 .Sy Example:
 .Dl extract.cmd bzip2
 .El
+.Sh CONFIGURE OPTIONS
+MacPorts provide special support for configure flags (CFLAGS, LDFLAGS, CPPFLAGS, CXXFLAGS). Please note that the previous way to alter these flags (using configure.env) may become deprecated at some point. The following options are defined:
+.Bl -tag -width lc
+.It Ic configure.cflags
+Flags to put in the CFLAGS environment variable when invoking the configure script.
+.br
+.Sy Type:
+.Em optional
+.br
+.Sy Default:
+.Em -O2
+.br
+.Sy Example:
+.Dl configure.cflags-append -DHAS_LRINTF
+.It Ic configure.cppflags
+Flags to put in the CPPFLAGS environment variable when invoking the configure script.
+.br
+.Sy Type:
+.Em optional
+.br
+.Sy Default:
+.Em -I${prefix}/include
+.It Ic configure.cxxflags
+Flags to put in the CXXFLAGS environment variable when invoking the configure script.
+.br
+.Sy Type:
+.Em optional
+.br
+.Sy Default:
+.Em -O2
+.It Ic configure.ldflags
+Flags to put in the LDFLAGS environment variable when invoking the configure script.
+.br
+.Sy Type:
+.Em optional
+.br
+.Sy Default:
+.Em -L${prefix}/lib
+.El
+.Ss UNIVERSAL TARGET HOOKS
+For universal builds of configure-based ports, we also define specific target hooks. These can be overridden for specific ports. Please note that these hooks are used by the default universal variant and redefining the variant will make them useless.
+.Bl -tag -width lc
+.It Ic configure.universal_args
+Arguments appended to the configure script to build the port universal.
+.br
+.Sy Type:
+.Em optional
+.br
+.Sy Default:
+.Em --disable-dependency-tracking
+.It Ic configure.universal_cflags
+Additional flags to put in the CFLAGS environment variable when invoking the configure script.
+.br
+.Sy Type:
+.Em optional
+.br
+.Sy Default:
+.Em -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc
+.It Ic configure.universal_cppflags
+Additional flags to put in the CPPFLAGS environment variable when invoking the configure script.
+.br
+.Sy Type:
+.Em optional
+.It Ic configure.universal_cxxflags
+Additional flags to put in the CXXFLAGS environment variable when invoking the configure script.
+.br
+.Sy Type:
+.Em optional
+.br
+.Sy Default:
+.Em -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc
+.It Ic configure.universal_ldflags
+Additional flags to put in the LDFLAGS environment variable when invoking the configure script.
+.br
+.Sy Type:
+.Em optional
+.br
+.Sy Default:
+.Em -arch i386 -arch ppc
+.El
 .Sh BUILD OPTIONS
 Execute necessary build commands.
 .Bl -tag -width lc
@@ -1122,6 +1211,8 @@
 (uses the date_updated tag of the freshmeat XML file),
 .Em sourceforge
 (uses the version of the latest file release of the project),
+.Em googlecode
+(uses the version of the latest file release of the project),
 .Em moddate
 (uses the modification date of some URL resource),
 .Em regex
@@ -1137,22 +1228,37 @@
 .Em optional
 .br
 .Sy Default:
+.Em sourceforge
+or
+.Em googlecode
+if the master_sites is one of these, else
 .Em freshmeat
-or
-.Em sourceforge
-if the master_sites is sourceforge.
 .br
 .Sy Values:
-.Em freshmeat sourceforge moddate regex regexm md5 none
+.Em freshmeat sourceforge googlecode moddate regex regexm md5 none
 .It Ic livecheck.name
-Name of the project for live checks (used for freshmeat and sourceforge checks).
+Name of the project for live checks (used for freshmeat, sourceforge, and googlecode checks).
 .br
 .Sy Type:
 .Em optional
 .br
 .Sy Default:
 .Em ${name}
-or the sourceforge project name if it can be guessed by looking at the master_sites.
+or the sourceforge/freshmeat/googlecode project name if it can be guessed by looking at the master_sites.
+.It Ic livecheck.distname
+Name of the file release (used for sourceforge and googlecode checks).
+For sourceforge releases use the name of the package release.
+For googlecode releases use the name of the file download, including extension.
+Replace the version part of the name with "(.*)".
+.br
+.Sy Type:
+.Em optional
+.br
+.Sy Default:
+.Em ${livecheck.name}
+for sourceforge projects or the first entry in
+.Em ${distfiles}
+for googlecode projects
 .It Ic livecheck.version
 Version of the project for live checks (used for regex-based checks).
 .br
@@ -1173,8 +1279,11 @@
 .Em http://freshmeat.net/projects-xml/${livecheck.name}/${livecheck.name}.xml
 or
 .Em http://sourceforge.net/export/rss2_projfiles.php?project=${livecheck.name}
+or
+.Em http://code.google.com/p/${livecheck.name}/downloads/list
 .It Ic livecheck.regex
 Regular expression to parse the resource for regex checks.
+Be sure to use a regular expression grouping around the version component.
 .br
 .Sy Type:
 .Em optional
@@ -1222,6 +1331,26 @@
 .br
 .Sy Example:
 .Dl default_variants +ssl +tcpd
+.It Ic unversal_variant
+When using MacPorts on MacOS X, a universal variant is defined and
+the default behavior is to configure ports with universal flags
+(see the
+.Ic UNIVERSAL TARGET HOOKS
+section above). The variant can be
+overridden if the default code does not work. It can also be
+suppressed if having a universal variant for the port does not make
+sense. To suppress it, use the
+.Ic universal_variant
+option.
+.br
+.Sy Type:
+.Em optional
+.br
+.Sy Default:
+.Em yes
+.br
+.Sy Example:
+.Dl universal_variant no
 .El
 .Sh PLATFORM OPTIONS
 MacPorts allows for platform-specific conditional modification to be

Modified: branches/release_1_4/base/portmgr/IndexRegen.sh
===================================================================
--- branches/release_1_4/base/portmgr/IndexRegen.sh	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/portmgr/IndexRegen.sh	2007-04-14 03:46:37 UTC (rev 23969)
@@ -22,7 +22,7 @@
 
 # Other settings (probably don't need to be changed).
 SVN_DPORTS_URL=http://svn.macports.org/repository/macports/trunk/dports
-SVN_BASE_URL=http://svn.macports.org/repository/macports/branches/release_1_4/base
+SVN_BASE_URL=http://svn.macports.org/repository/macports/trunk/base
 SVN_CONFIG_DIR=${ROOT}/svnconfig
 # Where to checkout the source code. This needs to exist!
 SRCTREE=${ROOT}/source

Modified: branches/release_1_4/base/src/config.h.in
===================================================================
--- branches/release_1_4/base/src/config.h.in	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/config.h.in	2007-04-14 03:46:37 UTC (rev 23969)
@@ -212,6 +212,12 @@
 /* Define to 1 if `vfork' works. */
 #undef HAVE_WORKING_VFORK
 
+/* Lowest non-system-reserved GID. */
+#undef MIN_USABLE_GID
+
+/* Lowest non-system-reserved UID. */
+#undef MIN_USABLE_UID
+
 /* Define to the address where bug reports for this package should be sent. */
 #undef PACKAGE_BUGREPORT
 

Modified: branches/release_1_4/base/src/darwinports1.0/darwinports.tcl
===================================================================
--- branches/release_1_4/base/src/darwinports1.0/darwinports.tcl	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/darwinports1.0/darwinports.tcl	2007-04-14 03:46:37 UTC (rev 23969)
@@ -980,6 +980,7 @@
 		set target "pkg"
 	}
 	if {$target == "configure" || $target == "build"
+		|| $target == "test"
 		|| $target == "destroot" || $target == "install"
 		|| $target == "archive"
 		|| $target == "pkg" || $target == "mpkg"
@@ -1076,7 +1077,21 @@
 		ui_info "Synchronizing from $source"
 		switch -regexp -- [darwinports::getprotocol $source] {
 			{^file$} {
-				continue
+			    set portdir [darwinports::getportdir $source]
+				if {[file exists $portdir/.svn]} {
+				    if {[catch {set svncmd [darwinports::binaryInPath "svn"]}] == 0} {
+				        set svn_commandline "${svncmd} update --non-interactive \"${portdir}\""
+				        ui_debug $svn_commandline
+				        if {[catch {system $svn_commandline}]} {
+				            return -code error "sync failed doing svn update"
+				        }
+				        if {[catch {system "chmod -R a+r \"${portdir}\""}]} {
+				            ui_warn "Setting world read permissions on parts of the ports tree failed, need root?"
+				        }
+				    } else {
+				        return -code error "svn command not found"
+				    }
+				}
 			}
 			{^dports$} {
 				darwinports::index::sync $darwinports::portdbpath $source
@@ -1237,13 +1252,14 @@
 	array set portinfo [dportinfo $dport]
 	set depends {}
 	set deptypes {}
-	
+		
 	# Determine deptypes to look for based on target
 	switch $target {
 		configure	{ set deptypes "depends_lib" }
 		
 		build		{ set deptypes "depends_lib depends_build" }
 		
+		test		-
 		destroot	-
 		install		-
 		archive		-

Modified: branches/release_1_4/base/src/package1.0/portarchive.tcl
===================================================================
--- branches/release_1_4/base/src/package1.0/portarchive.tcl	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/package1.0/portarchive.tcl	2007-04-14 03:46:37 UTC (rev 23969)
@@ -324,7 +324,7 @@
 			}
 
 			ui_info "$UI_PREFIX [format [msgcat::mc "Creating %s"] ${archive.file}]"
-			system "[command archive]"
+			command_exec archive
 			ui_info "$UI_PREFIX [format [msgcat::mc "Archive %s packaged"] ${archive.file}]"
 		}
 	}

Modified: branches/release_1_4/base/src/package1.0/portunarchive.tcl
===================================================================
--- branches/release_1_4/base/src/package1.0/portunarchive.tcl	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/package1.0/portunarchive.tcl	2007-04-14 03:46:37 UTC (rev 23969)
@@ -268,7 +268,7 @@
 
 	# Unpack the archive
 	ui_info "$UI_PREFIX [format [msgcat::mc "Extracting %s"] ${unarchive.file}]"
-	system "[command unarchive]"
+	command_exec unarchive
 
 	return 0
 }
@@ -313,7 +313,7 @@
 
 	# Unpack the archive
 	ui_info "$UI_PREFIX [format [msgcat::mc "Extracting %s"] ${unarchive.file}]"
-	system "[command unarchive]"
+	command_exec unarchive
 
 	return 0
 }

Modified: branches/release_1_4/base/src/pextlib1.0/Pextlib.c
===================================================================
--- branches/release_1_4/base/src/pextlib1.0/Pextlib.c	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/pextlib1.0/Pextlib.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -941,36 +941,40 @@
 	return TCL_OK;
 }
 
+/* Find the first unused UID > 100
+   previously this would find the highest used UID and add 1
+   but UIDs > 500 are visible on the login screen of OS X */
 int NextuidCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc UNUSED, Tcl_Obj *CONST objv[] UNUSED)
 {
 	Tcl_Obj *tcl_result;
-	struct passwd *pwent;
-	int max;
+	int cur;
 
-	max = 0;
-
-	while ((pwent = getpwent()) != NULL)
-		if ((int)pwent->pw_uid > max)
-			max = (int)pwent->pw_uid;
+	cur = MIN_USABLE_UID;
 	
-	tcl_result = Tcl_NewIntObj(max + 1);
+	while (getpwuid(cur) != NULL) {
+		cur++;
+	}
+	
+	tcl_result = Tcl_NewIntObj(cur);
 	Tcl_SetObjResult(interp, tcl_result);
 	return TCL_OK;
 }
 
+/* Just as with NextuidCmd, return the first unused gid > 100
+   groups aren't visible on the login screen, but I see no reason
+   to create group 502 when I can create group 100 */
 int NextgidCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc UNUSED, Tcl_Obj *CONST objv[] UNUSED)
 {
 	Tcl_Obj *tcl_result;
-	struct group *grent;
-	int max;
+	int cur;
 
-	max = 0;
+	cur = MIN_USABLE_GID;
 
-	while ((grent = getgrent()) != NULL)
-		if ((int)grent->gr_gid > max)
-			max = (int)grent->gr_gid;
+	while (getgrgid(cur) != NULL) {
+		cur++;
+	}
 	
-	tcl_result = Tcl_NewIntObj(max + 1);
+	tcl_result = Tcl_NewIntObj(cur);
 	Tcl_SetObjResult(interp, tcl_result);
 	return TCL_OK;
 }

Modified: branches/release_1_4/base/src/pextlib1.0/curl.c
===================================================================
--- branches/release_1_4/base/src/pextlib1.0/curl.c	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/pextlib1.0/curl.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -124,7 +124,7 @@
 /**
  * curl fetch subcommand entry point.
  *
- * syntax: curl fetch [-v] [--disable-epsv] [-u userpass] [--effective-url lasturlvar] url filename
+ * syntax: curl fetch [-v] [--disable-epsv] [--ignore-ssl-cert] [-u userpass] [--effective-url lasturlvar] url filename
  *
  * @param interp		current interpreter
  * @param objc			number of parameters
@@ -141,6 +141,7 @@
 		long theResponseCode = 0;
 		int noprogress = 1;
 		int useepsv = 1;
+		int ignoresslcert = 0;
 		const char* theUserPassString = NULL;
 		const char* effectiveURLVarName = NULL;
 		char* effectiveURL = NULL;
@@ -164,6 +165,8 @@
 				noprogress = 0;
 			} else if (strcmp(theOption, "--disable-epsv") == 0) {
 				useepsv = 0;
+			} else if (strcmp(theOption, "--ignore-ssl-cert") == 0) {
+				ignoresslcert = 1;
 			} else if (strcmp(theOption, "-u") == 0) {
 				/* check we also have the parameter */
 				if (optioncrsr < lastoption) {
@@ -278,6 +281,20 @@
 			theResult = SetResultFromCurlErrorCode(interp, theCurlCode);
 			break;
 		}
+		
+		/* we may want to ignore ssl errors */
+		if (ignoresslcert) {
+			theCurlCode = curl_easy_setopt(theHandle, CURLOPT_SSL_VERIFYPEER, (long) 0);
+			if (theCurlCode != CURLE_OK) {
+				theResult = SetResultFromCurlErrorCode(interp, theCurlCode);
+				break;
+			}
+			theCurlCode = curl_easy_setopt(theHandle, CURLOPT_SSL_VERIFYHOST, (long) 0);
+			if (theCurlCode != CURLE_OK) {
+				theResult = SetResultFromCurlErrorCode(interp, theCurlCode);
+				break;
+			}
+		}
 
 		/* set the l/p, if any */
 		if (theUserPassString) {

Modified: branches/release_1_4/base/src/port/port.tcl
===================================================================
--- branches/release_1_4/base/src/port/port.tcl	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/port/port.tcl	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1388,7 +1388,7 @@
 
 
 proc action_selfupdate { action portlist opts } {
-	global global_options;
+	global global_options
 	if { [catch {darwinports::selfupdate [array get global_options]} result ] } {
 		global errorInfo
 		ui_debug "$errorInfo"
@@ -1400,6 +1400,7 @@
 
 
 proc action_upgrade { action portlist opts } {
+    global global_variations
 	require_portlist portlist
 	foreachport $portlist {
 		# Merge global variations into the variations specified for this port
@@ -1990,6 +1991,7 @@
 
 
 proc action_target { action portlist opts } {
+    global global_variations
 	set status 0
 	require_portlist portlist
 	foreachport $portlist {

Modified: branches/release_1_4/base/src/port1.0/portbuild.tcl
===================================================================
--- branches/release_1_4/base/src/port1.0/portbuild.tcl	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/port1.0/portbuild.tcl	2007-04-14 03:46:37 UTC (rev 23969)
@@ -102,6 +102,6 @@
 }
 
 proc build_main {args} {
-    system "[command build]"
+    command_exec build
     return 0
 }

Modified: branches/release_1_4/base/src/port1.0/portconfigure.tcl
===================================================================
--- branches/release_1_4/base/src/port1.0/portconfigure.tcl	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/port1.0/portconfigure.tcl	2007-04-14 03:46:37 UTC (rev 23969)
@@ -41,6 +41,7 @@
 # define options
 commands configure automake autoconf xmkmf libtool
 # defaults
+default configure.env ""
 default configure.pre_args {--prefix=${prefix}}
 default configure.cmd ./configure
 default configure.dir {${worksrcpath}}
@@ -50,6 +51,22 @@
 default xmkmf.dir {${worksrcpath}}
 default use_configure yes
 
+# Configure special environment variables.
+options configure.cflags configure.cppflags configure.cxxflags configure.ldflags
+# We could have default debug/optimization flags at some point.
+default configure.cflags	{-O2}
+default configure.cppflags	{"-I${prefix}/include"}
+default configure.cxxflags	{-O2}
+default configure.ldflags	{"-L${prefix}/lib"}
+
+# Universal options & default values.
+options configure.universal_args		configure.universal_cflags configure.universal_cppflags configure.universal_cxxflags configure.universal_ldflags configure.universal_env
+default configure.universal_args		--disable-dependency-tracking
+default configure.universal_cflags		{"-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"}
+default configure.universal_cppflags	{}
+default configure.universal_cxxflags	{"-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"}
+default configure.universal_ldflags		{"-arch i386 -arch ppc"}
+
 set_ui_prefix
 
 proc configure_start {args} {
@@ -60,35 +77,46 @@
 
 proc configure_main {args} {
     global [info globals]
-    global configure configure.args configure.dir automake automake.env automake.args automake.dir autoconf autoconf.env autoconf.args autoconf.dir xmkmf libtool portname worksrcpath prefix workpath UI_PREFIX use_configure use_autoconf use_automake use_xmkmf
+    global worksrcpath use_configure use_autoconf use_automake use_xmkmf
+    global configure.env configure.cflags configure.cppflags configure.cxxflags configure.ldflags
     
     if {[tbool use_automake]} {
 	# XXX depend on automake
-	if {[catch {system "[command automake]"} result]} {
+	if {[catch {command_exec automake} result]} {
 	    return -code error "[format [msgcat::mc "%s failure: %s"] automake $result]"
 	}
     }
     
     if {[tbool use_autoconf]} {
 	# XXX depend on autoconf
-	if {[catch {system "[command autoconf]"} result]} {
+	if {[catch {command_exec autoconf} result]} {
 	    return -code error "[format [msgcat::mc "%s failure: %s"] autoconf $result]"
 	}
     }
     
     if {[tbool use_xmkmf]} {
-	# XXX depend on xmkmf
-	if {[catch {system "[command xmkmf]"} result]} {
-	    return -code error "[format [msgcat::mc "%s failure: %s"] xmkmf $result]"
-	} else {
-	    # XXX should probably use make command abstraction but we know that
-	    # X11 will already set things up so that "make Makefiles" always works.
-	    system "cd ${worksrcpath} && make Makefiles"
-	}
-    } elseif {[tbool use_configure]} {
-	if {[catch {system "[command configure]"} result]} {
-	    return -code error "[format [msgcat::mc "%s failure: %s"] configure $result]"
-	}
+		# XXX depend on xmkmf
+		if {[catch {command_exec xmkmf} result]} {
+		    return -code error "[format [msgcat::mc "%s failure: %s"] xmkmf $result]"
+		} else {
+		    # XXX should probably use make command abstraction but we know that
+		    # X11 will already set things up so that "make Makefiles" always works.
+		    system "cd ${worksrcpath} && make Makefiles"
+		}
+	} elseif {[tbool use_configure]} {
+    	# Merge (ld|c|cpp|cxx)flags into the environment variable.
+    	parse_environment configure
+
+    	# Append configure flags.
+		append_list_to_environment_value configure "CFLAGS" ${configure.cflags}
+		append_list_to_environment_value configure "CPPFLAGS" ${configure.cppflags}
+		append_list_to_environment_value configure "CXXFLAGS" ${configure.cxxflags}
+		append_list_to_environment_value configure "LDFLAGS" ${configure.ldflags}
+
+		# Execute the command (with the new environment).
+		if {[catch {command_exec configure} result]} {
+			return -code error "[format [msgcat::mc "%s failure: %s"] configure $result]"
+		}
     }
     return 0
 }

Modified: branches/release_1_4/base/src/port1.0/portdestroot.tcl
===================================================================
--- branches/release_1_4/base/src/port1.0/portdestroot.tcl	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/port1.0/portdestroot.tcl	2007-04-14 03:46:37 UTC (rev 23969)
@@ -99,7 +99,7 @@
 }
 
 proc destroot_main {args} {
-    system "[command destroot]"
+    command_exec destroot
     return 0
 }
 

Modified: branches/release_1_4/base/src/port1.0/portextract.tcl
===================================================================
--- branches/release_1_4/base/src/port1.0/portextract.tcl	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/port1.0/portextract.tcl	2007-04-14 03:46:37 UTC (rev 23969)
@@ -84,7 +84,7 @@
     foreach distfile [option extract.only] {
 	ui_info "$UI_PREFIX [format [msgcat::mc "Extracting %s"] $distfile]"
 	option extract.args "[option distpath]/$distfile"
-	if {[catch {system "[command extract]"} result]} {
+	if {[catch {command_exec extract} result]} {
 	    return -code error "$result"
 	}
     }

Modified: branches/release_1_4/base/src/port1.0/portfetch.tcl
===================================================================
--- branches/release_1_4/base/src/port1.0/portfetch.tcl	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/port1.0/portfetch.tcl	2007-04-14 03:46:37 UTC (rev 23969)
@@ -42,7 +42,7 @@
 
 # define options: distname master_sites
 options master_sites patch_sites extract.suffix distfiles patchfiles use_zip use_bzip2 dist_subdir \
-	fetch.type fetch.user fetch.password fetch.use_epsv \
+	fetch.type fetch.user fetch.password fetch.use_epsv fetch.ignore_sslcert \
 	master_sites.mirror_subdir patch_sites.mirror_subdir portname \
 	cvs.module cvs.root cvs.password cvs.date cvs.tag \
 	svn.url svn.tag
@@ -84,6 +84,8 @@
 default fetch.password ""
 # Use EPSV for FTP transfers
 default fetch.use_epsv "yes"
+# Ignore SSL certificate
+default fetch.ignore_sslcert "no"
 
 default fallback_mirror_site "opendarwin"
 default mirror_sites.listfile {"mirror_sites.tcl"}
@@ -163,11 +165,17 @@
 	# here we have the chance to take a look at tags, that possibly
 	# have been assigned in mirror_sites.tcl
 	set splitlist [split $element :]
-	if {[llength $splitlist] > 1} {
-	    set element "[lindex $splitlist 0]:[lindex $splitlist 1]" 
-	    set mirror_tag "[lindex $splitlist 2]"
-	}
+	# every element is a URL, so we'll always have multiple elements. no need to check
+    set element "[lindex $splitlist 0]:[lindex $splitlist 1]" 
+    set mirror_tag "[lindex $splitlist 2]"
 
+    set name_re {\$(?:name\y|\{name\})}
+    # if the URL has $name embedded, kill any mirror_tag that may have been added
+    # since a mirror_tag and $name are incompatible
+    if {[regexp $name_re $element]} {
+        set mirror_tag ""
+    }
+    
 	if {$mirror_tag == "mirror"} {
 		set thesubdir ${dist_subdir}
 	} elseif {$subdir == "" && $mirror_tag != "nosubdir"} {
@@ -176,6 +184,11 @@
 		set thesubdir ${subdir}
 	}
 	
+	# parse an embedded $name. if present, remove the subdir
+	if {[regsub $name_re $element $thesubdir element] > 0} {
+	    set thesubdir ""
+	}
+	
 	if {"$tag" != ""} {
 	    eval append element "${thesubdir}:${tag}"
 	} else {
@@ -313,25 +326,22 @@
 
     if {[regexp ^:pserver: ${cvs.root}]} {
 	set savecmd ${cvs.cmd}
-	set saveenv ${cvs.env}
 	set saveargs ${cvs.args}
 	set savepost_args ${cvs.post_args}
-	set cvs.cmd "echo ${cvs.password} | /usr/bin/env ${cvs.env} $portutil::autoconf::cvs_path"
-	set cvs.env ""
+	set cvs.cmd "echo ${cvs.password} | $portutil::autoconf::cvs_path"
 	set cvs.args login
 	set cvs.post_args ""
-	if {[catch {system -notty "[command cvs] 2>&1"} result]} {
+	if {[catch {command_exec cvs -notty "" "2>&1"} result]} {
 	    return -code error [msgcat::mc "CVS login failed"]
 	}
 	set cvs.cmd ${savecmd}
-	set cvs.env ${saveenv}
 	set cvs.args ${saveargs}
 	set cvs.post_args ${savepost_args}
     } else {
 	set env(CVS_RSH) ssh
     }
 
-    if {[catch {system "[command cvs] 2>&1"} result]} {
+    if {[catch {command_exec cvs "" "2>&1"} result]} {
 	return -code error [msgcat::mc "CVS check out failed"]
     }
 
@@ -366,7 +376,7 @@
 		set svn.args "${svn.args} -r ${svn.tag}"
     }
 
-    if {[catch {system "[command svn] 2>&1"} result]} {
+    if {[catch {command_exec svn "" "2>&1"} result]} {
 		return -code error [msgcat::mc "Subversion check out failed"]
     }
 
@@ -381,7 +391,7 @@
 # the listed url varable and associated distfile
 proc fetchfiles {args} {
 	global distpath all_dist_files UI_PREFIX fetch_urls
-	global fetch.user fetch.password fetch.use_epsv
+	global fetch.user fetch.password fetch.use_epsv fetch.ignore_sslcert
 	global distfile site
 	global portverbose
 
@@ -399,6 +409,9 @@
 	if {${fetch.use_epsv} != "yes"} {
 		lappend fetch_options "--disable-epsv"
 	}
+	if {${fetch.ignore_sslcert} != "no"} {
+		lappend fetch_options "--ignore-ssl-cert"
+	}
 	if {$portverbose == "yes"} {
 		lappend fetch_options "-v"
 	}

Modified: branches/release_1_4/base/src/port1.0/portlivecheck.tcl
===================================================================
--- branches/release_1_4/base/src/port1.0/portlivecheck.tcl	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/port1.0/portlivecheck.tcl	2007-04-14 03:46:37 UTC (rev 23969)
@@ -43,7 +43,7 @@
 target_requires ${com.apple.livecheck} main
 
 # define options
-options livecheck.url livecheck.check livecheck.md5 livecheck.regex livecheck.name livecheck.version
+options livecheck.url livecheck.check livecheck.md5 livecheck.regex livecheck.name livecheck.distname livecheck.version
 
 # defaults
 default livecheck.url {$homepage}
@@ -51,16 +51,17 @@
 default livecheck.md5 ""
 default livecheck.regex ""
 default livecheck.name default
+default livecheck.distname default
 default livecheck.version {$version}
 
 proc livecheck_main {args} {
-	global livecheck.url livecheck.check livecheck.md5 livecheck.regex livecheck.name livecheck.version
+	global livecheck.url livecheck.check livecheck.md5 livecheck.regex livecheck.name livecheck.distname livecheck.version
 	global homepage portname portpath workpath
-	global master_sites name
+	global master_sites name distfiles
 	
 	set updated 0
 	set updated_version "unknown"
-	set has_master_sites [info exists the_master_sites]
+	set has_master_sites [info exists master_sites]
 
 	set tempfile ${workpath}/livecheck.TMP
 	set port_moddate [file mtime ${portpath}/Portfile]
@@ -69,45 +70,68 @@
 	ui_debug "Port (livecheck) version is ${livecheck.version}"
 
 	# Determine the default type depending on the mirror.
-	if {"${livecheck.check}" == "default"} {
-		if {$has_master_sites && [regexp {sourceforge:(.+)} $master_sites dummy tag]} {
-			if {"${livecheck.name}" == "default"} {
+	if {${livecheck.check} eq "default"} {
+		if {$has_master_sites && [regexp {\y(sourceforge|freshmeat|googlecode)\y(?::(\S+))?} $master_sites _ site tag]} {
+			if {$tag ne "" && ${livecheck.name} eq "default"} {
 				set livecheck.name $tag
 			}
-			set livecheck.check sourceforge
-		} elseif {$has_master_sites && {"$master_sites" == "sourceforge"}} {
-			set livecheck.check sourceforge
+			set livecheck.check $site
 		} else {
-			set livecheck.check freshmeat
+		    set livecheck.check "freshmeat"
 		}
+		if {[regexp {^http://code.google.com/p/([^/]+)} $homepage _ tag]} {
+		    if {${livecheck.name} eq "default"} {
+		        set livecheck.name $tag
+		    }
+		    set livecheck.check "googlecode"
+		}
 	}
-	if {"${livecheck.name}" == "default"} {
+	if {${livecheck.name} eq "default"} {
 		set livecheck.name $name
 	}
 
 	# Perform the check depending on the type.
-	if {"${livecheck.check}" == "freshmeat"} {
-		if {![info exists homepage] || [string equal "${livecheck.url}" "${homepage}"]} {
-			set livecheck.url "http://freshmeat.net/projects-xml/${livecheck.name}/${livecheck.name}.xml"
+	switch ${livecheck.check} {
+	    "freshmeat" {
+    		if {![info exists homepage] || ${livecheck.url} eq ${homepage}} {
+    			set livecheck.url "http://freshmeat.net/projects-xml/${livecheck.name}/${livecheck.name}.xml"
+    		}
+    		if {${livecheck.regex} eq ""} {
+    			set livecheck.regex "<latest_release_version>(.*)</latest_release_version>"
+    		}
+    		set livecheck.check "regex"
 		}
-		if {"${livecheck.regex}" == ""} {
-			set livecheck.regex "<latest_release_version>(.*)</latest_release_version>"
+		"sourceforge" {
+    		if {![info exists homepage] || ${livecheck.url} eq ${homepage}} {
+    			set livecheck.url "http://sourceforge.net/export/rss2_projfiles.php?project=${livecheck.name}"
+    		}
+    		if {${livecheck.distname} eq "default"} {
+    		    set livecheck.distname ${livecheck.name}
+    		}
+    		if {${livecheck.regex} eq ""} {
+    			set livecheck.regex "<title>${livecheck.distname} (.*) released.*</title>"
+    		}
+    		set livecheck.check "regex"
 		}
-		set livecheck.check "regex"
-	} elseif {"${livecheck.check}" == "sourceforge"} {
-		if {![info exists homepage] || [string equal "${livecheck.url}" "${homepage}"]} {
-			set livecheck.url "http://sourceforge.net/export/rss2_projfiles.php?project=${livecheck.name}"
+		"googlecode" {
+		    if {![info exists homepage] || ${livecheck.url} eq ${homepage}} {
+		        set livecheck.url "http://code.google.com/p/${livecheck.name}/downloads/list"
+		    }
+		    if {${livecheck.distname} eq "default"} {
+		        set livecheck.distname [regsub ***=${livecheck.version} [file tail [lindex ${distfiles} 0]] (.*)]
+		    }
+		    if {${livecheck.regex} eq ""} {
+		        set livecheck.regex {<a href="http://${livecheck.name}.googlecode.com/files/${livecheck.distname}"}
+		    }
+		    set livecheck.check "regex"
 		}
-		if {"${livecheck.regex}" == ""} {
-			set livecheck.regex "<title>${livecheck.name} (.*) released.*</title>"
-		}
-		set livecheck.check "regex"
 	}
 	
 	switch ${livecheck.check} {
 		"regex" -
 		"regexm" {
 			# single and multiline regex
+			ui_debug "Fetching ${livecheck.url}"
 			if {[catch {curl fetch ${livecheck.url} $tempfile} error]} {
 				ui_error "cannot check if $portname was updated ($error)"
 			} else {
@@ -143,11 +167,14 @@
 				}
 				close $chan
 				if {$updated < 0} {
+					ui_debug "regex is >$the_re<"
+					ui_debug "url is >${livecheck.url}<"
 					ui_error "cannot check if $portname was updated (regex didn't match)"
 				}
 			}
 		}
 		"md5" {
+		    ui_debug "Fetching ${livecheck.url}"
 			if {[catch {curl fetch ${livecheck.url} $tempfile} error]} {
 				ui_error "cannot check if $portname was updated ($error)"
 			} else {
@@ -182,7 +209,7 @@
 		if {$updated > 0} {
 			ui_msg "$portname seems to have been updated (port version: ${livecheck.version}, new version: $updated_version)"
 		} elseif {$updated == 0} {
-			ui_debug "$portname seems to be up to date"
+			ui_info "$portname seems to be up to date"
 		}
 	}
 }

Modified: branches/release_1_4/base/src/port1.0/portmain.tcl
===================================================================
--- branches/release_1_4/base/src/port1.0/portmain.tcl	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/port1.0/portmain.tcl	2007-04-14 03:46:37 UTC (rev 23969)
@@ -94,8 +94,32 @@
 if {[info exists os.platform] && ![info exists variations(${os.platform})]} { variant_set ${os.platform}}
 if {[info exists os.arch] && ![info exists variations(${os.arch})]} { variant_set ${os.arch} }
 if {[info exists os.platform] && (${os.platform} == "darwin") && ![file isdirectory /System/Library/Frameworks/Carbon.framework] && ![info exists variations(puredarwin)]} { variant_set puredarwin }
-if {[info exists os.platform] && (${os.platform} == "darwin") && [file isdirectory /System/Library/Frameworks/Carbon.framework] && ![info exists variations(macosx)]} { variant_set macosx }
+if {[info exists os.platform] && (${os.platform} == "darwin") && [file isdirectory /System/Library/Frameworks/Carbon.framework] && ![info exists variations(macosx)]} {
+	variant_set macosx
+	# Declare default universal variant, on >10.3
+	variant universal {
+		if {[tbool use_xmkmf] || ![tbool use_configure]} {
+			return -code error "Default universal variant only works with ports based on configure"
+		}
+		configure.args-append ${configure.universal_args}
+		if {![file exists /Developer/SDKs/MacOSX10.4u.sdk/]} {
+			return -code error "MacOS X 10.4 universal SDK is not installed (are we running on 10.3? did you forget to install it?) and building with +universal will very likely fail"
+		}
+		configure.cflags-append ${configure.universal_cflags}
+		configure.cppflags-append ${configure.universal_cppflags}
+		configure.cxxflags-append ${configure.universal_cxxflags}
+		configure.ldflags-append ${configure.universal_ldflags}
+	}
 
+	# This is not a standard option, because we need to take an action when it's
+	# set, in order to alter the PortInfo structure in time.
+	proc universal_variant {state} {
+		if {${state} == "no"} {
+			variant_undef universal
+		}
+	}
+}
+
 proc main {args} {
     return 0
 }

Modified: branches/release_1_4/base/src/port1.0/portpatch.tcl
===================================================================
--- branches/release_1_4/base/src/port1.0/portpatch.tcl	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/port1.0/portpatch.tcl	2007-04-14 03:46:37 UTC (rev 23969)
@@ -79,9 +79,9 @@
 	}
 	switch -glob -- [file tail $patch] {
 	    *.Z -
-	    *.gz {system "$gzcat \"$patch\" | ([command patch])"}
-	    *.bz2 {system "bzcat \"$patch\" | ([command patch])"}
-	    default {system "[command patch] < \"$patch\""}
+	    *.gz {command_exec patch "$gzcat \"$patch\" | (" ")"}
+	    *.bz2 {command_exec patch "bzcat \"$patch\" | (" ")"}
+	    default {command_exec patch "" "< '$patch'"}
 	}
     }
     return 0

Modified: branches/release_1_4/base/src/port1.0/porttest.tcl
===================================================================
--- branches/release_1_4/base/src/port1.0/porttest.tcl	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/port1.0/porttest.tcl	2007-04-14 03:46:37 UTC (rev 23969)
@@ -7,7 +7,7 @@
 
 set com.apple.test [target_new com.apple.test test_main]
 target_provides ${com.apple.test} test
-target_requires ${com.apple.test} build
+target_requires ${com.apple.test} main fetch extract checksum patch configure build
 target_prerun ${com.apple.test} test_start
 
 # define options
@@ -30,7 +30,7 @@
 proc test_main {args} {
     global portname test.run
     if {[tbool test.run]} {
-    	system "[command test]"
+    	command_exec test
     } else {
 	return -code error [format [msgcat::mc "%s has no tests turned on. see 'test.run' in portfile(7)"] $portname]
     }

Modified: branches/release_1_4/base/src/port1.0/portutil.tcl
===================================================================
--- branches/release_1_4/base/src/port1.0/portutil.tcl	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/port1.0/portutil.tcl	2007-04-14 03:46:37 UTC (rev 23969)
@@ -202,10 +202,9 @@
     }
 }
 
-# command
-# Given a command name, command assembled a string
+# Given a command name, assemble a command string
 # composed of the command options.
-proc command {command} {
+proc command_string {command} {
     global ${command}.dir ${command}.pre_args ${command}.args ${command}.post_args ${command}.env ${command}.type ${command}.cmd
     
     set cmdstring ""
@@ -213,12 +212,6 @@
 	set cmdstring "cd \"[set ${command}.dir]\" &&"
     }
     
-    if {[info exists ${command}.env]} {
-	foreach string [set ${command}.env] {
-	    set cmdstring "$cmdstring $string"
-	}
-    }
-    
     if {[info exists ${command}.cmd]} {
 	foreach string [set ${command}.cmd] {
 	    set cmdstring "$cmdstring $string"
@@ -237,6 +230,70 @@
     return $cmdstring
 }
 
+# Given a command name, execute it with the options.
+# command_exec command [-notty] [command_prefix [command_suffix]]
+# command			name of the command
+# command_prefix	additional command prefix (typically pipe command)
+# command_suffix	additional command suffix (typically redirection)
+proc command_exec {command args} {
+	global ${command}.env ${command}.env_array env
+	set notty 0
+	set command_prefix ""
+	set command_suffix ""
+
+	if {[llength $args] > 0} {
+		if {[lindex $args 0] == "-notty"} {
+			set notty 1
+			set args [lrange $args 1 end]
+		}
+
+		if {[llength $args] > 0} {
+			set command_prefix [lindex $args 0]
+			if {[llength $args] > 1} {
+				set command_suffix [lindex $args 1]
+			}
+		}
+	}
+	
+	# Set the environment.
+	# If the array doesn't exist, we create it with the value
+	# coming from ${command}.env
+	# Otherwise, it means the caller actually played with the environment
+	# array already (e.g. configure flags).
+	if {![array exists ${command}.env_array]} {
+		parse_environment ${command}
+	}
+	
+	# Debug that.
+    ui_debug "Environment: [environment_array_to_string ${command}.env_array]"
+
+	# Get the command string.
+	set cmdstring [command_string ${command}]
+	
+	# Call this command.
+	# TODO: move that to the system native call?
+	# Save the environment.
+	array set saved_env [array get env]
+	# Set the overriden variables from the portfile.
+	array set env [array get ${command}.env_array]
+	# Call the command.
+	set fullcmdstring "$command_prefix $cmdstring $command_suffix"
+	if {$notty} {
+		set code [catch {system -notty $fullcmdstring} result]
+	} else {
+		set code [catch {system $fullcmdstring} result]
+	}
+	# Unset the command array until next time.
+	array unset ${command}.env_array
+	
+	# Restore the environment.
+	array unset env *
+	array set env [array get saved_env]
+
+	# Return as if system had been called directly.	
+	return -code $code $result
+}
+
 # default
 # Sets a variable to the supplied default if it does not exist,
 # and adds a variable trace. The variable traces allows for delayed
@@ -346,6 +403,28 @@
     set variations($name) -
 }
 
+# variant_undef name
+# Undefine a variant for the current portfile.
+proc variant_undef {name} {
+    global variations PortInfo
+    
+    # Remove it from the list of selected variations.
+    array unset variations $name
+
+	# Remove the variant from the portinfo.
+	if {[info exists PortInfo(variants)]} {
+		set variant_index [lsearch -exact $PortInfo(variants) $name]
+		if {$variant_index >= 0} {
+			set new_list [lreplace $PortInfo(variants) $variant_index $variant_index]
+			if {"$new_list" == {}} {
+				unset PortInfo(variants) 
+			} else {
+				set PortInfo(variants) $new_list
+			}
+		}
+	}
+}
+
 # platform <os> [<release>] [<arch>] 
 # Portfile level procedure to provide support for declaring platform-specifics
 # Basically, just wrap 'variant', so that Portfiles' platform declarations can
@@ -401,6 +480,76 @@
     }
 }
 
+########### Environment utility functions ###########
+
+# Parse the environment string of a command, storing the values into the
+# associated environment array.
+proc parse_environment {command} {
+	global ${command}.env ${command}.env_array
+
+	if {[info exists ${command}.env]} {
+		# Flatten the environment string.
+		set the_environment ""
+		foreach str [set ${command}.env] {
+			set the_environment "$the_environment $str"
+		}
+	
+		while {[regexp "^(?: *)(\[^= \]+)=(\"|'|)(\[^\"'\].*?)\\2(?: +|$)(.*)$" ${the_environment} matchVar key delimiter value remaining]} {
+			set the_environment ${remaining}
+			set ${command}.env_array(${key}) ${value}
+		}
+	} else {
+		array set ${command}.env_array {}
+	}
+}
+
+# Append to the value in the parsed environment.
+# Leave the environment untouched if the value is empty.
+proc append_to_environment_value {command key value} {
+	global ${command}.env_array
+
+	if {[string length $value] == 0} {
+		return
+	}
+
+	# Parse out any delimiter.
+	set append_value $value
+	if {[regexp {^("|')(.*)\1$} $append_value matchVar append_delim matchedValue]} {
+		set append_value $matchedValue
+	}
+
+	if {[info exists ${command}.env_array($key)]} {
+		set original_value [set ${command}.env_array($key)]
+		set ${command}.env_array($key) "${original_value} ${append_value}"
+	} else {
+		set ${command}.env_array($key) $append_value
+	}
+}
+
+# Append several items to a value in the parsed environment.
+proc append_list_to_environment_value {command key vallist} {
+	foreach {value} $vallist {
+		append_to_environment_value ${command} $key $value
+	}
+}
+
+# Build the environment as a string.
+# Remark: this method is only used for debugging purposes.
+proc environment_array_to_string {environment_array} {
+	upvar 1 ${environment_array} env_array
+	
+	set theString ""
+	foreach {key value} [array get env_array] {
+		if {$theString == ""} {
+			set theString "$key='$value'"
+		} else {
+			set theString "${theString} $key='$value'"
+		}
+	}
+	
+	return $theString
+}
+
 ########### Distname utility functions ###########
 
 # Given a distribution file name, return the appended tag
@@ -744,7 +893,7 @@
     eval "proc $name {} $body"
 }
 
-########### Internal Dependancy Manipulation Procedures ###########
+########### Internal Dependency Manipulation Procedures ###########
 
 proc target_run {ditem} {
     global target_state_fd portpath portname portversion portrevision portvariants ports_force variations workpath ports_trace PortInfo
@@ -884,6 +1033,7 @@
 						
 						build		{ set deptypes "depends_lib depends_build" }
 						
+						test		-
 						destroot	-
 						install		-
 						archive		-

Modified: branches/release_1_4/base/src/port1.0/resources/fetch/mirror_sites.tcl
===================================================================
--- branches/release_1_4/base/src/port1.0/resources/fetch/mirror_sites.tcl	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/port1.0/resources/fetch/mirror_sites.tcl	2007-04-14 03:46:37 UTC (rev 23969)
@@ -86,6 +86,10 @@
     ftp://ftp.gnustep.org/pub/gnustep/
 }
 
+set portfetch::mirror_sites::sites(googlecode) {
+    http://${name}.googlecode.com/files/
+}
+
 set portfetch::mirror_sites::sites(isc) {
     ftp://ftp.isc.org/isc/
     ftp://gd.tuwien.ac.at/infosys/servers/isc/

Modified: branches/release_1_4/base/src/port1.0/resources/group/ruby-1.0.tcl
===================================================================
--- branches/release_1_4/base/src/port1.0/resources/group/ruby-1.0.tcl	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/port1.0/resources/group/ruby-1.0.tcl	2007-04-14 03:46:37 UTC (rev 23969)
@@ -102,12 +102,20 @@
 			livecheck.url	http://rubyforge.org/projects/${ruby.project}
 			livecheck.regex	"<strong>${ruby.project}</strong></td><td>REL (.*)$"
 		}
+		rubyforge_gem:* {
+			set ruby.project [lindex [split ${source} {:}] 1]
+			homepage		http://rubyforge.org/projects/${ruby.project}
+			master_sites	http://rubyforge.rubyuser.de/gems/
+			livecheck.check	regex
+			livecheck.url	http://rubyforge.org/projects/${ruby.project}
+			livecheck.regex	"<strong>${module}</strong></td><td>(?:REL )?(.*)$"
+		}
 		rubyforge_gem {
 			homepage		http://rubyforge.org/projects/${ruby.project}
 			master_sites	http://rubyforge.rubyuser.de/gems/
 			livecheck.check	regex
 			livecheck.url	http://rubyforge.org/projects/${ruby.project}
-			livecheck.regex	"<strong>${ruby.project}</strong></td><td>REL (.*)$"
+			livecheck.regex	"<strong>${module}</strong></td><td>(?:REL )?(.*)$"
 		}
 		sourceforge:* {
 			set ruby.project [lindex [split ${source} {:}] 1]

Modified: branches/release_1_4/base/src/programs/mtree/config.h.in
===================================================================
--- branches/release_1_4/base/src/programs/mtree/config.h.in	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/mtree/config.h.in	2007-04-14 03:46:37 UTC (rev 23969)
@@ -270,7 +270,7 @@
 /* Define to rpl_malloc if the replacement function should be used. */
 #undef malloc
 
-/* Define to `unsigned' if <sys/types.h> does not define. */
+/* Define to `unsigned int' if <sys/types.h> does not define. */
 #undef size_t
 
 

Modified: branches/release_1_4/base/src/programs/mtree/configure
===================================================================
--- branches/release_1_4/base/src/programs/mtree/configure	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/mtree/configure	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,28 +1,57 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for nbsd-mtree 20021009.
+# Generated by GNU Autoconf 2.61 for nbsd-mtree 20021009.
 #
 # Report bugs to <agc at netbsd.org>.
 #
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
 ## --------------------- ##
 ## M4sh Initialization.  ##
 ## --------------------- ##
 
-# Be Bourne compatible
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
-  set -o posix
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
 fi
-DUALCASE=1; export DUALCASE # for MKS sh
 
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
 # Support unset when possible.
 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
   as_unset=unset
@@ -31,8 +60,43 @@
 fi
 
 
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
 # Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
 PS1='$ '
 PS2='> '
 PS4='+ '
@@ -46,18 +110,19 @@
   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
     eval $as_var=C; export $as_var
   else
-    $as_unset $as_var
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
   fi
 done
 
 # Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
 else
   as_expr=false
 fi
 
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
   as_basename=basename
 else
   as_basename=false
@@ -65,157 +130,388 @@
 
 
 # Name of the executable.
-as_me=`$as_basename "$0" ||
+as_me=`$as_basename -- "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)$' \| \
-	 .     : '\(.\)' 2>/dev/null ||
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
-  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\/\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
 
+# CDPATH.
+$as_unset CDPATH
 
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
 
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
+if test "x$CONFIG_SHELL" = x; then
+  if (eval ":") 2>/dev/null; then
+  as_have_required=yes
+else
+  as_have_required=no
 fi
 
+  if test $as_have_required = yes && 	 (eval ":
+(as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
 
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
-  # Find who we are.  Look in the path if we contain no path at all
-  # relative or not.
-  case $0 in
-    *[\\/]* ) as_myself=$0 ;;
-    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
 
-       ;;
-  esac
-  # We did not find ourselves, most probably we were run as `sh COMMAND'
-  # in which case we are not to be found in the path.
-  if test "x$as_myself" = x; then
-    as_myself=$0
-  fi
-  if test ! -f "$as_myself"; then
-    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
-   { (exit 1); exit 1; }; }
-  fi
-  case $CONFIG_SHELL in
-  '')
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=\$LINENO
+  as_lineno_2=\$LINENO
+  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+  :
+else
+  as_candidate_shells=
     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for as_base in sh bash ksh sh5; do
-	 case $as_dir in
+  case $as_dir in
 	 /*)
-	   if ("$as_dir/$as_base" -c '
+	   for as_base in sh bash ksh sh5; do
+	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+	   done;;
+       esac
+done
+IFS=$as_save_IFS
+
+
+      for as_shell in $as_candidate_shells $SHELL; do
+	 # Try only shells that exist, to save several forks.
+	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		{ ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+_ASEOF
+}; then
+  CONFIG_SHELL=$as_shell
+	       as_have_required=yes
+	       if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+  (exit $1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
   as_lineno_1=$LINENO
   as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
   test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
-	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
-	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
-	     CONFIG_SHELL=$as_dir/$as_base
-	     export CONFIG_SHELL
-	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
-	   fi;;
-	 esac
-       done
-done
-;;
-  esac
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
 
+_ASEOF
+}; then
+  break
+fi
+
+fi
+
+      done
+
+      if test "x$CONFIG_SHELL" != x; then
+  for as_var in BASH_ENV ENV
+        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+        done
+        export CONFIG_SHELL
+        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+    if test $as_have_required = no; then
+  echo This script requires a shell more modern than all the
+      echo shells that I found on your system.  Please install a
+      echo modern shell, or manually run the script under such a
+      echo shell if you do have one.
+      { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+  echo No shell found that supports shell functions.
+  echo Please tell autoconf at gnu.org about your system,
+  echo including any error possibly output before this
+  echo message
+}
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
   # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line before each line; the second 'sed' does the real
-  # work.  The second script uses 'N' to pair each line-number line
-  # with the numbered line, and appends trailing '-' during
-  # substitution so that $LINENO is not a special case at line end.
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
-  sed '=' <$as_myself |
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
     sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
       N
-      s,$,-,
-      : loop
-      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
       t loop
-      s,-$,,
-      s,^['$as_cr_digits']*\n,,
+      s/-\n.*//
     ' >$as_me.lineno &&
-  chmod +x $as_me.lineno ||
+  chmod +x "$as_me.lineno" ||
     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
    { (exit 1); exit 1; }; }
 
   # Don't try to exec as it changes $[0], causing all sort of problems
   # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensible to this).
-  . ./$as_me.lineno
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
   # Exit status is that of the last command.
   exit
 }
 
 
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
-  *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T='	' ;;
-  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
-  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
 esac
 
-if expr a : '\(a\)' >/dev/null 2>&1; then
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
 else
   as_expr=false
 fi
 
 rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir
+fi
 echo >conf$$.file
 if ln -s conf$$.file conf$$ 2>/dev/null; then
-  # We could just check for DJGPP; but this test a) works b) is more generic
-  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
-  if test -f conf$$.exe; then
-    # Don't use ln at all; we don't have any links
+  as_ln_s='ln -s'
+  # ... but there are two gotchas:
+  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+  # In both cases, we have to default to `cp -p'.
+  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
     as_ln_s='cp -p'
-  else
-    as_ln_s='ln -s'
-  fi
 elif ln conf$$.file conf$$ 2>/dev/null; then
   as_ln_s=ln
 else
   as_ln_s='cp -p'
 fi
-rm -f conf$$ conf$$.exe conf$$.file
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
 
 if mkdir -p . 2>/dev/null; then
   as_mkdir_p=:
@@ -224,7 +520,28 @@
   as_mkdir_p=false
 fi
 
-as_executable_p="test -f"
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+        test -d "$1/.";
+      else
+	case $1 in
+        -*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -233,39 +550,27 @@
 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" 	$as_nl"
 
-# CDPATH.
-$as_unset CDPATH
+exec 7<&0 </dev/null 6>&1
 
-
 # Name of the host.
 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
 # so uname gets run too.
 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 
-exec 6>&1
-
 #
 # Initializations.
 #
 ac_default_prefix=/usr/local
+ac_clean_files=
 ac_config_libobj_dir=.
+LIBOBJS=
 cross_compiling=no
 subdirs=
 MFLAGS=
 MAKEFLAGS=
 SHELL=${CONFIG_SHELL-/bin/sh}
 
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete.  It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
 # Identity of this package.
 PACKAGE_NAME='nbsd-mtree'
 PACKAGE_TARNAME='nbsd-mtree'
@@ -277,43 +582,117 @@
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
-#if HAVE_SYS_TYPES_H
+#ifdef HAVE_SYS_TYPES_H
 # include <sys/types.h>
 #endif
-#if HAVE_SYS_STAT_H
+#ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif
-#if STDC_HEADERS
+#ifdef STDC_HEADERS
 # include <stdlib.h>
 # include <stddef.h>
 #else
-# if HAVE_STDLIB_H
+# ifdef HAVE_STDLIB_H
 #  include <stdlib.h>
 # endif
 #endif
-#if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 #  include <memory.h>
 # endif
 # include <string.h>
 #endif
-#if HAVE_STRINGS_H
+#ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif
-#if HAVE_INTTYPES_H
+#ifdef HAVE_INTTYPES_H
 # include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
 #endif
-#if HAVE_UNISTD_H
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif"
 
-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 build build_cpu build_vendor build_os host host_cpu host_vendor host_os CANONICAL_HOST SET_MAKE AWK CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S AUTOCONF AUTOHEADER CPP EGREP LIBOBJS LTLIBOBJS'
+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
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias
+build
+build_cpu
+build_vendor
+build_os
+host
+host_cpu
+host_vendor
+host_os
+CANONICAL_HOST
+SET_MAKE
+AWK
+CC
+CFLAGS
+LDFLAGS
+CPPFLAGS
+ac_ct_CC
+EXEEXT
+OBJEXT
+INSTALL_PROGRAM
+INSTALL_SCRIPT
+INSTALL_DATA
+LN_S
+AUTOCONF
+AUTOHEADER
+CPP
+GREP
+EGREP
+LIBOBJS
+LTLIBOBJS'
 ac_subst_files=''
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
 
+
 # Initialize some variables set by options.
 ac_init_help=
 ac_init_version=false
@@ -339,34 +718,48 @@
 # and all the variables that are supposed to be based on exec_prefix
 # by default will actually change.
 # Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
 bindir='${exec_prefix}/bin'
 sbindir='${exec_prefix}/sbin'
 libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
 
 ac_prev=
+ac_dashdash=
 for ac_option
 do
   # If the previous option needs an argument, assign it.
   if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
+    eval $ac_prev=\$ac_option
     ac_prev=
     continue
   fi
 
-  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+  case $ac_option in
+  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *)	ac_optarg=yes ;;
+  esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
 
-  case $ac_option in
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
 
   -bindir | --bindir | --bindi | --bind | --bin | --bi)
     ac_prev=bindir ;;
@@ -388,33 +781,45 @@
   --config-cache | -C)
     cache_file=config.cache ;;
 
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+  -datadir | --datadir | --datadi | --datad)
     ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
     datadir=$ac_optarg ;;
 
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
   -disable-* | --disable-*)
     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
    { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
-    eval "enable_$ac_feature=no" ;;
+    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+    eval enable_$ac_feature=no ;;
 
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
   -enable-* | --enable-*)
     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
    { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
-    case $ac_option in
-      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_$ac_feature='$ac_optarg'" ;;
+    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+    eval enable_$ac_feature=\$ac_optarg ;;
 
   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -441,6 +846,12 @@
   -host=* | --host=* | --hos=* | --ho=*)
     host_alias=$ac_optarg ;;
 
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
   -includedir | --includedir | --includedi | --included | --include \
   | --includ | --inclu | --incl | --inc)
     ac_prev=includedir ;;
@@ -465,13 +876,16 @@
   | --libexe=* | --libex=* | --libe=*)
     libexecdir=$ac_optarg ;;
 
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
   -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
+  | --localstate | --localstat | --localsta | --localst | --locals)
     ac_prev=localstatedir ;;
   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
     localstatedir=$ac_optarg ;;
 
   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
@@ -536,6 +950,16 @@
   | --progr-tra=* | --program-tr=* | --program-t=*)
     program_transform_name=$ac_optarg ;;
 
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
@@ -588,24 +1012,20 @@
   -with-* | --with-*)
     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
       { echo "$as_me: error: invalid package name: $ac_package" >&2
    { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case $ac_option in
-      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_$ac_package='$ac_optarg'" ;;
+    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+    eval with_$ac_package=\$ac_optarg ;;
 
   -without-* | --without-*)
     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
       { echo "$as_me: error: invalid package name: $ac_package" >&2
    { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package | sed 's/-/_/g'`
-    eval "with_$ac_package=no" ;;
+    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+    eval with_$ac_package=no ;;
 
   --x)
     # Obsolete; use --with-x.
@@ -636,8 +1056,7 @@
     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
    { (exit 1); exit 1; }; }
-    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
-    eval "$ac_envvar='$ac_optarg'"
+    eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
 
   *)
@@ -657,29 +1076,21 @@
    { (exit 1); exit 1; }; }
 fi
 
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
+# Be sure to have absolute directory names.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
 do
-  eval ac_val=$`echo $ac_var`
+  eval ac_val=\$$ac_var
   case $ac_val in
-    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
-    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; };;
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
+  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; }
 done
 
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
-	      localstatedir libdir includedir oldincludedir infodir mandir
-do
-  eval ac_val=$`echo $ac_var`
-  case $ac_val in
-    [\\/$]* | ?:[\\/]* ) ;;
-    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; };;
-  esac
-done
-
 # There might be people who depend on the old broken behavior: `$host'
 # used to hold the argument of --host etc.
 # FIXME: To remove some day.
@@ -704,74 +1115,76 @@
 test "$silent" = yes && exec 6>/dev/null
 
 
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  { echo "$as_me: error: Working directory cannot be determined" >&2
+   { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  { echo "$as_me: error: pwd does not report name of working directory" >&2
+   { (exit 1); exit 1; }; }
+
+
 # Find the source files, if location was not specified.
 if test -z "$srcdir"; then
   ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_confdir=`(dirname "$0") 2>/dev/null ||
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$0" ||
 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$0" : 'X\(//\)[^/]' \| \
 	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 echo X"$0" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
   srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
+  if test ! -r "$srcdir/$ac_unique_file"; then
     srcdir=..
   fi
 else
   ac_srcdir_defaulted=no
 fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
    { (exit 1); exit 1; }; }
-  else
-    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
    { (exit 1); exit 1; }; }
-  fi
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
 fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
-  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
-   { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
 
 #
 # Report the --help message.
@@ -800,9 +1213,6 @@
   -n, --no-create         do not create output files
       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
 
-_ACEOF
-
-  cat <<_ACEOF
 Installation directories:
   --prefix=PREFIX         install architecture-independent files in PREFIX
 			  [$ac_default_prefix]
@@ -820,15 +1230,22 @@
   --bindir=DIR           user executables [EPREFIX/bin]
   --sbindir=DIR          system admin executables [EPREFIX/sbin]
   --libexecdir=DIR       program executables [EPREFIX/libexec]
-  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
   --libdir=DIR           object code libraries [EPREFIX/lib]
   --includedir=DIR       C header files [PREFIX/include]
   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
-  --infodir=DIR          info documentation [PREFIX/info]
-  --mandir=DIR           man documentation [PREFIX/man]
+  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR          info documentation [DATAROOTDIR/info]
+  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR           man documentation [DATAROOTDIR/man]
+  --docdir=DIR           documentation root [DATAROOTDIR/doc/nbsd-mtree]
+  --htmldir=DIR          html documentation [DOCDIR]
+  --dvidir=DIR           dvi documentation [DOCDIR]
+  --pdfdir=DIR           pdf documentation [DOCDIR]
+  --psdir=DIR            ps documentation [DOCDIR]
 _ACEOF
 
   cat <<\_ACEOF
@@ -855,8 +1272,9 @@
   CFLAGS      C compiler flags
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
               nonstandard directory <lib dir>
-  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
-              headers in a nonstandard directory <include dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
   CPP         C preprocessor
 
 Use these variables to override the choices made by `configure' or to help
@@ -864,120 +1282,86 @@
 
 Report bugs to <agc at netbsd.org>.
 _ACEOF
+ac_status=$?
 fi
 
 if test "$ac_init_help" = "recursive"; then
   # If there are subdirs, report their specific --help.
-  ac_popdir=`pwd`
   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    test -d $ac_dir || continue
+    test -d "$ac_dir" || continue
     ac_builddir=.
 
-if test "$ac_dir" != .; then
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A "../" for each directory in $ac_dir_suffix.
-  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
-  ac_dir_suffix= ac_top_builddir=
-fi
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
 
 case $srcdir in
-  .)  # No --srcdir option.  We are building in place.
+  .)  # We are building in place.
     ac_srcdir=.
-    if test -z "$ac_top_builddir"; then
-       ac_top_srcdir=.
-    else
-       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
-    fi ;;
-  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
     ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir ;;
-  *) # Relative path.
-    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
 esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
 
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
-  case "$ac_dir" in
-  .) ac_abs_builddir=`pwd`;;
-  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
-  *) ac_abs_builddir=`pwd`/"$ac_dir";;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
-  case ${ac_top_builddir}. in
-  .) ac_abs_top_builddir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
-  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
-  case $ac_srcdir in
-  .) ac_abs_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
-  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
-  case $ac_top_srcdir in
-  .) ac_abs_top_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
-  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
-  esac;;
-esac
-
-    cd $ac_dir
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $ac_srcdir/configure.gnu; then
-      echo
-      $SHELL $ac_srcdir/configure.gnu  --help=recursive
-    elif test -f $ac_srcdir/configure; then
-      echo
-      $SHELL $ac_srcdir/configure  --help=recursive
-    elif test -f $ac_srcdir/configure.ac ||
-	   test -f $ac_srcdir/configure.in; then
-      echo
-      $ac_configure --help
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
     else
       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi
-    cd $ac_popdir
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
   done
 fi
 
-test -n "$ac_init_help" && exit 0
+test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
 nbsd-mtree configure 20021009
-generated by GNU Autoconf 2.59
+generated by GNU Autoconf 2.61
 
-Copyright (C) 2003 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
-  exit 0
+  exit
 fi
-exec 5>config.log
-cat >&5 <<_ACEOF
+cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by nbsd-mtree $as_me 20021009, which was
-generated by GNU Autoconf 2.59.  Invocation command line was
+generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
 
 _ACEOF
+exec 5>>config.log
 {
 cat <<_ASUNAME
 ## --------- ##
@@ -996,7 +1380,7 @@
 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
@@ -1010,6 +1394,7 @@
   test -z "$as_dir" && as_dir=.
   echo "PATH: $as_dir"
 done
+IFS=$as_save_IFS
 
 } >&5
 
@@ -1031,7 +1416,6 @@
 ac_configure_args=
 ac_configure_args0=
 ac_configure_args1=
-ac_sep=
 ac_must_keep_next=false
 for ac_pass in 1 2
 do
@@ -1042,7 +1426,7 @@
     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
     | -silent | --silent | --silen | --sile | --sil)
       continue ;;
-    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+    *\'*)
       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
     esac
     case $ac_pass in
@@ -1064,9 +1448,7 @@
 	  -* ) ac_must_keep_next=true ;;
 	esac
       fi
-      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
-      # Get rid of the leading space.
-      ac_sep=" "
+      ac_configure_args="$ac_configure_args '$ac_arg'"
       ;;
     esac
   done
@@ -1077,8 +1459,8 @@
 # When interrupted or exit'd, cleanup temporary files, and complete
 # config.log.  We remove comments because anyway the quotes in there
 # would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
 trap 'exit_status=$?
   # Save into config.log some information that might help in debugging.
   {
@@ -1091,20 +1473,34 @@
 _ASBOX
     echo
     # The following way of writing the cache mishandles newlines in values,
-{
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
   (set) 2>&1 |
-    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
-    *ac_space=\ *)
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
       sed -n \
-	"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
-      ;;
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
     *)
-      sed -n \
-	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
       ;;
-    esac;
-}
+    esac |
+    sort
+)
     echo
 
     cat <<\_ASBOX
@@ -1115,22 +1511,28 @@
     echo
     for ac_var in $ac_subst_vars
     do
-      eval ac_val=$`echo $ac_var`
-      echo "$ac_var='"'"'$ac_val'"'"'"
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      echo "$ac_var='\''$ac_val'\''"
     done | sort
     echo
 
     if test -n "$ac_subst_files"; then
       cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
 _ASBOX
       echo
       for ac_var in $ac_subst_files
       do
-	eval ac_val=$`echo $ac_var`
-	echo "$ac_var='"'"'$ac_val'"'"'"
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	echo "$ac_var='\''$ac_val'\''"
       done | sort
       echo
     fi
@@ -1142,26 +1544,24 @@
 ## ----------- ##
 _ASBOX
       echo
-      sed "/^$/d" confdefs.h | sort
+      cat confdefs.h
       echo
     fi
     test "$ac_signal" != 0 &&
       echo "$as_me: caught signal $ac_signal"
     echo "$as_me: exit $exit_status"
   } >&5
-  rm -f core *.core &&
-  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
     exit $exit_status
-     ' 0
+' 0
 for ac_signal in 1 2 13 15; do
   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
 done
 ac_signal=0
 
 # confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
+rm -f -r conftest* confdefs.h
 
 # Predefined preprocessor variables.
 
@@ -1192,14 +1592,17 @@
 
 # Let the site file select an alternate cache file if it wants to.
 # Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
+if test -n "$CONFIG_SITE"; then
+  set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+  set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+  set x "$ac_default_prefix/share/config.site" \
+	"$ac_default_prefix/etc/config.site"
 fi
-for ac_site_file in $CONFIG_SITE; do
+shift
+for ac_site_file
+do
   if test -r "$ac_site_file"; then
     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
 echo "$as_me: loading site script $ac_site_file" >&6;}
@@ -1215,8 +1618,8 @@
     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
 echo "$as_me: loading cache $cache_file" >&6;}
     case $cache_file in
-      [\\/]* | ?:[\\/]* ) . $cache_file;;
-      *)                      . ./$cache_file;;
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
     esac
   fi
 else
@@ -1228,12 +1631,11 @@
 # Check that the precious variables saved in the cache have kept the same
 # value.
 ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
-	       sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+for ac_var in $ac_precious_vars; do
   eval ac_old_set=\$ac_cv_env_${ac_var}_set
   eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
-  eval ac_new_val="\$ac_env_${ac_var}_value"
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
   case $ac_old_set,$ac_new_set in
     set,)
       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
@@ -1258,8 +1660,7 @@
   # Pass precious variables to config.status.
   if test "$ac_new_set" = set; then
     case $ac_new_val in
-    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
-      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
     *) ac_arg=$ac_var=$ac_new_val ;;
     esac
     case " $ac_configure_args " in
@@ -1276,11 +1677,6 @@
    { (exit 1); exit 1; }; }
 fi
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
@@ -1305,135 +1701,175 @@
 
 
 
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+ac_config_headers="$ac_config_headers config.h"
 
-          ac_config_headers="$ac_config_headers config.h"
-
 test "$program_prefix" != NONE &&
-  program_transform_name="s,^,$program_prefix,;$program_transform_name"
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
 # Use a double $ so make ignores it.
 test "$program_suffix" != NONE &&
-  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
 # Double any \ or $.  echo might interpret backslashes.
 # By default was `s,x,x', remove it if useless.
 cat <<\_ACEOF >conftest.sed
 s/[\\$]/&&/g;s/;s,x,x,$//
 _ACEOF
 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm conftest.sed
+rm -f conftest.sed
 
 
 ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
-  if test -f $ac_dir/install-sh; then
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+  if test -f "$ac_dir/install-sh"; then
     ac_aux_dir=$ac_dir
     ac_install_sh="$ac_aux_dir/install-sh -c"
     break
-  elif test -f $ac_dir/install.sh; then
+  elif test -f "$ac_dir/install.sh"; then
     ac_aux_dir=$ac_dir
     ac_install_sh="$ac_aux_dir/install.sh -c"
     break
-  elif test -f $ac_dir/shtool; then
+  elif test -f "$ac_dir/shtool"; then
     ac_aux_dir=$ac_dir
     ac_install_sh="$ac_aux_dir/shtool install -c"
     break
   fi
 done
 if test -z "$ac_aux_dir"; then
-  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
    { (exit 1); exit 1; }; }
 fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
 
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
 # Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
-  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
    { (exit 1); exit 1; }; }
 
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
 if test "${ac_cv_build+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
-  ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
    { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
-  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
    { (exit 1); exit 1; }; }
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+echo "$as_me: error: invalid value of canonical build" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
 build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
 
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
 if test "${ac_cv_host+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
-  ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
-  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
    { (exit 1); exit 1; }; }
+fi
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+echo "$as_me: error: invalid value of canonical host" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
 host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
 CANONICAL_HOST=$host
 
 
 # Checks for programs.
-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
+set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
 all:
-	@echo 'ac_maketemp="$(MAKE)"'
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
 _ACEOF
 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
 rm -f conftest.make
 fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
   SET_MAKE=
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
   SET_MAKE="MAKE=${MAKE-make}"
 fi
 
@@ -1441,8 +1877,8 @@
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
 if test "${ac_cv_prog_AWK+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -1455,25 +1891,27 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_AWK="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 AWK=$ac_cv_prog_AWK
 if test -n "$AWK"; then
-  echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
+
   test -n "$AWK" && break
 done
 
@@ -1485,8 +1923,8 @@
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -1499,32 +1937,34 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
+
 fi
 if test -z "$ac_cv_prog_CC"; then
   ac_ct_CC=$CC
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -1537,36 +1977,51 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_CC="gcc"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
-  CC=$ac_ct_CC
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
 else
   CC="$ac_cv_prog_CC"
 fi
 
 if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -1579,74 +2034,34 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
+
   fi
-done
-done
-
 fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  CC=$ac_ct_CC
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-fi
 if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -1660,7 +2075,7 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
        continue
@@ -1671,6 +2086,7 @@
   fi
 done
 done
+IFS=$as_save_IFS
 
 if test $ac_prog_rejected = yes; then
   # We found a bogon in the path, so make sure we never use it.
@@ -1688,22 +2104,23 @@
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
+
 fi
 if test -z "$CC"; then
   if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl
+  for ac_prog in cl.exe
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -1716,36 +2133,38 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
+
     test -n "$CC" && break
   done
 fi
 if test -z "$CC"; then
   ac_ct_CC=$CC
-  for ac_prog in cl
+  for ac_prog in cl.exe
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -1758,29 +2177,45 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
+
   test -n "$ac_ct_CC" && break
 done
 
-  CC=$ac_ct_CC
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
 fi
 
 fi
@@ -1793,21 +2228,35 @@
    { (exit 1); exit 1; }; }
 
 # Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
-     "checking for C compiler version" >&5
+echo "$as_me:$LINENO: checking for C compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
-  (eval $ac_compiler --version </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
-  (eval $ac_compiler -v </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
-  (eval $ac_compiler -V </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
@@ -1832,47 +2281,77 @@
 # Try to create an executable without -o first, disregard a.out.
 # It will help us diagnose broken compilers, and finding out an intuition
 # of exeext.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
-  (eval $ac_link_default) 2>&5
+#
+# List of possible output files, starting from the most likely.
+# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
+# only as a last resort.  b.out is created by i960 compilers.
+ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
+#
+# The IRIX 6 linker writes into existing files which may not be
+# executable, retaining their permissions.  Remove them first so a
+# subsequent execution test works.
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { (ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link_default") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-  # Find the output, starting from the most likely.  This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
 do
   test -f "$ac_file" || continue
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
 	;;
-    conftest.$ac_ext )
-	# This is the source file.
-	;;
     [ab].out )
 	# We found the default executable, but exeext='' is most
 	# certainly right.
 	break;;
     *.* )
-	ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	# FIXME: I believe we export ac_cv_exeext for Libtool,
-	# but it would be cool to find out if it's true.  Does anybody
-	# maintain Libtool? --akim.
-	export ac_cv_exeext
+        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+	then :; else
+	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	fi
+	# We set ac_cv_exeext here because the later test for it is not
+	# safe: cross compilers may not add the suffix if given an `-o'
+	# argument, so we may need to know it at that point already.
+	# Even if this section looks crufty: it has the advantage of
+	# actually working.
 	break;;
     * )
 	break;;
   esac
 done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
 else
+  ac_file=''
+fi
+
+{ echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6; }
+if test -z "$ac_file"; then
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
@@ -1884,19 +2363,21 @@
 fi
 
 ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
 
-# Check the compiler produces executables we can run.  If not, either
+# Check that the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
 # If not cross compiling, check that we can run a simple program.
 if test "$cross_compiling" != yes; then
   if { ac_try='./$ac_file'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
@@ -1915,22 +2396,27 @@
     fi
   fi
 fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 
 rm -f a.out a.exe conftest$ac_cv_exeext b.out
 ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run.  If not, either
+# Check that the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
+{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6; }
 
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
@@ -1941,9 +2427,8 @@
 for ac_file in conftest.exe conftest conftest.*; do
   test -f "$ac_file" || continue
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	  export ac_cv_exeext
 	  break;;
     * ) break;;
   esac
@@ -1957,14 +2442,14 @@
 fi
 
 rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6; }
 
 rm -f conftest.$ac_ext
 EXEEXT=$ac_cv_exeext
 ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
 if test "${ac_cv_objext+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -1984,14 +2469,20 @@
 }
 _ACEOF
 rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
        break;;
   esac
@@ -2009,12 +2500,12 @@
 
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6; }
 OBJEXT=$ac_cv_objext
 ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
 if test "${ac_cv_c_compiler_gnu+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -2037,50 +2528,49 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_compiler_gnu=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_compiler_gnu=no
+	ac_compiler_gnu=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
 GCC=`test $ac_compiler_gnu = yes && echo yes`
 ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
 if test "${ac_cv_prog_cc_g+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -2096,38 +2586,118 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	CFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_prog_cc_g=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_prog_cc_g=no
+
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
 if test "$ac_test_CFLAGS" = set; then
   CFLAGS=$ac_save_CFLAGS
 elif test $ac_cv_prog_cc_g = yes; then
@@ -2143,12 +2713,12 @@
     CFLAGS=
   fi
 fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
+{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_prog_cc_stdc=no
+  ac_cv_prog_cc_c89=no
 ac_save_CC=$CC
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -2182,12 +2752,17 @@
 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
    function prototypes and stuff, but not '\xHH' hex character constants.
    These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std1 is added to get
+   as 'x'.  The following induces an error, until -std is added to get
    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
    array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std1.  */
+   that's true only with -std.  */
 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
 
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
 int test (int i, double x);
 struct s1 {int (*f) (int a);};
 struct s2 {int (*f) (double a);};
@@ -2202,205 +2777,57 @@
   return 0;
 }
 _ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX			-qlanglvl=ansi
-# Ultrix and OSF/1	-std1
-# HP-UX 10.20 and later	-Ae
-# HP-UX older versions	-Aa -D_HPUX_SOURCE
-# SVR4			-Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
 do
   CC="$ac_save_CC $ac_arg"
   rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_prog_cc_stdc=$ac_arg
-break
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_c89=$ac_arg
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+
 fi
-rm -f conftest.err conftest.$ac_objext
+
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
 done
-rm -f conftest.$ac_ext conftest.$ac_objext
+rm -f conftest.$ac_ext
 CC=$ac_save_CC
 
 fi
-
-case "x$ac_cv_prog_cc_stdc" in
-  x|xno)
-    echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6; } ;;
+  xno)
+    { echo "$as_me:$LINENO: result: unsupported" >&5
+echo "${ECHO_T}unsupported" >&6; } ;;
   *)
-    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
-    CC="$CC $ac_cv_prog_cc_stdc" ;;
+    CC="$CC $ac_cv_prog_cc_c89"
+    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
 esac
 
-# Some people use a C++ compiler to compile C.  Since we use `exit',
-# in C++ we need to declare it.  In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
-  choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  for ac_declaration in \
-   '' \
-   'extern "C" void std::exit (int) throw (); using std::exit;' \
-   'extern "C" void std::exit (int); using std::exit;' \
-   'extern "C" void exit (int) throw ();' \
-   'extern "C" void exit (int);' \
-   'void exit (int);'
-do
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_declaration
-int
-main ()
-{
-exit (42);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
-  echo '#ifdef __cplusplus' >>confdefs.h
-  echo $ac_declaration      >>confdefs.h
-  echo '#endif'             >>confdefs.h
-fi
-
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2420,8 +2847,8 @@
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # OS/2's system install, which has a completely different semantic
 # ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
 if test -z "$INSTALL"; then
 if test "${ac_cv_path_install+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2443,7 +2870,7 @@
     # by default.
     for ac_prog in ginstall scoinst install; do
       for ac_exec_ext in '' $ac_executable_extensions; do
-	if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
 	  if test $ac_prog = install &&
 	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
 	    # AIX install.  It has an incompatible calling convention.
@@ -2462,21 +2889,22 @@
     ;;
 esac
 done
+IFS=$as_save_IFS
 
 
 fi
   if test "${ac_cv_path_install+set}" = set; then
     INSTALL=$ac_cv_path_install
   else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
     # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
+    # removed, or if the value is a relative name.
     INSTALL=$ac_install_sh
   fi
 fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6
+{ echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6; }
 
 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
 # It thinks the first close brace ends the variable substitution.
@@ -2486,15 +2914,15 @@
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
-echo "$as_me:$LINENO: checking whether ln -s works" >&5
-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
 LN_S=$as_ln_s
 if test "$LN_S" = "ln -s"; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-echo "${ECHO_T}no, using $LN_S" >&6
+  { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6; }
 fi
 
 
@@ -2509,8 +2937,8 @@
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -2544,24 +2972,22 @@
 #endif
 		     Syntax error
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   :
 else
   echo "$as_me: failed program was:" >&5
@@ -2570,9 +2996,10 @@
   # Broken: fails on valid input.
 continue
 fi
+
 rm -f conftest.err conftest.$ac_ext
 
-  # OK, works on sane cases.  Now check whether non-existent headers
+  # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -2582,24 +3009,22 @@
 /* end confdefs.h.  */
 #include <ac_nonexistent.h>
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   # Broken: success on invalid input.
 continue
 else
@@ -2610,6 +3035,7 @@
 ac_preproc_ok=:
 break
 fi
+
 rm -f conftest.err conftest.$ac_ext
 
 done
@@ -2627,8 +3053,8 @@
 else
   ac_cv_prog_CPP=$CPP
 fi
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6
+{ echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6; }
 ac_preproc_ok=false
 for ac_c_preproc_warn_flag in '' yes
 do
@@ -2651,24 +3077,22 @@
 #endif
 		     Syntax error
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   :
 else
   echo "$as_me: failed program was:" >&5
@@ -2677,9 +3101,10 @@
   # Broken: fails on valid input.
 continue
 fi
+
 rm -f conftest.err conftest.$ac_ext
 
-  # OK, works on sane cases.  Now check whether non-existent headers
+  # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -2689,24 +3114,22 @@
 /* end confdefs.h.  */
 #include <ac_nonexistent.h>
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   # Broken: success on invalid input.
 continue
 else
@@ -2717,6 +3140,7 @@
 ac_preproc_ok=:
 break
 fi
+
 rm -f conftest.err conftest.$ac_ext
 
 done
@@ -2739,23 +3163,170 @@
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
+{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
-    then ac_cv_prog_egrep='grep -E'
-    else ac_cv_prog_egrep='egrep'
+  # Extract the first word of "grep ggrep" to use in msg output
+if test -z "$GREP"; then
+set dummy grep ggrep; ac_prog_name=$2
+if test "${ac_cv_path_GREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_path_GREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in grep ggrep; do
+  for ac_exec_ext in '' $ac_executable_extensions; do
+    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+    # Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
     fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+    $ac_path_GREP_found && break 3
+  done
+done
+
+done
+IFS=$as_save_IFS
+
+
 fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
 
+GREP="$ac_cv_path_GREP"
+if test -z "$GREP"; then
+  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     # Extract the first word of "egrep" to use in msg output
+if test -z "$EGREP"; then
+set dummy egrep; ac_prog_name=$2
+if test "${ac_cv_path_EGREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_path_EGREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in egrep; do
+  for ac_exec_ext in '' $ac_executable_extensions; do
+    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+    # Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+    $ac_path_EGREP_found && break 3
+  done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+EGREP="$ac_cv_path_EGREP"
+if test -z "$EGREP"; then
+  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+
+   fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
 if test "${ac_cv_header_stdc+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -2779,36 +3350,32 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_header_stdc=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_header_stdc=no
+	ac_cv_header_stdc=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
   cat >conftest.$ac_ext <<_ACEOF
@@ -2863,6 +3430,7 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include <ctype.h>
+#include <stdlib.h>
 #if ((' ' & 0x0FF) == 0x020)
 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
@@ -2882,18 +3450,27 @@
   for (i = 0; i < 256; i++)
     if (XOR (islower (i), ISLOWER (i))
 	|| toupper (i) != TOUPPER (i))
-      exit(2);
-  exit (0);
+      return 2;
+  return 0;
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
@@ -2906,12 +3483,14 @@
 ( exit $ac_status )
 ac_cv_header_stdc=no
 fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
+
+
 fi
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
 if test $ac_cv_header_stdc = yes; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -2934,9 +3513,9 @@
 		  inttypes.h stdint.h unistd.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -2950,38 +3529,35 @@
 #include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   eval "$as_ac_Header=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-eval "$as_ac_Header=no"
+	eval "$as_ac_Header=no"
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<_ACEOF
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
@@ -3014,18 +3590,19 @@
 for ac_header in assert.h dirent.h err.h errno.h fcntl.h fnmatch.h fts.h limits.h inttypes.h md5.h md5global.h machine/endian.h netdb.h pwd.h rmd160.h sha1.h signal.h termios.h utmp.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 else
   # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -3036,41 +3613,37 @@
 #include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_header_compiler=no
+	ac_header_compiler=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
 # Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -3079,24 +3652,22 @@
 /* end confdefs.h.  */
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   ac_header_preproc=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -3104,9 +3675,10 @@
 
   ac_header_preproc=no
 fi
+
 rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
 
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -3130,25 +3702,24 @@
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
+    ( cat <<\_ASBOX
 ## ----------------------------- ##
 ## Report this to agc at netbsd.org ##
 ## ----------------------------- ##
 _ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   eval "$as_ac_Header=\$ac_header_preproc"
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 
 fi
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
@@ -3166,18 +3737,19 @@
 for ac_header in sys/bitypes.h sys/byteorder.h sys/cdefs.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 else
   # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -3188,41 +3760,37 @@
 #include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_header_compiler=no
+	ac_header_compiler=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
 # Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -3231,24 +3799,22 @@
 /* end confdefs.h.  */
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   ac_header_preproc=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -3256,9 +3822,10 @@
 
   ac_header_preproc=no
 fi
+
 rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
 
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -3282,25 +3849,24 @@
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
+    ( cat <<\_ASBOX
 ## ----------------------------- ##
 ## Report this to agc at netbsd.org ##
 ## ----------------------------- ##
 _ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   eval "$as_ac_Header=\$ac_header_preproc"
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 
 fi
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
@@ -3323,18 +3889,19 @@
 for ac_header in sys/endian.h sys/file.h sys/mkdev.h sys/param.h sys/queue.h sys/stat.h sys/time.h sys/ttycom.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 else
   # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -3345,41 +3912,37 @@
 #include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_header_compiler=no
+	ac_header_compiler=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
 # Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -3388,24 +3951,22 @@
 /* end confdefs.h.  */
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   ac_header_preproc=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -3413,9 +3974,10 @@
 
   ac_header_preproc=no
 fi
+
 rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
 
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -3439,25 +4001,24 @@
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
+    ( cat <<\_ASBOX
 ## ----------------------------- ##
 ## Report this to agc at netbsd.org ##
 ## ----------------------------- ##
 _ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   eval "$as_ac_Header=\$ac_header_preproc"
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 
 fi
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
@@ -3471,8 +4032,8 @@
 
 
 
-echo "$as_me:$LINENO: checking for __attribute__" >&5
-echo $ECHO_N "checking for __attribute__... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for __attribute__" >&5
+echo $ECHO_N "checking for __attribute__... $ECHO_C" >&6; }
 if test "${ac_cv___attribute__+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -3503,35 +4064,31 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv___attribute__=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv___attribute__=no
+	ac_cv___attribute__=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
 if test "$ac_cv___attribute__" = "yes"; then
@@ -3541,11 +4098,11 @@
 _ACEOF
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv___attribute__" >&5
-echo "${ECHO_T}$ac_cv___attribute__" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv___attribute__" >&5
+echo "${ECHO_T}$ac_cv___attribute__" >&6; }
 
-echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
 if test "${ac_cv_c_const+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -3563,10 +4120,10 @@
 #ifndef __cplusplus
   /* Ultrix mips cc rejects this.  */
   typedef int charset[2];
-  const charset x;
+  const charset cs;
   /* SunOS 4.1.1 cc rejects this.  */
-  char const *const *ccp;
-  char **p;
+  char const *const *pcpcc;
+  char **ppc;
   /* NEC SVR4.0.2 mips cc rejects this.  */
   struct point {int x, y;};
   static struct point const zero = {0,0};
@@ -3575,16 +4132,17 @@
      an arm of an if-expression whose if-part is not a constant
      expression */
   const char *g = "string";
-  ccp = &g + (g ? g-g : 0);
+  pcpcc = &g + (g ? g-g : 0);
   /* HPUX 7.0 cc rejects these. */
-  ++ccp;
-  p = (char**) ccp;
-  ccp = (char const *const *) p;
+  ++pcpcc;
+  ppc = (char**) pcpcc;
+  pcpcc = (char const *const *) ppc;
   { /* SCO 3.2v4 cc rejects this.  */
     char *t;
     char const *s = 0 ? (char *) 0 : (char const *) 0;
 
     *t++ = 0;
+    if (s) return 0;
   }
   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
     int x[] = {25, 17};
@@ -3603,7 +4161,9 @@
   }
   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
     const int foo = 10;
+    if (!foo) return 0;
   }
+  return !cs[0] && !zero.x;
 #endif
 
   ;
@@ -3611,38 +4171,34 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_c_const=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_c_const=no
+	ac_cv_c_const=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-echo "${ECHO_T}$ac_cv_c_const" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6; }
 if test $ac_cv_c_const = no; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -3651,8 +4207,8 @@
 
 fi
 
-echo "$as_me:$LINENO: checking for size_t" >&5
-echo $ECHO_N "checking for size_t... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for size_t" >&5
+echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
 if test "${ac_cv_type_size_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -3663,62 +4219,59 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+typedef size_t ac__type_new_;
 int
 main ()
 {
-if ((size_t *) 0)
+if ((ac__type_new_ *) 0)
   return 0;
-if (sizeof (size_t))
+if (sizeof (ac__type_new_))
   return 0;
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_type_size_t=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_type_size_t=no
+	ac_cv_type_size_t=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-echo "${ECHO_T}$ac_cv_type_size_t" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
+echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
 if test $ac_cv_type_size_t = yes; then
   :
 else
 
 cat >>confdefs.h <<_ACEOF
-#define size_t unsigned
+#define size_t unsigned int
 _ACEOF
 
 fi
 
-echo "$as_me:$LINENO: checking for long long" >&5
-echo $ECHO_N "checking for long long... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for long long" >&5
+echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
 if test "${ac_cv_type_long_long+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -3742,50 +4295,47 @@
 #include <sys/bitypes.h>
 #endif
 
+typedef long long ac__type_new_;
 int
 main ()
 {
-if ((long long *) 0)
+if ((ac__type_new_ *) 0)
   return 0;
-if (sizeof (long long))
+if (sizeof (ac__type_new_))
   return 0;
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_type_long_long=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_type_long_long=no
+	ac_cv_type_long_long=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
-echo "${ECHO_T}$ac_cv_type_long_long" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
+echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
 if test $ac_cv_type_long_long = yes; then
 
 cat >>confdefs.h <<_ACEOF
@@ -3794,8 +4344,8 @@
 
 
 fi
-echo "$as_me:$LINENO: checking for int8_t" >&5
-echo $ECHO_N "checking for int8_t... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for int8_t" >&5
+echo $ECHO_N "checking for int8_t... $ECHO_C" >&6; }
 if test "${ac_cv_type_int8_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -3819,50 +4369,47 @@
 #include <sys/bitypes.h>
 #endif
 
+typedef int8_t ac__type_new_;
 int
 main ()
 {
-if ((int8_t *) 0)
+if ((ac__type_new_ *) 0)
   return 0;
-if (sizeof (int8_t))
+if (sizeof (ac__type_new_))
   return 0;
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_type_int8_t=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_type_int8_t=no
+	ac_cv_type_int8_t=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_int8_t" >&5
-echo "${ECHO_T}$ac_cv_type_int8_t" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_type_int8_t" >&5
+echo "${ECHO_T}$ac_cv_type_int8_t" >&6; }
 if test $ac_cv_type_int8_t = yes; then
 
 cat >>confdefs.h <<_ACEOF
@@ -3871,8 +4418,8 @@
 
 
 fi
-echo "$as_me:$LINENO: checking for int16_t" >&5
-echo $ECHO_N "checking for int16_t... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for int16_t" >&5
+echo $ECHO_N "checking for int16_t... $ECHO_C" >&6; }
 if test "${ac_cv_type_int16_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -3896,50 +4443,47 @@
 #include <sys/bitypes.h>
 #endif
 
+typedef int16_t ac__type_new_;
 int
 main ()
 {
-if ((int16_t *) 0)
+if ((ac__type_new_ *) 0)
   return 0;
-if (sizeof (int16_t))
+if (sizeof (ac__type_new_))
   return 0;
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_type_int16_t=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_type_int16_t=no
+	ac_cv_type_int16_t=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_int16_t" >&5
-echo "${ECHO_T}$ac_cv_type_int16_t" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_type_int16_t" >&5
+echo "${ECHO_T}$ac_cv_type_int16_t" >&6; }
 if test $ac_cv_type_int16_t = yes; then
 
 cat >>confdefs.h <<_ACEOF
@@ -3948,8 +4492,8 @@
 
 
 fi
-echo "$as_me:$LINENO: checking for int32_t" >&5
-echo $ECHO_N "checking for int32_t... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for int32_t" >&5
+echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
 if test "${ac_cv_type_int32_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -3973,50 +4517,47 @@
 #include <sys/bitypes.h>
 #endif
 
+typedef int32_t ac__type_new_;
 int
 main ()
 {
-if ((int32_t *) 0)
+if ((ac__type_new_ *) 0)
   return 0;
-if (sizeof (int32_t))
+if (sizeof (ac__type_new_))
   return 0;
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_type_int32_t=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_type_int32_t=no
+	ac_cv_type_int32_t=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_int32_t" >&5
-echo "${ECHO_T}$ac_cv_type_int32_t" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_type_int32_t" >&5
+echo "${ECHO_T}$ac_cv_type_int32_t" >&6; }
 if test $ac_cv_type_int32_t = yes; then
 
 cat >>confdefs.h <<_ACEOF
@@ -4025,8 +4566,8 @@
 
 
 fi
-echo "$as_me:$LINENO: checking for int64_t" >&5
-echo $ECHO_N "checking for int64_t... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for int64_t" >&5
+echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
 if test "${ac_cv_type_int64_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4050,50 +4591,47 @@
 #include <sys/bitypes.h>
 #endif
 
+typedef int64_t ac__type_new_;
 int
 main ()
 {
-if ((int64_t *) 0)
+if ((ac__type_new_ *) 0)
   return 0;
-if (sizeof (int64_t))
+if (sizeof (ac__type_new_))
   return 0;
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_type_int64_t=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_type_int64_t=no
+	ac_cv_type_int64_t=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_int64_t" >&5
-echo "${ECHO_T}$ac_cv_type_int64_t" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_type_int64_t" >&5
+echo "${ECHO_T}$ac_cv_type_int64_t" >&6; }
 if test $ac_cv_type_int64_t = yes; then
 
 cat >>confdefs.h <<_ACEOF
@@ -4102,8 +4640,8 @@
 
 
 fi
-echo "$as_me:$LINENO: checking for u_int8_t" >&5
-echo $ECHO_N "checking for u_int8_t... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for u_int8_t" >&5
+echo $ECHO_N "checking for u_int8_t... $ECHO_C" >&6; }
 if test "${ac_cv_type_u_int8_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4127,50 +4665,47 @@
 #include <sys/bitypes.h>
 #endif
 
+typedef u_int8_t ac__type_new_;
 int
 main ()
 {
-if ((u_int8_t *) 0)
+if ((ac__type_new_ *) 0)
   return 0;
-if (sizeof (u_int8_t))
+if (sizeof (ac__type_new_))
   return 0;
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_type_u_int8_t=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_type_u_int8_t=no
+	ac_cv_type_u_int8_t=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_u_int8_t" >&5
-echo "${ECHO_T}$ac_cv_type_u_int8_t" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_type_u_int8_t" >&5
+echo "${ECHO_T}$ac_cv_type_u_int8_t" >&6; }
 if test $ac_cv_type_u_int8_t = yes; then
 
 cat >>confdefs.h <<_ACEOF
@@ -4179,8 +4714,8 @@
 
 
 fi
-echo "$as_me:$LINENO: checking for u_int16_t" >&5
-echo $ECHO_N "checking for u_int16_t... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for u_int16_t" >&5
+echo $ECHO_N "checking for u_int16_t... $ECHO_C" >&6; }
 if test "${ac_cv_type_u_int16_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4204,50 +4739,47 @@
 #include <sys/bitypes.h>
 #endif
 
+typedef u_int16_t ac__type_new_;
 int
 main ()
 {
-if ((u_int16_t *) 0)
+if ((ac__type_new_ *) 0)
   return 0;
-if (sizeof (u_int16_t))
+if (sizeof (ac__type_new_))
   return 0;
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_type_u_int16_t=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_type_u_int16_t=no
+	ac_cv_type_u_int16_t=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_u_int16_t" >&5
-echo "${ECHO_T}$ac_cv_type_u_int16_t" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_type_u_int16_t" >&5
+echo "${ECHO_T}$ac_cv_type_u_int16_t" >&6; }
 if test $ac_cv_type_u_int16_t = yes; then
 
 cat >>confdefs.h <<_ACEOF
@@ -4256,8 +4788,8 @@
 
 
 fi
-echo "$as_me:$LINENO: checking for u_int32_t" >&5
-echo $ECHO_N "checking for u_int32_t... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for u_int32_t" >&5
+echo $ECHO_N "checking for u_int32_t... $ECHO_C" >&6; }
 if test "${ac_cv_type_u_int32_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4281,50 +4813,47 @@
 #include <sys/bitypes.h>
 #endif
 
+typedef u_int32_t ac__type_new_;
 int
 main ()
 {
-if ((u_int32_t *) 0)
+if ((ac__type_new_ *) 0)
   return 0;
-if (sizeof (u_int32_t))
+if (sizeof (ac__type_new_))
   return 0;
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_type_u_int32_t=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_type_u_int32_t=no
+	ac_cv_type_u_int32_t=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_u_int32_t" >&5
-echo "${ECHO_T}$ac_cv_type_u_int32_t" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_type_u_int32_t" >&5
+echo "${ECHO_T}$ac_cv_type_u_int32_t" >&6; }
 if test $ac_cv_type_u_int32_t = yes; then
 
 cat >>confdefs.h <<_ACEOF
@@ -4333,8 +4862,8 @@
 
 
 fi
-echo "$as_me:$LINENO: checking for u_int64_t" >&5
-echo $ECHO_N "checking for u_int64_t... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for u_int64_t" >&5
+echo $ECHO_N "checking for u_int64_t... $ECHO_C" >&6; }
 if test "${ac_cv_type_u_int64_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4358,50 +4887,47 @@
 #include <sys/bitypes.h>
 #endif
 
+typedef u_int64_t ac__type_new_;
 int
 main ()
 {
-if ((u_int64_t *) 0)
+if ((ac__type_new_ *) 0)
   return 0;
-if (sizeof (u_int64_t))
+if (sizeof (ac__type_new_))
   return 0;
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_type_u_int64_t=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_type_u_int64_t=no
+	ac_cv_type_u_int64_t=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_u_int64_t" >&5
-echo "${ECHO_T}$ac_cv_type_u_int64_t" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_type_u_int64_t" >&5
+echo "${ECHO_T}$ac_cv_type_u_int64_t" >&6; }
 if test $ac_cv_type_u_int64_t = yes; then
 
 cat >>confdefs.h <<_ACEOF
@@ -4410,8 +4936,8 @@
 
 
 fi
-echo "$as_me:$LINENO: checking for uint8_t" >&5
-echo $ECHO_N "checking for uint8_t... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for uint8_t" >&5
+echo $ECHO_N "checking for uint8_t... $ECHO_C" >&6; }
 if test "${ac_cv_type_uint8_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4435,50 +4961,47 @@
 #include <sys/bitypes.h>
 #endif
 
+typedef uint8_t ac__type_new_;
 int
 main ()
 {
-if ((uint8_t *) 0)
+if ((ac__type_new_ *) 0)
   return 0;
-if (sizeof (uint8_t))
+if (sizeof (ac__type_new_))
   return 0;
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_type_uint8_t=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_type_uint8_t=no
+	ac_cv_type_uint8_t=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_uint8_t" >&5
-echo "${ECHO_T}$ac_cv_type_uint8_t" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_type_uint8_t" >&5
+echo "${ECHO_T}$ac_cv_type_uint8_t" >&6; }
 if test $ac_cv_type_uint8_t = yes; then
 
 cat >>confdefs.h <<_ACEOF
@@ -4487,8 +5010,8 @@
 
 
 fi
-echo "$as_me:$LINENO: checking for uint16_t" >&5
-echo $ECHO_N "checking for uint16_t... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for uint16_t" >&5
+echo $ECHO_N "checking for uint16_t... $ECHO_C" >&6; }
 if test "${ac_cv_type_uint16_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4512,50 +5035,47 @@
 #include <sys/bitypes.h>
 #endif
 
+typedef uint16_t ac__type_new_;
 int
 main ()
 {
-if ((uint16_t *) 0)
+if ((ac__type_new_ *) 0)
   return 0;
-if (sizeof (uint16_t))
+if (sizeof (ac__type_new_))
   return 0;
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_type_uint16_t=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_type_uint16_t=no
+	ac_cv_type_uint16_t=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_uint16_t" >&5
-echo "${ECHO_T}$ac_cv_type_uint16_t" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_type_uint16_t" >&5
+echo "${ECHO_T}$ac_cv_type_uint16_t" >&6; }
 if test $ac_cv_type_uint16_t = yes; then
 
 cat >>confdefs.h <<_ACEOF
@@ -4564,8 +5084,8 @@
 
 
 fi
-echo "$as_me:$LINENO: checking for uint32_t" >&5
-echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for uint32_t" >&5
+echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
 if test "${ac_cv_type_uint32_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4589,50 +5109,47 @@
 #include <sys/bitypes.h>
 #endif
 
+typedef uint32_t ac__type_new_;
 int
 main ()
 {
-if ((uint32_t *) 0)
+if ((ac__type_new_ *) 0)
   return 0;
-if (sizeof (uint32_t))
+if (sizeof (ac__type_new_))
   return 0;
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_type_uint32_t=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_type_uint32_t=no
+	ac_cv_type_uint32_t=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_uint32_t" >&5
-echo "${ECHO_T}$ac_cv_type_uint32_t" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_type_uint32_t" >&5
+echo "${ECHO_T}$ac_cv_type_uint32_t" >&6; }
 if test $ac_cv_type_uint32_t = yes; then
 
 cat >>confdefs.h <<_ACEOF
@@ -4641,8 +5158,8 @@
 
 
 fi
-echo "$as_me:$LINENO: checking for uint64_t" >&5
-echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for uint64_t" >&5
+echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
 if test "${ac_cv_type_uint64_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4666,50 +5183,47 @@
 #include <sys/bitypes.h>
 #endif
 
+typedef uint64_t ac__type_new_;
 int
 main ()
 {
-if ((uint64_t *) 0)
+if ((ac__type_new_ *) 0)
   return 0;
-if (sizeof (uint64_t))
+if (sizeof (ac__type_new_))
   return 0;
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_type_uint64_t=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_type_uint64_t=no
+	ac_cv_type_uint64_t=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5
-echo "${ECHO_T}$ac_cv_type_uint64_t" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5
+echo "${ECHO_T}$ac_cv_type_uint64_t" >&6; }
 if test $ac_cv_type_uint64_t = yes; then
 
 cat >>confdefs.h <<_ACEOF
@@ -4719,8 +5233,8 @@
 
 fi
 
-echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
-echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
 if test "${ac_cv_c_bigendian+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4737,7 +5251,8 @@
 int
 main ()
 {
-#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+#if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
+	&& BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
  bogus endian macros
 #endif
 
@@ -4746,27 +5261,22 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -4789,40 +5299,36 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_c_bigendian=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_c_bigendian=no
+	ac_cv_c_bigendian=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-# It does not; compile a test program.
+	# It does not; compile a test program.
 if test "$cross_compiling" = yes; then
   # try to guess the endianness by grepping values into an object file
   ac_cv_c_bigendian=unknown
@@ -4832,11 +5338,11 @@
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
-short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
 int
 main ()
@@ -4847,27 +5353,22 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
   ac_cv_c_bigendian=yes
 fi
@@ -4883,8 +5384,10 @@
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -4892,27 +5395,41 @@
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+$ac_includes_default
 int
 main ()
 {
+
   /* Are we little or big endian?  From Harbison&Steele.  */
   union
   {
-    long l;
-    char c[sizeof (long)];
+    long int l;
+    char c[sizeof (long int)];
   } u;
   u.l = 1;
-  exit (u.c[sizeof (long) - 1] == 1);
+  return u.c[sizeof (long int) - 1] == 1;
+
+  ;
+  return 0;
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
@@ -4925,13 +5442,16 @@
 ( exit $ac_status )
 ac_cv_c_bigendian=yes
 fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
+
+
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
-echo "${ECHO_T}$ac_cv_c_bigendian" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
 case $ac_cv_c_bigendian in
   yes)
 
@@ -4955,18 +5475,19 @@
 for ac_header in stdlib.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 else
   # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -4977,41 +5498,37 @@
 #include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_header_compiler=no
+	ac_header_compiler=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
 # Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -5020,24 +5537,22 @@
 /* end confdefs.h.  */
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   ac_header_preproc=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -5045,9 +5560,10 @@
 
   ac_header_preproc=no
 fi
+
 rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
 
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -5071,25 +5587,24 @@
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
+    ( cat <<\_ASBOX
 ## ----------------------------- ##
 ## Report this to agc at netbsd.org ##
 ## ----------------------------- ##
 _ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   eval "$as_ac_Header=\$ac_header_preproc"
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 
 fi
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
@@ -5101,8 +5616,8 @@
 
 done
 
-echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5
-echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5
+echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6; }
 if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5115,7 +5630,7 @@
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#if STDC_HEADERS || HAVE_STDLIB_H
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
 # include <stdlib.h>
 #else
 char *malloc ();
@@ -5124,19 +5639,28 @@
 int
 main ()
 {
-exit (malloc (0) ? 0 : 1);
+return ! malloc (0);
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
@@ -5149,11 +5673,13 @@
 ( exit $ac_status )
 ac_cv_func_malloc_0_nonnull=no
 fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
+
+
 fi
-echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5
-echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5
+echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6; }
 if test $ac_cv_func_malloc_0_nonnull = yes; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -5165,12 +5691,10 @@
 #define HAVE_MALLOC 0
 _ACEOF
 
-   case $LIBOBJS in
-    "malloc.$ac_objext"   | \
-  *" malloc.$ac_objext"   | \
-    "malloc.$ac_objext "* | \
+   case " $LIBOBJS " in
   *" malloc.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;;
+  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
+ ;;
 esac
 
 
@@ -5182,8 +5706,8 @@
 
 
 
-echo "$as_me:$LINENO: checking whether strerror_r is declared" >&5
-echo $ECHO_N "checking whether strerror_r is declared... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking whether strerror_r is declared" >&5
+echo $ECHO_N "checking whether strerror_r is declared... $ECHO_C" >&6; }
 if test "${ac_cv_have_decl_strerror_r+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5198,7 +5722,7 @@
 main ()
 {
 #ifndef strerror_r
-  char *p = (char *) strerror_r;
+  (void) strerror_r;
 #endif
 
   ;
@@ -5206,38 +5730,34 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_have_decl_strerror_r=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_have_decl_strerror_r=no
+	ac_cv_have_decl_strerror_r=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_r" >&5
-echo "${ECHO_T}$ac_cv_have_decl_strerror_r" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_r" >&5
+echo "${ECHO_T}$ac_cv_have_decl_strerror_r" >&6; }
 if test $ac_cv_have_decl_strerror_r = yes; then
 
 cat >>confdefs.h <<_ACEOF
@@ -5258,9 +5778,9 @@
 for ac_func in strerror_r
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -5286,68 +5806,60 @@
 
 #undef $ac_func
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
 #ifdef __cplusplus
 extern "C"
-{
 #endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
 char $ac_func ();
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+#if defined __stub_$ac_func || defined __stub___$ac_func
 choke me
-#else
-char (*f) () = $ac_func;
 #endif
-#ifdef __cplusplus
-}
-#endif
 
 int
 main ()
 {
-return f != $ac_func;
+return $ac_func ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-eval "$as_ac_var=no"
+	eval "$as_ac_var=no"
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+ac_res=`eval echo '${'$as_ac_var'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 if test `eval echo '${'$as_ac_var'}'` = yes; then
   cat >>confdefs.h <<_ACEOF
 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
@@ -5356,8 +5868,8 @@
 fi
 done
 
-echo "$as_me:$LINENO: checking whether strerror_r returns char *" >&5
-echo $ECHO_N "checking whether strerror_r returns char *... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking whether strerror_r returns char *" >&5
+echo $ECHO_N "checking whether strerror_r returns char *... $ECHO_C" >&6; }
 if test "${ac_cv_func_strerror_r_char_p+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5378,40 +5890,38 @@
 	  char buf[100];
 	  char x = *strerror_r (0, buf, sizeof buf);
 	  char *p = strerror_r (0, buf, sizeof buf);
+	  return !p || x;
 
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_func_strerror_r_char_p=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     else
       # strerror_r is not declared.  Choose between
       # systems that have relatively inaccessible declarations for the
@@ -5435,19 +5945,28 @@
 {
 char buf[100];
 	  char x = *strerror_r (0, buf, sizeof buf);
-	  exit (!isalpha (x));
+	  return ! isalpha (x);
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
@@ -5458,13 +5977,15 @@
 sed 's/^/| /' conftest.$ac_ext >&5
 
 fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
+
+
     fi
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5
-echo "${ECHO_T}$ac_cv_func_strerror_r_char_p" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5
+echo "${ECHO_T}$ac_cv_func_strerror_r_char_p" >&6; }
 if test $ac_cv_func_strerror_r_char_p = yes; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -5477,9 +5998,9 @@
 for ac_func in vprintf
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -5505,75 +6026,67 @@
 
 #undef $ac_func
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
 #ifdef __cplusplus
 extern "C"
-{
 #endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
 char $ac_func ();
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+#if defined __stub_$ac_func || defined __stub___$ac_func
 choke me
-#else
-char (*f) () = $ac_func;
 #endif
-#ifdef __cplusplus
-}
-#endif
 
 int
 main ()
 {
-return f != $ac_func;
+return $ac_func ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-eval "$as_ac_var=no"
+	eval "$as_ac_var=no"
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+ac_res=`eval echo '${'$as_ac_var'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 if test `eval echo '${'$as_ac_var'}'` = yes; then
   cat >>confdefs.h <<_ACEOF
 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
-echo "$as_me:$LINENO: checking for _doprnt" >&5
-echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for _doprnt" >&5
+echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6; }
 if test "${ac_cv_func__doprnt+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5600,68 +6113,59 @@
 
 #undef _doprnt
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
 #ifdef __cplusplus
 extern "C"
-{
 #endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
 char _doprnt ();
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
-#if defined (__stub__doprnt) || defined (__stub____doprnt)
+#if defined __stub__doprnt || defined __stub____doprnt
 choke me
-#else
-char (*f) () = _doprnt;
 #endif
-#ifdef __cplusplus
-}
-#endif
 
 int
 main ()
 {
-return f != _doprnt;
+return _doprnt ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_func__doprnt=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_func__doprnt=no
+	ac_cv_func__doprnt=no
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
-echo "${ECHO_T}$ac_cv_func__doprnt" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
+echo "${ECHO_T}$ac_cv_func__doprnt" >&6; }
 if test $ac_cv_func__doprnt = yes; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -5700,9 +6204,9 @@
 for ac_func in bcopy bzero chflags dirfd err errx fgetln fparseln getmode getprogname lchmod lchown MD5File memset memcpy RMD160File setlocale setmode setprogname SHA1File strsep warn warnx
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -5728,68 +6232,60 @@
 
 #undef $ac_func
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
 #ifdef __cplusplus
 extern "C"
-{
 #endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
 char $ac_func ();
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+#if defined __stub_$ac_func || defined __stub___$ac_func
 choke me
-#else
-char (*f) () = $ac_func;
 #endif
-#ifdef __cplusplus
-}
-#endif
 
 int
 main ()
 {
-return f != $ac_func;
+return $ac_func ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-eval "$as_ac_var=no"
+	eval "$as_ac_var=no"
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+ac_res=`eval echo '${'$as_ac_var'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 if test `eval echo '${'$as_ac_var'}'` = yes; then
   cat >>confdefs.h <<_ACEOF
 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
@@ -5802,7 +6298,7 @@
 
 
 
-          ac_config_files="$ac_config_files Makefile"
+ac_config_files="$ac_config_files Makefile"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -5822,39 +6318,58 @@
 
 # The following way of writing the cache mishandles newlines in values,
 # but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
+# So, we kill variables containing newlines.
 # Ultrix sh set writes to stderr and can't be redirected directly,
 # and sets the high bit in the cache file unless we assign to the vars.
-{
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+
   (set) 2>&1 |
-    case `(ac_space=' '; set | grep ac_space) 2>&1` in
-    *ac_space=\ *)
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
       # `set' does not quote correctly, so add quotes (double-quote
       # substitution turns \\\\ into \\, and sed turns \\ into \).
       sed -n \
 	"s/'/'\\\\''/g;
 	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;;
+      ;; #(
     *)
       # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n \
-	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
       ;;
-    esac;
-} |
+    esac |
+    sort
+) |
   sed '
+     /^ac_cv_env_/b end
      t clear
-     : clear
+     :clear
      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
      t end
-     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
-  if test -w $cache_file; then
-    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    test "x$cache_file" != "x/dev/null" &&
+      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
     cat confcache >$cache_file
   else
-    echo "not updating unwritable cache $cache_file"
+    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
   fi
 fi
 rm -f confcache
@@ -5863,32 +6378,18 @@
 # Let make expand exec_prefix.
 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[	 ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[	 ]*$//;
-}'
-fi
-
 DEFS=-DHAVE_CONFIG_H
 
 ac_libobjs=
 ac_ltlibobjs=
 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
   # 1. Remove the extension, and $U if already installed.
-  ac_i=`echo "$ac_i" |
-	 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
-  # 2. Add them.
-  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
-  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
 done
 LIBOBJS=$ac_libobjs
 
@@ -5919,18 +6420,46 @@
 ## M4sh Initialization.  ##
 ## --------------------- ##
 
-# Be Bourne compatible
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
-  set -o posix
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
 fi
-DUALCASE=1; export DUALCASE # for MKS sh
 
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
 # Support unset when possible.
 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
   as_unset=unset
@@ -5939,8 +6468,43 @@
 fi
 
 
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
 # Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
 PS1='$ '
 PS2='> '
 PS4='+ '
@@ -5954,18 +6518,19 @@
   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
     eval $as_var=C; export $as_var
   else
-    $as_unset $as_var
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
   fi
 done
 
 # Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
 else
   as_expr=false
 fi
 
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
   as_basename=basename
 else
   as_basename=false
@@ -5973,159 +6538,120 @@
 
 
 # Name of the executable.
-as_me=`$as_basename "$0" ||
+as_me=`$as_basename -- "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)$' \| \
-	 .     : '\(.\)' 2>/dev/null ||
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
-  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\/\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
 
+# CDPATH.
+$as_unset CDPATH
 
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
 
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
 
-
   as_lineno_1=$LINENO
   as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
   test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
-  # Find who we are.  Look in the path if we contain no path at all
-  # relative or not.
-  case $0 in
-    *[\\/]* ) as_myself=$0 ;;
-    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
 
-       ;;
-  esac
-  # We did not find ourselves, most probably we were run as `sh COMMAND'
-  # in which case we are not to be found in the path.
-  if test "x$as_myself" = x; then
-    as_myself=$0
-  fi
-  if test ! -f "$as_myself"; then
-    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-  case $CONFIG_SHELL in
-  '')
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for as_base in sh bash ksh sh5; do
-	 case $as_dir in
-	 /*)
-	   if ("$as_dir/$as_base" -c '
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
-	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
-	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
-	     CONFIG_SHELL=$as_dir/$as_base
-	     export CONFIG_SHELL
-	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
-	   fi;;
-	 esac
-       done
-done
-;;
-  esac
-
   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
   # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line before each line; the second 'sed' does the real
-  # work.  The second script uses 'N' to pair each line-number line
-  # with the numbered line, and appends trailing '-' during
-  # substitution so that $LINENO is not a special case at line end.
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
-  sed '=' <$as_myself |
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
     sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
       N
-      s,$,-,
-      : loop
-      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
       t loop
-      s,-$,,
-      s,^['$as_cr_digits']*\n,,
+      s/-\n.*//
     ' >$as_me.lineno &&
-  chmod +x $as_me.lineno ||
-    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+  chmod +x "$as_me.lineno" ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
    { (exit 1); exit 1; }; }
 
   # Don't try to exec as it changes $[0], causing all sort of problems
   # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensible to this).
-  . ./$as_me.lineno
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
   # Exit status is that of the last command.
   exit
 }
 
 
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
-  *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T='	' ;;
-  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
-  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
 esac
 
-if expr a : '\(a\)' >/dev/null 2>&1; then
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
 else
   as_expr=false
 fi
 
 rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir
+fi
 echo >conf$$.file
 if ln -s conf$$.file conf$$ 2>/dev/null; then
-  # We could just check for DJGPP; but this test a) works b) is more generic
-  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
-  if test -f conf$$.exe; then
-    # Don't use ln at all; we don't have any links
+  as_ln_s='ln -s'
+  # ... but there are two gotchas:
+  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+  # In both cases, we have to default to `cp -p'.
+  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
     as_ln_s='cp -p'
-  else
-    as_ln_s='ln -s'
-  fi
 elif ln conf$$.file conf$$ 2>/dev/null; then
   as_ln_s=ln
 else
   as_ln_s='cp -p'
 fi
-rm -f conf$$ conf$$.exe conf$$.file
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
 
 if mkdir -p . 2>/dev/null; then
   as_mkdir_p=:
@@ -6134,7 +6660,28 @@
   as_mkdir_p=false
 fi
 
-as_executable_p="test -f"
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+        test -d "$1/.";
+      else
+	case $1 in
+        -*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -6143,31 +6690,14 @@
 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" 	$as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
 exec 6>&1
 
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# Save the log message, to keep $[0] and so on meaningful, and to
 # report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.  Logging --version etc. is OK.
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
+# values after options handling.
+ac_log="
 This file was extended by nbsd-mtree $as_me 20021009, which was
-generated by GNU Autoconf 2.59.  Invocation command line was
+generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -6175,30 +6705,19 @@
   CONFIG_COMMANDS = $CONFIG_COMMANDS
   $ $0 $@
 
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
 _ACEOF
 
+cat >>$CONFIG_STATUS <<_ACEOF
 # Files that config.status was made for.
-if test -n "$ac_config_files"; then
-  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
 
-if test -n "$ac_config_headers"; then
-  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
+_ACEOF
 
-if test -n "$ac_config_links"; then
-  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
-  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
-
 cat >>$CONFIG_STATUS <<\_ACEOF
-
 ac_cs_usage="\
 \`$as_me' instantiates files from templates according to the
 current configuration.
@@ -6206,7 +6725,7 @@
 Usage: $0 [OPTIONS] [FILE]...
 
   -h, --help       print this help, then exit
-  -V, --version    print version number, then exit
+  -V, --version    print version number and configuration settings, then exit
   -q, --quiet      do not print progress messages
   -d, --debug      don't remove temporary files
       --recheck    update $as_me by reconfiguring in the same conditions
@@ -6222,19 +6741,21 @@
 $config_headers
 
 Report bugs to <bug-autoconf at gnu.org>."
+
 _ACEOF
-
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
 nbsd-mtree config.status 20021009
-configured by $0, generated by GNU Autoconf 2.59,
-  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+configured by $0, generated by GNU Autoconf 2.61,
+  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
-Copyright (C) 2003 Free Software Foundation, Inc.
+Copyright (C) 2006 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-INSTALL="$INSTALL"
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
 _ACEOF
 
 cat >>$CONFIG_STATUS <<\_ACEOF
@@ -6245,39 +6766,24 @@
 do
   case $1 in
   --*=*)
-    ac_option=`expr "x$1" : 'x\([^=]*\)='`
-    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
     ac_shift=:
     ;;
-  -*)
+  *)
     ac_option=$1
     ac_optarg=$2
     ac_shift=shift
     ;;
-  *) # This is not an option, so the user has probably given explicit
-     # arguments.
-     ac_option=$1
-     ac_need_defaults=false;;
   esac
 
   case $ac_option in
   # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
     ac_cs_recheck=: ;;
-  --version | --vers* | -V )
-    echo "$ac_cs_version"; exit 0 ;;
-  --he | --h)
-    # Conflict between --help and --header
-    { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
-   { (exit 1); exit 1; }; };;
-  --help | --hel | -h )
-    echo "$ac_cs_usage"; exit 0 ;;
-  --debug | --d* | -d )
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    echo "$ac_cs_version"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
     debug=: ;;
   --file | --fil | --fi | --f )
     $ac_shift
@@ -6287,18 +6793,24 @@
     $ac_shift
     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
     ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    { echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit ;;
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil | --si | --s)
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
+  -*) { echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
    { (exit 1); exit 1; }; } ;;
 
-  *) ac_config_targets="$ac_config_targets $1" ;;
+  *) ac_config_targets="$ac_config_targets $1"
+     ac_need_defaults=false ;;
 
   esac
   shift
@@ -6314,29 +6826,43 @@
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 if \$ac_cs_recheck; then
-  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
-  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  CONFIG_SHELL=$SHELL
+  export CONFIG_SHELL
+  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
 fi
 
 _ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  echo "$ac_log"
+} >&5
 
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+_ACEOF
 
+cat >>$CONFIG_STATUS <<\_ACEOF
 
-
-
-cat >>$CONFIG_STATUS <<\_ACEOF
+# Handling of arguments.
 for ac_config_target in $ac_config_targets
 do
-  case "$ac_config_target" in
-  # Handling of arguments.
-  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+  case $ac_config_target in
+    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
    { (exit 1); exit 1; }; };;
   esac
 done
 
+
 # If the user did not use the arguments to specify the items to instantiate,
 # then the envvar interface is used.  Set only those that are not.
 # We use the long form for the default assignment because of an extremely
@@ -6347,566 +6873,519 @@
 fi
 
 # Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
+# simply because there is no reason against having it here, and in addition,
 # creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
 $debug ||
 {
-  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  tmp=
+  trap 'exit_status=$?
+  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
   trap '{ (exit 1); exit 1; }' 1 2 13 15
 }
-
 # Create a (secure) tmp directory for tmp files.
 
 {
-  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
   test -n "$tmp" && test -d "$tmp"
 }  ||
 {
-  tmp=./confstat$$-$RANDOM
-  (umask 077 && mkdir $tmp)
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
 } ||
 {
    echo "$me: cannot create a temporary directory in ." >&2
    { (exit 1); exit 1; }
 }
 
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-
 #
-# CONFIG_FILES section.
+# Set up the sed scripts for CONFIG_FILES section.
 #
 
 # No need to generate the scripts if there are no CONFIG_FILES.
 # This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
-  # Protect against being on the right side of a sed subst in config.status.
-  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
-   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s, at SHELL@,$SHELL,;t t
-s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s, at exec_prefix@,$exec_prefix,;t t
-s, at prefix@,$prefix,;t t
-s, at program_transform_name@,$program_transform_name,;t t
-s, at bindir@,$bindir,;t t
-s, at sbindir@,$sbindir,;t t
-s, at libexecdir@,$libexecdir,;t t
-s, at datadir@,$datadir,;t t
-s, at sysconfdir@,$sysconfdir,;t t
-s, at sharedstatedir@,$sharedstatedir,;t t
-s, at localstatedir@,$localstatedir,;t t
-s, at libdir@,$libdir,;t t
-s, at includedir@,$includedir,;t t
-s, at oldincludedir@,$oldincludedir,;t t
-s, at infodir@,$infodir,;t t
-s, at mandir@,$mandir,;t t
-s, at build_alias@,$build_alias,;t t
-s, at host_alias@,$host_alias,;t t
-s, at target_alias@,$target_alias,;t t
-s, at DEFS@,$DEFS,;t t
-s, at ECHO_C@,$ECHO_C,;t t
-s, at ECHO_N@,$ECHO_N,;t t
-s, at ECHO_T@,$ECHO_T,;t t
-s, at LIBS@,$LIBS,;t t
-s, at build@,$build,;t t
-s, at build_cpu@,$build_cpu,;t t
-s, at build_vendor@,$build_vendor,;t t
-s, at build_os@,$build_os,;t t
-s, at host@,$host,;t t
-s, at host_cpu@,$host_cpu,;t t
-s, at host_vendor@,$host_vendor,;t t
-s, at host_os@,$host_os,;t t
-s, at CANONICAL_HOST@,$CANONICAL_HOST,;t t
-s, at SET_MAKE@,$SET_MAKE,;t t
-s, at AWK@,$AWK,;t t
-s, at CC@,$CC,;t t
-s, at CFLAGS@,$CFLAGS,;t t
-s, at LDFLAGS@,$LDFLAGS,;t t
-s, at CPPFLAGS@,$CPPFLAGS,;t t
-s, at ac_ct_CC@,$ac_ct_CC,;t t
-s, at EXEEXT@,$EXEEXT,;t t
-s, at OBJEXT@,$OBJEXT,;t t
-s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s, at INSTALL_DATA@,$INSTALL_DATA,;t t
-s, at LN_S@,$LN_S,;t t
-s, at AUTOCONF@,$AUTOCONF,;t t
-s, at AUTOHEADER@,$AUTOHEADER,;t t
-s, at CPP@,$CPP,;t t
-s, at EGREP@,$EGREP,;t t
-s, at LIBOBJS@,$LIBOBJS,;t t
-s, at LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
+if test -n "$CONFIG_FILES"; then
 
 _ACEOF
 
-  cat >>$CONFIG_STATUS <<\_ACEOF
-  # Split the substitutions into bite-sized pieces for seds with
-  # small command number limits, like on Digital OSF/1 and HP-UX.
-  ac_max_sed_lines=48
-  ac_sed_frag=1 # Number of current file.
-  ac_beg=1 # First line for current file.
-  ac_end=$ac_max_sed_lines # Line after last line for current file.
-  ac_more_lines=:
-  ac_sed_cmds=
-  while $ac_more_lines; do
-    if test $ac_beg -gt 1; then
-      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
-    else
-      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
-    fi
-    if test ! -s $tmp/subs.frag; then
-      ac_more_lines=false
-    else
-      # The purpose of the label and of the branching condition is to
-      # speed up the sed processing (if there are no `@' at all, there
-      # is no need to browse any of the substitutions).
-      # These are the two extra sed commands mentioned above.
-      (echo ':t
-  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
-      if test -z "$ac_sed_cmds"; then
-	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
-      else
-	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
-      fi
-      ac_sed_frag=`expr $ac_sed_frag + 1`
-      ac_beg=$ac_end
-      ac_end=`expr $ac_end + $ac_max_sed_lines`
-    fi
-  done
-  if test -z "$ac_sed_cmds"; then
-    ac_sed_cmds=cat
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  cat >conf$$subs.sed <<_ACEOF
+SHELL!$SHELL$ac_delim
+PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
+PACKAGE_NAME!$PACKAGE_NAME$ac_delim
+PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
+PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
+PACKAGE_STRING!$PACKAGE_STRING$ac_delim
+PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
+exec_prefix!$exec_prefix$ac_delim
+prefix!$prefix$ac_delim
+program_transform_name!$program_transform_name$ac_delim
+bindir!$bindir$ac_delim
+sbindir!$sbindir$ac_delim
+libexecdir!$libexecdir$ac_delim
+datarootdir!$datarootdir$ac_delim
+datadir!$datadir$ac_delim
+sysconfdir!$sysconfdir$ac_delim
+sharedstatedir!$sharedstatedir$ac_delim
+localstatedir!$localstatedir$ac_delim
+includedir!$includedir$ac_delim
+oldincludedir!$oldincludedir$ac_delim
+docdir!$docdir$ac_delim
+infodir!$infodir$ac_delim
+htmldir!$htmldir$ac_delim
+dvidir!$dvidir$ac_delim
+pdfdir!$pdfdir$ac_delim
+psdir!$psdir$ac_delim
+libdir!$libdir$ac_delim
+localedir!$localedir$ac_delim
+mandir!$mandir$ac_delim
+DEFS!$DEFS$ac_delim
+ECHO_C!$ECHO_C$ac_delim
+ECHO_N!$ECHO_N$ac_delim
+ECHO_T!$ECHO_T$ac_delim
+LIBS!$LIBS$ac_delim
+build_alias!$build_alias$ac_delim
+host_alias!$host_alias$ac_delim
+target_alias!$target_alias$ac_delim
+build!$build$ac_delim
+build_cpu!$build_cpu$ac_delim
+build_vendor!$build_vendor$ac_delim
+build_os!$build_os$ac_delim
+host!$host$ac_delim
+host_cpu!$host_cpu$ac_delim
+host_vendor!$host_vendor$ac_delim
+host_os!$host_os$ac_delim
+CANONICAL_HOST!$CANONICAL_HOST$ac_delim
+SET_MAKE!$SET_MAKE$ac_delim
+AWK!$AWK$ac_delim
+CC!$CC$ac_delim
+CFLAGS!$CFLAGS$ac_delim
+LDFLAGS!$LDFLAGS$ac_delim
+CPPFLAGS!$CPPFLAGS$ac_delim
+ac_ct_CC!$ac_ct_CC$ac_delim
+EXEEXT!$EXEEXT$ac_delim
+OBJEXT!$OBJEXT$ac_delim
+INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
+INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
+INSTALL_DATA!$INSTALL_DATA$ac_delim
+LN_S!$LN_S$ac_delim
+AUTOCONF!$AUTOCONF$ac_delim
+AUTOHEADER!$AUTOHEADER$ac_delim
+CPP!$CPP$ac_delim
+GREP!$GREP$ac_delim
+EGREP!$EGREP$ac_delim
+LIBOBJS!$LIBOBJS$ac_delim
+LTLIBOBJS!$LTLIBOBJS$ac_delim
+_ACEOF
+
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 66; then
+    break
+  elif $ac_last_try; then
+    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
-fi # test -n "$CONFIG_FILES"
+done
 
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+  ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
 _ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+:end
+s/|#_!!_#|//g
+CEOF$ac_eof
+_ACEOF
+
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[	 ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
 cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case $ac_file in
-  - | *:- | *:-:* ) # input from stdin
-	cat >$tmp/stdin
-	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  * )   ac_file_in=$ac_file.in ;;
+fi # test -n "$CONFIG_FILES"
+
+
+for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
   esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+   { (exit 1); exit 1; }; };;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
 
-  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
-  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
+	 # because $ac_f cannot contain `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+   { (exit 1); exit 1; }; };;
+      esac
+      ac_file_inputs="$ac_file_inputs $ac_f"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input="Generated from "`IFS=:
+	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    fi
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$tmp/stdin";;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$ac_file" : 'X\(//\)[^/]' \| \
 	 X"$ac_file" : 'X\(//\)$' \| \
-	 X"$ac_file" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
 echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
-  { if $as_mkdir_p; then
-    mkdir -p "$ac_dir"
-  else
-    as_dir="$ac_dir"
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  { as_dir="$ac_dir"
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
     as_dirs=
-    while test ! -d "$as_dir"; do
-      as_dirs="$as_dir $as_dirs"
-      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$as_dir" : 'X\(//\)[^/]' \| \
 	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
     done
-    test ! -n "$as_dirs" || mkdir $as_dirs
-  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
    { (exit 1); exit 1; }; }; }
-
   ac_builddir=.
 
-if test "$ac_dir" != .; then
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A "../" for each directory in $ac_dir_suffix.
-  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
-  ac_dir_suffix= ac_top_builddir=
-fi
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
 
 case $srcdir in
-  .)  # No --srcdir option.  We are building in place.
+  .)  # We are building in place.
     ac_srcdir=.
-    if test -z "$ac_top_builddir"; then
-       ac_top_srcdir=.
-    else
-       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
-    fi ;;
-  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
     ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir ;;
-  *) # Relative path.
-    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
 esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
 
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
-  case "$ac_dir" in
-  .) ac_abs_builddir=`pwd`;;
-  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
-  *) ac_abs_builddir=`pwd`/"$ac_dir";;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
-  case ${ac_top_builddir}. in
-  .) ac_abs_top_builddir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
-  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
-  case $ac_srcdir in
-  .) ac_abs_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
-  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
-  case $ac_top_srcdir in
-  .) ac_abs_top_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
-  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
-  esac;;
-esac
 
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
 
   case $INSTALL in
   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
   esac
+_ACEOF
 
-  if test x"$ac_file" != x-; then
-    { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-    rm -f "$ac_file"
-  fi
-  # Let's still pretend it is `configure' which instantiates (i.e., don't
-  # use $as_me), people would be surprised to read:
-  #    /* config.h.  Generated by config.status.  */
-  if test x"$ac_file" = x-; then
-    configure_input=
-  else
-    configure_input="$ac_file.  "
-  fi
-  configure_input=$configure_input"Generated from `echo $ac_file_in |
-				     sed 's,.*/,,'` by configure."
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
 
-  # First look for the input files in the build tree, otherwise in the
-  # src tree.
-  ac_file_inputs=`IFS=:
-    for f in $ac_file_in; do
-      case $f in
-      -) echo $tmp/stdin ;;
-      [\\/$]*)
-	 # Absolute (can't be DOS-style, as IFS=:)
-	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-	 echo "$f";;
-      *) # Relative
-	 if test -f "$f"; then
-	   # Build tree
-	   echo "$f"
-	 elif test -f "$srcdir/$f"; then
-	   # Source tree
-	   echo "$srcdir/$f"
-	 else
-	   # /dev/null tree
-	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-	 fi;;
-      esac
-    done` || { (exit 1); exit 1; }
+case `sed -n '/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+' $ac_file_inputs` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+    s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF
   sed "$ac_vpsub
 $extrasub
 _ACEOF
 cat >>$CONFIG_STATUS <<\_ACEOF
 :t
 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s, at configure_input@,$configure_input,;t t
-s, at srcdir@,$ac_srcdir,;t t
-s, at abs_srcdir@,$ac_abs_srcdir,;t t
-s, at top_srcdir@,$ac_top_srcdir,;t t
-s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s, at builddir@,$ac_builddir,;t t
-s, at abs_builddir@,$ac_abs_builddir,;t t
-s, at top_builddir@,$ac_top_builddir,;t t
-s, at abs_top_builddir@,$ac_abs_top_builddir,;t t
-s, at INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
-  rm -f $tmp/stdin
-  if test x"$ac_file" != x-; then
-    mv $tmp/out $ac_file
-  else
-    cat $tmp/out
-    rm -f $tmp/out
-  fi
+s&@configure_input@&$configure_input&;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+$ac_datarootdir_hack
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
 
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&5
+echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&2;}
 
-#
-# CONFIG_HEADER section.
-#
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([	 ]*\)#\([	 ]*define[	 ][	 ]*\)'
-ac_dB='[	 ].*$,\1#\2'
-ac_dC=' '
-ac_dD=',;t'
-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([	 ]*\)#\([	 ]*\)undef\([	 ][	 ]*\)'
-ac_uB='$,\1#\2define\3'
-ac_uC=' '
-ac_uD=',;t'
-
-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  rm -f "$tmp/stdin"
   case $ac_file in
-  - | *:- | *:-:* ) # input from stdin
-	cat >$tmp/stdin
-	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  * )   ac_file_in=$ac_file.in ;;
+  -) cat "$tmp/out"; rm -f "$tmp/out";;
+  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
   esac
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+_ACEOF
 
-  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
+# Transform confdefs.h into a sed script `conftest.defines', that
+# substitutes the proper values into config.h.in to produce config.h.
+rm -f conftest.defines conftest.tail
+# First, append a space to every undef/define line, to ease matching.
+echo 's/$/ /' >conftest.defines
+# Then, protect against being on the right side of a sed subst, or in
+# an unquoted here document, in config.status.  If some macros were
+# called several times there might be several #defines for the same
+# symbol, which is useless.  But do not sort them, since the last
+# AC_DEFINE must be honored.
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
+# NAME is the cpp macro being defined, VALUE is the value it is being given.
+# PARAMS is the parameter list in the macro definition--in most cases, it's
+# just an empty string.
+ac_dA='s,^\\([	 #]*\\)[^	 ]*\\([	 ]*'
+ac_dB='\\)[	 (].*,\\1define\\2'
+ac_dC=' '
+ac_dD=' ,'
 
-  # First look for the input files in the build tree, otherwise in the
-  # src tree.
-  ac_file_inputs=`IFS=:
-    for f in $ac_file_in; do
-      case $f in
-      -) echo $tmp/stdin ;;
-      [\\/$]*)
-	 # Absolute (can't be DOS-style, as IFS=:)
-	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-	 # Do quote $f, to prevent DOS paths from being IFS'd.
-	 echo "$f";;
-      *) # Relative
-	 if test -f "$f"; then
-	   # Build tree
-	   echo "$f"
-	 elif test -f "$srcdir/$f"; then
-	   # Source tree
-	   echo "$srcdir/$f"
-	 else
-	   # /dev/null tree
-	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-	 fi;;
-      esac
-    done` || { (exit 1); exit 1; }
-  # Remove the trailing spaces.
-  sed 's/[	 ]*$//' $ac_file_inputs >$tmp/in
+uniq confdefs.h |
+  sed -n '
+	t rset
+	:rset
+	s/^[	 ]*#[	 ]*define[	 ][	 ]*//
+	t ok
+	d
+	:ok
+	s/[\\&,]/\\&/g
+	s/^\('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
+	s/^\('"$ac_word_re"'\)[	 ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
+  ' >>conftest.defines
 
-_ACEOF
-
-# Transform confdefs.h into two sed scripts, `conftest.defines' and
-# `conftest.undefs', that substitutes the proper values into
-# config.h.in to produce config.h.  The first handles `#define'
-# templates, and the second `#undef' templates.
-# And first: Protect against being on the right side of a sed subst in
-# config.status.  Protect against being in an unquoted here document
-# in config.status.
-rm -f conftest.defines conftest.undefs
-# Using a here document instead of a string reduces the quoting nightmare.
-# Putting comments in sed scripts is not portable.
-#
-# `end' is used to avoid that the second main sed command (meant for
-# 0-ary CPP macros) applies to n-ary macro definitions.
-# See the Autoconf documentation for `clear'.
-cat >confdef2sed.sed <<\_ACEOF
-s/[\\&,]/\\&/g
-s,[\\$`],\\&,g
-t clear
-: clear
-s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*\)\(([^)]*)\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
-t end
-s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-: end
-_ACEOF
-# If some macros were called several times there might be several times
-# the same #defines, which is useless.  Nevertheless, we may not want to
-# sort them, since we want the *last* AC-DEFINE to be honored.
-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
-rm -f confdef2sed.sed
-
-# This sed command replaces #undef with comments.  This is necessary, for
+# Remove the space that was appended to ease matching.
+# Then replace #undef with comments.  This is necessary, for
 # example, in the case of _POSIX_SOURCE, which is predefined and required
 # on some systems where configure will not decide to define it.
-cat >>conftest.undefs <<\_ACEOF
-s,^[	 ]*#[	 ]*undef[	 ][	 ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-_ACEOF
+# (The regexp can be short, since the line contains either #define or #undef.)
+echo 's/ $//
+s,^[	 #]*u.*,/* & */,' >>conftest.defines
 
-# Break up conftest.defines because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo '  if grep "^[	 ]*#[	 ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
-echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
-echo '  :' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.defines >/dev/null
+# Break up conftest.defines:
+ac_max_sed_lines=50
+
+# First sed command is:	 sed -f defines.sed $ac_file_inputs >"$tmp/out1"
+# Second one is:	 sed -f defines.sed "$tmp/out1" >"$tmp/out2"
+# Third one will be:	 sed -f defines.sed "$tmp/out2" >"$tmp/out1"
+# et cetera.
+ac_in='$ac_file_inputs'
+ac_out='"$tmp/out1"'
+ac_nxt='"$tmp/out2"'
+
+while :
 do
-  # Write a limited-size here document to $tmp/defines.sed.
-  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
-  # Speed up: don't consider the non `#define' lines.
-  echo '/^[	 ]*#[	 ]*define/!b' >>$CONFIG_STATUS
-  # Work around the forget-to-reset-the-flag bug.
-  echo 't clr' >>$CONFIG_STATUS
-  echo ': clr' >>$CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+  # Write a here document:
+    cat >>$CONFIG_STATUS <<_ACEOF
+    # First, check the format of the line:
+    cat >"\$tmp/defines.sed" <<\\CEOF
+/^[	 ]*#[	 ]*undef[	 ][	 ]*$ac_word_re[	 ]*\$/b def
+/^[	 ]*#[	 ]*define[	 ][	 ]*$ac_word_re[(	 ]/b def
+b
+:def
+_ACEOF
+  sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
   echo 'CEOF
-  sed -f $tmp/defines.sed $tmp/in >$tmp/out
-  rm -f $tmp/in
-  mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+    sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
+  ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
+  sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
+  grep . conftest.tail >/dev/null || break
   rm -f conftest.defines
   mv conftest.tail conftest.defines
 done
-rm -f conftest.defines
-echo '  fi # grep' >>$CONFIG_STATUS
-echo >>$CONFIG_STATUS
+rm -f conftest.defines conftest.tail
 
-# Break up conftest.undefs because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.undefs >/dev/null
-do
-  # Write a limited-size here document to $tmp/undefs.sed.
-  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
-  # Speed up: don't consider the non `#undef'
-  echo '/^[	 ]*#[	 ]*undef/!b' >>$CONFIG_STATUS
-  # Work around the forget-to-reset-the-flag bug.
-  echo 't clr' >>$CONFIG_STATUS
-  echo ': clr' >>$CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
-  echo 'CEOF
-  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
-  rm -f $tmp/in
-  mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
-  rm -f conftest.undefs
-  mv conftest.tail conftest.undefs
-done
-rm -f conftest.undefs
-
+echo "ac_result=$ac_in" >>$CONFIG_STATUS
 cat >>$CONFIG_STATUS <<\_ACEOF
-  # Let's still pretend it is `configure' which instantiates (i.e., don't
-  # use $as_me), people would be surprised to read:
-  #    /* config.h.  Generated by config.status.  */
-  if test x"$ac_file" = x-; then
-    echo "/* Generated by configure.  */" >$tmp/config.h
-  else
-    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
-  fi
-  cat $tmp/in >>$tmp/config.h
-  rm -f $tmp/in
   if test x"$ac_file" != x-; then
-    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+    echo "/* $configure_input  */" >"$tmp/config.h"
+    cat "$ac_result" >>"$tmp/config.h"
+    if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
 echo "$as_me: $ac_file is unchanged" >&6;}
     else
-      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$ac_file" : 'X\(//\)[^/]' \| \
-	 X"$ac_file" : 'X\(//\)$' \| \
-	 X"$ac_file" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
-      { if $as_mkdir_p; then
-    mkdir -p "$ac_dir"
-  else
-    as_dir="$ac_dir"
-    as_dirs=
-    while test ! -d "$as_dir"; do
-      as_dirs="$as_dir $as_dirs"
-      as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
-    done
-    test ! -n "$as_dirs" || mkdir $as_dirs
-  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
-   { (exit 1); exit 1; }; }; }
-
       rm -f $ac_file
-      mv $tmp/config.h $ac_file
+      mv "$tmp/config.h" $ac_file
     fi
   else
-    cat $tmp/config.h
-    rm -f $tmp/config.h
+    echo "/* $configure_input  */"
+    cat "$ac_result"
   fi
-done
-_ACEOF
+  rm -f "$tmp/out12"
+ ;;
 
-cat >>$CONFIG_STATUS <<\_ACEOF
 
+  esac
+
+done # for ac_tag
+
+
 { (exit 0); exit 0; }
 _ACEOF
 chmod +x $CONFIG_STATUS

Copied: branches/release_1_4/base/src/programs/xar (from rev 23968, trunk/base/src/programs/xar)

Deleted: branches/release_1_4/base/src/programs/xar/INSTALL
===================================================================
--- trunk/base/src/programs/xar/INSTALL	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/INSTALL	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,151 +0,0 @@
-################################################################################
-#
-# Building and installation instructions for the Xar source distribution.
-#
-################################################################################
-
-Required: Xar's build system uses GNU make.
-
-Required: Xar depends on libxml2's XML functionality.  For more information
-	  about libxml2, see:
-
-		http://www.xmlsoft.org/
-
-Required: Xar depends on OpenSSL (libcrypto in particular) for MD5 and SHA1
-	  functionality.  For more information about OpenSSL, see:
-
-		http://www.openssl.org/
-
-Required: Xar depends on zlib (libz) for data compression.  For more information
-	  about zlib, see:
-
-		http://www.zlib.net/
-
-Optional: Xar can optionally use libbzip2 for data compression.  For more
-	  information about libbzip2, see:
-
-		http://www.bzip.org/
-
-Optional: Regenerating the configure script requires GNU autoconf.  Doing so is
-	  only necessary when making changes to the configuration system.
-
-################################################################################
-
-Building Xar is in many cases as simple as typing the following commands while
-in the root directory of the source tree:
-
-	./configure
-	make
-
-To install, do the above, then type:
-
-	make install
-
-Additional build targets of finer granularity include:
-
-	src_all
-	lib_all
-
-Additional install targets of finer granularity include:
-
-	src_install
-	lib_install
-
-Uninstall targets include:
-
-	uninstall
-	src_uninstall
-	lib_uninstall
-
-Cleanup targets include:
-
-	clean
-	distclean
-	relclean
-
-################################################################################
-
-The build system is capable of building in a different directory than the
-source, so that no files are written to the source tree.  In order to use this
-feature, run 'configure' and 'make' while in the directory that you want to
-build the software in.
-
-Optionally, pass any of the following arguments to 'configure' (run 'configure'
-with the --help option for a full list):
-
---prefix=<install-root-dir>
-	Set the base directory in which to install.  For example:
-
-		./configure --prefix=/usr/local
-
-	will cause files to be installed into /usr/local/bin, /usr/local/man,
-	/usr/local/include, /usr/local/lib, and /usr/local/share.
-
---enable-autogen
-	Include dependency rules in the build system to automatically regenerate
-	files created by configure when their sources are newer.  This is
-	only of interest when making modifications to the source code.
-
---with-xml2-config=<path>
-	If specified, use <path> as the full path (including filename) to the
-	xml2-config program.  This is useful when there is more than one copy of
-	xml2-config in your shell's path, or when you want to use a copy of
-	xml2-config that is not in your shell's path at all.
-
-Optionally, define environment variables when invoking configure, including (not
-exclusively):
-
-CFLAGS="?"
-	Pass these flags to the compiler.
-
-CPPFLAGS="?"
-	Pass these flags to the C preprocessor.  Note that CFLAGS is not passed
-	to 'cpp' when 'configure' is looking for include files, so you must use
-	CPPFLAGS instead if you need to help 'configure' find header files.
-
-LD_LIBRARY_PATH="?"
-	'ld' uses this colon-separated list to find libraries.
-
-LDFLAGS="?"
-	Pass these flags when linking.
-
-PATH="?"
-	'configure' uses this to find programs.
-
-################################################################################
-
-Optionally, define make variables when invoking make, including (not
-exclusively):
-
-PREFIX="?"
-	Use this as the installation prefix.
-
-BINDIR="?"
-	Use this as the installation prefix for programs.
-
-DATADIR="?"
-	Use this as the installation prefix for modules and documentation.
-
-LIBDIR="?"
-	Use this as the installation prefix for libraries.
-
-INCLUDEDIR="?"
-	Use this as the installation prefix for header files.
-
-MANDIR="?"
-	Use this as the installation prefix for man pages.
-
-CC="?"
-	Use this to specify the C compiler.
-
-CFLAGS="?"
-	Pass these flags to the compiler.
-
-CPPFLAGS="?"
-	Pass these flags to the C preprocessor.
-
-LDFLAGS="?"
-	Pass these flags when linking.
-
-PATH="?"
-	Use this to search for programs used during configuration and building.

Copied: branches/release_1_4/base/src/programs/xar/INSTALL (from rev 23968, trunk/base/src/programs/xar/INSTALL)
===================================================================
--- branches/release_1_4/base/src/programs/xar/INSTALL	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/INSTALL	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,151 @@
+################################################################################
+#
+# Building and installation instructions for the Xar source distribution.
+#
+################################################################################
+
+Required: Xar's build system uses GNU make.
+
+Required: Xar depends on libxml2's XML functionality.  For more information
+	  about libxml2, see:
+
+		http://www.xmlsoft.org/
+
+Required: Xar depends on OpenSSL (libcrypto in particular) for MD5 and SHA1
+	  functionality.  For more information about OpenSSL, see:
+
+		http://www.openssl.org/
+
+Required: Xar depends on zlib (libz) for data compression.  For more information
+	  about zlib, see:
+
+		http://www.zlib.net/
+
+Optional: Xar can optionally use libbzip2 for data compression.  For more
+	  information about libbzip2, see:
+
+		http://www.bzip.org/
+
+Optional: Regenerating the configure script requires GNU autoconf.  Doing so is
+	  only necessary when making changes to the configuration system.
+
+################################################################################
+
+Building Xar is in many cases as simple as typing the following commands while
+in the root directory of the source tree:
+
+	./configure
+	make
+
+To install, do the above, then type:
+
+	make install
+
+Additional build targets of finer granularity include:
+
+	src_all
+	lib_all
+
+Additional install targets of finer granularity include:
+
+	src_install
+	lib_install
+
+Uninstall targets include:
+
+	uninstall
+	src_uninstall
+	lib_uninstall
+
+Cleanup targets include:
+
+	clean
+	distclean
+	relclean
+
+################################################################################
+
+The build system is capable of building in a different directory than the
+source, so that no files are written to the source tree.  In order to use this
+feature, run 'configure' and 'make' while in the directory that you want to
+build the software in.
+
+Optionally, pass any of the following arguments to 'configure' (run 'configure'
+with the --help option for a full list):
+
+--prefix=<install-root-dir>
+	Set the base directory in which to install.  For example:
+
+		./configure --prefix=/usr/local
+
+	will cause files to be installed into /usr/local/bin, /usr/local/man,
+	/usr/local/include, /usr/local/lib, and /usr/local/share.
+
+--enable-autogen
+	Include dependency rules in the build system to automatically regenerate
+	files created by configure when their sources are newer.  This is
+	only of interest when making modifications to the source code.
+
+--with-xml2-config=<path>
+	If specified, use <path> as the full path (including filename) to the
+	xml2-config program.  This is useful when there is more than one copy of
+	xml2-config in your shell's path, or when you want to use a copy of
+	xml2-config that is not in your shell's path at all.
+
+Optionally, define environment variables when invoking configure, including (not
+exclusively):
+
+CFLAGS="?"
+	Pass these flags to the compiler.
+
+CPPFLAGS="?"
+	Pass these flags to the C preprocessor.  Note that CFLAGS is not passed
+	to 'cpp' when 'configure' is looking for include files, so you must use
+	CPPFLAGS instead if you need to help 'configure' find header files.
+
+LD_LIBRARY_PATH="?"
+	'ld' uses this colon-separated list to find libraries.
+
+LDFLAGS="?"
+	Pass these flags when linking.
+
+PATH="?"
+	'configure' uses this to find programs.
+
+################################################################################
+
+Optionally, define make variables when invoking make, including (not
+exclusively):
+
+PREFIX="?"
+	Use this as the installation prefix.
+
+BINDIR="?"
+	Use this as the installation prefix for programs.
+
+DATADIR="?"
+	Use this as the installation prefix for modules and documentation.
+
+LIBDIR="?"
+	Use this as the installation prefix for libraries.
+
+INCLUDEDIR="?"
+	Use this as the installation prefix for header files.
+
+MANDIR="?"
+	Use this as the installation prefix for man pages.
+
+CC="?"
+	Use this to specify the C compiler.
+
+CFLAGS="?"
+	Pass these flags to the compiler.
+
+CPPFLAGS="?"
+	Pass these flags to the C preprocessor.
+
+LDFLAGS="?"
+	Pass these flags when linking.
+
+PATH="?"
+	Use this to search for programs used during configuration and building.

Deleted: branches/release_1_4/base/src/programs/xar/LICENSE
===================================================================
--- trunk/base/src/programs/xar/LICENSE	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/LICENSE	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2005 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of his contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 03-Apr-2005
- * DRI: Rob Braun <bbraun at opendarwin.org>
- */
-

Copied: branches/release_1_4/base/src/programs/xar/LICENSE (from rev 23968, trunk/base/src/programs/xar/LICENSE)
===================================================================
--- branches/release_1_4/base/src/programs/xar/LICENSE	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/LICENSE	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2005 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of his contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 03-Apr-2005
+ * DRI: Rob Braun <bbraun at opendarwin.org>
+ */
+

Deleted: branches/release_1_4/base/src/programs/xar/Makefile.in
===================================================================
--- trunk/base/src/programs/xar/Makefile.in	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/Makefile.in	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,99 +0,0 @@
-# Clear out all vpaths, then set just one (default vpath) for the main build
-# directory.
-vpath
-vpath % .
-
-# Clear the default suffixes, so that built-in rules are not used.
-.SUFFIXES :
-
-#
-# Standard definitions.
-#
-
-SHELL := /bin/sh
-CC := @CC@
-LD := @LD@
-INSTALL := @INSTALL@
-AUTOCONF := @AUTOCONF@
-
-#
-# Build parameters.
-#
-
-CPPFLAGS := @CPPFLAGS@
-CFLAGS := @CFLAGS@ 
-A_CFLAGS := $(CFLAGS) 
-S_CFLAGS := $(CFLAGS) -fPIC -DPIC
-ifeq (macho, @abi@)
-S_CFLAGS += -dynamic
-endif
-LDFLAGS := @LDFLAGS@ 
-
-PREFIX := @PREFIX@
-BINDIR := @BINDIR@
-DATADIR := @DATADIR@
-LIBDIR := @LIBDIR@
-INCLUDEDIR := @INCLUDEDIR@
-MANDIR := @MANDIR@
-
-dir_names := lib src
-
-all : $(dir_names:%=%_all)
-
-install : $(dir_names:%=%_install)
-
-uninstall : $(dir_names:%=%_uninstall)
-
-clean : $(dir_names:%=%_clean)
-
-distclean : clean $(dir_names:%=%_distclean)
-	rm -f @objroot at config.log
-	rm -f @objroot at config.status
-	rm -f @objroot at cfghdrs.stamp
-	rm -f @objroot at cfgoutputs.stamp
-	rm -f @objroot at configure.lineno
-	rm -f @cfghdrs@
-	rm -f @cfgoutputs@
-	rm -rf @objroot at autom4te.cache
-
-relclean : distclean
-	rm -f @objroot at configure
-
-# Include Makefile.inc files in subdirectories.
-include $(dir_names:%=%/Makefile.inc)
-
-#
-# Re-configuration rules.
-#
-ifeq (@enable_autogen@, 1)
- at srcroot@configure : @srcroot at configure.ac
-	cd ./@srcroot@ && $(AUTOCONF)
-
- at objroot@config.status : @srcroot at configure
-	./@objroot at config.status --recheck
-
-# cfghdrs rules.
- at srcroot@cfghdrs.stamp.in : @srcroot at configure.ac
-	echo stamp > @srcroot at cfghdrs.stamp.in
-
-$(patsubst %, @srcroot@%.in, @cfghdrs@) : @objroot at config.status
-
- at objroot@cfghdrs.stamp : $(patsubst %, @srcroot@%.in, @cfghdrs@)
-	./@objroot at config.status
-	echo stamp > $@
-
-$(filter-out @objroot at cfghdrs.stamp, @cfghdrs@) : @objroot at cfghdrs.stamp
-
-# cfgoutputs rules.
- at srcroot@cfgoutputs.stamp.in : @srcroot at configure.ac
-	echo stamp > @srcroot at cfgoutputs.stamp.in
-
-$(patsubst %, @srcroot@%.in, @cfgoutputs@) : @objroot at config.status
-
- at objroot@cfgoutputs.stamp : $(patsubst %, @srcroot@%.in, @cfgoutputs@)
-	./@objroot at config.status
-
-$(filter-out \
-	@objroot at cfgoutputs.stamp, \
-	$(patsubst %, @objroot@%, @cfgoutputs@)) : @objroot at cfgoutputs.stamp
-endif

Copied: branches/release_1_4/base/src/programs/xar/Makefile.in (from rev 23968, trunk/base/src/programs/xar/Makefile.in)
===================================================================
--- branches/release_1_4/base/src/programs/xar/Makefile.in	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/Makefile.in	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,99 @@
+# Clear out all vpaths, then set just one (default vpath) for the main build
+# directory.
+vpath
+vpath % .
+
+# Clear the default suffixes, so that built-in rules are not used.
+.SUFFIXES :
+
+#
+# Standard definitions.
+#
+
+SHELL := /bin/sh
+CC := @CC@
+LD := @LD@
+INSTALL := @INSTALL@
+AUTOCONF := @AUTOCONF@
+
+#
+# Build parameters.
+#
+
+CPPFLAGS := @CPPFLAGS@
+CFLAGS := @CFLAGS@ 
+A_CFLAGS := $(CFLAGS) 
+S_CFLAGS := $(CFLAGS) -fPIC -DPIC
+ifeq (macho, @abi@)
+S_CFLAGS += -dynamic
+endif
+LDFLAGS := @LDFLAGS@ 
+
+PREFIX := @PREFIX@
+BINDIR := @BINDIR@
+DATADIR := @DATADIR@
+LIBDIR := @LIBDIR@
+INCLUDEDIR := @INCLUDEDIR@
+MANDIR := @MANDIR@
+
+dir_names := lib src
+
+all : $(dir_names:%=%_all)
+
+install : $(dir_names:%=%_install)
+
+uninstall : $(dir_names:%=%_uninstall)
+
+clean : $(dir_names:%=%_clean)
+
+distclean : clean $(dir_names:%=%_distclean)
+	rm -f @objroot at config.log
+	rm -f @objroot at config.status
+	rm -f @objroot at cfghdrs.stamp
+	rm -f @objroot at cfgoutputs.stamp
+	rm -f @objroot at configure.lineno
+	rm -f @cfghdrs@
+	rm -f @cfgoutputs@
+	rm -rf @objroot at autom4te.cache
+
+relclean : distclean
+	rm -f @objroot at configure
+
+# Include Makefile.inc files in subdirectories.
+include $(dir_names:%=%/Makefile.inc)
+
+#
+# Re-configuration rules.
+#
+ifeq (@enable_autogen@, 1)
+ at srcroot@configure : @srcroot at configure.ac
+	cd ./@srcroot@ && $(AUTOCONF)
+
+ at objroot@config.status : @srcroot at configure
+	./@objroot at config.status --recheck
+
+# cfghdrs rules.
+ at srcroot@cfghdrs.stamp.in : @srcroot at configure.ac
+	echo stamp > @srcroot at cfghdrs.stamp.in
+
+$(patsubst %, @srcroot@%.in, @cfghdrs@) : @objroot at config.status
+
+ at objroot@cfghdrs.stamp : $(patsubst %, @srcroot@%.in, @cfghdrs@)
+	./@objroot at config.status
+	echo stamp > $@
+
+$(filter-out @objroot at cfghdrs.stamp, @cfghdrs@) : @objroot at cfghdrs.stamp
+
+# cfgoutputs rules.
+ at srcroot@cfgoutputs.stamp.in : @srcroot at configure.ac
+	echo stamp > @srcroot at cfgoutputs.stamp.in
+
+$(patsubst %, @srcroot@%.in, @cfgoutputs@) : @objroot at config.status
+
+ at objroot@cfgoutputs.stamp : $(patsubst %, @srcroot@%.in, @cfgoutputs@)
+	./@objroot at config.status
+
+$(filter-out \
+	@objroot at cfgoutputs.stamp, \
+	$(patsubst %, @objroot@%, @cfgoutputs@)) : @objroot at cfgoutputs.stamp
+endif

Deleted: branches/release_1_4/base/src/programs/xar/TODO
===================================================================
--- trunk/base/src/programs/xar/TODO	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/TODO	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,2 +0,0 @@
-The xar TODO exists primarily on the wiki site at:
-http://wiki.opendarwin.org/index.php/Xar:Todo

Copied: branches/release_1_4/base/src/programs/xar/TODO (from rev 23968, trunk/base/src/programs/xar/TODO)
===================================================================
--- branches/release_1_4/base/src/programs/xar/TODO	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/TODO	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,2 @@
+The xar TODO exists primarily on the wiki site at:
+http://wiki.opendarwin.org/index.php/Xar:Todo

Deleted: branches/release_1_4/base/src/programs/xar/cfghdrs.stamp.in
===================================================================
--- trunk/base/src/programs/xar/cfghdrs.stamp.in	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/cfghdrs.stamp.in	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1 +0,0 @@
-stamp

Copied: branches/release_1_4/base/src/programs/xar/cfghdrs.stamp.in (from rev 23968, trunk/base/src/programs/xar/cfghdrs.stamp.in)
===================================================================
--- branches/release_1_4/base/src/programs/xar/cfghdrs.stamp.in	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/cfghdrs.stamp.in	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1 @@
+stamp

Deleted: branches/release_1_4/base/src/programs/xar/cfgoutputs.stamp.in
===================================================================
--- trunk/base/src/programs/xar/cfgoutputs.stamp.in	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/cfgoutputs.stamp.in	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1 +0,0 @@
-stamp

Copied: branches/release_1_4/base/src/programs/xar/cfgoutputs.stamp.in (from rev 23968, trunk/base/src/programs/xar/cfgoutputs.stamp.in)
===================================================================
--- branches/release_1_4/base/src/programs/xar/cfgoutputs.stamp.in	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/cfgoutputs.stamp.in	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1 @@
+stamp

Deleted: branches/release_1_4/base/src/programs/xar/config.guess
===================================================================
--- trunk/base/src/programs/xar/config.guess	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/config.guess	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,1466 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-
-timestamp='2005-08-03'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner <per at bothner.com>.
-# Please send patches to <config-patches at gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches at gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help" >&2
-       exit 1 ;;
-    * )
-       break ;;
-  esac
-done
-
-if test $# != 0; then
-  echo "$me: too many arguments$help" >&2
-  exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
-	for c in cc gcc c89 c99 ; do
-	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
-	     CC_FOR_BUILD="$c"; break ;
-	  fi ;
-	done ;
-	if test x"$CC_FOR_BUILD" = x ; then
-	  CC_FOR_BUILD=no_compiler_found ;
-	fi
-	;;
- ,,*)   CC_FOR_BUILD=$CC ;;
- ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi at noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-	PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    *:NetBSD:*:*)
-	# NetBSD (nbsd) targets should (where applicable) match one or
-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
-	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
-	# switched to ELF, *-*-netbsd* would select the old
-	# object file format.  This provides both forward
-	# compatibility and a consistent mechanism for selecting the
-	# object file format.
-	#
-	# Note: NetBSD doesn't particularly care about the vendor
-	# portion of the name.  We always set it to "unknown".
-	sysctl="sysctl -n hw.machine_arch"
-	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
-	case "${UNAME_MACHINE_ARCH}" in
-	    armeb) machine=armeb-unknown ;;
-	    arm*) machine=arm-unknown ;;
-	    sh3el) machine=shl-unknown ;;
-	    sh3eb) machine=sh-unknown ;;
-	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
-	esac
-	# The Operating System including object format, if it has switched
-	# to ELF recently, or will in the future.
-	case "${UNAME_MACHINE_ARCH}" in
-	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-		eval $set_cc_for_build
-		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-			| grep __ELF__ >/dev/null
-		then
-		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-		    # Return netbsd for either.  FIX?
-		    os=netbsd
-		else
-		    os=netbsdelf
-		fi
-		;;
-	    *)
-	        os=netbsd
-		;;
-	esac
-	# The OS release
-	# Debian GNU/NetBSD machines have a different userland, and
-	# thus, need a distinct triplet. However, they do not need
-	# kernel version information, so it can be replaced with a
-	# suitable tag, in the style of linux-gnu.
-	case "${UNAME_VERSION}" in
-	    Debian*)
-		release='-gnu'
-		;;
-	    *)
-		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-		;;
-	esac
-	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
-	# contains redundant information, the shorter form:
-	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}"
-	exit ;;
-    *:OpenBSD:*:*)
-	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
-	exit ;;
-    *:ekkoBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
-	exit ;;
-    macppc:MirBSD:*:*)
-	echo powerppc-unknown-mirbsd${UNAME_RELEASE}
-	exit ;;
-    *:MirBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
-	exit ;;
-    alpha:OSF1:*:*)
-	case $UNAME_RELEASE in
-	*4.0)
-		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-		;;
-	*5.*)
-	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
-		;;
-	esac
-	# According to Compaq, /usr/sbin/psrinfo has been available on
-	# OSF/1 and Tru64 systems produced since 1995.  I hope that
-	# covers most systems running today.  This code pipes the CPU
-	# types through head -n 1, so we only detect the type of CPU 0.
-	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
-	case "$ALPHA_CPU_TYPE" in
-	    "EV4 (21064)")
-		UNAME_MACHINE="alpha" ;;
-	    "EV4.5 (21064)")
-		UNAME_MACHINE="alpha" ;;
-	    "LCA4 (21066/21068)")
-		UNAME_MACHINE="alpha" ;;
-	    "EV5 (21164)")
-		UNAME_MACHINE="alphaev5" ;;
-	    "EV5.6 (21164A)")
-		UNAME_MACHINE="alphaev56" ;;
-	    "EV5.6 (21164PC)")
-		UNAME_MACHINE="alphapca56" ;;
-	    "EV5.7 (21164PC)")
-		UNAME_MACHINE="alphapca57" ;;
-	    "EV6 (21264)")
-		UNAME_MACHINE="alphaev6" ;;
-	    "EV6.7 (21264A)")
-		UNAME_MACHINE="alphaev67" ;;
-	    "EV6.8CB (21264C)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.8AL (21264B)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.8CX (21264D)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.9A (21264/EV69A)")
-		UNAME_MACHINE="alphaev69" ;;
-	    "EV7 (21364)")
-		UNAME_MACHINE="alphaev7" ;;
-	    "EV7.9 (21364A)")
-		UNAME_MACHINE="alphaev79" ;;
-	esac
-	# A Pn.n version is a patched version.
-	# A Vn.n version is a released version.
-	# A Tn.n version is a released field test version.
-	# A Xn.n version is an unreleased experimental baselevel.
-	# 1.2 uses "1.2" for uname -r.
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit ;;
-    Alpha\ *:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# Should we change UNAME_MACHINE based on the output of uname instead
-	# of the specific Alpha model?
-	echo alpha-pc-interix
-	exit ;;
-    21064:Windows_NT:50:3)
-	echo alpha-dec-winnt3.5
-	exit ;;
-    Amiga*:UNIX_System_V:4.0:*)
-	echo m68k-unknown-sysv4
-	exit ;;
-    *:[Aa]miga[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-amigaos
-	exit ;;
-    *:[Mm]orph[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-morphos
-	exit ;;
-    *:OS/390:*:*)
-	echo i370-ibm-openedition
-	exit ;;
-    *:z/VM:*:*)
-	echo s390-ibm-zvmoe
-	exit ;;
-    *:OS400:*:*)
-        echo powerpc-ibm-os400
-	exit ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit ;;
-    arm:riscos:*:*|arm:RISCOS:*:*)
-	echo arm-unknown-riscos
-	exit ;;
-    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-	echo hppa1.1-hitachi-hiuxmpp
-	exit ;;
-    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
-	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-	if test "`(/bin/universe) 2>/dev/null`" = att ; then
-		echo pyramid-pyramid-sysv3
-	else
-		echo pyramid-pyramid-bsd
-	fi
-	exit ;;
-    NILE*:*:*:dcosx)
-	echo pyramid-pyramid-svr4
-	exit ;;
-    DRS?6000:unix:4.0:6*)
-	echo sparc-icl-nx6
-	exit ;;
-    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
-	case `/usr/bin/uname -p` in
-	    sparc) echo sparc-icl-nx7; exit ;;
-	esac ;;
-    sun4H:SunOS:5.*:*)
-	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    i86pc:SunOS:5.*:*)
-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:6*:*)
-	# According to config.sub, this is the proper way to canonicalize
-	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-	# it's likely to be more like Solaris than SunOS4.
-	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:*:*)
-	case "`/usr/bin/arch -k`" in
-	    Series*|S4*)
-		UNAME_RELEASE=`uname -v`
-		;;
-	esac
-	# Japanese Language versions have a version number like `4.1.3-JL'.
-	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit ;;
-    sun3*:SunOS:*:*)
-	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit ;;
-    sun*:*:4.2BSD:*)
-	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-	case "`/bin/arch`" in
-	    sun3)
-		echo m68k-sun-sunos${UNAME_RELEASE}
-		;;
-	    sun4)
-		echo sparc-sun-sunos${UNAME_RELEASE}
-		;;
-	esac
-	exit ;;
-    aushp:SunOS:*:*)
-	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit ;;
-    # The situation for MiNT is a little confusing.  The machine name
-    # can be virtually everything (everything which is not
-    # "atarist" or "atariste" at least should have a processor
-    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
-    # to the lowercase version "mint" (or "freemint").  Finally
-    # the system name "TOS" denotes a system which is actually not
-    # MiNT.  But MiNT is downward compatible to TOS, so this should
-    # be no problem.
-    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
-    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
-    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
-    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
-    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
-    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
-    m68k:machten:*:*)
-	echo m68k-apple-machten${UNAME_RELEASE}
-	exit ;;
-    powerpc:machten:*:*)
-	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit ;;
-    RISC*:Mach:*:*)
-	echo mips-dec-mach_bsd4.3
-	exit ;;
-    RISC*:ULTRIX:*:*)
-	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit ;;
-    VAX*:ULTRIX*:*:*)
-	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit ;;
-    2020:CLIX:*:* | 2430:CLIX:*:*)
-	echo clipper-intergraph-clix${UNAME_RELEASE}
-	exit ;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-	int main (int argc, char *argv[]) {
-#else
-	int main (argc, argv) int argc; char *argv[]; {
-#endif
-	#if defined (host_mips) && defined (MIPSEB)
-	#if defined (SYSTYPE_SYSV)
-	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_SVR4)
-	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
-	#endif
-	#endif
-	  exit (-1);
-	}
-EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c &&
-	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-	  SYSTEM_NAME=`$dummy $dummyarg` &&
-	    { echo "$SYSTEM_NAME"; exit; }
-	echo mips-mips-riscos${UNAME_RELEASE}
-	exit ;;
-    Motorola:PowerMAX_OS:*:*)
-	echo powerpc-motorola-powermax
-	exit ;;
-    Motorola:*:4.3:PL8-*)
-	echo powerpc-harris-powermax
-	exit ;;
-    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
-	echo powerpc-harris-powermax
-	exit ;;
-    Night_Hawk:Power_UNIX:*:*)
-	echo powerpc-harris-powerunix
-	exit ;;
-    m88k:CX/UX:7*:*)
-	echo m88k-harris-cxux7
-	exit ;;
-    m88k:*:4*:R4*)
-	echo m88k-motorola-sysv4
-	exit ;;
-    m88k:*:3*:R3*)
-	echo m88k-motorola-sysv3
-	exit ;;
-    AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
-	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
-	then
-	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-	       [ ${TARGET_BINARY_INTERFACE}x = x ]
-	    then
-		echo m88k-dg-dgux${UNAME_RELEASE}
-	    else
-		echo m88k-dg-dguxbcs${UNAME_RELEASE}
-	    fi
-	else
-	    echo i586-dg-dgux${UNAME_RELEASE}
-	fi
- 	exit ;;
-    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
-	echo m88k-dolphin-sysv3
-	exit ;;
-    M88*:*:R3*:*)
-	# Delta 88k system running SVR3
-	echo m88k-motorola-sysv3
-	exit ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-	echo m88k-tektronix-sysv3
-	exit ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-	echo m68k-tektronix-bsd
-	exit ;;
-    *:IRIX*:*:*)
-	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit ;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
-	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
-    i*86:AIX:*:*)
-	echo i386-ibm-aix
-	exit ;;
-    ia64:AIX:*:*)
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-	exit ;;
-    *:AIX:2:3)
-	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		eval $set_cc_for_build
-		sed 's/^		//' << EOF >$dummy.c
-		#include <sys/systemcfg.h>
-
-		main()
-			{
-			if (!__power_pc())
-				exit(1);
-			puts("powerpc-ibm-aix3.2.5");
-			exit(0);
-			}
-EOF
-		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
-		then
-			echo "$SYSTEM_NAME"
-		else
-			echo rs6000-ibm-aix3.2.5
-		fi
-	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-		echo rs6000-ibm-aix3.2.4
-	else
-		echo rs6000-ibm-aix3.2
-	fi
-	exit ;;
-    *:AIX:*:[45])
-	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
-		IBM_ARCH=rs6000
-	else
-		IBM_ARCH=powerpc
-	fi
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit ;;
-    *:AIX:*:*)
-	echo rs6000-ibm-aix
-	exit ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
-	echo romp-ibm-bsd4.4
-	exit ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-	exit ;;                             # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-	echo rs6000-bull-bosx
-	exit ;;
-    DPX/2?00:B.O.S.:*:*)
-	echo m68k-bull-sysv3
-	exit ;;
-    9000/[34]??:4.3bsd:1.*:*)
-	echo m68k-hp-bsd
-	exit ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-	echo m68k-hp-bsd4.4
-	exit ;;
-    9000/[34678]??:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	case "${UNAME_MACHINE}" in
-	    9000/31? )            HP_ARCH=m68000 ;;
-	    9000/[34]?? )         HP_ARCH=m68k ;;
-	    9000/[678][0-9][0-9])
-		if [ -x /usr/bin/getconf ]; then
-		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
-			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
-		fi
-		if [ "${HP_ARCH}" = "" ]; then
-		    eval $set_cc_for_build
-		    sed 's/^              //' << EOF >$dummy.c
-
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
-
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
-
-                  switch (cpu)
-              	{
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-              	case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-              	    switch (bits)
-              		{
-              		case 64: puts ("hppa2.0w"); break;
-              		case 32: puts ("hppa2.0n"); break;
-              		default: puts ("hppa2.0"); break;
-              		} break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-              	    puts ("hppa2.0"); break;
-              #endif
-              	default: puts ("hppa1.0"); break;
-              	}
-                  exit (0);
-              }
-EOF
-		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
-		    test -z "$HP_ARCH" && HP_ARCH=hppa
-		fi ;;
-	esac
-	if [ ${HP_ARCH} = "hppa2.0w" ]
-	then
-	    eval $set_cc_for_build
-
-	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
-	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
-	    # generating 64-bit code.  GNU and HP use different nomenclature:
-	    #
-	    # $ CC_FOR_BUILD=cc ./config.guess
-	    # => hppa2.0w-hp-hpux11.23
-	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
-	    # => hppa64-hp-hpux11.23
-
-	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-		grep __LP64__ >/dev/null
-	    then
-		HP_ARCH="hppa2.0w"
-	    else
-		HP_ARCH="hppa64"
-	    fi
-	fi
-	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit ;;
-    ia64:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	echo ia64-hp-hpux${HPUX_REV}
-	exit ;;
-    3050*:HI-UX:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <unistd.h>
-	int
-	main ()
-	{
-	  long cpu = sysconf (_SC_CPU_VERSION);
-	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-	     results, however.  */
-	  if (CPU_IS_PA_RISC (cpu))
-	    {
-	      switch (cpu)
-		{
-		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-		  default: puts ("hppa-hitachi-hiuxwe2"); break;
-		}
-	    }
-	  else if (CPU_IS_HP_MC68K (cpu))
-	    puts ("m68k-hitachi-hiuxwe2");
-	  else puts ("unknown-hitachi-hiuxwe2");
-	  exit (0);
-	}
-EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
-		{ echo "$SYSTEM_NAME"; exit; }
-	echo unknown-hitachi-hiuxwe2
-	exit ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-	echo hppa1.1-hp-bsd
-	exit ;;
-    9000/8??:4.3bsd:*:*)
-	echo hppa1.0-hp-bsd
-	exit ;;
-    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-	echo hppa1.0-hp-mpeix
-	exit ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
-	echo hppa1.1-hp-osf
-	exit ;;
-    hp8??:OSF1:*:*)
-	echo hppa1.0-hp-osf
-	exit ;;
-    i*86:OSF1:*:*)
-	if [ -x /usr/sbin/sysversion ] ; then
-	    echo ${UNAME_MACHINE}-unknown-osf1mk
-	else
-	    echo ${UNAME_MACHINE}-unknown-osf1
-	fi
-	exit ;;
-    parisc*:Lites*:*:*)
-	echo hppa1.1-hp-lites
-	exit ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-	echo c1-convex-bsd
-        exit ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-        exit ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-	echo c34-convex-bsd
-        exit ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-	echo c38-convex-bsd
-        exit ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-	echo c4-convex-bsd
-        exit ;;
-    CRAY*Y-MP:*:*:*)
-	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*[A-Z]90:*:*:*)
-	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
-	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-	      -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*TS:*:*:*)
-	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*T3E:*:*:*)
-	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*SV1:*:*:*)
-	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    *:UNICOS/mp:*:*)
-	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit ;;
-    5000:UNIX_System_V:4.*:*)
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-	exit ;;
-    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-	exit ;;
-    sparc*:BSD/OS:*:*)
-	echo sparc-unknown-bsdi${UNAME_RELEASE}
-	exit ;;
-    *:BSD/OS:*:*)
-	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-	exit ;;
-    *:FreeBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-	exit ;;
-    i*:CYGWIN*:*)
-	echo ${UNAME_MACHINE}-pc-cygwin
-	exit ;;
-    i*:MINGW*:*)
-	echo ${UNAME_MACHINE}-pc-mingw32
-	exit ;;
-    i*:windows32*:*)
-    	# uname -m includes "-pc" on this system.
-    	echo ${UNAME_MACHINE}-mingw32
-	exit ;;
-    i*:PW*:*)
-	echo ${UNAME_MACHINE}-pc-pw32
-	exit ;;
-    x86:Interix*:[34]*)
-	echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
-	exit ;;
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
-	echo i${UNAME_MACHINE}-pc-mks
-	exit ;;
-    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
-	# UNAME_MACHINE based on the output of uname instead of i386?
-	echo i586-pc-interix
-	exit ;;
-    i*:UWIN*:*)
-	echo ${UNAME_MACHINE}-pc-uwin
-	exit ;;
-    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-	echo x86_64-unknown-cygwin
-	exit ;;
-    p*:CYGWIN*:*)
-	echo powerpcle-unknown-cygwin
-	exit ;;
-    prep*:SunOS:5.*:*)
-	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    *:GNU:*:*)
-	# the GNU system
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit ;;
-    *:GNU/*:*:*)
-	# other systems with GNU libc and userland
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
-	exit ;;
-    i*86:Minix:*:*)
-	echo ${UNAME_MACHINE}-pc-minix
-	exit ;;
-    arm*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    cris:Linux:*:*)
-	echo cris-axis-linux-gnu
-	exit ;;
-    crisv32:Linux:*:*)
-	echo crisv32-axis-linux-gnu
-	exit ;;
-    frv:Linux:*:*)
-    	echo frv-unknown-linux-gnu
-	exit ;;
-    ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    m32r*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    mips:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef mips
-	#undef mipsel
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mipsel
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips
-	#else
-	CPU=
-	#endif
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-	;;
-    mips64:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef mips64
-	#undef mips64el
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mips64el
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips64
-	#else
-	CPU=
-	#endif
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-	;;
-    or32:Linux:*:*)
-	echo or32-unknown-linux-gnu
-	exit ;;
-    ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
-	exit ;;
-    ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
-	exit ;;
-    alpha:Linux:*:*)
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-	  EV5)   UNAME_MACHINE=alphaev5 ;;
-	  EV56)  UNAME_MACHINE=alphaev56 ;;
-	  PCA56) UNAME_MACHINE=alphapca56 ;;
-	  PCA57) UNAME_MACHINE=alphapca56 ;;
-	  EV6)   UNAME_MACHINE=alphaev6 ;;
-	  EV67)  UNAME_MACHINE=alphaev67 ;;
-	  EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-	exit ;;
-    parisc:Linux:*:* | hppa:Linux:*:*)
-	# Look for CPU level
-	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
-	  *)    echo hppa-unknown-linux-gnu ;;
-	esac
-	exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
-	exit ;;
-    s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux
-	exit ;;
-    sh64*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    x86_64:Linux:*:*)
-	echo x86_64-unknown-linux-gnu
-	exit ;;
-    i*86:Linux:*:*)
-	# The BFD linker knows what the default object file format is, so
-	# first see if it will tell us. cd to the root directory to prevent
-	# problems with other programs or directories called `ld' in the path.
-	# Set LC_ALL=C to ensure ld outputs messages in English.
-	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-			 | sed -ne '/supported targets:/!d
-				    s/[ 	][ 	]*/ /g
-				    s/.*supported targets: *//
-				    s/ .*//
-				    p'`
-        case "$ld_supported_targets" in
-	  elf32-i386)
-		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-		;;
-	  a.out-i386-linux)
-		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-		exit ;;
-	  coff-i386)
-		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-		exit ;;
-	  "")
-		# Either a pre-BFD a.out linker (linux-gnuoldld) or
-		# one that does not give us useful --help.
-		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-		exit ;;
-	esac
-	# Determine whether the default compiler is a.out or elf
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <features.h>
-	#ifdef __ELF__
-	# ifdef __GLIBC__
-	#  if __GLIBC__ >= 2
-	LIBC=gnu
-	#  else
-	LIBC=gnulibc1
-	#  endif
-	# else
-	LIBC=gnulibc1
-	# endif
-	#else
-	#ifdef __INTEL_COMPILER
-	LIBC=gnu
-	#else
-	LIBC=gnuaout
-	#endif
-	#endif
-	#ifdef __dietlibc__
-	LIBC=dietlibc
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-	test x"${LIBC}" != x && {
-		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-		exit
-	}
-	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-	;;
-    i*86:DYNIX/ptx:4*:*)
-	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
-	# earlier versions are messed up and put the nodename in both
-	# sysname and nodename.
-	echo i386-sequent-sysv4
-	exit ;;
-    i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
-	# I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
-	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-	exit ;;
-    i*86:OS/2:*:*)
-	# If we were able to find `uname', then EMX Unix compatibility
-	# is probably installed.
-	echo ${UNAME_MACHINE}-pc-os2-emx
-	exit ;;
-    i*86:XTS-300:*:STOP)
-	echo ${UNAME_MACHINE}-unknown-stop
-	exit ;;
-    i*86:atheos:*:*)
-	echo ${UNAME_MACHINE}-unknown-atheos
-	exit ;;
-    i*86:syllable:*:*)
-	echo ${UNAME_MACHINE}-pc-syllable
-	exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
-	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    i*86:*DOS:*:*)
-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit ;;
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
-	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
-	else
-		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
-	fi
-	exit ;;
-    i*86:*:5:[678]*)
-    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
-	case `/bin/uname -X | grep "^Machine"` in
-	    *486*)	     UNAME_MACHINE=i486 ;;
-	    *Pentium)	     UNAME_MACHINE=i586 ;;
-	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
-	esac
-	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-	exit ;;
-    i*86:*:3.2:*)
-	if test -f /usr/options/cb.name; then
-		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-	elif /bin/uname -X 2>/dev/null >/dev/null ; then
-		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
-		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
-		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
-			&& UNAME_MACHINE=i586
-		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
-	else
-		echo ${UNAME_MACHINE}-pc-sysv32
-	fi
-	exit ;;
-    pc:*:*:*)
-	# Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-	echo i386-pc-msdosdjgpp
-        exit ;;
-    Intel:Mach:3*:*)
-	echo i386-pc-mach3
-	exit ;;
-    paragon:*:*:*)
-	echo i860-intel-osf1
-	exit ;;
-    i860:*:4.*:*) # i860-SVR4
-	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-	else # Add other i860-SVR4 vendors below as they are discovered.
-	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-	fi
-	exit ;;
-    mini*:CTIX:SYS*5:*)
-	# "miniframe"
-	echo m68010-convergent-sysv
-	exit ;;
-    mc68k:UNIX:SYSTEM5:3.51m)
-	echo m68k-convergent-sysv
-	exit ;;
-    M680?0:D-NIX:5.3:*)
-	echo m68k-diab-dnix
-	exit ;;
-    M68*:*:R3V[5678]*:*)
-	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
-	OS_REL=''
-	test -r /etc/.relid \
-	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && { echo i486-ncr-sysv4; exit; } ;;
-    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-	echo m68k-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    mc68030:UNIX_System_V:4.*:*)
-	echo m68k-atari-sysv4
-	exit ;;
-    TSUNAMI:LynxOS:2.*:*)
-	echo sparc-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    rs6000:LynxOS:2.*:*)
-	echo rs6000-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
-	echo powerpc-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    SM[BE]S:UNIX_SV:*:*)
-	echo mips-dde-sysv${UNAME_RELEASE}
-	exit ;;
-    RM*:ReliantUNIX-*:*:*)
-	echo mips-sni-sysv4
-	exit ;;
-    RM*:SINIX-*:*:*)
-	echo mips-sni-sysv4
-	exit ;;
-    *:SINIX-*:*:*)
-	if uname -p 2>/dev/null >/dev/null ; then
-		UNAME_MACHINE=`(uname -p) 2>/dev/null`
-		echo ${UNAME_MACHINE}-sni-sysv4
-	else
-		echo ns32k-sni-sysv
-	fi
-	exit ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel at ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit ;;
-    *:UNIX_System_V:4*:FTX*)
-	# From Gerald Hewes <hewes at openmarket.com>.
-	# How about differentiating between stratus architectures? -djm
-	echo hppa1.1-stratus-sysv4
-	exit ;;
-    *:*:*:FTX*)
-	# From seanf at swdc.stratus.com.
-	echo i860-stratus-sysv4
-	exit ;;
-    i*86:VOS:*:*)
-	# From Paul.Green at stratus.com.
-	echo ${UNAME_MACHINE}-stratus-vos
-	exit ;;
-    *:VOS:*:*)
-	# From Paul.Green at stratus.com.
-	echo hppa1.1-stratus-vos
-	exit ;;
-    mc68*:A/UX:*:*)
-	echo m68k-apple-aux${UNAME_RELEASE}
-	exit ;;
-    news*:NEWS-OS:6*:*)
-	echo mips-sony-newsos6
-	exit ;;
-    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-	if [ -d /usr/nec ]; then
-	        echo mips-nec-sysv${UNAME_RELEASE}
-	else
-	        echo mips-unknown-sysv${UNAME_RELEASE}
-	fi
-        exit ;;
-    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
-	echo powerpc-be-beos
-	exit ;;
-    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
-	echo powerpc-apple-beos
-	exit ;;
-    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
-	echo i586-pc-beos
-	exit ;;
-    SX-4:SUPER-UX:*:*)
-	echo sx4-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-5:SUPER-UX:*:*)
-	echo sx5-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-6:SUPER-UX:*:*)
-	echo sx6-nec-superux${UNAME_RELEASE}
-	exit ;;
-    Power*:Rhapsody:*:*)
-	echo powerpc-apple-rhapsody${UNAME_RELEASE}
-	exit ;;
-    *:Rhapsody:*:*)
-	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-	exit ;;
-    *:Darwin:*:*)
-	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-	case $UNAME_PROCESSOR in
-	    *86) UNAME_PROCESSOR=i686 ;;
-	    unknown) UNAME_PROCESSOR=powerpc ;;
-	esac
-	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-	exit ;;
-    *:procnto*:*:* | *:QNX:[0123456789]*:*)
-	UNAME_PROCESSOR=`uname -p`
-	if test "$UNAME_PROCESSOR" = "x86"; then
-		UNAME_PROCESSOR=i386
-		UNAME_MACHINE=pc
-	fi
-	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-	exit ;;
-    *:QNX:*:4*)
-	echo i386-pc-qnx
-	exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
-	echo nse-tandem-nsk${UNAME_RELEASE}
-	exit ;;
-    NSR-?:NONSTOP_KERNEL:*:*)
-	echo nsr-tandem-nsk${UNAME_RELEASE}
-	exit ;;
-    *:NonStop-UX:*:*)
-	echo mips-compaq-nonstopux
-	exit ;;
-    BS2000:POSIX*:*:*)
-	echo bs2000-siemens-sysv
-	exit ;;
-    DS/*:UNIX_System_V:*:*)
-	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-	exit ;;
-    *:Plan9:*:*)
-	# "uname -m" is not consistent, so use $cputype instead. 386
-	# is converted to i386 for consistency with other x86
-	# operating systems.
-	if test "$cputype" = "386"; then
-	    UNAME_MACHINE=i386
-	else
-	    UNAME_MACHINE="$cputype"
-	fi
-	echo ${UNAME_MACHINE}-unknown-plan9
-	exit ;;
-    *:TOPS-10:*:*)
-	echo pdp10-unknown-tops10
-	exit ;;
-    *:TENEX:*:*)
-	echo pdp10-unknown-tenex
-	exit ;;
-    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-	echo pdp10-dec-tops20
-	exit ;;
-    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-	echo pdp10-xkl-tops20
-	exit ;;
-    *:TOPS-20:*:*)
-	echo pdp10-unknown-tops20
-	exit ;;
-    *:ITS:*:*)
-	echo pdp10-unknown-its
-	exit ;;
-    SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
-	exit ;;
-    *:DragonFly:*:*)
-	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-	exit ;;
-    *:*VMS:*:*)
-    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
-	case "${UNAME_MACHINE}" in
-	    A*) echo alpha-dec-vms ; exit ;;
-	    I*) echo ia64-dec-vms ; exit ;;
-	    V*) echo vax-dec-vms ; exit ;;
-	esac ;;
-    *:XENIX:*:SysV)
-	echo i386-pc-xenix
-	exit ;;
-    i*86:skyos:*:*)
-	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
-	exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-          "4"
-#else
-	  ""
-#endif
-         ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-	printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-	printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-	{ echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-	echo c1-convex-bsd
-	exit ;;
-    c2*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-	exit ;;
-    c34*)
-	echo c34-convex-bsd
-	exit ;;
-    c38*)
-	echo c38-convex-bsd
-	exit ;;
-    c4*)
-	echo c4-convex-bsd
-	exit ;;
-    esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
-and
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches at gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo               = `(hostinfo) 2>/dev/null`
-/bin/universe          = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch              = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:

Copied: branches/release_1_4/base/src/programs/xar/config.guess (from rev 23968, trunk/base/src/programs/xar/config.guess)
===================================================================
--- branches/release_1_4/base/src/programs/xar/config.guess	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/config.guess	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,1466 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+timestamp='2005-08-03'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per at bothner.com>.
+# Please send patches to <config-patches at gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+	for c in cc gcc c89 c99 ; do
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found ;
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi at noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep __ELF__ >/dev/null
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+	        os=netbsd
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case "${UNAME_VERSION}" in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit ;;
+    *:OpenBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	exit ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit ;;
+    macppc:MirBSD:*:*)
+	echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    alpha:OSF1:*:*)
+	case $UNAME_RELEASE in
+	*4.0)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+		;;
+	*5.*)
+	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case "$ALPHA_CPU_TYPE" in
+	    "EV4 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE="alphaev5" ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE="alphaev56" ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE="alphapca56" ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE="alphapca57" ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE="alphaev6" ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE="alphaev67" ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE="alphaev69" ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE="alphaev7" ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE="alphaev79" ;;
+	esac
+	# A Pn.n version is a patched version.
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	exit ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-unknown-sysv4
+	exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+	exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+	echo arm-unknown-riscos
+	exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7; exit ;;
+	esac ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    i86pc:SunOS:5.*:*)
+	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+        exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c &&
+	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	    { echo "$SYSTEM_NAME"; exit; }
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit ;;
+    Motorola:*:4.3:PL8-*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+ 	exit ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		then
+			echo "$SYSTEM_NAME"
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit ;;
+    *:AIX:*:[45])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit ;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if [ -x /usr/bin/getconf ]; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+              	{
+              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+              	case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+              	    switch (bits)
+              		{
+              		case 64: puts ("hppa2.0w"); break;
+              		case 32: puts ("hppa2.0n"); break;
+              		default: puts ("hppa2.0"); break;
+              		} break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+              	    puts ("hppa2.0"); break;
+              #endif
+              	default: puts ("hppa1.0"); break;
+              	}
+                  exit (0);
+              }
+EOF
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if [ ${HP_ARCH} = "hppa2.0w" ]
+	then
+	    eval $set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep __LP64__ >/dev/null
+	    then
+		HP_ARCH="hppa2.0w"
+	    else
+		HP_ARCH="hppa64"
+	    fi
+	fi
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit ;;
+    3050*:HI-UX:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+		{ echo "$SYSTEM_NAME"; exit; }
+	echo unknown-hitachi-hiuxwe2
+	exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-unknown-osf1
+	fi
+	exit ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+        exit ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+        exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+        exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+        exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+        exit ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*[A-Z]90:*:*:*)
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*TS:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*T3E:*:*:*)
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    *:UNICOS/mp:*:*)
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:FreeBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
+    i*:CYGWIN*:*)
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit ;;
+    i*:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit ;;
+    i*:windows32*:*)
+    	# uname -m includes "-pc" on this system.
+    	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit ;;
+    x86:Interix*:[34]*)
+	echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+	exit ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	exit ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i586-pc-interix
+	exit ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	echo x86_64-unknown-cygwin
+	exit ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-unknown-cygwin
+	exit ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    *:GNU:*:*)
+	# the GNU system
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit ;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+	exit ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit ;;
+    arm*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    cris:Linux:*:*)
+	echo cris-axis-linux-gnu
+	exit ;;
+    crisv32:Linux:*:*)
+	echo crisv32-axis-linux-gnu
+	exit ;;
+    frv:Linux:*:*)
+    	echo frv-unknown-linux-gnu
+	exit ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    mips:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips
+	#undef mipsel
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mipsel
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	;;
+    mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips64
+	#undef mips64el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mips64el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips64
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	;;
+    or32:Linux:*:*)
+	echo or32-unknown-linux-gnu
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
+	exit ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
+	exit ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
+	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
+	  *)    echo hppa-unknown-linux-gnu ;;
+	esac
+	exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
+	exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux
+	exit ;;
+    sh64*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    x86_64:Linux:*:*)
+	echo x86_64-unknown-linux-gnu
+	exit ;;
+    i*86:Linux:*:*)
+	# The BFD linker knows what the default object file format is, so
+	# first see if it will tell us. cd to the root directory to prevent
+	# problems with other programs or directories called `ld' in the path.
+	# Set LC_ALL=C to ensure ld outputs messages in English.
+	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+			 | sed -ne '/supported targets:/!d
+				    s/[ 	][ 	]*/ /g
+				    s/.*supported targets: *//
+				    s/ .*//
+				    p'`
+        case "$ld_supported_targets" in
+	  elf32-i386)
+		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+		;;
+	  a.out-i386-linux)
+		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+		exit ;;
+	  coff-i386)
+		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+		exit ;;
+	  "")
+		# Either a pre-BFD a.out linker (linux-gnuoldld) or
+		# one that does not give us useful --help.
+		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+		exit ;;
+	esac
+	# Determine whether the default compiler is a.out or elf
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <features.h>
+	#ifdef __ELF__
+	# ifdef __GLIBC__
+	#  if __GLIBC__ >= 2
+	LIBC=gnu
+	#  else
+	LIBC=gnulibc1
+	#  endif
+	# else
+	LIBC=gnulibc1
+	# endif
+	#else
+	#ifdef __INTEL_COMPILER
+	LIBC=gnu
+	#else
+	LIBC=gnuaout
+	#endif
+	#endif
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+	test x"${LIBC}" != x && {
+		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+		exit
+	}
+	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+	;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit ;;
+    i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit ;;
+    i*86:*:5:[678]*)
+    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+	echo i386-pc-msdosdjgpp
+        exit ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit ;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && { echo i486-ncr-sysv4; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel at ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes at openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit ;;
+    *:*:*:FTX*)
+	# From seanf at swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit ;;
+    i*86:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo ${UNAME_MACHINE}-stratus-vos
+	exit ;;
+    *:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo hppa1.1-stratus-vos
+	exit ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+	        echo mips-nec-sysv${UNAME_RELEASE}
+	else
+	        echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+        exit ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Darwin:*:*)
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	case $UNAME_PROCESSOR in
+	    *86) UNAME_PROCESSOR=i686 ;;
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+	exit ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
+    *:*VMS:*:*)
+    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms ; exit ;;
+	    I*) echo ia64-dec-vms ; exit ;;
+	    V*) echo vax-dec-vms ; exit ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
+	exit ;;
+    i*86:skyos:*:*)
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+	  ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+	printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+	printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+	{ echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+	echo c1-convex-bsd
+	exit ;;
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    c34*)
+	echo c34-convex-bsd
+	exit ;;
+    c38*)
+	echo c38-convex-bsd
+	exit ;;
+    c4*)
+	echo c4-convex-bsd
+	exit ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches at gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:

Deleted: branches/release_1_4/base/src/programs/xar/config.sub
===================================================================
--- trunk/base/src/programs/xar/config.sub	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/config.sub	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,1579 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-
-timestamp='2005-07-08'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Please send patches to <config-patches at gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches at gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help"
-       exit 1 ;;
-
-    *local*)
-       # First pass through any local machine types.
-       echo $1
-       exit ;;
-
-    * )
-       break ;;
-  esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
-    exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
-    exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
-  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-	-sun*os*)
-		# Prevent following clause from handling this invalid input.
-		;;
-	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis | -knuth | -cray)
-		os=
-		basic_machine=$1
-		;;
-	-sim | -cisco | -oki | -wec | -winbond)
-		os=
-		basic_machine=$1
-		;;
-	-scout)
-		;;
-	-wrs)
-		os=-vxworks
-		basic_machine=$1
-		;;
-	-chorusos*)
-		os=-chorusos
-		basic_machine=$1
-		;;
- 	-chorusrdb)
- 		os=-chorusrdb
-		basic_machine=$1
- 		;;
-	-hiux*)
-		os=-hiuxwe2
-		;;
-	-sco5)
-		os=-sco3.2v5
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco4)
-		os=-sco3.2v4
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2.[4-9]*)
-		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2v[4-9]*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco*)
-		os=-sco3.2v2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-udk*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-isc)
-		os=-isc2.2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-clix*)
-		basic_machine=clipper-intergraph
-		;;
-	-isc*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-lynx*)
-		os=-lynxos
-		;;
-	-ptx*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-		;;
-	-windowsnt*)
-		os=`echo $os | sed -e 's/windowsnt/winnt/'`
-		;;
-	-psos*)
-		os=-psos
-		;;
-	-mint | -mint[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
-		;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
-	# Recognize the basic CPU types without company name.
-	# Some are omitted here because they have special meanings below.
-	1750a | 580 \
-	| a29k \
-	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
-	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-	| am33_2.0 \
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
-	| bfin \
-	| c4x | clipper \
-	| d10v | d30v | dlx | dsp16xx \
-	| fr30 | frv \
-	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-	| i370 | i860 | i960 | ia64 \
-	| ip2k | iq2000 \
-	| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
-	| mips | mipsbe | mipseb | mipsel | mipsle \
-	| mips16 \
-	| mips64 | mips64el \
-	| mips64vr | mips64vrel \
-	| mips64orion | mips64orionel \
-	| mips64vr4100 | mips64vr4100el \
-	| mips64vr4300 | mips64vr4300el \
-	| mips64vr5000 | mips64vr5000el \
-	| mips64vr5900 | mips64vr5900el \
-	| mipsisa32 | mipsisa32el \
-	| mipsisa32r2 | mipsisa32r2el \
-	| mipsisa64 | mipsisa64el \
-	| mipsisa64r2 | mipsisa64r2el \
-	| mipsisa64sb1 | mipsisa64sb1el \
-	| mipsisa64sr71k | mipsisa64sr71kel \
-	| mipstx39 | mipstx39el \
-	| mn10200 | mn10300 \
-	| ms1 \
-	| msp430 \
-	| ns16k | ns32k \
-	| or32 \
-	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
-	| pyramid \
-	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
-	| sh64 | sh64le \
-	| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
-	| sparcv8 | sparcv9 | sparcv9b \
-	| strongarm \
-	| tahoe | thumb | tic4x | tic80 | tron \
-	| v850 | v850e \
-	| we32k \
-	| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
-	| z8k)
-		basic_machine=$basic_machine-unknown
-		;;
-	m32c)
-		basic_machine=$basic_machine-unknown
-		;;
-	m6811 | m68hc11 | m6812 | m68hc12)
-		# Motorola 68HC11/12.
-		basic_machine=$basic_machine-unknown
-		os=-none
-		;;
-	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
-		;;
-
-	# We use `pc' rather than `unknown'
-	# because (1) that's what they normally are, and
-	# (2) the word "unknown" tends to confuse beginning users.
-	i*86 | x86_64)
-	  basic_machine=$basic_machine-pc
-	  ;;
-	# Object if more than one company name word.
-	*-*-*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-	# Recognize the basic CPU types with company name.
-	580-* \
-	| a29k-* \
-	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
-	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
-	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-	| avr-* \
-	| bfin-* | bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-	| clipper-* | craynv-* | cydra-* \
-	| d10v-* | d30v-* | dlx-* \
-	| elxsi-* \
-	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
-	| h8300-* | h8500-* \
-	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
-	| i*86-* | i860-* | i960-* | ia64-* \
-	| ip2k-* | iq2000-* \
-	| m32r-* | m32rle-* \
-	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | maxq-* | mcore-* \
-	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
-	| mips16-* \
-	| mips64-* | mips64el-* \
-	| mips64vr-* | mips64vrel-* \
-	| mips64orion-* | mips64orionel-* \
-	| mips64vr4100-* | mips64vr4100el-* \
-	| mips64vr4300-* | mips64vr4300el-* \
-	| mips64vr5000-* | mips64vr5000el-* \
-	| mips64vr5900-* | mips64vr5900el-* \
-	| mipsisa32-* | mipsisa32el-* \
-	| mipsisa32r2-* | mipsisa32r2el-* \
-	| mipsisa64-* | mipsisa64el-* \
-	| mipsisa64r2-* | mipsisa64r2el-* \
-	| mipsisa64sb1-* | mipsisa64sb1el-* \
-	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
-	| mipstx39-* | mipstx39el-* \
-	| mmix-* \
-	| ms1-* \
-	| msp430-* \
-	| none-* | np1-* | ns16k-* | ns32k-* \
-	| orion-* \
-	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
-	| pyramid-* \
-	| romp-* | rs6000-* \
-	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
-	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-	| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
-	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
-	| tahoe-* | thumb-* \
-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-	| tron-* \
-	| v850-* | v850e-* | vax-* \
-	| we32k-* \
-	| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
-	| xstormy16-* | xtensa-* \
-	| ymp-* \
-	| z8k-*)
-		;;
-	m32c-*)
-		;;
-	# Recognize the various machine names and aliases which stand
-	# for a CPU type and a company and sometimes even an OS.
-	386bsd)
-		basic_machine=i386-unknown
-		os=-bsd
-		;;
-	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-		basic_machine=m68000-att
-		;;
-	3b*)
-		basic_machine=we32k-att
-		;;
-	a29khif)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-    	abacus)
-		basic_machine=abacus-unknown
-		;;
-	adobe68k)
-		basic_machine=m68010-adobe
-		os=-scout
-		;;
-	alliant | fx80)
-		basic_machine=fx80-alliant
-		;;
-	altos | altos3068)
-		basic_machine=m68k-altos
-		;;
-	am29k)
-		basic_machine=a29k-none
-		os=-bsd
-		;;
-	amd64)
-		basic_machine=x86_64-pc
-		;;
-	amd64-*)
-		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	amdahl)
-		basic_machine=580-amdahl
-		os=-sysv
-		;;
-	amiga | amiga-*)
-		basic_machine=m68k-unknown
-		;;
-	amigaos | amigados)
-		basic_machine=m68k-unknown
-		os=-amigaos
-		;;
-	amigaunix | amix)
-		basic_machine=m68k-unknown
-		os=-sysv4
-		;;
-	apollo68)
-		basic_machine=m68k-apollo
-		os=-sysv
-		;;
-	apollo68bsd)
-		basic_machine=m68k-apollo
-		os=-bsd
-		;;
-	aux)
-		basic_machine=m68k-apple
-		os=-aux
-		;;
-	balance)
-		basic_machine=ns32k-sequent
-		os=-dynix
-		;;
-	c90)
-		basic_machine=c90-cray
-		os=-unicos
-		;;
-	convex-c1)
-		basic_machine=c1-convex
-		os=-bsd
-		;;
-	convex-c2)
-		basic_machine=c2-convex
-		os=-bsd
-		;;
-	convex-c32)
-		basic_machine=c32-convex
-		os=-bsd
-		;;
-	convex-c34)
-		basic_machine=c34-convex
-		os=-bsd
-		;;
-	convex-c38)
-		basic_machine=c38-convex
-		os=-bsd
-		;;
-	cray | j90)
-		basic_machine=j90-cray
-		os=-unicos
-		;;
-	craynv)
-		basic_machine=craynv-cray
-		os=-unicosmp
-		;;
-	cr16c)
-		basic_machine=cr16c-unknown
-		os=-elf
-		;;
-	crds | unos)
-		basic_machine=m68k-crds
-		;;
-	crisv32 | crisv32-* | etraxfs*)
-		basic_machine=crisv32-axis
-		;;
-	cris | cris-* | etrax*)
-		basic_machine=cris-axis
-		;;
-	crx)
-		basic_machine=crx-unknown
-		os=-elf
-		;;
-	da30 | da30-*)
-		basic_machine=m68k-da30
-		;;
-	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-		basic_machine=mips-dec
-		;;
-	decsystem10* | dec10*)
-		basic_machine=pdp10-dec
-		os=-tops10
-		;;
-	decsystem20* | dec20*)
-		basic_machine=pdp10-dec
-		os=-tops20
-		;;
-	delta | 3300 | motorola-3300 | motorola-delta \
-	      | 3300-motorola | delta-motorola)
-		basic_machine=m68k-motorola
-		;;
-	delta88)
-		basic_machine=m88k-motorola
-		os=-sysv3
-		;;
-	djgpp)
-		basic_machine=i586-pc
-		os=-msdosdjgpp
-		;;
-	dpx20 | dpx20-*)
-		basic_machine=rs6000-bull
-		os=-bosx
-		;;
-	dpx2* | dpx2*-bull)
-		basic_machine=m68k-bull
-		os=-sysv3
-		;;
-	ebmon29k)
-		basic_machine=a29k-amd
-		os=-ebmon
-		;;
-	elxsi)
-		basic_machine=elxsi-elxsi
-		os=-bsd
-		;;
-	encore | umax | mmax)
-		basic_machine=ns32k-encore
-		;;
-	es1800 | OSE68k | ose68k | ose | OSE)
-		basic_machine=m68k-ericsson
-		os=-ose
-		;;
-	fx2800)
-		basic_machine=i860-alliant
-		;;
-	genix)
-		basic_machine=ns32k-ns
-		;;
-	gmicro)
-		basic_machine=tron-gmicro
-		os=-sysv
-		;;
-	go32)
-		basic_machine=i386-pc
-		os=-go32
-		;;
-	h3050r* | hiux*)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	h8300hms)
-		basic_machine=h8300-hitachi
-		os=-hms
-		;;
-	h8300xray)
-		basic_machine=h8300-hitachi
-		os=-xray
-		;;
-	h8500hms)
-		basic_machine=h8500-hitachi
-		os=-hms
-		;;
-	harris)
-		basic_machine=m88k-harris
-		os=-sysv3
-		;;
-	hp300-*)
-		basic_machine=m68k-hp
-		;;
-	hp300bsd)
-		basic_machine=m68k-hp
-		os=-bsd
-		;;
-	hp300hpux)
-		basic_machine=m68k-hp
-		os=-hpux
-		;;
-	hp3k9[0-9][0-9] | hp9[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hp9k2[0-9][0-9] | hp9k31[0-9])
-		basic_machine=m68000-hp
-		;;
-	hp9k3[2-9][0-9])
-		basic_machine=m68k-hp
-		;;
-	hp9k6[0-9][0-9] | hp6[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hp9k7[0-79][0-9] | hp7[0-79][0-9])
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k78[0-9] | hp78[0-9])
-		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
-		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][13679] | hp8[0-9][13679])
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][0-9] | hp8[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hppa-next)
-		os=-nextstep3
-		;;
-	hppaosf)
-		basic_machine=hppa1.1-hp
-		os=-osf
-		;;
-	hppro)
-		basic_machine=hppa1.1-hp
-		os=-proelf
-		;;
-	i370-ibm* | ibm*)
-		basic_machine=i370-ibm
-		;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-	i*86v32)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv32
-		;;
-	i*86v4*)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv4
-		;;
-	i*86v)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv
-		;;
-	i*86sol2)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-solaris2
-		;;
-	i386mach)
-		basic_machine=i386-mach
-		os=-mach
-		;;
-	i386-vsta | vsta)
-		basic_machine=i386-unknown
-		os=-vsta
-		;;
-	iris | iris4d)
-		basic_machine=mips-sgi
-		case $os in
-		    -irix*)
-			;;
-		    *)
-			os=-irix4
-			;;
-		esac
-		;;
-	isi68 | isi)
-		basic_machine=m68k-isi
-		os=-sysv
-		;;
-	m88k-omron*)
-		basic_machine=m88k-omron
-		;;
-	magnum | m3230)
-		basic_machine=mips-mips
-		os=-sysv
-		;;
-	merlin)
-		basic_machine=ns32k-utek
-		os=-sysv
-		;;
-	mingw32)
-		basic_machine=i386-pc
-		os=-mingw32
-		;;
-	miniframe)
-		basic_machine=m68000-convergent
-		;;
-	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
-		;;
-	mips3*-*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-		;;
-	mips3*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-		;;
-	monitor)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	morphos)
-		basic_machine=powerpc-unknown
-		os=-morphos
-		;;
-	msdos)
-		basic_machine=i386-pc
-		os=-msdos
-		;;
-	mvs)
-		basic_machine=i370-ibm
-		os=-mvs
-		;;
-	ncr3000)
-		basic_machine=i486-ncr
-		os=-sysv4
-		;;
-	netbsd386)
-		basic_machine=i386-unknown
-		os=-netbsd
-		;;
-	netwinder)
-		basic_machine=armv4l-rebel
-		os=-linux
-		;;
-	news | news700 | news800 | news900)
-		basic_machine=m68k-sony
-		os=-newsos
-		;;
-	news1000)
-		basic_machine=m68030-sony
-		os=-newsos
-		;;
-	news-3600 | risc-news)
-		basic_machine=mips-sony
-		os=-newsos
-		;;
-	necv70)
-		basic_machine=v70-nec
-		os=-sysv
-		;;
-	next | m*-next )
-		basic_machine=m68k-next
-		case $os in
-		    -nextstep* )
-			;;
-		    -ns2*)
-		      os=-nextstep2
-			;;
-		    *)
-		      os=-nextstep3
-			;;
-		esac
-		;;
-	nh3000)
-		basic_machine=m68k-harris
-		os=-cxux
-		;;
-	nh[45]000)
-		basic_machine=m88k-harris
-		os=-cxux
-		;;
-	nindy960)
-		basic_machine=i960-intel
-		os=-nindy
-		;;
-	mon960)
-		basic_machine=i960-intel
-		os=-mon960
-		;;
-	nonstopux)
-		basic_machine=mips-compaq
-		os=-nonstopux
-		;;
-	np1)
-		basic_machine=np1-gould
-		;;
-	nsr-tandem)
-		basic_machine=nsr-tandem
-		;;
-	op50n-* | op60c-*)
-		basic_machine=hppa1.1-oki
-		os=-proelf
-		;;
-	openrisc | openrisc-*)
-		basic_machine=or32-unknown
-		;;
-	os400)
-		basic_machine=powerpc-ibm
-		os=-os400
-		;;
-	OSE68000 | ose68000)
-		basic_machine=m68000-ericsson
-		os=-ose
-		;;
-	os68k)
-		basic_machine=m68k-none
-		os=-os68k
-		;;
-	pa-hitachi)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	paragon)
-		basic_machine=i860-intel
-		os=-osf
-		;;
-	pbd)
-		basic_machine=sparc-tti
-		;;
-	pbb)
-		basic_machine=m68k-tti
-		;;
-	pc532 | pc532-*)
-		basic_machine=ns32k-pc532
-		;;
-	pentium | p5 | k5 | k6 | nexgen | viac3)
-		basic_machine=i586-pc
-		;;
-	pentiumpro | p6 | 6x86 | athlon | athlon_*)
-		basic_machine=i686-pc
-		;;
-	pentiumii | pentium2 | pentiumiii | pentium3)
-		basic_machine=i686-pc
-		;;
-	pentium4)
-		basic_machine=i786-pc
-		;;
-	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
-		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumpro-* | p6-* | 6x86-* | athlon-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentium4-*)
-		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pn)
-		basic_machine=pn-gould
-		;;
-	power)	basic_machine=power-ibm
-		;;
-	ppc)	basic_machine=powerpc-unknown
-		;;
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppcle | powerpclittle | ppc-le | powerpc-little)
-		basic_machine=powerpcle-unknown
-		;;
-	ppcle-* | powerpclittle-*)
-		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64)	basic_machine=powerpc64-unknown
-		;;
-	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
-		basic_machine=powerpc64le-unknown
-		;;
-	ppc64le-* | powerpc64little-*)
-		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ps2)
-		basic_machine=i386-ibm
-		;;
-	pw32)
-		basic_machine=i586-unknown
-		os=-pw32
-		;;
-	rom68k)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	rm[46]00)
-		basic_machine=mips-siemens
-		;;
-	rtpc | rtpc-*)
-		basic_machine=romp-ibm
-		;;
-	s390 | s390-*)
-		basic_machine=s390-ibm
-		;;
-	s390x | s390x-*)
-		basic_machine=s390x-ibm
-		;;
-	sa29200)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	sb1)
-		basic_machine=mipsisa64sb1-unknown
-		;;
-	sb1el)
-		basic_machine=mipsisa64sb1el-unknown
-		;;
-	sei)
-		basic_machine=mips-sei
-		os=-seiux
-		;;
-	sequent)
-		basic_machine=i386-sequent
-		;;
-	sh)
-		basic_machine=sh-hitachi
-		os=-hms
-		;;
-	sh64)
-		basic_machine=sh64-unknown
-		;;
-	sparclite-wrs | simso-wrs)
-		basic_machine=sparclite-wrs
-		os=-vxworks
-		;;
-	sps7)
-		basic_machine=m68k-bull
-		os=-sysv2
-		;;
-	spur)
-		basic_machine=spur-unknown
-		;;
-	st2000)
-		basic_machine=m68k-tandem
-		;;
-	stratus)
-		basic_machine=i860-stratus
-		os=-sysv4
-		;;
-	sun2)
-		basic_machine=m68000-sun
-		;;
-	sun2os3)
-		basic_machine=m68000-sun
-		os=-sunos3
-		;;
-	sun2os4)
-		basic_machine=m68000-sun
-		os=-sunos4
-		;;
-	sun3os3)
-		basic_machine=m68k-sun
-		os=-sunos3
-		;;
-	sun3os4)
-		basic_machine=m68k-sun
-		os=-sunos4
-		;;
-	sun4os3)
-		basic_machine=sparc-sun
-		os=-sunos3
-		;;
-	sun4os4)
-		basic_machine=sparc-sun
-		os=-sunos4
-		;;
-	sun4sol2)
-		basic_machine=sparc-sun
-		os=-solaris2
-		;;
-	sun3 | sun3-*)
-		basic_machine=m68k-sun
-		;;
-	sun4)
-		basic_machine=sparc-sun
-		;;
-	sun386 | sun386i | roadrunner)
-		basic_machine=i386-sun
-		;;
-	sv1)
-		basic_machine=sv1-cray
-		os=-unicos
-		;;
-	symmetry)
-		basic_machine=i386-sequent
-		os=-dynix
-		;;
-	t3e)
-		basic_machine=alphaev5-cray
-		os=-unicos
-		;;
-	t90)
-		basic_machine=t90-cray
-		os=-unicos
-		;;
-	tic54x | c54x*)
-		basic_machine=tic54x-unknown
-		os=-coff
-		;;
-	tic55x | c55x*)
-		basic_machine=tic55x-unknown
-		os=-coff
-		;;
-	tic6x | c6x*)
-		basic_machine=tic6x-unknown
-		os=-coff
-		;;
-	tx39)
-		basic_machine=mipstx39-unknown
-		;;
-	tx39el)
-		basic_machine=mipstx39el-unknown
-		;;
-	toad1)
-		basic_machine=pdp10-xkl
-		os=-tops20
-		;;
-	tower | tower-32)
-		basic_machine=m68k-ncr
-		;;
-	tpf)
-		basic_machine=s390x-ibm
-		os=-tpf
-		;;
-	udi29k)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	ultra3)
-		basic_machine=a29k-nyu
-		os=-sym1
-		;;
-	v810 | necv810)
-		basic_machine=v810-nec
-		os=-none
-		;;
-	vaxv)
-		basic_machine=vax-dec
-		os=-sysv
-		;;
-	vms)
-		basic_machine=vax-dec
-		os=-vms
-		;;
-	vpp*|vx|vx-*)
-		basic_machine=f301-fujitsu
-		;;
-	vxworks960)
-		basic_machine=i960-wrs
-		os=-vxworks
-		;;
-	vxworks68)
-		basic_machine=m68k-wrs
-		os=-vxworks
-		;;
-	vxworks29k)
-		basic_machine=a29k-wrs
-		os=-vxworks
-		;;
-	w65*)
-		basic_machine=w65-wdc
-		os=-none
-		;;
-	w89k-*)
-		basic_machine=hppa1.1-winbond
-		os=-proelf
-		;;
-	xbox)
-		basic_machine=i686-pc
-		os=-mingw32
-		;;
-	xps | xps100)
-		basic_machine=xps100-honeywell
-		;;
-	ymp)
-		basic_machine=ymp-cray
-		os=-unicos
-		;;
-	z8k-*-coff)
-		basic_machine=z8k-unknown
-		os=-sim
-		;;
-	none)
-		basic_machine=none-none
-		os=-none
-		;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-	w89k)
-		basic_machine=hppa1.1-winbond
-		;;
-	op50n)
-		basic_machine=hppa1.1-oki
-		;;
-	op60c)
-		basic_machine=hppa1.1-oki
-		;;
-	romp)
-		basic_machine=romp-ibm
-		;;
-	mmix)
-		basic_machine=mmix-knuth
-		;;
-	rs6000)
-		basic_machine=rs6000-ibm
-		;;
-	vax)
-		basic_machine=vax-dec
-		;;
-	pdp10)
-		# there are many clones, so DEC is not a safe bet
-		basic_machine=pdp10-unknown
-		;;
-	pdp11)
-		basic_machine=pdp11-dec
-		;;
-	we32k)
-		basic_machine=we32k-att
-		;;
-	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
-		basic_machine=sh-unknown
-		;;
-	sparc | sparcv8 | sparcv9 | sparcv9b)
-		basic_machine=sparc-sun
-		;;
-	cydra)
-		basic_machine=cydra-cydrome
-		;;
-	orion)
-		basic_machine=orion-highlevel
-		;;
-	orion105)
-		basic_machine=clipper-highlevel
-		;;
-	mac | mpw | mac-mpw)
-		basic_machine=m68k-apple
-		;;
-	pmac | pmac-mpw)
-		basic_machine=powerpc-apple
-		;;
-	*-unknown)
-		# Make sure to match an already-canonicalized machine name.
-		;;
-	*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-	*-digital*)
-		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
-		;;
-	*-commodore*)
-		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
-		;;
-	*)
-		;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
-	# -solaris* is a basic system type, with this one exception.
-	-solaris1 | -solaris1.*)
-		os=`echo $os | sed -e 's|solaris1|sunos4|'`
-		;;
-	-solaris)
-		os=-solaris2
-		;;
-	-svr4*)
-		os=-sysv4
-		;;
-	-unixware*)
-		os=-sysv4.2uw
-		;;
-	-gnu/linux*)
-		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-		;;
-	# First accept the basic system types.
-	# The portable systems comes first.
-	# Each alternative MUST END IN A *, to match a version number.
-	# -sysv* is not here because it comes later, after sysvr4.
-	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* \
-	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
-	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
-	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
-	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -chorusos* | -chorusrdb* \
-	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
-	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
-	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
-	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-	      | -skyos* | -haiku*)
-	# Remember, each alternative MUST END IN *, to match a version number.
-		;;
-	-qnx*)
-		case $basic_machine in
-		    x86-* | i*86-*)
-			;;
-		    *)
-			os=-nto$os
-			;;
-		esac
-		;;
-	-nto-qnx*)
-		;;
-	-nto*)
-		os=`echo $os | sed -e 's|nto|nto-qnx|'`
-		;;
-	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
-	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
-		;;
-	-mac*)
-		os=`echo $os | sed -e 's|mac|macos|'`
-		;;
-	-linux-dietlibc)
-		os=-linux-dietlibc
-		;;
-	-linux*)
-		os=`echo $os | sed -e 's|linux|linux-gnu|'`
-		;;
-	-sunos5*)
-		os=`echo $os | sed -e 's|sunos5|solaris2|'`
-		;;
-	-sunos6*)
-		os=`echo $os | sed -e 's|sunos6|solaris3|'`
-		;;
-	-opened*)
-		os=-openedition
-		;;
-        -os400*)
-		os=-os400
-		;;
-	-wince*)
-		os=-wince
-		;;
-	-osfrose*)
-		os=-osfrose
-		;;
-	-osf*)
-		os=-osf
-		;;
-	-utek*)
-		os=-bsd
-		;;
-	-dynix*)
-		os=-bsd
-		;;
-	-acis*)
-		os=-aos
-		;;
-	-atheos*)
-		os=-atheos
-		;;
-	-syllable*)
-		os=-syllable
-		;;
-	-386bsd)
-		os=-bsd
-		;;
-	-ctix* | -uts*)
-		os=-sysv
-		;;
-	-nova*)
-		os=-rtmk-nova
-		;;
-	-ns2 )
-		os=-nextstep2
-		;;
-	-nsk*)
-		os=-nsk
-		;;
-	# Preserve the version number of sinix5.
-	-sinix5.*)
-		os=`echo $os | sed -e 's|sinix|sysv|'`
-		;;
-	-sinix*)
-		os=-sysv4
-		;;
-        -tpf*)
-		os=-tpf
-		;;
-	-triton*)
-		os=-sysv3
-		;;
-	-oss*)
-		os=-sysv3
-		;;
-	-svr4)
-		os=-sysv4
-		;;
-	-svr3)
-		os=-sysv3
-		;;
-	-sysvr4)
-		os=-sysv4
-		;;
-	# This must come after -sysvr4.
-	-sysv*)
-		;;
-	-ose*)
-		os=-ose
-		;;
-	-es1800*)
-		os=-ose
-		;;
-	-xenix)
-		os=-xenix
-		;;
-	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-		os=-mint
-		;;
-	-aros*)
-		os=-aros
-		;;
-	-kaos*)
-		os=-kaos
-		;;
-	-zvmoe)
-		os=-zvmoe
-		;;
-	-none)
-		;;
-	*)
-		# Get rid of the `-' at the beginning of $os.
-		os=`echo $os | sed 's/[^-]*-//'`
-		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
-		exit 1
-		;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
-	*-acorn)
-		os=-riscix1.2
-		;;
-	arm*-rebel)
-		os=-linux
-		;;
-	arm*-semi)
-		os=-aout
-		;;
-    c4x-* | tic4x-*)
-        os=-coff
-        ;;
-	# This must come before the *-dec entry.
-	pdp10-*)
-		os=-tops20
-		;;
-	pdp11-*)
-		os=-none
-		;;
-	*-dec | vax-*)
-		os=-ultrix4.2
-		;;
-	m68*-apollo)
-		os=-domain
-		;;
-	i386-sun)
-		os=-sunos4.0.2
-		;;
-	m68000-sun)
-		os=-sunos3
-		# This also exists in the configure program, but was not the
-		# default.
-		# os=-sunos4
-		;;
-	m68*-cisco)
-		os=-aout
-		;;
-	mips*-cisco)
-		os=-elf
-		;;
-	mips*-*)
-		os=-elf
-		;;
-	or32-*)
-		os=-coff
-		;;
-	*-tti)	# must be before sparc entry or we get the wrong os.
-		os=-sysv3
-		;;
-	sparc-* | *-sun)
-		os=-sunos4.1.1
-		;;
-	*-be)
-		os=-beos
-		;;
-	*-haiku)
-		os=-haiku
-		;;
-	*-ibm)
-		os=-aix
-		;;
-    	*-knuth)
-		os=-mmixware
-		;;
-	*-wec)
-		os=-proelf
-		;;
-	*-winbond)
-		os=-proelf
-		;;
-	*-oki)
-		os=-proelf
-		;;
-	*-hp)
-		os=-hpux
-		;;
-	*-hitachi)
-		os=-hiux
-		;;
-	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-		os=-sysv
-		;;
-	*-cbm)
-		os=-amigaos
-		;;
-	*-dg)
-		os=-dgux
-		;;
-	*-dolphin)
-		os=-sysv3
-		;;
-	m68k-ccur)
-		os=-rtu
-		;;
-	m88k-omron*)
-		os=-luna
-		;;
-	*-next )
-		os=-nextstep
-		;;
-	*-sequent)
-		os=-ptx
-		;;
-	*-crds)
-		os=-unos
-		;;
-	*-ns)
-		os=-genix
-		;;
-	i370-*)
-		os=-mvs
-		;;
-	*-next)
-		os=-nextstep3
-		;;
-	*-gould)
-		os=-sysv
-		;;
-	*-highlevel)
-		os=-bsd
-		;;
-	*-encore)
-		os=-bsd
-		;;
-	*-sgi)
-		os=-irix
-		;;
-	*-siemens)
-		os=-sysv4
-		;;
-	*-masscomp)
-		os=-rtu
-		;;
-	f30[01]-fujitsu | f700-fujitsu)
-		os=-uxpv
-		;;
-	*-rom68k)
-		os=-coff
-		;;
-	*-*bug)
-		os=-coff
-		;;
-	*-apple)
-		os=-macos
-		;;
-	*-atari*)
-		os=-mint
-		;;
-	*)
-		os=-none
-		;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-	*-unknown)
-		case $os in
-			-riscix*)
-				vendor=acorn
-				;;
-			-sunos*)
-				vendor=sun
-				;;
-			-aix*)
-				vendor=ibm
-				;;
-			-beos*)
-				vendor=be
-				;;
-			-hpux*)
-				vendor=hp
-				;;
-			-mpeix*)
-				vendor=hp
-				;;
-			-hiux*)
-				vendor=hitachi
-				;;
-			-unos*)
-				vendor=crds
-				;;
-			-dgux*)
-				vendor=dg
-				;;
-			-luna*)
-				vendor=omron
-				;;
-			-genix*)
-				vendor=ns
-				;;
-			-mvs* | -opened*)
-				vendor=ibm
-				;;
-			-os400*)
-				vendor=ibm
-				;;
-			-ptx*)
-				vendor=sequent
-				;;
-			-tpf*)
-				vendor=ibm
-				;;
-			-vxsim* | -vxworks* | -windiss*)
-				vendor=wrs
-				;;
-			-aux*)
-				vendor=apple
-				;;
-			-hms*)
-				vendor=hitachi
-				;;
-			-mpw* | -macos*)
-				vendor=apple
-				;;
-			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-				vendor=atari
-				;;
-			-vos*)
-				vendor=stratus
-				;;
-		esac
-		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-		;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:

Copied: branches/release_1_4/base/src/programs/xar/config.sub (from rev 23968, trunk/base/src/programs/xar/config.sub)
===================================================================
--- branches/release_1_4/base/src/programs/xar/config.sub	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/config.sub	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,1579 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+timestamp='2005-07-08'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches at gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
+  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis | -knuth | -cray)
+		os=
+		basic_machine=$1
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+ 	-chorusrdb)
+ 		os=-chorusrdb
+		basic_machine=$1
+ 		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	1750a | 580 \
+	| a29k \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| am33_2.0 \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+	| bfin \
+	| c4x | clipper \
+	| d10v | d30v | dlx | dsp16xx \
+	| fr30 | frv \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| i370 | i860 | i960 | ia64 \
+	| ip2k | iq2000 \
+	| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64vr | mips64vrel \
+	| mips64orion | mips64orionel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| ms1 \
+	| msp430 \
+	| ns16k | ns32k \
+	| or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| pyramid \
+	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+	| sh64 | sh64le \
+	| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
+	| sparcv8 | sparcv9 | sparcv9b \
+	| strongarm \
+	| tahoe | thumb | tic4x | tic80 | tron \
+	| v850 | v850e \
+	| we32k \
+	| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
+	| z8k)
+		basic_machine=$basic_machine-unknown
+		;;
+	m32c)
+		basic_machine=$basic_machine-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12)
+		# Motorola 68HC11/12.
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	580-* \
+	| a29k-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+	| avr-* \
+	| bfin-* | bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| clipper-* | craynv-* | cydra-* \
+	| d10v-* | d30v-* | dlx-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* | iq2000-* \
+	| m32r-* | m32rle-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mips64vr5900-* | mips64vr5900el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64r2-* | mipsisa64r2el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| ms1-* \
+	| msp430-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| pyramid-* \
+	| romp-* | rs6000-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+	| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+	| sparclite-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+	| tahoe-* | thumb-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tron-* \
+	| v850-* | v850e-* | vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| xstormy16-* | xtensa-* \
+	| ymp-* \
+	| z8k-*)
+		;;
+	m32c-*)
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+    	abacus)
+		basic_machine=abacus-unknown
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amd64)
+		basic_machine=x86_64-pc
+		;;
+	amd64-*)
+		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-unknown
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-unknown
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | j90)
+		basic_machine=j90-cray
+		os=-unicos
+		;;
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
+		;;
+	cr16c)
+		basic_machine=cr16c-unknown
+		os=-elf
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	crisv32 | crisv32-* | etraxfs*)
+		basic_machine=crisv32-axis
+		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
+	crx)
+		basic_machine=crx-unknown
+		os=-elf
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	mingw32)
+		basic_machine=i386-pc
+		os=-mingw32
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	openrisc | openrisc-*)
+		basic_machine=or32-unknown
+		;;
+	os400)
+		basic_machine=powerpc-ibm
+		os=-os400
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+	pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pentium | p5 | k5 | k6 | nexgen | viac3)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2 | pentiumiii | pentium3)
+		basic_machine=i686-pc
+		;;
+	pentium4)
+		basic_machine=i786-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium4-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc)	basic_machine=powerpc-unknown
+		;;
+	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+		;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+		;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	s390 | s390-*)
+		basic_machine=s390-ibm
+		;;
+	s390x | s390x-*)
+		basic_machine=s390x-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparclite-wrs | simso-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
+		os=-unicos
+		;;
+	tic54x | c54x*)
+		basic_machine=tic54x-unknown
+		os=-coff
+		;;
+	tic55x | c55x*)
+		basic_machine=tic55x-unknown
+		os=-coff
+		;;
+	tic6x | c6x*)
+		basic_machine=tic6x-unknown
+		os=-coff
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	tpf)
+		basic_machine=s390x-ibm
+		os=-tpf
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+		basic_machine=f301-fujitsu
+		;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
+	xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+		basic_machine=sh-unknown
+		;;
+	sparc | sparcv8 | sparcv9 | sparcv9b)
+		basic_machine=sparc-sun
+		;;
+	cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -chorusos* | -chorusrdb* \
+	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+	      | -skyos* | -haiku*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto-qnx*)
+		;;
+	-nto*)
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux-dietlibc)
+		os=-linux-dietlibc
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+        -os400*)
+		os=-os400
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-atheos*)
+		os=-atheos
+		;;
+	-syllable*)
+		os=-syllable
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
+	-ns2 )
+		os=-nextstep2
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+        -tpf*)
+		os=-tpf
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
+		;;
+	-aros*)
+		os=-aros
+		;;
+	-kaos*)
+		os=-kaos
+		;;
+	-zvmoe)
+		os=-zvmoe
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+    c4x-* | tic4x-*)
+        os=-coff
+        ;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=-tops20
+		;;
+	pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		# This also exists in the configure program, but was not the
+		# default.
+		# os=-sunos4
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	or32-*)
+		os=-coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-haiku)
+		os=-haiku
+		;;
+	*-ibm)
+		os=-aix
+		;;
+    	*-knuth)
+		os=-mmixware
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+	*-gould)
+		os=-sysv
+		;;
+	*-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+	*-sgi)
+		os=-irix
+		;;
+	*-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-os400*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-tpf*)
+				vendor=ibm
+				;;
+			-vxsim* | -vxworks* | -windiss*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:

Deleted: branches/release_1_4/base/src/programs/xar/configure
===================================================================
--- trunk/base/src/programs/xar/configure	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/configure	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,7969 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for OpenDarwin Xar 1.4.
-#
-# Report bugs to <xar at opendarwin.org>.
-#
-# Copyright (C) 2003 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
-  set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-  LC_TELEPHONE LC_TIME
-do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
-  else
-    $as_unset $as_var
-  fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)$' \| \
-	 .     : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
-  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\/\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
-  # Find who we are.  Look in the path if we contain no path at all
-  # relative or not.
-  case $0 in
-    *[\\/]* ) as_myself=$0 ;;
-    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
-       ;;
-  esac
-  # We did not find ourselves, most probably we were run as `sh COMMAND'
-  # in which case we are not to be found in the path.
-  if test "x$as_myself" = x; then
-    as_myself=$0
-  fi
-  if test ! -f "$as_myself"; then
-    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
-   { (exit 1); exit 1; }; }
-  fi
-  case $CONFIG_SHELL in
-  '')
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for as_base in sh bash ksh sh5; do
-	 case $as_dir in
-	 /*)
-	   if ("$as_dir/$as_base" -c '
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
-	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
-	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
-	     CONFIG_SHELL=$as_dir/$as_base
-	     export CONFIG_SHELL
-	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
-	   fi;;
-	 esac
-       done
-done
-;;
-  esac
-
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line before each line; the second 'sed' does the real
-  # work.  The second script uses 'N' to pair each line-number line
-  # with the numbered line, and appends trailing '-' during
-  # substitution so that $LINENO is not a special case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
-  sed '=' <$as_myself |
-    sed '
-      N
-      s,$,-,
-      : loop
-      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
-      t loop
-      s,-$,,
-      s,^['$as_cr_digits']*\n,,
-    ' >$as_me.lineno &&
-  chmod +x $as_me.lineno ||
-    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensible to this).
-  . ./$as_me.lineno
-  # Exit status is that of the last command.
-  exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
-  *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T='	' ;;
-  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
-  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  # We could just check for DJGPP; but this test a) works b) is more generic
-  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
-  if test -f conf$$.exe; then
-    # Don't use ln at all; we don't have any links
-    as_ln_s='cp -p'
-  else
-    as_ln_s='ln -s'
-  fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" 	$as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-exec 6>&1
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_config_libobj_dir=.
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete.  It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
-# Identity of this package.
-PACKAGE_NAME='OpenDarwin Xar'
-PACKAGE_TARNAME='xar'
-PACKAGE_VERSION='1.4'
-PACKAGE_STRING='OpenDarwin Xar 1.4'
-PACKAGE_BUGREPORT='xar at opendarwin.org'
-
-ac_unique_file="LICENSE"
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#if STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# if HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
-#endif
-#if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
-#  include <memory.h>
-# endif
-# include <string.h>
-#endif
-#if HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-
-ac_default_prefix=/usr/local
-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 LIB_REV XAR_MAJOR_VERSION XAR_MINOR_VERSION XAR_VERSION srcroot abs_srcroot objroot abs_objroot PREFIX BINDIR DATADIR LIBDIR INCLUDEDIR MANDIR CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LD AUTOCONF build build_cpu build_vendor build_os host host_cpu host_vendor host_os abi RPATH enable_autogen EGREP XML2_CONFIG cfghdrs cfgoutputs LIBOBJS LTLIBOBJS'
-ac_subst_files=''
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-ac_prev=
-for ac_option
-do
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case $ac_option in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir=$ac_optarg ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build_alias ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build_alias=$ac_optarg ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file=$ac_optarg ;;
-
-  --config-cache | -C)
-    cache_file=config.cache ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir=$ac_optarg ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
-   { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
-    eval "enable_$ac_feature=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
-   { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
-    case $ac_option in
-      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_$ac_feature='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix=$ac_optarg ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he | -h)
-    ac_init_help=long ;;
-  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
-    ac_init_help=recursive ;;
-  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
-    ac_init_help=short ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host_alias ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host_alias=$ac_optarg ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir=$ac_optarg ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir=$ac_optarg ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir=$ac_optarg ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir=$ac_optarg ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir=$ac_optarg ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir=$ac_optarg ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c | -n)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir=$ac_optarg ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix=$ac_optarg ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix=$ac_optarg ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix=$ac_optarg ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name=$ac_optarg ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir=$ac_optarg ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir=$ac_optarg ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site=$ac_optarg ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir=$ac_optarg ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir=$ac_optarg ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target_alias ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target_alias=$ac_optarg ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers | -V)
-    ac_init_version=: ;;
-
-  -with-* | --with-*)
-    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid package name: $ac_package" >&2
-   { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case $ac_option in
-      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_$ac_package='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid package name: $ac_package" >&2
-   { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package | sed 's/-/_/g'`
-    eval "with_$ac_package=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes=$ac_optarg ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries=$ac_optarg ;;
-
-  -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; }
-    ;;
-
-  *=*)
-    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
-   { (exit 1); exit 1; }; }
-    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
-    eval "$ac_envvar='$ac_optarg'"
-    export $ac_envvar ;;
-
-  *)
-    # FIXME: should be removed in autoconf 3.0.
-    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
-    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  { echo "$as_me: error: missing argument to $ac_option" >&2
-   { (exit 1); exit 1; }; }
-fi
-
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
-  eval ac_val=$`echo $ac_var`
-  case $ac_val in
-    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
-    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; };;
-  esac
-done
-
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
-	      localstatedir libdir includedir oldincludedir infodir mandir
-do
-  eval ac_val=$`echo $ac_var`
-  case $ac_val in
-    [\\/$]* | ?:[\\/]* ) ;;
-    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; };;
-  esac
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
-  if test "x$build_alias" = x; then
-    cross_compiling=maybe
-    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used." >&2
-  elif test "x$build_alias" != "x$host_alias"; then
-    cross_compiling=yes
-  fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$0" : 'X\(//\)[^/]' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
-echo X"$0" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
-   { (exit 1); exit 1; }; }
-  else
-    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
-   { (exit 1); exit 1; }; }
-  fi
-fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
-  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
-   { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
-  # Omit some internal or obsolete options to make the list less imposing.
-  # This message is too long to be a string in the A/UX 3.1 sh.
-  cat <<_ACEOF
-\`configure' configures OpenDarwin Xar 1.4 to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE.  See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
-  -h, --help              display this help and exit
-      --help=short        display options specific to this package
-      --help=recursive    display the short help of all the included packages
-  -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking...' messages
-      --cache-file=FILE   cache test results in FILE [disabled]
-  -C, --config-cache      alias for \`--cache-file=config.cache'
-  -n, --no-create         do not create output files
-      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
-
-_ACEOF
-
-  cat <<_ACEOF
-Installation directories:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-			  [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-			  [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
-  --bindir=DIR           user executables [EPREFIX/bin]
-  --sbindir=DIR          system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR       program executables [EPREFIX/libexec]
-  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
-  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
-  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
-  --libdir=DIR           object code libraries [EPREFIX/lib]
-  --includedir=DIR       C header files [PREFIX/include]
-  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
-  --infodir=DIR          info documentation [PREFIX/info]
-  --mandir=DIR           man documentation [PREFIX/man]
-_ACEOF
-
-  cat <<\_ACEOF
-
-System types:
-  --build=BUILD     configure for building on BUILD [guessed]
-  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-  case $ac_init_help in
-     short | recursive ) echo "Configuration of OpenDarwin Xar 1.4:";;
-   esac
-  cat <<\_ACEOF
-
-Optional Features:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-autogen        Automatically regenerate configure output
-
-Optional Packages:
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-xml2-config      libxml2 config program
-
-Some influential environment variables:
-  CC          C compiler command
-  CFLAGS      C compiler flags
-  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
-              nonstandard directory <lib dir>
-  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
-              headers in a nonstandard directory <include dir>
-  CPP         C preprocessor
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-Report bugs to <xar at opendarwin.org>.
-_ACEOF
-fi
-
-if test "$ac_init_help" = "recursive"; then
-  # If there are subdirs, report their specific --help.
-  ac_popdir=`pwd`
-  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    test -d $ac_dir || continue
-    ac_builddir=.
-
-if test "$ac_dir" != .; then
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A "../" for each directory in $ac_dir_suffix.
-  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
-  ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
-  .)  # No --srcdir option.  We are building in place.
-    ac_srcdir=.
-    if test -z "$ac_top_builddir"; then
-       ac_top_srcdir=.
-    else
-       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
-    fi ;;
-  [\\/]* | ?:[\\/]* )  # Absolute path.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir ;;
-  *) # Relative path.
-    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
-  case "$ac_dir" in
-  .) ac_abs_builddir=`pwd`;;
-  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
-  *) ac_abs_builddir=`pwd`/"$ac_dir";;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
-  case ${ac_top_builddir}. in
-  .) ac_abs_top_builddir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
-  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
-  case $ac_srcdir in
-  .) ac_abs_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
-  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
-  case $ac_top_srcdir in
-  .) ac_abs_top_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
-  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
-  esac;;
-esac
-
-    cd $ac_dir
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $ac_srcdir/configure.gnu; then
-      echo
-      $SHELL $ac_srcdir/configure.gnu  --help=recursive
-    elif test -f $ac_srcdir/configure; then
-      echo
-      $SHELL $ac_srcdir/configure  --help=recursive
-    elif test -f $ac_srcdir/configure.ac ||
-	   test -f $ac_srcdir/configure.in; then
-      echo
-      $ac_configure --help
-    else
-      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi
-    cd $ac_popdir
-  done
-fi
-
-test -n "$ac_init_help" && exit 0
-if $ac_init_version; then
-  cat <<\_ACEOF
-OpenDarwin Xar configure 1.4
-generated by GNU Autoconf 2.59
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
-  exit 0
-fi
-exec 5>config.log
-cat >&5 <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by OpenDarwin Xar $as_me 1.4, which was
-generated by GNU Autoconf 2.59.  Invocation command line was
-
-  $ $0 $@
-
-_ACEOF
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
-
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  echo "PATH: $as_dir"
-done
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_sep=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
-  for ac_arg
-  do
-    case $ac_arg in
-    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-    | -silent | --silent | --silen | --sile | --sil)
-      continue ;;
-    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
-      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    case $ac_pass in
-    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
-    2)
-      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
-      if test $ac_must_keep_next = true; then
-	ac_must_keep_next=false # Got value, back to normal.
-      else
-	case $ac_arg in
-	  *=* | --config-cache | -C | -disable-* | --disable-* \
-	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-	  | -with-* | --with-* | -without-* | --without-* | --x)
-	    case "$ac_configure_args0 " in
-	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-	    esac
-	    ;;
-	  -* ) ac_must_keep_next=true ;;
-	esac
-      fi
-      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
-      # Get rid of the leading space.
-      ac_sep=" "
-      ;;
-    esac
-  done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.  We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
-trap 'exit_status=$?
-  # Save into config.log some information that might help in debugging.
-  {
-    echo
-
-    cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
-    echo
-    # The following way of writing the cache mishandles newlines in values,
-{
-  (set) 2>&1 |
-    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
-    *ac_space=\ *)
-      sed -n \
-	"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
-      ;;
-    *)
-      sed -n \
-	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
-      ;;
-    esac;
-}
-    echo
-
-    cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
-    echo
-    for ac_var in $ac_subst_vars
-    do
-      eval ac_val=$`echo $ac_var`
-      echo "$ac_var='"'"'$ac_val'"'"'"
-    done | sort
-    echo
-
-    if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
-      echo
-      for ac_var in $ac_subst_files
-      do
-	eval ac_val=$`echo $ac_var`
-	echo "$ac_var='"'"'$ac_val'"'"'"
-      done | sort
-      echo
-    fi
-
-    if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
-      echo
-      sed "/^$/d" confdefs.h | sort
-      echo
-    fi
-    test "$ac_signal" != 0 &&
-      echo "$as_me: caught signal $ac_signal"
-    echo "$as_me: exit $exit_status"
-  } >&5
-  rm -f core *.core &&
-  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
-    exit $exit_status
-     ' 0
-for ac_signal in 1 2 13 15; do
-  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
-    sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  # Some versions of bash will fail to source /dev/null (special
-  # files actually), so we avoid doing that.
-  if test -f "$cache_file"; then
-    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
-    case $cache_file in
-      [\\/]* | ?:[\\/]* ) . $cache_file;;
-      *)                      . ./$cache_file;;
-    esac
-  fi
-else
-  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
-  >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
-	       sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
-  eval ac_old_set=\$ac_cv_env_${ac_var}_set
-  eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
-  eval ac_new_val="\$ac_env_${ac_var}_value"
-  case $ac_old_set,$ac_new_set in
-    set,)
-      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,set)
-      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,);;
-    *)
-      if test "x$ac_old_val" != "x$ac_new_val"; then
-	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
-echo "$as_me:   former value:  $ac_old_val" >&2;}
-	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
-echo "$as_me:   current value: $ac_new_val" >&2;}
-	ac_cache_corrupted=:
-      fi;;
-  esac
-  # Pass precious variables to config.status.
-  if test "$ac_new_set" = set; then
-    case $ac_new_val in
-    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
-      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
-    *) ac_arg=$ac_var=$ac_new_val ;;
-    esac
-    case " $ac_configure_args " in
-      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
-      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-    esac
-  fi
-done
-if $ac_cache_corrupted; then
-  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-LIB_REV=1
-
-
-XAR_MAJOR_VERSION="1"
-XAR_MINOR_VERSION="4"
-XAR_VERSION="${XAR_MAJOR_VERSION}.${XAR_MINOR_VERSION}"
-
-
-
-
-srcroot=$srcdir
-if test "x${srcroot}" = "x." ; then
-  srcroot=""
-else
-  srcroot="${srcroot}/"
-fi
-
-abs_srcroot="`cd "$srcdir"; pwd`/"
-
-
-objroot=""
-
-abs_objroot="`pwd`/"
-
-
-if test "x$prefix" = "xNONE" ; then
-  prefix="/usr/local"
-fi
-if test "x$exec_prefix" = "xNONE" ; then
-  exec_prefix=$prefix
-fi
-PREFIX=$prefix
-
-BINDIR=`eval echo $bindir`
-BINDIR=`eval echo $BINDIR`
-
-DATADIR=`eval echo $datadir`
-DATADIR=`eval echo $DATADIR`
-
-LIBDIR=`eval echo $libdir`
-LIBDIR=`eval echo $LIBDIR`
-
-INCLUDEDIR=`eval echo $includedir`
-INCLUDEDIR=`eval echo $INCLUDEDIR`
-
-MANDIR=`eval echo $mandir`
-MANDIR=`eval echo $MANDIR`
-
-
-cfgoutputs="cfgoutputs.stamp"
-cfgoutputs="${cfgoutputs} Makefile"
-cfgoutputs="${cfgoutputs} include/xar.h"
-cfgoutputs="${cfgoutputs} lib/Makefile.inc"
-cfgoutputs="${cfgoutputs} src/Makefile.inc"
-
-cfghdrs="${objroot}cfghdrs.stamp"
-cfghdrs="${cfghdrs} ${objroot}include/config.h"
-
-CFLAGS=$CFLAGS
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="gcc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  CC=$ac_ct_CC
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="${ac_tool_prefix}cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  CC=$ac_ct_CC
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-fi
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_CC="cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  test -n "$ac_ct_CC" && break
-done
-
-  CC=$ac_ct_CC
-fi
-
-fi
-
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
-     "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
-  (eval $ac_compiler --version </dev/null >&5) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
-  (eval $ac_compiler -v </dev/null >&5) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
-  (eval $ac_compiler -V </dev/null >&5) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
-  (eval $ac_link_default) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  # Find the output, starting from the most likely.  This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
-do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
-	;;
-    conftest.$ac_ext )
-	# This is the source file.
-	;;
-    [ab].out )
-	# We found the default executable, but exeext='' is most
-	# certainly right.
-	break;;
-    *.* )
-	ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	# FIXME: I believe we export ac_cv_exeext for Libtool,
-	# but it would be cool to find out if it's true.  Does anybody
-	# maintain Libtool? --akim.
-	export ac_cv_exeext
-	break;;
-    * )
-	break;;
-  esac
-done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
-
-# Check the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
-  if { ac_try='./$ac_file'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-    cross_compiling=no
-  else
-    if test "$cross_compiling" = maybe; then
-	cross_compiling=yes
-    else
-	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-    fi
-  fi
-fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	  export ac_cv_exeext
-	  break;;
-    * ) break;;
-  esac
-done
-else
-  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
-if test "${ac_cv_objext+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
-    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_compiler_gnu=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_prog_cc_g=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_prog_cc_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
-   function prototypes and stuff, but not '\xHH' hex character constants.
-   These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std1 is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std1.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
-_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX			-qlanglvl=ansi
-# Ultrix and OSF/1	-std1
-# HP-UX 10.20 and later	-Ae
-# HP-UX older versions	-Aa -D_HPUX_SOURCE
-# SVR4			-Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_prog_cc_stdc=$ac_arg
-break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-
-fi
-
-case "x$ac_cv_prog_cc_stdc" in
-  x|xno)
-    echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
-  *)
-    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
-    CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
-
-# Some people use a C++ compiler to compile C.  Since we use `exit',
-# in C++ we need to declare it.  In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
-  choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  for ac_declaration in \
-   '' \
-   'extern "C" void std::exit (int) throw (); using std::exit;' \
-   'extern "C" void std::exit (int); using std::exit;' \
-   'extern "C" void exit (int) throw ();' \
-   'extern "C" void exit (int);' \
-   'void exit (int);'
-do
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_declaration
-int
-main ()
-{
-exit (42);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
-  echo '#ifdef __cplusplus' >>confdefs.h
-  echo $ac_declaration      >>confdefs.h
-  echo '#endif'             >>confdefs.h
-fi
-
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-if test "x$CFLAGS" = "x" ; then
-  no_CFLAGS="yes"
-fi
-if test "x$no_CFLAGS" = "xyes" -a "x$GCC" = "xyes" ; then
-  CFLAGS="-Wall -g"
-fi
-if test "x$EXTRA_CFLAGS" != "x" ; then
-  CFLAGS="$CFLAGS $EXTRA_CFLAGS"
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether non-existent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  # Broken: success on invalid input.
-continue
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  break
-fi
-
-    done
-    ac_cv_prog_CPP=$CPP
-
-fi
-  CPP=$ac_cv_prog_CPP
-else
-  ac_cv_prog_CPP=$CPP
-fi
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether non-existent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  # Broken: success on invalid input.
-continue
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
-else
-  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  elif test -f $ac_dir/shtool; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/shtool install -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-
-# Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
-  ./ | .// | /cC/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-	if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
-	  if test $ac_prog = install &&
-	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  elif test $ac_prog = install &&
-	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # program-specific install script used by HP pwplus--don't use.
-	    :
-	  else
-	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-	    break 3
-	  fi
-	fi
-      done
-    done
-    ;;
-esac
-done
-
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL=$ac_install_sh
-  fi
-fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-# Extract the first word of "ld", so it can be a program name with args.
-set dummy ld; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_LD+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $LD in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_LD="$LD" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_LD="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-  ;;
-esac
-fi
-LD=$ac_cv_path_LD
-
-if test -n "$LD"; then
-  echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-# Extract the first word of "autoconf", so it can be a program name with args.
-set dummy autoconf; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_AUTOCONF+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $AUTOCONF in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_AUTOCONF="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-  ;;
-esac
-fi
-AUTOCONF=$ac_cv_path_AUTOCONF
-
-if test -n "$AUTOCONF"; then
-  echo "$as_me:$LINENO: result: $AUTOCONF" >&5
-echo "${ECHO_T}$AUTOCONF" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-
-# Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
-  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
-   { (exit 1); exit 1; }; }
-
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
-if test "${ac_cv_build+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
-  ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
-  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
-  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
-build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
-if test "${ac_cv_host+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
-  ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
-  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
-host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-case "${host}" in
-  *-*-darwin*)
-	abi="macho"
-	RPATH=""
-	;;
-  *-*-freebsd*)
-	CFLAGS="$CFLAGS"
-	abi="elf"
-	RPATH="-Wl,-rpath,"
-	;;
-  *-*-linux*)
-	CFLAGS="$CFLAGS"
-	abi="elf"
-		CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
-	RPATH="-Wl,-rpath,"
-	;;
-  *-*-netbsd*)
-	echo "$as_me:$LINENO: checking ABI" >&5
-echo $ECHO_N "checking ABI... $ECHO_C" >&6
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __ELF__
-/* ELF */
-#else
-#error aout
-#endif
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  CFLAGS="$CFLAGS"; abi="elf"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-abi="aout"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-	echo "$as_me:$LINENO: result: $abi" >&5
-echo "${ECHO_T}$abi" >&6
-	RPATH="-Wl,-rpath,"
-	;;
-  *-*-solaris2*)
-	CFLAGS="$CFLAGS"
-	abi="elf"
-	RPATH="-Wl,-R,"
-					;;
-  *)
-	echo "$as_me:$LINENO: result: Unsupported operating system: ${host}" >&5
-echo "${ECHO_T}Unsupported operating system: ${host}" >&6
-	abi="elf"
-	RPATH="-Wl,-rpath,"
-	;;
-esac
-
-
-
-# Check whether --enable-autogen or --disable-autogen was given.
-if test "${enable_autogen+set}" = set; then
-  enableval="$enable_autogen"
-  if test "x$enable_autogen" = "xno" ; then
-  enable_autogen="0"
-else
-  enable_autogen="1"
-fi
-
-else
-  enable_autogen="0"
-
-fi;
-
-
-
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
-    then ac_cv_prog_egrep='grep -E'
-    else ac_cv_prog_egrep='egrep'
-    fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
-
-
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
-if test "${ac_cv_header_stdc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_header_stdc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_stdc=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ctype.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      exit(2);
-  exit (0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
-
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-		  inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_Header=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-
-
-
-
-
-for ac_header in sys/acl.h ext2fs/ext2_fs.h sys/statfs.h sys/xattr.h sys/param.h sys/extattr.h libutil.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## --------------------------------- ##
-## Report this to xar at opendarwin.org ##
-## --------------------------------- ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-for ac_func in lgetxattr
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-for ac_func in lsetxattr
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-for ac_func in getxattr
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-for ac_func in setxattr
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-for ac_func in getattrlist
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-for ac_func in setattrlist
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-echo "$as_me:$LINENO: checking for uid_t" >&5
-echo $ECHO_N "checking for uid_t... $ECHO_C" >&6
-if test "${ac_cv_type_uid_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if ((uid_t *) 0)
-  return 0;
-if (sizeof (uid_t))
-  return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_type_uid_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_uid_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
-echo "${ECHO_T}$ac_cv_type_uid_t" >&6
-
-echo "$as_me:$LINENO: checking size of uid_t" >&5
-echo $ECHO_N "checking size of uid_t... $ECHO_C" >&6
-if test "${ac_cv_sizeof_uid_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$ac_cv_type_uid_t" = yes; then
-  # The cast to unsigned long works around a bug in the HP C Compiler
-  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-  # This bug is HP SR number 8606223364.
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (uid_t))) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (uid_t))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_hi=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr $ac_mid + 1`
-		    if test $ac_lo -le $ac_mid; then
-		      ac_lo= ac_hi=
-		      break
-		    fi
-		    ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (uid_t))) < 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (uid_t))) >= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_lo=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_hi=`expr '(' $ac_mid ')' - 1`
-		       if test $ac_mid -le $ac_hi; then
-			 ac_lo= ac_hi=
-			 break
-		       fi
-		       ac_mid=`expr 2 '*' $ac_mid`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo= ac_hi=
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (uid_t))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_hi=$ac_mid
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_uid_t=$ac_lo;;
-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uid_t), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (uid_t), 77
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; } ;;
-esac
-else
-  if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-long longval () { return (long) (sizeof (uid_t)); }
-unsigned long ulongval () { return (long) (sizeof (uid_t)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    exit (1);
-  if (((long) (sizeof (uid_t))) < 0)
-    {
-      long i = longval ();
-      if (i != ((long) (sizeof (uid_t))))
-	exit (1);
-      fprintf (f, "%ld\n", i);
-    }
-  else
-    {
-      unsigned long i = ulongval ();
-      if (i != ((long) (sizeof (uid_t))))
-	exit (1);
-      fprintf (f, "%lu\n", i);
-    }
-  exit (ferror (f) || fclose (f) != 0);
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_uid_t=`cat conftest.val`
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uid_t), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (uid_t), 77
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-rm -f conftest.val
-else
-  ac_cv_sizeof_uid_t=0
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_sizeof_uid_t" >&5
-echo "${ECHO_T}$ac_cv_sizeof_uid_t" >&6
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_UID_T $ac_cv_sizeof_uid_t
-_ACEOF
-
-
-if test $ac_cv_sizeof_uid_t = "4"; then
-cat >>confdefs.h <<\_ACEOF
-#define UID_STRING RId32
-_ACEOF
-
-cat >>confdefs.h <<\_ACEOF
-#define UID_CAST (uint32_t)
-_ACEOF
-
-elif test $ac_cv_sizeof_uid_t = "8"; then
-cat >>confdefs.h <<\_ACEOF
-#define UID_STRING PRId64
-_ACEOF
-
-cat >>confdefs.h <<\_ACEOF
-#define UID_CAST (uint64_t)
-_ACEOF
-
-else
-{ { echo "$as_me:$LINENO: error: can not detect the size of your system's uid_t type" >&5
-echo "$as_me: error: can not detect the size of your system's uid_t type" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-echo "$as_me:$LINENO: checking for gid_t" >&5
-echo $ECHO_N "checking for gid_t... $ECHO_C" >&6
-if test "${ac_cv_type_gid_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if ((gid_t *) 0)
-  return 0;
-if (sizeof (gid_t))
-  return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_type_gid_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_gid_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_gid_t" >&5
-echo "${ECHO_T}$ac_cv_type_gid_t" >&6
-
-echo "$as_me:$LINENO: checking size of gid_t" >&5
-echo $ECHO_N "checking size of gid_t... $ECHO_C" >&6
-if test "${ac_cv_sizeof_gid_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$ac_cv_type_gid_t" = yes; then
-  # The cast to unsigned long works around a bug in the HP C Compiler
-  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-  # This bug is HP SR number 8606223364.
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (gid_t))) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (gid_t))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_hi=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr $ac_mid + 1`
-		    if test $ac_lo -le $ac_mid; then
-		      ac_lo= ac_hi=
-		      break
-		    fi
-		    ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (gid_t))) < 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (gid_t))) >= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_lo=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_hi=`expr '(' $ac_mid ')' - 1`
-		       if test $ac_mid -le $ac_hi; then
-			 ac_lo= ac_hi=
-			 break
-		       fi
-		       ac_mid=`expr 2 '*' $ac_mid`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo= ac_hi=
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (gid_t))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_hi=$ac_mid
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_gid_t=$ac_lo;;
-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (gid_t), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (gid_t), 77
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; } ;;
-esac
-else
-  if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-long longval () { return (long) (sizeof (gid_t)); }
-unsigned long ulongval () { return (long) (sizeof (gid_t)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    exit (1);
-  if (((long) (sizeof (gid_t))) < 0)
-    {
-      long i = longval ();
-      if (i != ((long) (sizeof (gid_t))))
-	exit (1);
-      fprintf (f, "%ld\n", i);
-    }
-  else
-    {
-      unsigned long i = ulongval ();
-      if (i != ((long) (sizeof (gid_t))))
-	exit (1);
-      fprintf (f, "%lu\n", i);
-    }
-  exit (ferror (f) || fclose (f) != 0);
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_gid_t=`cat conftest.val`
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (gid_t), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (gid_t), 77
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-rm -f conftest.val
-else
-  ac_cv_sizeof_gid_t=0
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_sizeof_gid_t" >&5
-echo "${ECHO_T}$ac_cv_sizeof_gid_t" >&6
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_GID_T $ac_cv_sizeof_gid_t
-_ACEOF
-
-
-if test $ac_cv_sizeof_gid_t = "4"; then
-cat >>confdefs.h <<\_ACEOF
-#define GID_STRING PRId32
-_ACEOF
-
-cat >>confdefs.h <<\_ACEOF
-#define GID_CAST (uint32_t)
-_ACEOF
-
-elif test $ac_cv_sizeof_gid_t = "8"; then
-cat >>confdefs.h <<\_ACEOF
-#define GID_STRING PRId64
-_ACEOF
-
-cat >>confdefs.h <<\_ACEOF
-#define GID_CAST (uint64_t)
-_ACEOF
-
-else
-{ { echo "$as_me:$LINENO: error: can not detect the size of your system's gid_t type" >&5
-echo "$as_me: error: can not detect the size of your system's gid_t type" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-echo "$as_me:$LINENO: checking for ino_t" >&5
-echo $ECHO_N "checking for ino_t... $ECHO_C" >&6
-if test "${ac_cv_type_ino_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if ((ino_t *) 0)
-  return 0;
-if (sizeof (ino_t))
-  return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_type_ino_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_ino_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_ino_t" >&5
-echo "${ECHO_T}$ac_cv_type_ino_t" >&6
-
-echo "$as_me:$LINENO: checking size of ino_t" >&5
-echo $ECHO_N "checking size of ino_t... $ECHO_C" >&6
-if test "${ac_cv_sizeof_ino_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$ac_cv_type_ino_t" = yes; then
-  # The cast to unsigned long works around a bug in the HP C Compiler
-  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-  # This bug is HP SR number 8606223364.
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (ino_t))) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (ino_t))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_hi=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr $ac_mid + 1`
-		    if test $ac_lo -le $ac_mid; then
-		      ac_lo= ac_hi=
-		      break
-		    fi
-		    ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (ino_t))) < 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (ino_t))) >= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_lo=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_hi=`expr '(' $ac_mid ')' - 1`
-		       if test $ac_mid -le $ac_hi; then
-			 ac_lo= ac_hi=
-			 break
-		       fi
-		       ac_mid=`expr 2 '*' $ac_mid`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo= ac_hi=
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (ino_t))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_hi=$ac_mid
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_ino_t=$ac_lo;;
-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (ino_t), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (ino_t), 77
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; } ;;
-esac
-else
-  if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-long longval () { return (long) (sizeof (ino_t)); }
-unsigned long ulongval () { return (long) (sizeof (ino_t)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    exit (1);
-  if (((long) (sizeof (ino_t))) < 0)
-    {
-      long i = longval ();
-      if (i != ((long) (sizeof (ino_t))))
-	exit (1);
-      fprintf (f, "%ld\n", i);
-    }
-  else
-    {
-      unsigned long i = ulongval ();
-      if (i != ((long) (sizeof (ino_t))))
-	exit (1);
-      fprintf (f, "%lu\n", i);
-    }
-  exit (ferror (f) || fclose (f) != 0);
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_ino_t=`cat conftest.val`
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (ino_t), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (ino_t), 77
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-rm -f conftest.val
-else
-  ac_cv_sizeof_ino_t=0
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_sizeof_ino_t" >&5
-echo "${ECHO_T}$ac_cv_sizeof_ino_t" >&6
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INO_T $ac_cv_sizeof_ino_t
-_ACEOF
-
-
-if test $ac_cv_sizeof_ino_t = "4"; then
-cat >>confdefs.h <<\_ACEOF
-#define INO_STRING PRId32
-_ACEOF
-
-cat >>confdefs.h <<\_ACEOF
-#define INO_HEXSTRING PRIx32
-_ACEOF
-
-cat >>confdefs.h <<\_ACEOF
-#define INO_CAST (uint32_t)
-_ACEOF
-
-elif test $ac_cv_sizeof_ino_t = "8"; then
-cat >>confdefs.h <<\_ACEOF
-#define INO_STRING PRId64
-_ACEOF
-
-cat >>confdefs.h <<\_ACEOF
-#define INO_HEXSTRING PRIx64
-_ACEOF
-
-cat >>confdefs.h <<\_ACEOF
-#define INO_CAST (uint64_t)
-_ACEOF
-
-else
-{ { echo "$as_me:$LINENO: error: can not detect the size of your system's ino_t type" >&5
-echo "$as_me: error: can not detect the size of your system's ino_t type" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-echo "$as_me:$LINENO: checking for dev_t" >&5
-echo $ECHO_N "checking for dev_t... $ECHO_C" >&6
-if test "${ac_cv_type_dev_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if ((dev_t *) 0)
-  return 0;
-if (sizeof (dev_t))
-  return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_type_dev_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_dev_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_dev_t" >&5
-echo "${ECHO_T}$ac_cv_type_dev_t" >&6
-
-echo "$as_me:$LINENO: checking size of dev_t" >&5
-echo $ECHO_N "checking size of dev_t... $ECHO_C" >&6
-if test "${ac_cv_sizeof_dev_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$ac_cv_type_dev_t" = yes; then
-  # The cast to unsigned long works around a bug in the HP C Compiler
-  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-  # This bug is HP SR number 8606223364.
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (dev_t))) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (dev_t))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_hi=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr $ac_mid + 1`
-		    if test $ac_lo -le $ac_mid; then
-		      ac_lo= ac_hi=
-		      break
-		    fi
-		    ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (dev_t))) < 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (dev_t))) >= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_lo=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_hi=`expr '(' $ac_mid ')' - 1`
-		       if test $ac_mid -le $ac_hi; then
-			 ac_lo= ac_hi=
-			 break
-		       fi
-		       ac_mid=`expr 2 '*' $ac_mid`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo= ac_hi=
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (dev_t))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_hi=$ac_mid
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_dev_t=$ac_lo;;
-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (dev_t), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (dev_t), 77
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; } ;;
-esac
-else
-  if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-long longval () { return (long) (sizeof (dev_t)); }
-unsigned long ulongval () { return (long) (sizeof (dev_t)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    exit (1);
-  if (((long) (sizeof (dev_t))) < 0)
-    {
-      long i = longval ();
-      if (i != ((long) (sizeof (dev_t))))
-	exit (1);
-      fprintf (f, "%ld\n", i);
-    }
-  else
-    {
-      unsigned long i = ulongval ();
-      if (i != ((long) (sizeof (dev_t))))
-	exit (1);
-      fprintf (f, "%lu\n", i);
-    }
-  exit (ferror (f) || fclose (f) != 0);
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_dev_t=`cat conftest.val`
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (dev_t), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (dev_t), 77
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-rm -f conftest.val
-else
-  ac_cv_sizeof_dev_t=0
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_sizeof_dev_t" >&5
-echo "${ECHO_T}$ac_cv_sizeof_dev_t" >&6
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_DEV_T $ac_cv_sizeof_dev_t
-_ACEOF
-
-
-if test $ac_cv_sizeof_dev_t = "4"; then
-cat >>confdefs.h <<\_ACEOF
-#define DEV_STRING PRId32
-_ACEOF
-
-cat >>confdefs.h <<\_ACEOF
-#define DEV_HEXSTRING PRIx32
-_ACEOF
-
-cat >>confdefs.h <<\_ACEOF
-#define DEV_CAST (uint32_t)
-_ACEOF
-
-elif test $ac_cv_sizeof_dev_t = "8"; then
-cat >>confdefs.h <<\_ACEOF
-#define DEV_STRING PRId64
-_ACEOF
-
-cat >>confdefs.h <<\_ACEOF
-#define DEV_HEXSTRING PRIx64
-_ACEOF
-
-cat >>confdefs.h <<\_ACEOF
-#define DEV_CAST (uint64_t)
-_ACEOF
-
-else
-{ { echo "$as_me:$LINENO: error: can not detect the size of your system's dev_t type" >&5
-echo "$as_me: error: can not detect the size of your system's dev_t type" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-
-echo "$as_me:$LINENO: checking for acl_get_file in -lacl" >&5
-echo $ECHO_N "checking for acl_get_file in -lacl... $ECHO_C" >&6
-if test "${ac_cv_lib_acl_acl_get_file+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lacl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char acl_get_file ();
-int
-main ()
-{
-acl_get_file ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_acl_acl_get_file=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_acl_acl_get_file=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_acl_acl_get_file" >&5
-echo "${ECHO_T}$ac_cv_lib_acl_acl_get_file" >&6
-if test $ac_cv_lib_acl_acl_get_file = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBACL 1
-_ACEOF
-
-  LIBS="-lacl $LIBS"
-
-fi
-
-
-
-
-echo "$as_me:$LINENO: checking for asprintf" >&5
-echo $ECHO_N "checking for asprintf... $ECHO_C" >&6
-if test "${ac_cv_func_asprintf+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define asprintf to an innocuous variant, in case <limits.h> declares asprintf.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define asprintf innocuous_asprintf
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char asprintf (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef asprintf
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char asprintf ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_asprintf) || defined (__stub___asprintf)
-choke me
-#else
-char (*f) () = asprintf;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != asprintf;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_func_asprintf=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_asprintf=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_asprintf" >&5
-echo "${ECHO_T}$ac_cv_func_asprintf" >&6
-if test $ac_cv_func_asprintf = yes; then
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_ASPRINTF 1
-_ACEOF
-
-fi
-
-
-LIBXML2_VERSION_MIN=2.6.11
-
-have_libxml2="1"
-
-
-# Check whether --with-xml2-config or --without-xml2-config was given.
-if test "${with_xml2_config+set}" = set; then
-  withval="$with_xml2_config"
-  if test "x${with_xml2_config}" = "xno" ; then
-  XML2_CONFIG=
-else
-  XML2_CONFIG="${with_xml2_config}"
-fi
-
-else
-  XML2_CONFIG=
-
-fi;
-if test "x${XML2_CONFIG}" != "x" ; then
-   if test ! -x "${XML2_CONFIG}" ; then
-     { { echo "$as_me:$LINENO: error: Unusable or missing xml2-config: ${XML2_CONFIG}" >&5
-echo "$as_me: error: Unusable or missing xml2-config: ${XML2_CONFIG}" >&2;}
-   { (exit 1); exit 1; }; }
-   fi
-else
-  # Extract the first word of "xml2-config", so it can be a program name with args.
-set dummy xml2-config; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_XML2_CONFIG+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $XML2_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in ${PATH}
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-  ;;
-esac
-fi
-XML2_CONFIG=$ac_cv_path_XML2_CONFIG
-
-if test -n "$XML2_CONFIG"; then
-  echo "$as_me:$LINENO: result: $XML2_CONFIG" >&5
-echo "${ECHO_T}$XML2_CONFIG" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  if test "x${XML2_CONFIG}" = "x" ; then
-    { { echo "$as_me:$LINENO: error: Cannot configure without xml2-config" >&5
-echo "$as_me: error: Cannot configure without xml2-config" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-fi
-
-echo "$as_me:$LINENO: checking for libxml >= ${LIBXML2_VERSION_MIN}" >&5
-echo $ECHO_N "checking for libxml >= ${LIBXML2_VERSION_MIN}... $ECHO_C" >&6
-LIBXML2_FOUND=`2>&1 ${XML2_CONFIG} --version`
-LIBXML2_MAJOR=`echo ${LIBXML2_FOUND} | tr . " " | awk '{print $1}'`
-LIBXML2_MINOR=`echo ${LIBXML2_FOUND} | tr . " " | awk '{print $2}' | tr a-z " " |awk '{print $1}'`
-LIBXML2_BRANCH=`echo ${LIBXML2_FOUND} | tr . " " | awk '{print $3}' | tr a-z " " |awk '{print $1}'`
-if test "x${LIBXML2_BRANCH}" = "x" ; then
-  LIBXML2_BRANCH=0
-fi
-LIBXML2_MAJOR_MIN=`echo ${LIBXML2_VERSION_MIN} | tr . " " | awk '{print $1}'`
-LIBXML2_MINOR_MIN=`echo ${LIBXML2_VERSION_MIN} | tr . " " | awk '{print $2}'`
-LIBXML2_BRANCH_MIN=`echo ${LIBXML2_VERSION_MIN} | tr . " " | awk '{print $3}'`
-if test ${LIBXML2_MAJOR} -gt ${LIBXML2_MAJOR_MIN} \
-     -o ${LIBXML2_MAJOR} -eq ${LIBXML2_MAJOR_MIN} \
-     -a ${LIBXML2_MINOR} -gt ${LIBXML2_MINOR_MIN} \
-     -o ${LIBXML2_MAJOR} -eq ${LIBXML2_MAJOR_MIN} \
-     -a ${LIBXML2_MINOR} -eq ${LIBXML2_MINOR_MIN} \
-     -a ${LIBXML2_BRANCH} -ge $LIBXML2_BRANCH_MIN ; then
-  echo "$as_me:$LINENO: result: ${LIBXML2_MAJOR}.${LIBXML2_MINOR}.${LIBXML2_BRANCH}" >&5
-echo "${ECHO_T}${LIBXML2_MAJOR}.${LIBXML2_MINOR}.${LIBXML2_BRANCH}" >&6
-  have_libxml2="1"
-  CPPFLAGS="${CPPFLAGS} `${XML2_CONFIG} --cflags`"
-  LIBS="${LIBS} `${XML2_CONFIG} --libs`"
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-  have_libxml2="0"
-fi
-if test "x${have_libxml2}" = "x1" ; then
-    if test "${ac_cv_header_libxml_xmlwriter_h+set}" = set; then
-  echo "$as_me:$LINENO: checking for libxml/xmlwriter.h" >&5
-echo $ECHO_N "checking for libxml/xmlwriter.h... $ECHO_C" >&6
-if test "${ac_cv_header_libxml_xmlwriter_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_libxml_xmlwriter_h" >&5
-echo "${ECHO_T}$ac_cv_header_libxml_xmlwriter_h" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking libxml/xmlwriter.h usability" >&5
-echo $ECHO_N "checking libxml/xmlwriter.h usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <libxml/xmlwriter.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking libxml/xmlwriter.h presence" >&5
-echo $ECHO_N "checking libxml/xmlwriter.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <libxml/xmlwriter.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: libxml/xmlwriter.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: libxml/xmlwriter.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: libxml/xmlwriter.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: libxml/xmlwriter.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: libxml/xmlwriter.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: libxml/xmlwriter.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: libxml/xmlwriter.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: libxml/xmlwriter.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: libxml/xmlwriter.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: libxml/xmlwriter.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: libxml/xmlwriter.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: libxml/xmlwriter.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: libxml/xmlwriter.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: libxml/xmlwriter.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: libxml/xmlwriter.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: libxml/xmlwriter.h: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## --------------------------------- ##
-## Report this to xar at opendarwin.org ##
-## --------------------------------- ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for libxml/xmlwriter.h" >&5
-echo $ECHO_N "checking for libxml/xmlwriter.h... $ECHO_C" >&6
-if test "${ac_cv_header_libxml_xmlwriter_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_header_libxml_xmlwriter_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_libxml_xmlwriter_h" >&5
-echo "${ECHO_T}$ac_cv_header_libxml_xmlwriter_h" >&6
-
-fi
-if test $ac_cv_header_libxml_xmlwriter_h = yes; then
-  :
-else
-  have_libxml2="0"
-fi
-
-
-fi
-if test "x${have_libxml2}" = "x0" ; then
-  { { echo "$as_me:$LINENO: error: Cannot build without libxml2" >&5
-echo "$as_me: error: Cannot build without libxml2" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-have_libcrypto="1"
-
-for ac_header in openssl/evp.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## --------------------------------- ##
-## Report this to xar at opendarwin.org ##
-## --------------------------------- ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-else
-  have_libcrypto="0"
-fi
-
-done
-
-
-echo "$as_me:$LINENO: checking for OpenSSL_add_all_ciphers in -lcrypto" >&5
-echo $ECHO_N "checking for OpenSSL_add_all_ciphers in -lcrypto... $ECHO_C" >&6
-if test "${ac_cv_lib_crypto_OpenSSL_add_all_ciphers+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypto  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char OpenSSL_add_all_ciphers ();
-int
-main ()
-{
-OpenSSL_add_all_ciphers ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_crypto_OpenSSL_add_all_ciphers=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_crypto_OpenSSL_add_all_ciphers=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_OpenSSL_add_all_ciphers" >&5
-echo "${ECHO_T}$ac_cv_lib_crypto_OpenSSL_add_all_ciphers" >&6
-if test $ac_cv_lib_crypto_OpenSSL_add_all_ciphers = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBCRYPTO 1
-_ACEOF
-
-  LIBS="-lcrypto $LIBS"
-
-else
-  have_libcrypto="0"
-fi
-
-if test "x${have_libcrypto}" = "x0" ; then
-  { { echo "$as_me:$LINENO: error: Cannot build without libcrypto (OpenSSL)" >&5
-echo "$as_me: error: Cannot build without libcrypto (OpenSSL)" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-have_libz="1"
-
-for ac_header in zlib.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## --------------------------------- ##
-## Report this to xar at opendarwin.org ##
-## --------------------------------- ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-else
-  have_libz="0"
-fi
-
-done
-
-
-echo "$as_me:$LINENO: checking for deflate in -lz" >&5
-echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6
-if test "${ac_cv_lib_z_deflate+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char deflate ();
-int
-main ()
-{
-deflate ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_z_deflate=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_z_deflate=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5
-echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6
-if test $ac_cv_lib_z_deflate = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBZ 1
-_ACEOF
-
-  LIBS="-lz $LIBS"
-
-else
-  have_libz="0"
-fi
-
-if test "x${have_libz}" = "x0" ; then
-  { { echo "$as_me:$LINENO: error: Cannot build without libz" >&5
-echo "$as_me: error: Cannot build without libz" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-have_libbz2="1"
-
-for ac_header in bzlib.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## --------------------------------- ##
-## Report this to xar at opendarwin.org ##
-## --------------------------------- ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-else
-  have_libbz2="0"
-fi
-
-done
-
-
-echo "$as_me:$LINENO: checking for BZ2_bzCompress in -lbz2" >&5
-echo $ECHO_N "checking for BZ2_bzCompress in -lbz2... $ECHO_C" >&6
-if test "${ac_cv_lib_bz2_BZ2_bzCompress+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbz2  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char BZ2_bzCompress ();
-int
-main ()
-{
-BZ2_bzCompress ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_bz2_BZ2_bzCompress=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_bz2_BZ2_bzCompress=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_bz2_BZ2_bzCompress" >&5
-echo "${ECHO_T}$ac_cv_lib_bz2_BZ2_bzCompress" >&6
-if test $ac_cv_lib_bz2_BZ2_bzCompress = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBBZ2 1
-_ACEOF
-
-  LIBS="-lbz2 $LIBS"
-
-else
-  have_libbz2="0"
-fi
-
-if test "x${have_libbz2}" = "x1" ; then
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBBZ2 1
-_ACEOF
-
-fi
-
-
-          ac_config_headers="$ac_config_headers $cfghdrs"
-
-
-
-          ac_config_files="$ac_config_files $cfgoutputs"
-
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems.  If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-{
-  (set) 2>&1 |
-    case `(ac_space=' '; set | grep ac_space) 2>&1` in
-    *ac_space=\ *)
-      # `set' does not quote correctly, so add quotes (double-quote
-      # substitution turns \\\\ into \\, and sed turns \\ into \).
-      sed -n \
-	"s/'/'\\\\''/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;;
-    *)
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n \
-	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
-      ;;
-    esac;
-} |
-  sed '
-     t clear
-     : clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     t end
-     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
-  if test -w $cache_file; then
-    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
-    cat confcache >$cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[	 ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[	 ]*$//;
-}'
-fi
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
-  # 1. Remove the extension, and $U if already installed.
-  ac_i=`echo "$ac_i" |
-	 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
-  # 2. Add them.
-  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
-  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
-  set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-  LC_TELEPHONE LC_TIME
-do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
-  else
-    $as_unset $as_var
-  fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)$' \| \
-	 .     : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
-  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\/\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
-  # Find who we are.  Look in the path if we contain no path at all
-  # relative or not.
-  case $0 in
-    *[\\/]* ) as_myself=$0 ;;
-    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
-       ;;
-  esac
-  # We did not find ourselves, most probably we were run as `sh COMMAND'
-  # in which case we are not to be found in the path.
-  if test "x$as_myself" = x; then
-    as_myself=$0
-  fi
-  if test ! -f "$as_myself"; then
-    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-  case $CONFIG_SHELL in
-  '')
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for as_base in sh bash ksh sh5; do
-	 case $as_dir in
-	 /*)
-	   if ("$as_dir/$as_base" -c '
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
-	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
-	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
-	     CONFIG_SHELL=$as_dir/$as_base
-	     export CONFIG_SHELL
-	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
-	   fi;;
-	 esac
-       done
-done
-;;
-  esac
-
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line before each line; the second 'sed' does the real
-  # work.  The second script uses 'N' to pair each line-number line
-  # with the numbered line, and appends trailing '-' during
-  # substitution so that $LINENO is not a special case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
-  sed '=' <$as_myself |
-    sed '
-      N
-      s,$,-,
-      : loop
-      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
-      t loop
-      s,-$,,
-      s,^['$as_cr_digits']*\n,,
-    ' >$as_me.lineno &&
-  chmod +x $as_me.lineno ||
-    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
-   { (exit 1); exit 1; }; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensible to this).
-  . ./$as_me.lineno
-  # Exit status is that of the last command.
-  exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
-  *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T='	' ;;
-  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
-  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  # We could just check for DJGPP; but this test a) works b) is more generic
-  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
-  if test -f conf$$.exe; then
-    # Don't use ln at all; we don't have any links
-    as_ln_s='cp -p'
-  else
-    as_ln_s='ln -s'
-  fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" 	$as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.  Logging --version etc. is OK.
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by OpenDarwin Xar $as_me 1.4, which was
-generated by GNU Autoconf 2.59.  Invocation command line was
-
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  $ $0 $@
-
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
-_ACEOF
-
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
-  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_headers"; then
-  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_links"; then
-  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
-  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
-  -h, --help       print this help, then exit
-  -V, --version    print version number, then exit
-  -q, --quiet      do not print progress messages
-  -d, --debug      don't remove temporary files
-      --recheck    update $as_me by reconfiguring in the same conditions
-  --file=FILE[:TEMPLATE]
-		   instantiate the configuration file FILE
-  --header=FILE[:TEMPLATE]
-		   instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Report bugs to <bug-autoconf at gnu.org>."
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-OpenDarwin Xar config.status 1.4
-configured by $0, generated by GNU Autoconf 2.59,
-  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-INSTALL="$INSTALL"
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value.  By we need to know if files were specified by the user.
-ac_need_defaults=:
-while test $# != 0
-do
-  case $1 in
-  --*=*)
-    ac_option=`expr "x$1" : 'x\([^=]*\)='`
-    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
-    ac_shift=:
-    ;;
-  -*)
-    ac_option=$1
-    ac_optarg=$2
-    ac_shift=shift
-    ;;
-  *) # This is not an option, so the user has probably given explicit
-     # arguments.
-     ac_option=$1
-     ac_need_defaults=false;;
-  esac
-
-  case $ac_option in
-  # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    ac_cs_recheck=: ;;
-  --version | --vers* | -V )
-    echo "$ac_cs_version"; exit 0 ;;
-  --he | --h)
-    # Conflict between --help and --header
-    { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
-   { (exit 1); exit 1; }; };;
-  --help | --hel | -h )
-    echo "$ac_cs_usage"; exit 0 ;;
-  --debug | --d* | -d )
-    debug=: ;;
-  --file | --fil | --fi | --f )
-    $ac_shift
-    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
-    ac_need_defaults=false;;
-  --header | --heade | --head | --hea )
-    $ac_shift
-    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
-    ac_need_defaults=false;;
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil | --si | --s)
-    ac_cs_silent=: ;;
-
-  # This is an error.
-  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
-   { (exit 1); exit 1; }; } ;;
-
-  *) ac_config_targets="$ac_config_targets $1" ;;
-
-  esac
-  shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
-  exec 6>/dev/null
-  ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-if \$ac_cs_recheck; then
-  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
-  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-
-
-
-
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_config_target in $ac_config_targets
-do
-  case "$ac_config_target" in
-  # Handling of arguments.
-  "$cfgoutputs" ) CONFIG_FILES="$CONFIG_FILES $cfgoutputs" ;;
-  "$cfghdrs" ) CONFIG_HEADERS="$CONFIG_HEADERS $cfghdrs" ;;
-  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
-   { (exit 1); exit 1; }; };;
-  esac
-done
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used.  Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
-  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
-fi
-
-# Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
-  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-
-{
-  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
-}  ||
-{
-  tmp=./confstat$$-$RANDOM
-  (umask 077 && mkdir $tmp)
-} ||
-{
-   echo "$me: cannot create a temporary directory in ." >&2
-   { (exit 1); exit 1; }
-}
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-
-#
-# CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
-  # Protect against being on the right side of a sed subst in config.status.
-  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
-   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s, at SHELL@,$SHELL,;t t
-s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s, at exec_prefix@,$exec_prefix,;t t
-s, at prefix@,$prefix,;t t
-s, at program_transform_name@,$program_transform_name,;t t
-s, at bindir@,$bindir,;t t
-s, at sbindir@,$sbindir,;t t
-s, at libexecdir@,$libexecdir,;t t
-s, at datadir@,$datadir,;t t
-s, at sysconfdir@,$sysconfdir,;t t
-s, at sharedstatedir@,$sharedstatedir,;t t
-s, at localstatedir@,$localstatedir,;t t
-s, at libdir@,$libdir,;t t
-s, at includedir@,$includedir,;t t
-s, at oldincludedir@,$oldincludedir,;t t
-s, at infodir@,$infodir,;t t
-s, at mandir@,$mandir,;t t
-s, at build_alias@,$build_alias,;t t
-s, at host_alias@,$host_alias,;t t
-s, at target_alias@,$target_alias,;t t
-s, at DEFS@,$DEFS,;t t
-s, at ECHO_C@,$ECHO_C,;t t
-s, at ECHO_N@,$ECHO_N,;t t
-s, at ECHO_T@,$ECHO_T,;t t
-s, at LIBS@,$LIBS,;t t
-s, at LIB_REV@,$LIB_REV,;t t
-s, at XAR_MAJOR_VERSION@,$XAR_MAJOR_VERSION,;t t
-s, at XAR_MINOR_VERSION@,$XAR_MINOR_VERSION,;t t
-s, at XAR_VERSION@,$XAR_VERSION,;t t
-s, at srcroot@,$srcroot,;t t
-s, at abs_srcroot@,$abs_srcroot,;t t
-s, at objroot@,$objroot,;t t
-s, at abs_objroot@,$abs_objroot,;t t
-s, at PREFIX@,$PREFIX,;t t
-s, at BINDIR@,$BINDIR,;t t
-s, at DATADIR@,$DATADIR,;t t
-s, at LIBDIR@,$LIBDIR,;t t
-s, at INCLUDEDIR@,$INCLUDEDIR,;t t
-s, at MANDIR@,$MANDIR,;t t
-s, at CC@,$CC,;t t
-s, at CFLAGS@,$CFLAGS,;t t
-s, at LDFLAGS@,$LDFLAGS,;t t
-s, at CPPFLAGS@,$CPPFLAGS,;t t
-s, at ac_ct_CC@,$ac_ct_CC,;t t
-s, at EXEEXT@,$EXEEXT,;t t
-s, at OBJEXT@,$OBJEXT,;t t
-s, at CPP@,$CPP,;t t
-s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s, at INSTALL_DATA@,$INSTALL_DATA,;t t
-s, at LD@,$LD,;t t
-s, at AUTOCONF@,$AUTOCONF,;t t
-s, at build@,$build,;t t
-s, at build_cpu@,$build_cpu,;t t
-s, at build_vendor@,$build_vendor,;t t
-s, at build_os@,$build_os,;t t
-s, at host@,$host,;t t
-s, at host_cpu@,$host_cpu,;t t
-s, at host_vendor@,$host_vendor,;t t
-s, at host_os@,$host_os,;t t
-s, at abi@,$abi,;t t
-s, at RPATH@,$RPATH,;t t
-s, at enable_autogen@,$enable_autogen,;t t
-s, at EGREP@,$EGREP,;t t
-s, at XML2_CONFIG@,$XML2_CONFIG,;t t
-s, at cfghdrs@,$cfghdrs,;t t
-s, at cfgoutputs@,$cfgoutputs,;t t
-s, at LIBOBJS@,$LIBOBJS,;t t
-s, at LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
-
-_ACEOF
-
-  cat >>$CONFIG_STATUS <<\_ACEOF
-  # Split the substitutions into bite-sized pieces for seds with
-  # small command number limits, like on Digital OSF/1 and HP-UX.
-  ac_max_sed_lines=48
-  ac_sed_frag=1 # Number of current file.
-  ac_beg=1 # First line for current file.
-  ac_end=$ac_max_sed_lines # Line after last line for current file.
-  ac_more_lines=:
-  ac_sed_cmds=
-  while $ac_more_lines; do
-    if test $ac_beg -gt 1; then
-      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
-    else
-      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
-    fi
-    if test ! -s $tmp/subs.frag; then
-      ac_more_lines=false
-    else
-      # The purpose of the label and of the branching condition is to
-      # speed up the sed processing (if there are no `@' at all, there
-      # is no need to browse any of the substitutions).
-      # These are the two extra sed commands mentioned above.
-      (echo ':t
-  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
-      if test -z "$ac_sed_cmds"; then
-	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
-      else
-	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
-      fi
-      ac_sed_frag=`expr $ac_sed_frag + 1`
-      ac_beg=$ac_end
-      ac_end=`expr $ac_end + $ac_max_sed_lines`
-    fi
-  done
-  if test -z "$ac_sed_cmds"; then
-    ac_sed_cmds=cat
-  fi
-fi # test -n "$CONFIG_FILES"
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case $ac_file in
-  - | *:- | *:-:* ) # input from stdin
-	cat >$tmp/stdin
-	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  * )   ac_file_in=$ac_file.in ;;
-  esac
-
-  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
-  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$ac_file" : 'X\(//\)[^/]' \| \
-	 X"$ac_file" : 'X\(//\)$' \| \
-	 X"$ac_file" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
-  { if $as_mkdir_p; then
-    mkdir -p "$ac_dir"
-  else
-    as_dir="$ac_dir"
-    as_dirs=
-    while test ! -d "$as_dir"; do
-      as_dirs="$as_dir $as_dirs"
-      as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
-    done
-    test ! -n "$as_dirs" || mkdir $as_dirs
-  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
-   { (exit 1); exit 1; }; }; }
-
-  ac_builddir=.
-
-if test "$ac_dir" != .; then
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A "../" for each directory in $ac_dir_suffix.
-  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
-  ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
-  .)  # No --srcdir option.  We are building in place.
-    ac_srcdir=.
-    if test -z "$ac_top_builddir"; then
-       ac_top_srcdir=.
-    else
-       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
-    fi ;;
-  [\\/]* | ?:[\\/]* )  # Absolute path.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir ;;
-  *) # Relative path.
-    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
-  case "$ac_dir" in
-  .) ac_abs_builddir=`pwd`;;
-  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
-  *) ac_abs_builddir=`pwd`/"$ac_dir";;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
-  case ${ac_top_builddir}. in
-  .) ac_abs_top_builddir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
-  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
-  case $ac_srcdir in
-  .) ac_abs_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
-  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
-  case $ac_top_srcdir in
-  .) ac_abs_top_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
-  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
-  esac;;
-esac
-
-
-  case $INSTALL in
-  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
-  esac
-
-  if test x"$ac_file" != x-; then
-    { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-    rm -f "$ac_file"
-  fi
-  # Let's still pretend it is `configure' which instantiates (i.e., don't
-  # use $as_me), people would be surprised to read:
-  #    /* config.h.  Generated by config.status.  */
-  if test x"$ac_file" = x-; then
-    configure_input=
-  else
-    configure_input="$ac_file.  "
-  fi
-  configure_input=$configure_input"Generated from `echo $ac_file_in |
-				     sed 's,.*/,,'` by configure."
-
-  # First look for the input files in the build tree, otherwise in the
-  # src tree.
-  ac_file_inputs=`IFS=:
-    for f in $ac_file_in; do
-      case $f in
-      -) echo $tmp/stdin ;;
-      [\\/$]*)
-	 # Absolute (can't be DOS-style, as IFS=:)
-	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-	 echo "$f";;
-      *) # Relative
-	 if test -f "$f"; then
-	   # Build tree
-	   echo "$f"
-	 elif test -f "$srcdir/$f"; then
-	   # Source tree
-	   echo "$srcdir/$f"
-	 else
-	   # /dev/null tree
-	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-	 fi;;
-      esac
-    done` || { (exit 1); exit 1; }
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-  sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s, at configure_input@,$configure_input,;t t
-s, at srcdir@,$ac_srcdir,;t t
-s, at abs_srcdir@,$ac_abs_srcdir,;t t
-s, at top_srcdir@,$ac_top_srcdir,;t t
-s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s, at builddir@,$ac_builddir,;t t
-s, at abs_builddir@,$ac_abs_builddir,;t t
-s, at top_builddir@,$ac_top_builddir,;t t
-s, at abs_top_builddir@,$ac_abs_top_builddir,;t t
-s, at INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
-  rm -f $tmp/stdin
-  if test x"$ac_file" != x-; then
-    mv $tmp/out $ac_file
-  else
-    cat $tmp/out
-    rm -f $tmp/out
-  fi
-
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_HEADER section.
-#
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([	 ]*\)#\([	 ]*define[	 ][	 ]*\)'
-ac_dB='[	 ].*$,\1#\2'
-ac_dC=' '
-ac_dD=',;t'
-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([	 ]*\)#\([	 ]*\)undef\([	 ][	 ]*\)'
-ac_uB='$,\1#\2define\3'
-ac_uC=' '
-ac_uD=',;t'
-
-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case $ac_file in
-  - | *:- | *:-:* ) # input from stdin
-	cat >$tmp/stdin
-	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  * )   ac_file_in=$ac_file.in ;;
-  esac
-
-  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-
-  # First look for the input files in the build tree, otherwise in the
-  # src tree.
-  ac_file_inputs=`IFS=:
-    for f in $ac_file_in; do
-      case $f in
-      -) echo $tmp/stdin ;;
-      [\\/$]*)
-	 # Absolute (can't be DOS-style, as IFS=:)
-	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-	 # Do quote $f, to prevent DOS paths from being IFS'd.
-	 echo "$f";;
-      *) # Relative
-	 if test -f "$f"; then
-	   # Build tree
-	   echo "$f"
-	 elif test -f "$srcdir/$f"; then
-	   # Source tree
-	   echo "$srcdir/$f"
-	 else
-	   # /dev/null tree
-	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-	 fi;;
-      esac
-    done` || { (exit 1); exit 1; }
-  # Remove the trailing spaces.
-  sed 's/[	 ]*$//' $ac_file_inputs >$tmp/in
-
-_ACEOF
-
-# Transform confdefs.h into two sed scripts, `conftest.defines' and
-# `conftest.undefs', that substitutes the proper values into
-# config.h.in to produce config.h.  The first handles `#define'
-# templates, and the second `#undef' templates.
-# And first: Protect against being on the right side of a sed subst in
-# config.status.  Protect against being in an unquoted here document
-# in config.status.
-rm -f conftest.defines conftest.undefs
-# Using a here document instead of a string reduces the quoting nightmare.
-# Putting comments in sed scripts is not portable.
-#
-# `end' is used to avoid that the second main sed command (meant for
-# 0-ary CPP macros) applies to n-ary macro definitions.
-# See the Autoconf documentation for `clear'.
-cat >confdef2sed.sed <<\_ACEOF
-s/[\\&,]/\\&/g
-s,[\\$`],\\&,g
-t clear
-: clear
-s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*\)\(([^)]*)\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
-t end
-s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-: end
-_ACEOF
-# If some macros were called several times there might be several times
-# the same #defines, which is useless.  Nevertheless, we may not want to
-# sort them, since we want the *last* AC-DEFINE to be honored.
-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
-rm -f confdef2sed.sed
-
-# This sed command replaces #undef with comments.  This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-cat >>conftest.undefs <<\_ACEOF
-s,^[	 ]*#[	 ]*undef[	 ][	 ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-_ACEOF
-
-# Break up conftest.defines because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo '  if grep "^[	 ]*#[	 ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
-echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
-echo '  :' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.defines >/dev/null
-do
-  # Write a limited-size here document to $tmp/defines.sed.
-  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
-  # Speed up: don't consider the non `#define' lines.
-  echo '/^[	 ]*#[	 ]*define/!b' >>$CONFIG_STATUS
-  # Work around the forget-to-reset-the-flag bug.
-  echo 't clr' >>$CONFIG_STATUS
-  echo ': clr' >>$CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
-  echo 'CEOF
-  sed -f $tmp/defines.sed $tmp/in >$tmp/out
-  rm -f $tmp/in
-  mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
-  rm -f conftest.defines
-  mv conftest.tail conftest.defines
-done
-rm -f conftest.defines
-echo '  fi # grep' >>$CONFIG_STATUS
-echo >>$CONFIG_STATUS
-
-# Break up conftest.undefs because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.undefs >/dev/null
-do
-  # Write a limited-size here document to $tmp/undefs.sed.
-  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
-  # Speed up: don't consider the non `#undef'
-  echo '/^[	 ]*#[	 ]*undef/!b' >>$CONFIG_STATUS
-  # Work around the forget-to-reset-the-flag bug.
-  echo 't clr' >>$CONFIG_STATUS
-  echo ': clr' >>$CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
-  echo 'CEOF
-  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
-  rm -f $tmp/in
-  mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
-  rm -f conftest.undefs
-  mv conftest.tail conftest.undefs
-done
-rm -f conftest.undefs
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-  # Let's still pretend it is `configure' which instantiates (i.e., don't
-  # use $as_me), people would be surprised to read:
-  #    /* config.h.  Generated by config.status.  */
-  if test x"$ac_file" = x-; then
-    echo "/* Generated by configure.  */" >$tmp/config.h
-  else
-    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
-  fi
-  cat $tmp/in >>$tmp/config.h
-  rm -f $tmp/in
-  if test x"$ac_file" != x-; then
-    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
-      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
-    else
-      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$ac_file" : 'X\(//\)[^/]' \| \
-	 X"$ac_file" : 'X\(//\)$' \| \
-	 X"$ac_file" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
-      { if $as_mkdir_p; then
-    mkdir -p "$ac_dir"
-  else
-    as_dir="$ac_dir"
-    as_dirs=
-    while test ! -d "$as_dir"; do
-      as_dirs="$as_dir $as_dirs"
-      as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
-    done
-    test ! -n "$as_dirs" || mkdir $as_dirs
-  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
-   { (exit 1); exit 1; }; }; }
-
-      rm -f $ac_file
-      mv $tmp/config.h $ac_file
-    fi
-  else
-    cat $tmp/config.h
-    rm -f $tmp/config.h
-  fi
-done
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded.  So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status.  When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
-  ac_cs_success=:
-  ac_config_status_args=
-  test "$silent" = yes &&
-    ac_config_status_args="$ac_config_status_args --quiet"
-  exec 5>/dev/null
-  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
-  exec 5>>config.log
-  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
-  # would make configure fail if this is the last instruction.
-  $ac_cs_success || { (exit 1); exit 1; }
-fi
-

Copied: branches/release_1_4/base/src/programs/xar/configure (from rev 23968, trunk/base/src/programs/xar/configure)
===================================================================
--- branches/release_1_4/base/src/programs/xar/configure	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/configure	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,7969 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59 for OpenDarwin Xar 1.4.
+#
+# Report bugs to <xar at opendarwin.org>.
+#
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete.  It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='OpenDarwin Xar'
+PACKAGE_TARNAME='xar'
+PACKAGE_VERSION='1.4'
+PACKAGE_STRING='OpenDarwin Xar 1.4'
+PACKAGE_BUGREPORT='xar at opendarwin.org'
+
+ac_unique_file="LICENSE"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_default_prefix=/usr/local
+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 LIB_REV XAR_MAJOR_VERSION XAR_MINOR_VERSION XAR_VERSION srcroot abs_srcroot objroot abs_objroot PREFIX BINDIR DATADIR LIBDIR INCLUDEDIR MANDIR CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LD AUTOCONF build build_cpu build_vendor build_os host host_cpu host_vendor host_os abi RPATH enable_autogen EGREP XML2_CONFIG cfghdrs cfgoutputs LIBOBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_option in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval "enable_$ac_feature=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_$ac_feature='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_$ac_package='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval "with_$ac_package=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    eval "$ac_envvar='$ac_optarg'"
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+	      localstatedir libdir includedir oldincludedir infodir mandir
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then its parent.
+  ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$0" : 'X\(//\)[^/]' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+   { (exit 1); exit 1; }; }
+  else
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+  fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+   { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures OpenDarwin Xar 1.4 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+  cat <<_ACEOF
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+			  [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+			  [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --infodir=DIR          info documentation [PREFIX/info]
+  --mandir=DIR           man documentation [PREFIX/man]
+_ACEOF
+
+  cat <<\_ACEOF
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of OpenDarwin Xar 1.4:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-autogen        Automatically regenerate configure output
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-xml2-config      libxml2 config program
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+              headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <xar at opendarwin.org>.
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  ac_popdir=`pwd`
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d $ac_dir || continue
+    ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+    cd $ac_dir
+    # Check for guested configure; otherwise get Cygnus style configure.
+    if test -f $ac_srcdir/configure.gnu; then
+      echo
+      $SHELL $ac_srcdir/configure.gnu  --help=recursive
+    elif test -f $ac_srcdir/configure; then
+      echo
+      $SHELL $ac_srcdir/configure  --help=recursive
+    elif test -f $ac_srcdir/configure.ac ||
+	   test -f $ac_srcdir/configure.in; then
+      echo
+      $ac_configure --help
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi
+    cd $ac_popdir
+  done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+  cat <<\_ACEOF
+OpenDarwin Xar configure 1.4
+generated by GNU Autoconf 2.59
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by OpenDarwin Xar $as_me 1.4, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+      # Get rid of the leading space.
+      ac_sep=" "
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+{
+  (set) 2>&1 |
+    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      sed -n \
+	"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+      ;;
+    *)
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+}
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=$`echo $ac_var`
+      echo "$ac_var='"'"'$ac_val'"'"'"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=$`echo $ac_var`
+	echo "$ac_var='"'"'$ac_val'"'"'"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      sed "/^$/d" confdefs.h | sort
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core &&
+  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+     ' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+	       sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+  eval ac_new_val="\$ac_env_${ac_var}_value"
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+	ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+LIB_REV=1
+
+
+XAR_MAJOR_VERSION="1"
+XAR_MINOR_VERSION="4"
+XAR_VERSION="${XAR_MAJOR_VERSION}.${XAR_MINOR_VERSION}"
+
+
+
+
+srcroot=$srcdir
+if test "x${srcroot}" = "x." ; then
+  srcroot=""
+else
+  srcroot="${srcroot}/"
+fi
+
+abs_srcroot="`cd "$srcdir"; pwd`/"
+
+
+objroot=""
+
+abs_objroot="`pwd`/"
+
+
+if test "x$prefix" = "xNONE" ; then
+  prefix="/usr/local"
+fi
+if test "x$exec_prefix" = "xNONE" ; then
+  exec_prefix=$prefix
+fi
+PREFIX=$prefix
+
+BINDIR=`eval echo $bindir`
+BINDIR=`eval echo $BINDIR`
+
+DATADIR=`eval echo $datadir`
+DATADIR=`eval echo $DATADIR`
+
+LIBDIR=`eval echo $libdir`
+LIBDIR=`eval echo $LIBDIR`
+
+INCLUDEDIR=`eval echo $includedir`
+INCLUDEDIR=`eval echo $INCLUDEDIR`
+
+MANDIR=`eval echo $mandir`
+MANDIR=`eval echo $MANDIR`
+
+
+cfgoutputs="cfgoutputs.stamp"
+cfgoutputs="${cfgoutputs} Makefile"
+cfgoutputs="${cfgoutputs} include/xar.h"
+cfgoutputs="${cfgoutputs} lib/Makefile.inc"
+cfgoutputs="${cfgoutputs} src/Makefile.inc"
+
+cfghdrs="${objroot}cfghdrs.stamp"
+cfghdrs="${cfghdrs} ${objroot}include/config.h"
+
+CFLAGS=$CFLAGS
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CC" && break
+done
+
+  CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+  (eval $ac_link_default) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Find the output, starting from the most likely.  This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+	;;
+    conftest.$ac_ext )
+	# This is the source file.
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+	ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	# FIXME: I believe we export ac_cv_exeext for Libtool,
+	# but it would be cool to find out if it's true.  Does anybody
+	# maintain Libtool? --akim.
+	export ac_cv_exeext
+	break;;
+    * )
+	break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  export ac_cv_exeext
+	  break;;
+    * ) break;;
+  esac
+done
+else
+  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std1 is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std1.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX			-qlanglvl=ansi
+# Ultrix and OSF/1	-std1
+# HP-UX 10.20 and later	-Ae
+# HP-UX older versions	-Aa -D_HPUX_SOURCE
+# SVR4			-Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+  x|xno)
+    echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+  *)
+    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+    CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C.  Since we use `exit',
+# in C++ we need to declare it.  In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+  choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test "x$CFLAGS" = "x" ; then
+  no_CFLAGS="yes"
+fi
+if test "x$no_CFLAGS" = "xyes" -a "x$GCC" = "xyes" ; then
+  CFLAGS="-Wall -g"
+fi
+if test "x$EXTRA_CFLAGS" != "x" ; then
+  CFLAGS="$CFLAGS $EXTRA_CFLAGS"
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f $ac_dir/shtool; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	    break 3
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
+done
+
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL=$ac_install_sh
+  fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+# Extract the first word of "ld", so it can be a program name with args.
+set dummy ld; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $LD in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_LD="$LD" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_LD="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+LD=$ac_cv_path_LD
+
+if test -n "$LD"; then
+  echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+# Extract the first word of "autoconf", so it can be a program name with args.
+set dummy autoconf; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_AUTOCONF+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $AUTOCONF in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_AUTOCONF="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+AUTOCONF=$ac_cv_path_AUTOCONF
+
+if test -n "$AUTOCONF"; then
+  echo "$as_me:$LINENO: result: $AUTOCONF" >&5
+echo "${ECHO_T}$AUTOCONF" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+  ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+  ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+case "${host}" in
+  *-*-darwin*)
+	abi="macho"
+	RPATH=""
+	;;
+  *-*-freebsd*)
+	CFLAGS="$CFLAGS"
+	abi="elf"
+	RPATH="-Wl,-rpath,"
+	;;
+  *-*-linux*)
+	CFLAGS="$CFLAGS"
+	abi="elf"
+		CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+	RPATH="-Wl,-rpath,"
+	;;
+  *-*-netbsd*)
+	echo "$as_me:$LINENO: checking ABI" >&5
+echo $ECHO_N "checking ABI... $ECHO_C" >&6
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __ELF__
+/* ELF */
+#else
+#error aout
+#endif
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  CFLAGS="$CFLAGS"; abi="elf"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+abi="aout"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+	echo "$as_me:$LINENO: result: $abi" >&5
+echo "${ECHO_T}$abi" >&6
+	RPATH="-Wl,-rpath,"
+	;;
+  *-*-solaris2*)
+	CFLAGS="$CFLAGS"
+	abi="elf"
+	RPATH="-Wl,-R,"
+					;;
+  *)
+	echo "$as_me:$LINENO: result: Unsupported operating system: ${host}" >&5
+echo "${ECHO_T}Unsupported operating system: ${host}" >&6
+	abi="elf"
+	RPATH="-Wl,-rpath,"
+	;;
+esac
+
+
+
+# Check whether --enable-autogen or --disable-autogen was given.
+if test "${enable_autogen+set}" = set; then
+  enableval="$enable_autogen"
+  if test "x$enable_autogen" = "xno" ; then
+  enable_autogen="0"
+else
+  enable_autogen="1"
+fi
+
+else
+  enable_autogen="0"
+
+fi;
+
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+
+
+
+for ac_header in sys/acl.h ext2fs/ext2_fs.h sys/statfs.h sys/xattr.h sys/param.h sys/extattr.h libutil.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## --------------------------------- ##
+## Report this to xar at opendarwin.org ##
+## --------------------------------- ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_func in lgetxattr
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in lsetxattr
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in getxattr
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in setxattr
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in getattrlist
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in setattrlist
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+echo "$as_me:$LINENO: checking for uid_t" >&5
+echo $ECHO_N "checking for uid_t... $ECHO_C" >&6
+if test "${ac_cv_type_uid_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+if ((uid_t *) 0)
+  return 0;
+if (sizeof (uid_t))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_uid_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_uid_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
+echo "${ECHO_T}$ac_cv_type_uid_t" >&6
+
+echo "$as_me:$LINENO: checking size of uid_t" >&5
+echo $ECHO_N "checking size of uid_t... $ECHO_C" >&6
+if test "${ac_cv_sizeof_uid_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_uid_t" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (uid_t))) >= 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (uid_t))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+		    if test $ac_lo -le $ac_mid; then
+		      ac_lo= ac_hi=
+		      break
+		    fi
+		    ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (uid_t))) < 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (uid_t))) >= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+		       if test $ac_mid -le $ac_hi; then
+			 ac_lo= ac_hi=
+			 break
+		       fi
+		       ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (uid_t))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_uid_t=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uid_t), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (uid_t), 77
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+else
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+long longval () { return (long) (sizeof (uid_t)); }
+unsigned long ulongval () { return (long) (sizeof (uid_t)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (uid_t))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (uid_t))))
+	exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (uid_t))))
+	exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sizeof_uid_t=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uid_t), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (uid_t), 77
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_uid_t=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_uid_t" >&5
+echo "${ECHO_T}$ac_cv_sizeof_uid_t" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_UID_T $ac_cv_sizeof_uid_t
+_ACEOF
+
+
+if test $ac_cv_sizeof_uid_t = "4"; then
+cat >>confdefs.h <<\_ACEOF
+#define UID_STRING RId32
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
+#define UID_CAST (uint32_t)
+_ACEOF
+
+elif test $ac_cv_sizeof_uid_t = "8"; then
+cat >>confdefs.h <<\_ACEOF
+#define UID_STRING PRId64
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
+#define UID_CAST (uint64_t)
+_ACEOF
+
+else
+{ { echo "$as_me:$LINENO: error: can not detect the size of your system's uid_t type" >&5
+echo "$as_me: error: can not detect the size of your system's uid_t type" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+echo "$as_me:$LINENO: checking for gid_t" >&5
+echo $ECHO_N "checking for gid_t... $ECHO_C" >&6
+if test "${ac_cv_type_gid_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+if ((gid_t *) 0)
+  return 0;
+if (sizeof (gid_t))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_gid_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_gid_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_gid_t" >&5
+echo "${ECHO_T}$ac_cv_type_gid_t" >&6
+
+echo "$as_me:$LINENO: checking size of gid_t" >&5
+echo $ECHO_N "checking size of gid_t... $ECHO_C" >&6
+if test "${ac_cv_sizeof_gid_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_gid_t" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (gid_t))) >= 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (gid_t))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+		    if test $ac_lo -le $ac_mid; then
+		      ac_lo= ac_hi=
+		      break
+		    fi
+		    ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (gid_t))) < 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (gid_t))) >= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+		       if test $ac_mid -le $ac_hi; then
+			 ac_lo= ac_hi=
+			 break
+		       fi
+		       ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (gid_t))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_gid_t=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (gid_t), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (gid_t), 77
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+else
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+long longval () { return (long) (sizeof (gid_t)); }
+unsigned long ulongval () { return (long) (sizeof (gid_t)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (gid_t))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (gid_t))))
+	exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (gid_t))))
+	exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sizeof_gid_t=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (gid_t), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (gid_t), 77
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_gid_t=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_gid_t" >&5
+echo "${ECHO_T}$ac_cv_sizeof_gid_t" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_GID_T $ac_cv_sizeof_gid_t
+_ACEOF
+
+
+if test $ac_cv_sizeof_gid_t = "4"; then
+cat >>confdefs.h <<\_ACEOF
+#define GID_STRING PRId32
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
+#define GID_CAST (uint32_t)
+_ACEOF
+
+elif test $ac_cv_sizeof_gid_t = "8"; then
+cat >>confdefs.h <<\_ACEOF
+#define GID_STRING PRId64
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
+#define GID_CAST (uint64_t)
+_ACEOF
+
+else
+{ { echo "$as_me:$LINENO: error: can not detect the size of your system's gid_t type" >&5
+echo "$as_me: error: can not detect the size of your system's gid_t type" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+echo "$as_me:$LINENO: checking for ino_t" >&5
+echo $ECHO_N "checking for ino_t... $ECHO_C" >&6
+if test "${ac_cv_type_ino_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+if ((ino_t *) 0)
+  return 0;
+if (sizeof (ino_t))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_ino_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_ino_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_ino_t" >&5
+echo "${ECHO_T}$ac_cv_type_ino_t" >&6
+
+echo "$as_me:$LINENO: checking size of ino_t" >&5
+echo $ECHO_N "checking size of ino_t... $ECHO_C" >&6
+if test "${ac_cv_sizeof_ino_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_ino_t" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (ino_t))) >= 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (ino_t))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+		    if test $ac_lo -le $ac_mid; then
+		      ac_lo= ac_hi=
+		      break
+		    fi
+		    ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (ino_t))) < 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (ino_t))) >= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+		       if test $ac_mid -le $ac_hi; then
+			 ac_lo= ac_hi=
+			 break
+		       fi
+		       ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (ino_t))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_ino_t=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (ino_t), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (ino_t), 77
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+else
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+long longval () { return (long) (sizeof (ino_t)); }
+unsigned long ulongval () { return (long) (sizeof (ino_t)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (ino_t))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (ino_t))))
+	exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (ino_t))))
+	exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sizeof_ino_t=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (ino_t), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (ino_t), 77
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_ino_t=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_ino_t" >&5
+echo "${ECHO_T}$ac_cv_sizeof_ino_t" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INO_T $ac_cv_sizeof_ino_t
+_ACEOF
+
+
+if test $ac_cv_sizeof_ino_t = "4"; then
+cat >>confdefs.h <<\_ACEOF
+#define INO_STRING PRId32
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
+#define INO_HEXSTRING PRIx32
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
+#define INO_CAST (uint32_t)
+_ACEOF
+
+elif test $ac_cv_sizeof_ino_t = "8"; then
+cat >>confdefs.h <<\_ACEOF
+#define INO_STRING PRId64
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
+#define INO_HEXSTRING PRIx64
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
+#define INO_CAST (uint64_t)
+_ACEOF
+
+else
+{ { echo "$as_me:$LINENO: error: can not detect the size of your system's ino_t type" >&5
+echo "$as_me: error: can not detect the size of your system's ino_t type" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+echo "$as_me:$LINENO: checking for dev_t" >&5
+echo $ECHO_N "checking for dev_t... $ECHO_C" >&6
+if test "${ac_cv_type_dev_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+if ((dev_t *) 0)
+  return 0;
+if (sizeof (dev_t))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_dev_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_dev_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_dev_t" >&5
+echo "${ECHO_T}$ac_cv_type_dev_t" >&6
+
+echo "$as_me:$LINENO: checking size of dev_t" >&5
+echo $ECHO_N "checking size of dev_t... $ECHO_C" >&6
+if test "${ac_cv_sizeof_dev_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_dev_t" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (dev_t))) >= 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (dev_t))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+		    if test $ac_lo -le $ac_mid; then
+		      ac_lo= ac_hi=
+		      break
+		    fi
+		    ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (dev_t))) < 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (dev_t))) >= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+		       if test $ac_mid -le $ac_hi; then
+			 ac_lo= ac_hi=
+			 break
+		       fi
+		       ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (dev_t))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_dev_t=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (dev_t), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (dev_t), 77
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+else
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+long longval () { return (long) (sizeof (dev_t)); }
+unsigned long ulongval () { return (long) (sizeof (dev_t)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (dev_t))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (dev_t))))
+	exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (dev_t))))
+	exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sizeof_dev_t=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (dev_t), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (dev_t), 77
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_dev_t=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_dev_t" >&5
+echo "${ECHO_T}$ac_cv_sizeof_dev_t" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_DEV_T $ac_cv_sizeof_dev_t
+_ACEOF
+
+
+if test $ac_cv_sizeof_dev_t = "4"; then
+cat >>confdefs.h <<\_ACEOF
+#define DEV_STRING PRId32
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
+#define DEV_HEXSTRING PRIx32
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
+#define DEV_CAST (uint32_t)
+_ACEOF
+
+elif test $ac_cv_sizeof_dev_t = "8"; then
+cat >>confdefs.h <<\_ACEOF
+#define DEV_STRING PRId64
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
+#define DEV_HEXSTRING PRIx64
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
+#define DEV_CAST (uint64_t)
+_ACEOF
+
+else
+{ { echo "$as_me:$LINENO: error: can not detect the size of your system's dev_t type" >&5
+echo "$as_me: error: can not detect the size of your system's dev_t type" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+echo "$as_me:$LINENO: checking for acl_get_file in -lacl" >&5
+echo $ECHO_N "checking for acl_get_file in -lacl... $ECHO_C" >&6
+if test "${ac_cv_lib_acl_acl_get_file+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lacl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char acl_get_file ();
+int
+main ()
+{
+acl_get_file ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_acl_acl_get_file=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_acl_acl_get_file=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_acl_acl_get_file" >&5
+echo "${ECHO_T}$ac_cv_lib_acl_acl_get_file" >&6
+if test $ac_cv_lib_acl_acl_get_file = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBACL 1
+_ACEOF
+
+  LIBS="-lacl $LIBS"
+
+fi
+
+
+
+
+echo "$as_me:$LINENO: checking for asprintf" >&5
+echo $ECHO_N "checking for asprintf... $ECHO_C" >&6
+if test "${ac_cv_func_asprintf+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define asprintf to an innocuous variant, in case <limits.h> declares asprintf.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define asprintf innocuous_asprintf
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char asprintf (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef asprintf
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char asprintf ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_asprintf) || defined (__stub___asprintf)
+choke me
+#else
+char (*f) () = asprintf;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != asprintf;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_asprintf=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_asprintf=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_asprintf" >&5
+echo "${ECHO_T}$ac_cv_func_asprintf" >&6
+if test $ac_cv_func_asprintf = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_ASPRINTF 1
+_ACEOF
+
+fi
+
+
+LIBXML2_VERSION_MIN=2.6.11
+
+have_libxml2="1"
+
+
+# Check whether --with-xml2-config or --without-xml2-config was given.
+if test "${with_xml2_config+set}" = set; then
+  withval="$with_xml2_config"
+  if test "x${with_xml2_config}" = "xno" ; then
+  XML2_CONFIG=
+else
+  XML2_CONFIG="${with_xml2_config}"
+fi
+
+else
+  XML2_CONFIG=
+
+fi;
+if test "x${XML2_CONFIG}" != "x" ; then
+   if test ! -x "${XML2_CONFIG}" ; then
+     { { echo "$as_me:$LINENO: error: Unusable or missing xml2-config: ${XML2_CONFIG}" >&5
+echo "$as_me: error: Unusable or missing xml2-config: ${XML2_CONFIG}" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+else
+  # Extract the first word of "xml2-config", so it can be a program name with args.
+set dummy xml2-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_XML2_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $XML2_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in ${PATH}
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+XML2_CONFIG=$ac_cv_path_XML2_CONFIG
+
+if test -n "$XML2_CONFIG"; then
+  echo "$as_me:$LINENO: result: $XML2_CONFIG" >&5
+echo "${ECHO_T}$XML2_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  if test "x${XML2_CONFIG}" = "x" ; then
+    { { echo "$as_me:$LINENO: error: Cannot configure without xml2-config" >&5
+echo "$as_me: error: Cannot configure without xml2-config" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+fi
+
+echo "$as_me:$LINENO: checking for libxml >= ${LIBXML2_VERSION_MIN}" >&5
+echo $ECHO_N "checking for libxml >= ${LIBXML2_VERSION_MIN}... $ECHO_C" >&6
+LIBXML2_FOUND=`2>&1 ${XML2_CONFIG} --version`
+LIBXML2_MAJOR=`echo ${LIBXML2_FOUND} | tr . " " | awk '{print $1}'`
+LIBXML2_MINOR=`echo ${LIBXML2_FOUND} | tr . " " | awk '{print $2}' | tr a-z " " |awk '{print $1}'`
+LIBXML2_BRANCH=`echo ${LIBXML2_FOUND} | tr . " " | awk '{print $3}' | tr a-z " " |awk '{print $1}'`
+if test "x${LIBXML2_BRANCH}" = "x" ; then
+  LIBXML2_BRANCH=0
+fi
+LIBXML2_MAJOR_MIN=`echo ${LIBXML2_VERSION_MIN} | tr . " " | awk '{print $1}'`
+LIBXML2_MINOR_MIN=`echo ${LIBXML2_VERSION_MIN} | tr . " " | awk '{print $2}'`
+LIBXML2_BRANCH_MIN=`echo ${LIBXML2_VERSION_MIN} | tr . " " | awk '{print $3}'`
+if test ${LIBXML2_MAJOR} -gt ${LIBXML2_MAJOR_MIN} \
+     -o ${LIBXML2_MAJOR} -eq ${LIBXML2_MAJOR_MIN} \
+     -a ${LIBXML2_MINOR} -gt ${LIBXML2_MINOR_MIN} \
+     -o ${LIBXML2_MAJOR} -eq ${LIBXML2_MAJOR_MIN} \
+     -a ${LIBXML2_MINOR} -eq ${LIBXML2_MINOR_MIN} \
+     -a ${LIBXML2_BRANCH} -ge $LIBXML2_BRANCH_MIN ; then
+  echo "$as_me:$LINENO: result: ${LIBXML2_MAJOR}.${LIBXML2_MINOR}.${LIBXML2_BRANCH}" >&5
+echo "${ECHO_T}${LIBXML2_MAJOR}.${LIBXML2_MINOR}.${LIBXML2_BRANCH}" >&6
+  have_libxml2="1"
+  CPPFLAGS="${CPPFLAGS} `${XML2_CONFIG} --cflags`"
+  LIBS="${LIBS} `${XML2_CONFIG} --libs`"
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  have_libxml2="0"
+fi
+if test "x${have_libxml2}" = "x1" ; then
+    if test "${ac_cv_header_libxml_xmlwriter_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for libxml/xmlwriter.h" >&5
+echo $ECHO_N "checking for libxml/xmlwriter.h... $ECHO_C" >&6
+if test "${ac_cv_header_libxml_xmlwriter_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_libxml_xmlwriter_h" >&5
+echo "${ECHO_T}$ac_cv_header_libxml_xmlwriter_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking libxml/xmlwriter.h usability" >&5
+echo $ECHO_N "checking libxml/xmlwriter.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <libxml/xmlwriter.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking libxml/xmlwriter.h presence" >&5
+echo $ECHO_N "checking libxml/xmlwriter.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <libxml/xmlwriter.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: libxml/xmlwriter.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: libxml/xmlwriter.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libxml/xmlwriter.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: libxml/xmlwriter.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: libxml/xmlwriter.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: libxml/xmlwriter.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libxml/xmlwriter.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: libxml/xmlwriter.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libxml/xmlwriter.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: libxml/xmlwriter.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libxml/xmlwriter.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: libxml/xmlwriter.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libxml/xmlwriter.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: libxml/xmlwriter.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libxml/xmlwriter.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: libxml/xmlwriter.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## --------------------------------- ##
+## Report this to xar at opendarwin.org ##
+## --------------------------------- ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for libxml/xmlwriter.h" >&5
+echo $ECHO_N "checking for libxml/xmlwriter.h... $ECHO_C" >&6
+if test "${ac_cv_header_libxml_xmlwriter_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_libxml_xmlwriter_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_libxml_xmlwriter_h" >&5
+echo "${ECHO_T}$ac_cv_header_libxml_xmlwriter_h" >&6
+
+fi
+if test $ac_cv_header_libxml_xmlwriter_h = yes; then
+  :
+else
+  have_libxml2="0"
+fi
+
+
+fi
+if test "x${have_libxml2}" = "x0" ; then
+  { { echo "$as_me:$LINENO: error: Cannot build without libxml2" >&5
+echo "$as_me: error: Cannot build without libxml2" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+have_libcrypto="1"
+
+for ac_header in openssl/evp.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## --------------------------------- ##
+## Report this to xar at opendarwin.org ##
+## --------------------------------- ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  have_libcrypto="0"
+fi
+
+done
+
+
+echo "$as_me:$LINENO: checking for OpenSSL_add_all_ciphers in -lcrypto" >&5
+echo $ECHO_N "checking for OpenSSL_add_all_ciphers in -lcrypto... $ECHO_C" >&6
+if test "${ac_cv_lib_crypto_OpenSSL_add_all_ciphers+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char OpenSSL_add_all_ciphers ();
+int
+main ()
+{
+OpenSSL_add_all_ciphers ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_crypto_OpenSSL_add_all_ciphers=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_crypto_OpenSSL_add_all_ciphers=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_OpenSSL_add_all_ciphers" >&5
+echo "${ECHO_T}$ac_cv_lib_crypto_OpenSSL_add_all_ciphers" >&6
+if test $ac_cv_lib_crypto_OpenSSL_add_all_ciphers = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBCRYPTO 1
+_ACEOF
+
+  LIBS="-lcrypto $LIBS"
+
+else
+  have_libcrypto="0"
+fi
+
+if test "x${have_libcrypto}" = "x0" ; then
+  { { echo "$as_me:$LINENO: error: Cannot build without libcrypto (OpenSSL)" >&5
+echo "$as_me: error: Cannot build without libcrypto (OpenSSL)" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+have_libz="1"
+
+for ac_header in zlib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## --------------------------------- ##
+## Report this to xar at opendarwin.org ##
+## --------------------------------- ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  have_libz="0"
+fi
+
+done
+
+
+echo "$as_me:$LINENO: checking for deflate in -lz" >&5
+echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6
+if test "${ac_cv_lib_z_deflate+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char deflate ();
+int
+main ()
+{
+deflate ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_z_deflate=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_z_deflate=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5
+echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6
+if test $ac_cv_lib_z_deflate = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+  LIBS="-lz $LIBS"
+
+else
+  have_libz="0"
+fi
+
+if test "x${have_libz}" = "x0" ; then
+  { { echo "$as_me:$LINENO: error: Cannot build without libz" >&5
+echo "$as_me: error: Cannot build without libz" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+have_libbz2="1"
+
+for ac_header in bzlib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## --------------------------------- ##
+## Report this to xar at opendarwin.org ##
+## --------------------------------- ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  have_libbz2="0"
+fi
+
+done
+
+
+echo "$as_me:$LINENO: checking for BZ2_bzCompress in -lbz2" >&5
+echo $ECHO_N "checking for BZ2_bzCompress in -lbz2... $ECHO_C" >&6
+if test "${ac_cv_lib_bz2_BZ2_bzCompress+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbz2  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char BZ2_bzCompress ();
+int
+main ()
+{
+BZ2_bzCompress ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_bz2_BZ2_bzCompress=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_bz2_BZ2_bzCompress=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_bz2_BZ2_bzCompress" >&5
+echo "${ECHO_T}$ac_cv_lib_bz2_BZ2_bzCompress" >&6
+if test $ac_cv_lib_bz2_BZ2_bzCompress = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBBZ2 1
+_ACEOF
+
+  LIBS="-lbz2 $LIBS"
+
+else
+  have_libbz2="0"
+fi
+
+if test "x${have_libbz2}" = "x1" ; then
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBBZ2 1
+_ACEOF
+
+fi
+
+
+          ac_config_headers="$ac_config_headers $cfghdrs"
+
+
+
+          ac_config_files="$ac_config_files $cfgoutputs"
+
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+  (set) 2>&1 |
+    case `(ac_space=' '; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;;
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+} |
+  sed '
+     t clear
+     : clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+  if test -w $cache_file; then
+    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+    cat confcache >$cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[	 ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[	 ]*$//;
+}'
+fi
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_i=`echo "$ac_i" |
+	 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+  # 2. Add them.
+  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.  Logging --version etc. is OK.
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by OpenDarwin Xar $as_me 1.4, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number, then exit
+  -q, --quiet      do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+		   instantiate the configuration file FILE
+  --header=FILE[:TEMPLATE]
+		   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Report bugs to <bug-autoconf at gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+OpenDarwin Xar config.status 1.4
+configured by $0, generated by GNU Autoconf 2.59,
+  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "x$1" : 'x\([^=]*\)='`
+    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  -*)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  *) # This is not an option, so the user has probably given explicit
+     # arguments.
+     ac_option=$1
+     ac_need_defaults=false;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --vers* | -V )
+    echo "$ac_cs_version"; exit 0 ;;
+  --he | --h)
+    # Conflict between --help and --header
+    { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit 0 ;;
+  --debug | --d* | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    ac_need_defaults=false;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1" ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "$cfgoutputs" ) CONFIG_FILES="$CONFIG_FILES $cfgoutputs" ;;
+  "$cfghdrs" ) CONFIG_HEADERS="$CONFIG_HEADERS $cfghdrs" ;;
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./confstat$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s, at SHELL@,$SHELL,;t t
+s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s, at exec_prefix@,$exec_prefix,;t t
+s, at prefix@,$prefix,;t t
+s, at program_transform_name@,$program_transform_name,;t t
+s, at bindir@,$bindir,;t t
+s, at sbindir@,$sbindir,;t t
+s, at libexecdir@,$libexecdir,;t t
+s, at datadir@,$datadir,;t t
+s, at sysconfdir@,$sysconfdir,;t t
+s, at sharedstatedir@,$sharedstatedir,;t t
+s, at localstatedir@,$localstatedir,;t t
+s, at libdir@,$libdir,;t t
+s, at includedir@,$includedir,;t t
+s, at oldincludedir@,$oldincludedir,;t t
+s, at infodir@,$infodir,;t t
+s, at mandir@,$mandir,;t t
+s, at build_alias@,$build_alias,;t t
+s, at host_alias@,$host_alias,;t t
+s, at target_alias@,$target_alias,;t t
+s, at DEFS@,$DEFS,;t t
+s, at ECHO_C@,$ECHO_C,;t t
+s, at ECHO_N@,$ECHO_N,;t t
+s, at ECHO_T@,$ECHO_T,;t t
+s, at LIBS@,$LIBS,;t t
+s, at LIB_REV@,$LIB_REV,;t t
+s, at XAR_MAJOR_VERSION@,$XAR_MAJOR_VERSION,;t t
+s, at XAR_MINOR_VERSION@,$XAR_MINOR_VERSION,;t t
+s, at XAR_VERSION@,$XAR_VERSION,;t t
+s, at srcroot@,$srcroot,;t t
+s, at abs_srcroot@,$abs_srcroot,;t t
+s, at objroot@,$objroot,;t t
+s, at abs_objroot@,$abs_objroot,;t t
+s, at PREFIX@,$PREFIX,;t t
+s, at BINDIR@,$BINDIR,;t t
+s, at DATADIR@,$DATADIR,;t t
+s, at LIBDIR@,$LIBDIR,;t t
+s, at INCLUDEDIR@,$INCLUDEDIR,;t t
+s, at MANDIR@,$MANDIR,;t t
+s, at CC@,$CC,;t t
+s, at CFLAGS@,$CFLAGS,;t t
+s, at LDFLAGS@,$LDFLAGS,;t t
+s, at CPPFLAGS@,$CPPFLAGS,;t t
+s, at ac_ct_CC@,$ac_ct_CC,;t t
+s, at EXEEXT@,$EXEEXT,;t t
+s, at OBJEXT@,$OBJEXT,;t t
+s, at CPP@,$CPP,;t t
+s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s, at INSTALL_DATA@,$INSTALL_DATA,;t t
+s, at LD@,$LD,;t t
+s, at AUTOCONF@,$AUTOCONF,;t t
+s, at build@,$build,;t t
+s, at build_cpu@,$build_cpu,;t t
+s, at build_vendor@,$build_vendor,;t t
+s, at build_os@,$build_os,;t t
+s, at host@,$host,;t t
+s, at host_cpu@,$host_cpu,;t t
+s, at host_vendor@,$host_vendor,;t t
+s, at host_os@,$host_os,;t t
+s, at abi@,$abi,;t t
+s, at RPATH@,$RPATH,;t t
+s, at enable_autogen@,$enable_autogen,;t t
+s, at EGREP@,$EGREP,;t t
+s, at XML2_CONFIG@,$XML2_CONFIG,;t t
+s, at cfghdrs@,$cfghdrs,;t t
+s, at cfgoutputs@,$cfgoutputs,;t t
+s, at LIBOBJS@,$LIBOBJS,;t t
+s, at LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+  cat >>$CONFIG_STATUS <<\_ACEOF
+  # Split the substitutions into bite-sized pieces for seds with
+  # small command number limits, like on Digital OSF/1 and HP-UX.
+  ac_max_sed_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # Line after last line for current file.
+  ac_more_lines=:
+  ac_sed_cmds=
+  while $ac_more_lines; do
+    if test $ac_beg -gt 1; then
+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    else
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    fi
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (echo ':t
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+      if test -z "$ac_sed_cmds"; then
+	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+      else
+	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+      fi
+      ac_sed_frag=`expr $ac_sed_frag + 1`
+      ac_beg=$ac_end
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
+  fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+  esac
+
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    configure_input=
+  else
+    configure_input="$ac_file.  "
+  fi
+  configure_input=$configure_input"Generated from `echo $ac_file_in |
+				     sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s, at configure_input@,$configure_input,;t t
+s, at srcdir@,$ac_srcdir,;t t
+s, at abs_srcdir@,$ac_abs_srcdir,;t t
+s, at top_srcdir@,$ac_top_srcdir,;t t
+s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s, at builddir@,$ac_builddir,;t t
+s, at abs_builddir@,$ac_abs_builddir,;t t
+s, at top_builddir@,$ac_top_builddir,;t t
+s, at abs_top_builddir@,$ac_abs_top_builddir,;t t
+s, at INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([	 ]*\)#\([	 ]*define[	 ][	 ]*\)'
+ac_dB='[	 ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([	 ]*\)#\([	 ]*\)undef\([	 ][	 ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 # Do quote $f, to prevent DOS paths from being IFS'd.
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  # Remove the trailing spaces.
+  sed 's/[	 ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h.  The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status.  Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*\)\(([^)]*)\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless.  Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >>conftest.undefs <<\_ACEOF
+s,^[	 ]*#[	 ]*undef[	 ][	 ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo '  if grep "^[	 ]*#[	 ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo '  :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+  # Write a limited-size here document to $tmp/defines.sed.
+  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#define' lines.
+  echo '/^[	 ]*#[	 ]*define/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo '  fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+  # Write a limited-size here document to $tmp/undefs.sed.
+  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#undef'
+  echo '/^[	 ]*#[	 ]*undef/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+  rm -f conftest.undefs
+  mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    echo "/* Generated by configure.  */" >$tmp/config.h
+  else
+    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
+  fi
+  cat $tmp/in >>$tmp/config.h
+  rm -f $tmp/in
+  if test x"$ac_file" != x-; then
+    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+      { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+      rm -f $ac_file
+      mv $tmp/config.h $ac_file
+    fi
+  else
+    cat $tmp/config.h
+    rm -f $tmp/config.h
+  fi
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+

Deleted: branches/release_1_4/base/src/programs/xar/configure.ac
===================================================================
--- trunk/base/src/programs/xar/configure.ac	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/configure.ac	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,322 +0,0 @@
-AC_PREREQ(2.59)
-AC_INIT([OpenDarwin Xar], [1.4], [xar at opendarwin.org], [xar])
-AC_CONFIG_SRCDIR([LICENSE])
-
-dnl Revision number for libxar.
-LIB_REV=1
-AC_SUBST([LIB_REV])
-
-dnl xar version variables.
-XAR_MAJOR_VERSION="1"
-XAR_MINOR_VERSION="4"
-XAR_VERSION="${XAR_MAJOR_VERSION}.${XAR_MINOR_VERSION}"
-AC_SUBST([XAR_MAJOR_VERSION])
-AC_SUBST([XAR_MINOR_VERSION])
-AC_SUBST([XAR_VERSION])
-
-dnl 
-dnl Various paths.
-dnl 
-srcroot=$srcdir
-if test "x${srcroot}" = "x." ; then
-  srcroot=""
-else
-  srcroot="${srcroot}/"
-fi
-AC_SUBST([srcroot])
-abs_srcroot="`cd "$srcdir"; pwd`/"
-AC_SUBST([abs_srcroot])
-
-objroot=""
-AC_SUBST([objroot])
-abs_objroot="`pwd`/"
-AC_SUBST([abs_objroot])
-
-dnl Set install paths.
-if test "x$prefix" = "xNONE" ; then
-  prefix="/usr/local"
-fi
-if test "x$exec_prefix" = "xNONE" ; then
-  exec_prefix=$prefix
-fi
-PREFIX=$prefix
-AC_SUBST([PREFIX])
-BINDIR=`eval echo $bindir`
-BINDIR=`eval echo $BINDIR`
-AC_SUBST([BINDIR])
-DATADIR=`eval echo $datadir`
-DATADIR=`eval echo $DATADIR`
-AC_SUBST([DATADIR])
-LIBDIR=`eval echo $libdir`
-LIBDIR=`eval echo $LIBDIR`
-AC_SUBST([LIBDIR])
-INCLUDEDIR=`eval echo $includedir`
-INCLUDEDIR=`eval echo $INCLUDEDIR`
-AC_SUBST([INCLUDEDIR])
-MANDIR=`eval echo $mandir`
-MANDIR=`eval echo $MANDIR`
-AC_SUBST([MANDIR])
-
-cfgoutputs="cfgoutputs.stamp"
-cfgoutputs="${cfgoutputs} Makefile"
-cfgoutputs="${cfgoutputs} include/xar.h"
-cfgoutputs="${cfgoutputs} lib/Makefile.inc"
-cfgoutputs="${cfgoutputs} src/Makefile.inc"
-
-cfghdrs="${objroot}cfghdrs.stamp"
-cfghdrs="${cfghdrs} ${objroot}include/config.h"
-
-dnl If CFLAGS isn't defined and using gcc, set CFLAGS to something reasonable.
-dnl Otherwise, just prevent autoconf from molesting CFLAGS.
-CFLAGS=$CFLAGS
-AC_PROG_CC
-if test "x$CFLAGS" = "x" ; then
-  no_CFLAGS="yes"
-fi
-if test "x$no_CFLAGS" = "xyes" -a "x$GCC" = "xyes" ; then
-  CFLAGS="-Wall -g"
-fi
-dnl Append EXTRA_CFLAGS to CFLAGS, if defined.
-if test "x$EXTRA_CFLAGS" != "x" ; then
-  CFLAGS="$CFLAGS $EXTRA_CFLAGS"
-fi
-AC_PROG_CPP
-
-AC_PROG_INSTALL
-AC_PATH_PROG([LD], [ld], , [$PATH])
-AC_PATH_PROG([AUTOCONF], [autoconf], , [$PATH])
-
-dnl Platform-specific settings.  abi and RPATH can probably be determined
-dnl programmatically, but doing so is error-prone, which makes it generally
-dnl not worth the trouble.
-dnl 
-dnl Define cpp macros in CPPFLAGS, rather than doing AC_DEFINE(macro), since the
-dnl definitions need to be seen before and headers are included, which is a pain
-dnl to make happen otherwise.
-AC_CANONICAL_HOST
-case "${host}" in
-  *-*-darwin*)
-	abi="macho"
-	RPATH=""
-	;;
-  *-*-freebsd*)
-	CFLAGS="$CFLAGS"
-	abi="elf"
-	RPATH="-Wl,-rpath,"
-	;;
-  *-*-linux*)
-	CFLAGS="$CFLAGS"
-	abi="elf"
-	dnl Linux needs this for things like asprintf() and poll() flags.
-	CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
-	RPATH="-Wl,-rpath,"
-	;;
-  *-*-netbsd*)
-	AC_MSG_CHECKING([ABI])
-        AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-[[#ifdef __ELF__
-/* ELF */
-#else
-#error aout
-#endif
-]])],
-                          [CFLAGS="$CFLAGS"; abi="elf"],
-                          [abi="aout"])
-	AC_MSG_RESULT([$abi])
-	RPATH="-Wl,-rpath,"
-	;;
-  *-*-solaris2*)
-	CFLAGS="$CFLAGS"
-	abi="elf"
-	RPATH="-Wl,-R,"
-	dnl XXX Remove the following if it ends up not being useful.
-	dnl Solaris needs this for sigwait().
-	dnl CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
-	dnl LIBS="$LIBS -lposix4 -lsocket -lnsl"
-	;;
-  *)
-	AC_MSG_RESULT([Unsupported operating system: ${host}])
-	abi="elf"
-	RPATH="-Wl,-rpath,"
-	;;
-esac
-AC_SUBST([abi])
-AC_SUBST([RPATH])
-
-dnl Disable rules that do automatic regeneration of configure output by default.
-AC_ARG_ENABLE([autogen],
-              [  --enable-autogen        Automatically regenerate configure output],
-[if test "x$enable_autogen" = "xno" ; then
-  enable_autogen="0"
-else
-  enable_autogen="1"
-fi
-],
-[enable_autogen="0"]
-)
-AC_SUBST([enable_autogen])
-
-AC_CHECK_HEADERS(sys/acl.h ext2fs/ext2_fs.h sys/statfs.h sys/xattr.h sys/param.h sys/extattr.h libutil.h)
-AC_CHECK_FUNCS(lgetxattr)
-AC_CHECK_FUNCS(lsetxattr)
-AC_CHECK_FUNCS(getxattr)
-AC_CHECK_FUNCS(setxattr)
-AC_CHECK_FUNCS(getattrlist)
-AC_CHECK_FUNCS(setattrlist)
-
-AC_CHECK_SIZEOF(uid_t)
-if test $ac_cv_sizeof_uid_t = "4"; then
-AC_DEFINE(UID_STRING, RId32)
-AC_DEFINE(UID_CAST, (uint32_t))
-elif test $ac_cv_sizeof_uid_t = "8"; then
-AC_DEFINE(UID_STRING, PRId64)
-AC_DEFINE(UID_CAST, (uint64_t))
-else
-AC_ERROR(can not detect the size of your system's uid_t type)
-fi
-
-AC_CHECK_SIZEOF(gid_t)
-if test $ac_cv_sizeof_gid_t = "4"; then
-AC_DEFINE(GID_STRING, PRId32)
-AC_DEFINE(GID_CAST, (uint32_t))
-elif test $ac_cv_sizeof_gid_t = "8"; then
-AC_DEFINE(GID_STRING, PRId64)
-AC_DEFINE(GID_CAST, (uint64_t))
-else
-AC_ERROR(can not detect the size of your system's gid_t type)
-fi
-
-AC_CHECK_SIZEOF(ino_t)
-if test $ac_cv_sizeof_ino_t = "4"; then
-AC_DEFINE(INO_STRING, PRId32)
-AC_DEFINE(INO_HEXSTRING, PRIx32)
-AC_DEFINE(INO_CAST, (uint32_t))
-elif test $ac_cv_sizeof_ino_t = "8"; then
-AC_DEFINE(INO_STRING, PRId64)
-AC_DEFINE(INO_HEXSTRING, PRIx64)
-AC_DEFINE(INO_CAST, (uint64_t))
-else
-AC_ERROR(can not detect the size of your system's ino_t type)
-fi
-
-AC_CHECK_SIZEOF(dev_t)
-if test $ac_cv_sizeof_dev_t = "4"; then
-AC_DEFINE(DEV_STRING, PRId32)
-AC_DEFINE(DEV_HEXSTRING, PRIx32)
-AC_DEFINE(DEV_CAST, (uint32_t))
-elif test $ac_cv_sizeof_dev_t = "8"; then
-AC_DEFINE(DEV_STRING, PRId64)
-AC_DEFINE(DEV_HEXSTRING, PRIx64)
-AC_DEFINE(DEV_CAST, (uint64_t))
-else
-AC_ERROR(can not detect the size of your system's dev_t type)
-fi
-
-AC_CHECK_LIB(acl, acl_get_file)
-
-dnl Check for paths
-AC_PREFIX_DEFAULT(/usr/local)
-
-AC_CHECK_FUNC([asprintf], AC_DEFINE([HAVE_ASPRINTF]))
-
-dnl 
-dnl Configure libxml2.
-dnl 
-LIBXML2_VERSION_MIN=2.6.11
-
-have_libxml2="1"
-
-AC_ARG_WITH([xml2-config], [  --with-xml2-config      libxml2 config program],
-if test "x${with_xml2_config}" = "xno" ; then
-  XML2_CONFIG=
-else
-  XML2_CONFIG="${with_xml2_config}"
-fi
-,
-  XML2_CONFIG=
-)
-if test "x${XML2_CONFIG}" != "x" ; then
-   if test ! -x "${XML2_CONFIG}" ; then
-     AC_MSG_ERROR([Unusable or missing xml2-config: ${XML2_CONFIG}])
-   fi
-else
-  AC_PATH_PROG([XML2_CONFIG], [xml2-config], , [${PATH}])
-  if test "x${XML2_CONFIG}" = "x" ; then
-    AC_MSG_ERROR([Cannot configure without xml2-config])
-  fi
-fi
-
-dnl Make sure the version of libxml2 found is sufficient.
-AC_MSG_CHECKING([for libxml >= ${LIBXML2_VERSION_MIN}])
-LIBXML2_FOUND=`2>&1 ${XML2_CONFIG} --version`
-LIBXML2_MAJOR=`echo ${LIBXML2_FOUND} | tr . " " | awk '{print $1}'`
-LIBXML2_MINOR=`echo ${LIBXML2_FOUND} | tr . " " | awk '{print $2}' | tr a-z " " |awk '{print $1}'`
-LIBXML2_BRANCH=`echo ${LIBXML2_FOUND} | tr . " " | awk '{print $3}' | tr a-z " " |awk '{print $1}'`
-if test "x${LIBXML2_BRANCH}" = "x" ; then
-  LIBXML2_BRANCH=0
-fi
-LIBXML2_MAJOR_MIN=`echo ${LIBXML2_VERSION_MIN} | tr . " " | awk '{print $1}'`
-LIBXML2_MINOR_MIN=`echo ${LIBXML2_VERSION_MIN} | tr . " " | awk '{print $2}'`
-LIBXML2_BRANCH_MIN=`echo ${LIBXML2_VERSION_MIN} | tr . " " | awk '{print $3}'`
-if test ${LIBXML2_MAJOR} -gt ${LIBXML2_MAJOR_MIN} \
-     -o ${LIBXML2_MAJOR} -eq ${LIBXML2_MAJOR_MIN} \
-     -a ${LIBXML2_MINOR} -gt ${LIBXML2_MINOR_MIN} \
-     -o ${LIBXML2_MAJOR} -eq ${LIBXML2_MAJOR_MIN} \
-     -a ${LIBXML2_MINOR} -eq ${LIBXML2_MINOR_MIN} \
-     -a ${LIBXML2_BRANCH} -ge $LIBXML2_BRANCH_MIN ; then
-  AC_MSG_RESULT([${LIBXML2_MAJOR}.${LIBXML2_MINOR}.${LIBXML2_BRANCH}])
-  have_libxml2="1"
-  CPPFLAGS="${CPPFLAGS} `${XML2_CONFIG} --cflags`"
-  LIBS="${LIBS} `${XML2_CONFIG} --libs`"
-else
-  AC_MSG_RESULT([no])
-  have_libxml2="0"
-fi
-if test "x${have_libxml2}" = "x1" ; then
-  dnl Final sanity check, to make sure that xmlwriter is present.
-  AC_CHECK_HEADER([libxml/xmlwriter.h], , [have_libxml2="0"])
-fi
-if test "x${have_libxml2}" = "x0" ; then
-  AC_MSG_ERROR([Cannot build without libxml2])
-fi
-
-dnl 
-dnl Configure libcrypto (part of OpenSSL).
-dnl 
-have_libcrypto="1"
-AC_CHECK_HEADERS([openssl/evp.h], , [have_libcrypto="0"])
-AC_CHECK_LIB([crypto], [OpenSSL_add_all_ciphers], , [have_libcrypto="0"])
-if test "x${have_libcrypto}" = "x0" ; then
-  AC_MSG_ERROR([Cannot build without libcrypto (OpenSSL)])
-fi
-
-dnl 
-dnl Configure libz.
-dnl 
-have_libz="1"
-AC_CHECK_HEADERS([zlib.h], , [have_libz="0"])
-AC_CHECK_LIB([z], [deflate], , [have_libz="0"])
-if test "x${have_libz}" = "x0" ; then
-  AC_MSG_ERROR([Cannot build without libz])
-fi
-
-dnl 
-dnl Configure libbz2.
-dnl 
-have_libbz2="1"
-AC_CHECK_HEADERS([bzlib.h], , [have_libbz2="0"])
-AC_CHECK_LIB([bz2], [BZ2_bzCompress], , [have_libbz2="0"])
-if test "x${have_libbz2}" = "x1" ; then
-  AC_DEFINE([HAVE_LIBBZ2])
-fi
-
-dnl 
-dnl Process .in files.
-dnl 
-AC_SUBST([cfghdrs])
-AC_CONFIG_HEADER([$cfghdrs])
-
-AC_SUBST([cfgoutputs])
-AC_CONFIG_FILES([$cfgoutputs])
-
-AC_OUTPUT

Copied: branches/release_1_4/base/src/programs/xar/configure.ac (from rev 23968, trunk/base/src/programs/xar/configure.ac)
===================================================================
--- branches/release_1_4/base/src/programs/xar/configure.ac	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/configure.ac	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,322 @@
+AC_PREREQ(2.59)
+AC_INIT([OpenDarwin Xar], [1.4], [xar at opendarwin.org], [xar])
+AC_CONFIG_SRCDIR([LICENSE])
+
+dnl Revision number for libxar.
+LIB_REV=1
+AC_SUBST([LIB_REV])
+
+dnl xar version variables.
+XAR_MAJOR_VERSION="1"
+XAR_MINOR_VERSION="4"
+XAR_VERSION="${XAR_MAJOR_VERSION}.${XAR_MINOR_VERSION}"
+AC_SUBST([XAR_MAJOR_VERSION])
+AC_SUBST([XAR_MINOR_VERSION])
+AC_SUBST([XAR_VERSION])
+
+dnl 
+dnl Various paths.
+dnl 
+srcroot=$srcdir
+if test "x${srcroot}" = "x." ; then
+  srcroot=""
+else
+  srcroot="${srcroot}/"
+fi
+AC_SUBST([srcroot])
+abs_srcroot="`cd "$srcdir"; pwd`/"
+AC_SUBST([abs_srcroot])
+
+objroot=""
+AC_SUBST([objroot])
+abs_objroot="`pwd`/"
+AC_SUBST([abs_objroot])
+
+dnl Set install paths.
+if test "x$prefix" = "xNONE" ; then
+  prefix="/usr/local"
+fi
+if test "x$exec_prefix" = "xNONE" ; then
+  exec_prefix=$prefix
+fi
+PREFIX=$prefix
+AC_SUBST([PREFIX])
+BINDIR=`eval echo $bindir`
+BINDIR=`eval echo $BINDIR`
+AC_SUBST([BINDIR])
+DATADIR=`eval echo $datadir`
+DATADIR=`eval echo $DATADIR`
+AC_SUBST([DATADIR])
+LIBDIR=`eval echo $libdir`
+LIBDIR=`eval echo $LIBDIR`
+AC_SUBST([LIBDIR])
+INCLUDEDIR=`eval echo $includedir`
+INCLUDEDIR=`eval echo $INCLUDEDIR`
+AC_SUBST([INCLUDEDIR])
+MANDIR=`eval echo $mandir`
+MANDIR=`eval echo $MANDIR`
+AC_SUBST([MANDIR])
+
+cfgoutputs="cfgoutputs.stamp"
+cfgoutputs="${cfgoutputs} Makefile"
+cfgoutputs="${cfgoutputs} include/xar.h"
+cfgoutputs="${cfgoutputs} lib/Makefile.inc"
+cfgoutputs="${cfgoutputs} src/Makefile.inc"
+
+cfghdrs="${objroot}cfghdrs.stamp"
+cfghdrs="${cfghdrs} ${objroot}include/config.h"
+
+dnl If CFLAGS isn't defined and using gcc, set CFLAGS to something reasonable.
+dnl Otherwise, just prevent autoconf from molesting CFLAGS.
+CFLAGS=$CFLAGS
+AC_PROG_CC
+if test "x$CFLAGS" = "x" ; then
+  no_CFLAGS="yes"
+fi
+if test "x$no_CFLAGS" = "xyes" -a "x$GCC" = "xyes" ; then
+  CFLAGS="-Wall -g"
+fi
+dnl Append EXTRA_CFLAGS to CFLAGS, if defined.
+if test "x$EXTRA_CFLAGS" != "x" ; then
+  CFLAGS="$CFLAGS $EXTRA_CFLAGS"
+fi
+AC_PROG_CPP
+
+AC_PROG_INSTALL
+AC_PATH_PROG([LD], [ld], , [$PATH])
+AC_PATH_PROG([AUTOCONF], [autoconf], , [$PATH])
+
+dnl Platform-specific settings.  abi and RPATH can probably be determined
+dnl programmatically, but doing so is error-prone, which makes it generally
+dnl not worth the trouble.
+dnl 
+dnl Define cpp macros in CPPFLAGS, rather than doing AC_DEFINE(macro), since the
+dnl definitions need to be seen before and headers are included, which is a pain
+dnl to make happen otherwise.
+AC_CANONICAL_HOST
+case "${host}" in
+  *-*-darwin*)
+	abi="macho"
+	RPATH=""
+	;;
+  *-*-freebsd*)
+	CFLAGS="$CFLAGS"
+	abi="elf"
+	RPATH="-Wl,-rpath,"
+	;;
+  *-*-linux*)
+	CFLAGS="$CFLAGS"
+	abi="elf"
+	dnl Linux needs this for things like asprintf() and poll() flags.
+	CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+	RPATH="-Wl,-rpath,"
+	;;
+  *-*-netbsd*)
+	AC_MSG_CHECKING([ABI])
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[#ifdef __ELF__
+/* ELF */
+#else
+#error aout
+#endif
+]])],
+                          [CFLAGS="$CFLAGS"; abi="elf"],
+                          [abi="aout"])
+	AC_MSG_RESULT([$abi])
+	RPATH="-Wl,-rpath,"
+	;;
+  *-*-solaris2*)
+	CFLAGS="$CFLAGS"
+	abi="elf"
+	RPATH="-Wl,-R,"
+	dnl XXX Remove the following if it ends up not being useful.
+	dnl Solaris needs this for sigwait().
+	dnl CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
+	dnl LIBS="$LIBS -lposix4 -lsocket -lnsl"
+	;;
+  *)
+	AC_MSG_RESULT([Unsupported operating system: ${host}])
+	abi="elf"
+	RPATH="-Wl,-rpath,"
+	;;
+esac
+AC_SUBST([abi])
+AC_SUBST([RPATH])
+
+dnl Disable rules that do automatic regeneration of configure output by default.
+AC_ARG_ENABLE([autogen],
+              [  --enable-autogen        Automatically regenerate configure output],
+[if test "x$enable_autogen" = "xno" ; then
+  enable_autogen="0"
+else
+  enable_autogen="1"
+fi
+],
+[enable_autogen="0"]
+)
+AC_SUBST([enable_autogen])
+
+AC_CHECK_HEADERS(sys/acl.h ext2fs/ext2_fs.h sys/statfs.h sys/xattr.h sys/param.h sys/extattr.h libutil.h)
+AC_CHECK_FUNCS(lgetxattr)
+AC_CHECK_FUNCS(lsetxattr)
+AC_CHECK_FUNCS(getxattr)
+AC_CHECK_FUNCS(setxattr)
+AC_CHECK_FUNCS(getattrlist)
+AC_CHECK_FUNCS(setattrlist)
+
+AC_CHECK_SIZEOF(uid_t)
+if test $ac_cv_sizeof_uid_t = "4"; then
+AC_DEFINE(UID_STRING, RId32)
+AC_DEFINE(UID_CAST, (uint32_t))
+elif test $ac_cv_sizeof_uid_t = "8"; then
+AC_DEFINE(UID_STRING, PRId64)
+AC_DEFINE(UID_CAST, (uint64_t))
+else
+AC_ERROR(can not detect the size of your system's uid_t type)
+fi
+
+AC_CHECK_SIZEOF(gid_t)
+if test $ac_cv_sizeof_gid_t = "4"; then
+AC_DEFINE(GID_STRING, PRId32)
+AC_DEFINE(GID_CAST, (uint32_t))
+elif test $ac_cv_sizeof_gid_t = "8"; then
+AC_DEFINE(GID_STRING, PRId64)
+AC_DEFINE(GID_CAST, (uint64_t))
+else
+AC_ERROR(can not detect the size of your system's gid_t type)
+fi
+
+AC_CHECK_SIZEOF(ino_t)
+if test $ac_cv_sizeof_ino_t = "4"; then
+AC_DEFINE(INO_STRING, PRId32)
+AC_DEFINE(INO_HEXSTRING, PRIx32)
+AC_DEFINE(INO_CAST, (uint32_t))
+elif test $ac_cv_sizeof_ino_t = "8"; then
+AC_DEFINE(INO_STRING, PRId64)
+AC_DEFINE(INO_HEXSTRING, PRIx64)
+AC_DEFINE(INO_CAST, (uint64_t))
+else
+AC_ERROR(can not detect the size of your system's ino_t type)
+fi
+
+AC_CHECK_SIZEOF(dev_t)
+if test $ac_cv_sizeof_dev_t = "4"; then
+AC_DEFINE(DEV_STRING, PRId32)
+AC_DEFINE(DEV_HEXSTRING, PRIx32)
+AC_DEFINE(DEV_CAST, (uint32_t))
+elif test $ac_cv_sizeof_dev_t = "8"; then
+AC_DEFINE(DEV_STRING, PRId64)
+AC_DEFINE(DEV_HEXSTRING, PRIx64)
+AC_DEFINE(DEV_CAST, (uint64_t))
+else
+AC_ERROR(can not detect the size of your system's dev_t type)
+fi
+
+AC_CHECK_LIB(acl, acl_get_file)
+
+dnl Check for paths
+AC_PREFIX_DEFAULT(/usr/local)
+
+AC_CHECK_FUNC([asprintf], AC_DEFINE([HAVE_ASPRINTF]))
+
+dnl 
+dnl Configure libxml2.
+dnl 
+LIBXML2_VERSION_MIN=2.6.11
+
+have_libxml2="1"
+
+AC_ARG_WITH([xml2-config], [  --with-xml2-config      libxml2 config program],
+if test "x${with_xml2_config}" = "xno" ; then
+  XML2_CONFIG=
+else
+  XML2_CONFIG="${with_xml2_config}"
+fi
+,
+  XML2_CONFIG=
+)
+if test "x${XML2_CONFIG}" != "x" ; then
+   if test ! -x "${XML2_CONFIG}" ; then
+     AC_MSG_ERROR([Unusable or missing xml2-config: ${XML2_CONFIG}])
+   fi
+else
+  AC_PATH_PROG([XML2_CONFIG], [xml2-config], , [${PATH}])
+  if test "x${XML2_CONFIG}" = "x" ; then
+    AC_MSG_ERROR([Cannot configure without xml2-config])
+  fi
+fi
+
+dnl Make sure the version of libxml2 found is sufficient.
+AC_MSG_CHECKING([for libxml >= ${LIBXML2_VERSION_MIN}])
+LIBXML2_FOUND=`2>&1 ${XML2_CONFIG} --version`
+LIBXML2_MAJOR=`echo ${LIBXML2_FOUND} | tr . " " | awk '{print $1}'`
+LIBXML2_MINOR=`echo ${LIBXML2_FOUND} | tr . " " | awk '{print $2}' | tr a-z " " |awk '{print $1}'`
+LIBXML2_BRANCH=`echo ${LIBXML2_FOUND} | tr . " " | awk '{print $3}' | tr a-z " " |awk '{print $1}'`
+if test "x${LIBXML2_BRANCH}" = "x" ; then
+  LIBXML2_BRANCH=0
+fi
+LIBXML2_MAJOR_MIN=`echo ${LIBXML2_VERSION_MIN} | tr . " " | awk '{print $1}'`
+LIBXML2_MINOR_MIN=`echo ${LIBXML2_VERSION_MIN} | tr . " " | awk '{print $2}'`
+LIBXML2_BRANCH_MIN=`echo ${LIBXML2_VERSION_MIN} | tr . " " | awk '{print $3}'`
+if test ${LIBXML2_MAJOR} -gt ${LIBXML2_MAJOR_MIN} \
+     -o ${LIBXML2_MAJOR} -eq ${LIBXML2_MAJOR_MIN} \
+     -a ${LIBXML2_MINOR} -gt ${LIBXML2_MINOR_MIN} \
+     -o ${LIBXML2_MAJOR} -eq ${LIBXML2_MAJOR_MIN} \
+     -a ${LIBXML2_MINOR} -eq ${LIBXML2_MINOR_MIN} \
+     -a ${LIBXML2_BRANCH} -ge $LIBXML2_BRANCH_MIN ; then
+  AC_MSG_RESULT([${LIBXML2_MAJOR}.${LIBXML2_MINOR}.${LIBXML2_BRANCH}])
+  have_libxml2="1"
+  CPPFLAGS="${CPPFLAGS} `${XML2_CONFIG} --cflags`"
+  LIBS="${LIBS} `${XML2_CONFIG} --libs`"
+else
+  AC_MSG_RESULT([no])
+  have_libxml2="0"
+fi
+if test "x${have_libxml2}" = "x1" ; then
+  dnl Final sanity check, to make sure that xmlwriter is present.
+  AC_CHECK_HEADER([libxml/xmlwriter.h], , [have_libxml2="0"])
+fi
+if test "x${have_libxml2}" = "x0" ; then
+  AC_MSG_ERROR([Cannot build without libxml2])
+fi
+
+dnl 
+dnl Configure libcrypto (part of OpenSSL).
+dnl 
+have_libcrypto="1"
+AC_CHECK_HEADERS([openssl/evp.h], , [have_libcrypto="0"])
+AC_CHECK_LIB([crypto], [OpenSSL_add_all_ciphers], , [have_libcrypto="0"])
+if test "x${have_libcrypto}" = "x0" ; then
+  AC_MSG_ERROR([Cannot build without libcrypto (OpenSSL)])
+fi
+
+dnl 
+dnl Configure libz.
+dnl 
+have_libz="1"
+AC_CHECK_HEADERS([zlib.h], , [have_libz="0"])
+AC_CHECK_LIB([z], [deflate], , [have_libz="0"])
+if test "x${have_libz}" = "x0" ; then
+  AC_MSG_ERROR([Cannot build without libz])
+fi
+
+dnl 
+dnl Configure libbz2.
+dnl 
+have_libbz2="1"
+AC_CHECK_HEADERS([bzlib.h], , [have_libbz2="0"])
+AC_CHECK_LIB([bz2], [BZ2_bzCompress], , [have_libbz2="0"])
+if test "x${have_libbz2}" = "x1" ; then
+  AC_DEFINE([HAVE_LIBBZ2])
+fi
+
+dnl 
+dnl Process .in files.
+dnl 
+AC_SUBST([cfghdrs])
+AC_CONFIG_HEADER([$cfghdrs])
+
+AC_SUBST([cfgoutputs])
+AC_CONFIG_FILES([$cfgoutputs])
+
+AC_OUTPUT

Copied: branches/release_1_4/base/src/programs/xar/include (from rev 23968, trunk/base/src/programs/xar/include)

Deleted: branches/release_1_4/base/src/programs/xar/include/config.h.in
===================================================================
--- trunk/base/src/programs/xar/include/config.h.in	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/include/config.h.in	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,25 +0,0 @@
-#undef HAVE_SYS_STATFS_H
-#undef HAVE_SYS_XATTR_H
-#undef HAVE_SYS_EXTATTR_H
-#undef HAVE_SYS_PARAM_H
-#undef HAVE_LGETXATTR
-#undef HAVE_LSETXATTR
-#undef HAVE_GETXATTR
-#undef HAVE_SETXATTR
-#undef HAVE_GETATTRLIST
-#undef HAVE_SETATTRLIST
-#undef HAVE_EXT2FS_EXT2_FS_H
-#undef HAVE_SYS_ACL_H
-#undef HAVE_LIBUTIL_H
-#undef HAVE_ASPRINTF
-#undef HAVE_LIBBZ2
-#undef UID_STRING
-#undef UID_CAST
-#undef GID_STRING
-#undef GID_CAST
-#undef INO_STRING
-#undef INO_HEXSTRING
-#undef INO_CAST
-#undef DEV_STRING
-#undef DEV_HEXSTRING
-#undef DEV_CAST

Copied: branches/release_1_4/base/src/programs/xar/include/config.h.in (from rev 23968, trunk/base/src/programs/xar/include/config.h.in)
===================================================================
--- branches/release_1_4/base/src/programs/xar/include/config.h.in	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/include/config.h.in	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,25 @@
+#undef HAVE_SYS_STATFS_H
+#undef HAVE_SYS_XATTR_H
+#undef HAVE_SYS_EXTATTR_H
+#undef HAVE_SYS_PARAM_H
+#undef HAVE_LGETXATTR
+#undef HAVE_LSETXATTR
+#undef HAVE_GETXATTR
+#undef HAVE_SETXATTR
+#undef HAVE_GETATTRLIST
+#undef HAVE_SETATTRLIST
+#undef HAVE_EXT2FS_EXT2_FS_H
+#undef HAVE_SYS_ACL_H
+#undef HAVE_LIBUTIL_H
+#undef HAVE_ASPRINTF
+#undef HAVE_LIBBZ2
+#undef UID_STRING
+#undef UID_CAST
+#undef GID_STRING
+#undef GID_CAST
+#undef INO_STRING
+#undef INO_HEXSTRING
+#undef INO_CAST
+#undef DEV_STRING
+#undef DEV_HEXSTRING
+#undef DEV_CAST

Deleted: branches/release_1_4/base/src/programs/xar/include/xar.h.in
===================================================================
--- trunk/base/src/programs/xar/include/xar.h.in	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/include/xar.h.in	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,151 +0,0 @@
-/*
- * Copyright (c) 2005 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of his contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 03-Apr-2005
- * DRI: Rob Braun <bbraun at opendarwin.org>
- */
-
-#ifndef _XAR_H_
-#define _XAR_H_
-
-#define XAR_VERSION "@XAR_VERSION@"
-
-#include <sys/types.h>
-#include <stdint.h>
-
-struct xar_header {
-	uint32_t magic;
-	uint16_t size;
-	uint16_t version;
-	uint64_t toc_length_compressed;
-	uint64_t toc_length_uncompressed;
-	uint32_t cksum_alg;
-};
-typedef struct xar_header xar_header_t;
-
-#define XAR_HEADER_MAGIC 0x78617221
-#define XAR_EA_FORK "ea"
-
-#define XAR_CKSUM_NONE   0
-#define XAR_CKSUM_SHA1   1
-#define XAR_CKSUM_MD5    2
-
-typedef void *xar_errctx_t;
-typedef const struct __xar_file_t *xar_file_t;
-typedef const struct __xar_iter_t *xar_iter_t;
-typedef const struct __xar_t *xar_t;
-typedef const struct __xar_subdoc_t *xar_subdoc_t;
-typedef int32_t (*err_handler)(int32_t severit, int32_t instance, xar_errctx_t ctx, void *usrctx);
-
-#define READ 0
-#define WRITE 1
-
-/* Valid xar options & values */
-#define XAR_OPT_OWNERSHIP    "ownership"  /* setting owner/group behavior */
-#define XAR_OPT_VAL_SYMBOLIC "symbolic"   /* set owner/group based on names */
-#define XAR_OPT_VAL_NUMERIC  "numeric"    /* set owner/group based on uid/gid */
-
-#define XAR_OPT_TOCCKSUM "toc-cksum"      /* set the toc checksum algorithm */
-#define XAR_OPT_VAL_NONE "none"
-#define XAR_OPT_VAL_SHA1 "sha1"
-#define XAR_OPT_VAL_MD5  "md5"
-
-#define XAR_OPT_COMPRESSION "compression" /* set the file compression type */
-#define XAR_OPT_VAL_GZIP    "gzip"
-#define XAR_OPT_VAL_BZIP    "bzip2"
-
-#define XAR_OPT_RSIZE       "rsize"       /* Read io buffer size */
-
-#define XAR_OPT_COALESCE    "coalesce"    /* Coalesce identical heap blocks */
-#define XAR_OPT_LINKSAME    "linksame"    /* Hardlink identical files */
-
-/* xar error handler macros */
-#define XAR_SEVERITY_DEBUG    1
-#define XAR_SEVERITY_INFO     2
-#define XAR_SEVERITY_NORMAL   3
-#define XAR_SEVERITY_WARNING  4
-#define XAR_SEVERITY_NONFATAL 5
-#define XAR_SEVERITY_FATAL    6
-
-#define XAR_ERR_ARCHIVE_CREATION   1
-#define XAR_ERR_ARCHIVE_EXTRACTION 2
-
-xar_t xar_open(const char *file, int32_t flags);
-int xar_close(xar_t x);
-xar_file_t xar_add(xar_t x, const char *path);
-int32_t xar_extract(xar_t x, xar_file_t f);
-int32_t xar_extract_tofile(xar_t x, xar_file_t f, const char *path);
-const char *xar_opt_get(xar_t x, const char *option);
-int32_t xar_opt_set(xar_t x, const char *option, const char *value);
-
-int32_t xar_prop_set(xar_file_t f, const char *key, const char *value);
-int32_t xar_prop_create(xar_file_t f, const char *key, const char *value);
-int32_t xar_prop_get(xar_file_t f, const char *key, const char **value);
-
-xar_iter_t xar_iter_new();
-void xar_iter_free(xar_iter_t i);
-
-const char *xar_prop_first(xar_file_t f, xar_iter_t i);
-const char *xar_prop_next(xar_iter_t i);
-void xar_prop_unset(xar_file_t f, const char *key);
-xar_file_t xar_file_first(xar_t x, xar_iter_t i);
-xar_file_t xar_file_next(xar_iter_t i);
-
-const char *xar_attr_get(xar_file_t f, const char *prop, const char *key);
-int32_t xar_attr_set(xar_file_t f, const char *prop, const char *key, const char *value);
-const char *xar_attr_first(xar_file_t f, const char *prop, xar_iter_t i);
-const char *xar_attr_next(xar_iter_t i);
-
-xar_subdoc_t xar_subdoc_new(xar_t x, const char *name);
-int32_t xar_subdoc_prop_set(xar_subdoc_t s, const char *key, const char *value);
-int32_t xar_subdoc_prop_get(xar_subdoc_t s, const char *key, const char **value);
-int32_t xar_subdoc_attr_set(xar_subdoc_t s, const char *prop, const char *key, const char *value);
-const char *xar_subdoc_attr_get(xar_subdoc_t s, const char *prop, const char *key);
-xar_subdoc_t xar_subdoc_first(xar_t x);
-xar_subdoc_t xar_subdoc_next(xar_subdoc_t s);
-const char *xar_subdoc_name(xar_subdoc_t s);
-int32_t xar_subdoc_copyout(xar_subdoc_t s, unsigned char **, unsigned int *);
-int32_t xar_subdoc_copyin(xar_subdoc_t s, const unsigned char *, unsigned int);
-void xar_subdoc_remove(xar_subdoc_t s);
-
-/* These are for xar modules and should never be needed from a calling app */
-void xar_register_errhandler(xar_t x, err_handler callback, void *usrctx);
-xar_file_t xar_err_get_file(xar_errctx_t ctx);
-const char *xar_err_get_string(xar_errctx_t ctx);
-int xar_err_get_errno(xar_errctx_t ctx);
-void  xar_err_set_file(xar_t x, xar_file_t f);
-void  xar_err_set_string(xar_t x, const char *str);
-void  xar_err_set_errno(xar_t x, int e);
-void xar_err_new(xar_t x);
-int32_t xar_err_callback(xar_t x, int32_t sev, int32_t err);
-
-char *xar_get_path(xar_file_t f);
-uint64_t xar_ntoh64(uint64_t num);
-
-#endif /* _XAR_H_ */

Copied: branches/release_1_4/base/src/programs/xar/include/xar.h.in (from rev 23968, trunk/base/src/programs/xar/include/xar.h.in)
===================================================================
--- branches/release_1_4/base/src/programs/xar/include/xar.h.in	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/include/xar.h.in	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2005 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of his contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 03-Apr-2005
+ * DRI: Rob Braun <bbraun at opendarwin.org>
+ */
+
+#ifndef _XAR_H_
+#define _XAR_H_
+
+#define XAR_VERSION "@XAR_VERSION@"
+
+#include <sys/types.h>
+#include <stdint.h>
+
+struct xar_header {
+	uint32_t magic;
+	uint16_t size;
+	uint16_t version;
+	uint64_t toc_length_compressed;
+	uint64_t toc_length_uncompressed;
+	uint32_t cksum_alg;
+};
+typedef struct xar_header xar_header_t;
+
+#define XAR_HEADER_MAGIC 0x78617221
+#define XAR_EA_FORK "ea"
+
+#define XAR_CKSUM_NONE   0
+#define XAR_CKSUM_SHA1   1
+#define XAR_CKSUM_MD5    2
+
+typedef void *xar_errctx_t;
+typedef const struct __xar_file_t *xar_file_t;
+typedef const struct __xar_iter_t *xar_iter_t;
+typedef const struct __xar_t *xar_t;
+typedef const struct __xar_subdoc_t *xar_subdoc_t;
+typedef int32_t (*err_handler)(int32_t severit, int32_t instance, xar_errctx_t ctx, void *usrctx);
+
+#define READ 0
+#define WRITE 1
+
+/* Valid xar options & values */
+#define XAR_OPT_OWNERSHIP    "ownership"  /* setting owner/group behavior */
+#define XAR_OPT_VAL_SYMBOLIC "symbolic"   /* set owner/group based on names */
+#define XAR_OPT_VAL_NUMERIC  "numeric"    /* set owner/group based on uid/gid */
+
+#define XAR_OPT_TOCCKSUM "toc-cksum"      /* set the toc checksum algorithm */
+#define XAR_OPT_VAL_NONE "none"
+#define XAR_OPT_VAL_SHA1 "sha1"
+#define XAR_OPT_VAL_MD5  "md5"
+
+#define XAR_OPT_COMPRESSION "compression" /* set the file compression type */
+#define XAR_OPT_VAL_GZIP    "gzip"
+#define XAR_OPT_VAL_BZIP    "bzip2"
+
+#define XAR_OPT_RSIZE       "rsize"       /* Read io buffer size */
+
+#define XAR_OPT_COALESCE    "coalesce"    /* Coalesce identical heap blocks */
+#define XAR_OPT_LINKSAME    "linksame"    /* Hardlink identical files */
+
+/* xar error handler macros */
+#define XAR_SEVERITY_DEBUG    1
+#define XAR_SEVERITY_INFO     2
+#define XAR_SEVERITY_NORMAL   3
+#define XAR_SEVERITY_WARNING  4
+#define XAR_SEVERITY_NONFATAL 5
+#define XAR_SEVERITY_FATAL    6
+
+#define XAR_ERR_ARCHIVE_CREATION   1
+#define XAR_ERR_ARCHIVE_EXTRACTION 2
+
+xar_t xar_open(const char *file, int32_t flags);
+int xar_close(xar_t x);
+xar_file_t xar_add(xar_t x, const char *path);
+int32_t xar_extract(xar_t x, xar_file_t f);
+int32_t xar_extract_tofile(xar_t x, xar_file_t f, const char *path);
+const char *xar_opt_get(xar_t x, const char *option);
+int32_t xar_opt_set(xar_t x, const char *option, const char *value);
+
+int32_t xar_prop_set(xar_file_t f, const char *key, const char *value);
+int32_t xar_prop_create(xar_file_t f, const char *key, const char *value);
+int32_t xar_prop_get(xar_file_t f, const char *key, const char **value);
+
+xar_iter_t xar_iter_new();
+void xar_iter_free(xar_iter_t i);
+
+const char *xar_prop_first(xar_file_t f, xar_iter_t i);
+const char *xar_prop_next(xar_iter_t i);
+void xar_prop_unset(xar_file_t f, const char *key);
+xar_file_t xar_file_first(xar_t x, xar_iter_t i);
+xar_file_t xar_file_next(xar_iter_t i);
+
+const char *xar_attr_get(xar_file_t f, const char *prop, const char *key);
+int32_t xar_attr_set(xar_file_t f, const char *prop, const char *key, const char *value);
+const char *xar_attr_first(xar_file_t f, const char *prop, xar_iter_t i);
+const char *xar_attr_next(xar_iter_t i);
+
+xar_subdoc_t xar_subdoc_new(xar_t x, const char *name);
+int32_t xar_subdoc_prop_set(xar_subdoc_t s, const char *key, const char *value);
+int32_t xar_subdoc_prop_get(xar_subdoc_t s, const char *key, const char **value);
+int32_t xar_subdoc_attr_set(xar_subdoc_t s, const char *prop, const char *key, const char *value);
+const char *xar_subdoc_attr_get(xar_subdoc_t s, const char *prop, const char *key);
+xar_subdoc_t xar_subdoc_first(xar_t x);
+xar_subdoc_t xar_subdoc_next(xar_subdoc_t s);
+const char *xar_subdoc_name(xar_subdoc_t s);
+int32_t xar_subdoc_copyout(xar_subdoc_t s, unsigned char **, unsigned int *);
+int32_t xar_subdoc_copyin(xar_subdoc_t s, const unsigned char *, unsigned int);
+void xar_subdoc_remove(xar_subdoc_t s);
+
+/* These are for xar modules and should never be needed from a calling app */
+void xar_register_errhandler(xar_t x, err_handler callback, void *usrctx);
+xar_file_t xar_err_get_file(xar_errctx_t ctx);
+const char *xar_err_get_string(xar_errctx_t ctx);
+int xar_err_get_errno(xar_errctx_t ctx);
+void  xar_err_set_file(xar_t x, xar_file_t f);
+void  xar_err_set_string(xar_t x, const char *str);
+void  xar_err_set_errno(xar_t x, int e);
+void xar_err_new(xar_t x);
+int32_t xar_err_callback(xar_t x, int32_t sev, int32_t err);
+
+char *xar_get_path(xar_file_t f);
+uint64_t xar_ntoh64(uint64_t num);
+
+#endif /* _XAR_H_ */

Deleted: branches/release_1_4/base/src/programs/xar/install-sh
===================================================================
--- trunk/base/src/programs/xar/install-sh	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/install-sh	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,250 +0,0 @@
-#! /bin/sh
-#
-# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
-#
-# Copyright 1991 by the Massachusetts Institute of Technology
-#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission.  M.I.T. makes no representations about the
-# suitability of this software for any purpose.  It is provided "as is"
-# without express or implied warranty.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
-
-	-d) dir_arg=true
-	    shift
-	    continue;;
-
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
-
-	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
-	    shift
-	    continue;;
-
-	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-	    shift
-	    continue;;
-
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		# this colon is to work around a 386BSD /bin/sh bug
-		:
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-	echo "install:	no input file specified"
-	exit 1
-else
-	true
-fi
-
-if [ x"$dir_arg" != x ]; then
-	dst=$src
-	src=""
-	
-	if [ -d $dst ]; then
-		instcmd=:
-	else
-		instcmd=mkdir
-	fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
-# if $src (and thus $dsttmp) contains '*'.
-
-	if [ -f $src -o -d $src ]
-	then
-		true
-	else
-		echo "install:  $src does not exist"
-		exit 1
-	fi
-	
-	if [ x"$dst" = x ]
-	then
-		echo "install:	no destination specified"
-		exit 1
-	else
-		true
-	fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-	if [ -d $dst ]
-	then
-		dst="$dst"/`basename $src`
-	else
-		true
-	fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='	
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-	pathcomp="${pathcomp}${1}"
-	shift
-
-	if [ ! -d "${pathcomp}" ] ;
-        then
-		$mkdirprog "${pathcomp}"
-	else
-		true
-	fi
-
-	pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
-	$doit $instcmd $dst &&
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-	if [ x"$transformarg" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		dstfile=`basename $dst $transformbasename | 
-			sed $transformarg`$transformbasename
-	fi
-
-# don't allow the sed command to completely eliminate the filename
-
-	if [ x"$dstfile" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		true
-	fi
-
-# Make a temp file name in the proper directory.
-
-	dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-	$doit $instcmd $src $dsttmp &&
-
-	trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
-	$doit $rmcmd -f $dstdir/$dstfile &&
-	$doit $mvcmd $dsttmp $dstdir/$dstfile 
-
-fi &&
-
-
-exit 0

Copied: branches/release_1_4/base/src/programs/xar/install-sh (from rev 23968, trunk/base/src/programs/xar/install-sh)
===================================================================
--- branches/release_1_4/base/src/programs/xar/install-sh	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/install-sh	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,250 @@
+#! /bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission.  M.I.T. makes no representations about the
+# suitability of this software for any purpose.  It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+    case $1 in
+	-c) instcmd="$cpprog"
+	    shift
+	    continue;;
+
+	-d) dir_arg=true
+	    shift
+	    continue;;
+
+	-m) chmodcmd="$chmodprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-o) chowncmd="$chownprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-g) chgrpcmd="$chgrpprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-s) stripcmd="$stripprog"
+	    shift
+	    continue;;
+
+	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
+	    shift
+	    continue;;
+
+	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+	    shift
+	    continue;;
+
+	*)  if [ x"$src" = x ]
+	    then
+		src=$1
+	    else
+		# this colon is to work around a 386BSD /bin/sh bug
+		:
+		dst=$1
+	    fi
+	    shift
+	    continue;;
+    esac
+done
+
+if [ x"$src" = x ]
+then
+	echo "install:	no input file specified"
+	exit 1
+else
+	true
+fi
+
+if [ x"$dir_arg" != x ]; then
+	dst=$src
+	src=""
+	
+	if [ -d $dst ]; then
+		instcmd=:
+	else
+		instcmd=mkdir
+	fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad 
+# if $src (and thus $dsttmp) contains '*'.
+
+	if [ -f $src -o -d $src ]
+	then
+		true
+	else
+		echo "install:  $src does not exist"
+		exit 1
+	fi
+	
+	if [ x"$dst" = x ]
+	then
+		echo "install:	no destination specified"
+		exit 1
+	else
+		true
+	fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+	if [ -d $dst ]
+	then
+		dst="$dst"/`basename $src`
+	else
+		true
+	fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+#  this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='	
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+	pathcomp="${pathcomp}${1}"
+	shift
+
+	if [ ! -d "${pathcomp}" ] ;
+        then
+		$mkdirprog "${pathcomp}"
+	else
+		true
+	fi
+
+	pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+	$doit $instcmd $dst &&
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+	if [ x"$transformarg" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		dstfile=`basename $dst $transformbasename | 
+			sed $transformarg`$transformbasename
+	fi
+
+# don't allow the sed command to completely eliminate the filename
+
+	if [ x"$dstfile" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		true
+	fi
+
+# Make a temp file name in the proper directory.
+
+	dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+	$doit $instcmd $src $dsttmp &&
+
+	trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing.  If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+	$doit $rmcmd -f $dstdir/$dstfile &&
+	$doit $mvcmd $dsttmp $dstdir/$dstfile 
+
+fi &&
+
+
+exit 0

Copied: branches/release_1_4/base/src/programs/xar/lib (from rev 23968, trunk/base/src/programs/xar/lib)


Property changes on: branches/release_1_4/base/src/programs/xar/lib
___________________________________________________________________
Name: svn:ignore
   + Makefile.inc
*.d
*.dylib


Deleted: branches/release_1_4/base/src/programs/xar/lib/Makefile.inc.in
===================================================================
--- trunk/base/src/programs/xar/lib/Makefile.inc.in	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/Makefile.inc.in	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,140 +0,0 @@
-#
-# File lists.
-#
-
-# Internal headers.
-LIBXAR_IINCS := asprintf.h
-
-LIBXAR_IINCS := $(patsubst %, @srcroot at include/%, $(LIBXAR_IINCS))
-LIBXAR_IINCS += @objroot at include/config.h
-
-# Headers.
-LIBXAR_INCS :=
-
-LIBXAR_INCS := $(patsubst %, @srcroot at include/%, $(LIBXAR_INCS))
-LIBXAR_INCS += @objroot at include/xar.h
-
-# Sources.
-LIBXAR_SRCS := archive.c arcmod.c b64.c bzxar.c darwinattr.c data.c err.c
-LIBXAR_SRCS += ext2.c fbsdattr.c filetree.c io.c linuxattr.c md5.c stat.c
-LIBXAR_SRCS += subdoc.c util.c zxar.c script.c macho.c
-
-LIBXAR_SRCS := $(patsubst %, @srcroot at lib/%, $(LIBXAR_SRCS))
-
-# Libraries.  librxar is created such that it's possible to run xar without
-# first installing libxar.
-
-ifeq (elf, @abi@)
-LIBRXAR_SNAME := librxar.so. at LIB_REV@
-LIBRXAR_LNAME := librxar.so
-LIBRXAR_L := @objroot at lib/$(LIBRXAR_LNAME)
-LIBXAR_SNAME := libxar.so. at LIB_REV@
-LIBXAR_LNAME := libxar.so
-LIBXAR_L := @objroot at lib/$(LIBXAR_LNAME)
-endif
-ifeq (macho, @abi@)
-LIBRXAR_SNAME := librxar. at LIB_REV@.dylib
-LIBRXAR_LNAME := librxar.dylib
-LIBRXAR_L := @objroot at lib/$(LIBRXAR_LNAME)
-LIBXAR_SNAME := libxar. at LIB_REV@.dylib
-LIBXAR_LNAME := libxar.dylib
-LIBXAR_L := @objroot at lib/$(LIBXAR_LNAME)
-endif
-ifeq (aout, @abi@)
-LIBRXAR_SNAME := librxar.so. at LIB_REV@.0
-LIBRXAR_LNAME :=
-LIBRXAR_L :=
-LIBXAR_SNAME := libxar.so. at LIB_REV@.0
-LIBXAR_LNAME :=
-LIBXAR_L :=
-endif
-LIBRXAR_S := @objroot at lib/$(LIBRXAR_SNAME)
-LIBXAR_S := @objroot at lib/$(LIBXAR_SNAME)
-
-#
-# Include generated dependency files.
-#
--include $(LIBXAR_SRCS:@srcroot@%.c=@objroot@%.d)
-
-LDFLAGS := -L at objroot@lib $(LDFLAGS)
-
-#
-# User make'ables.
-#
-
-lib_all : $(LIBRXAR_S) $(LIBXAR_S)
-
-lib_install : $(LIBXAR_S)
-	@INSTALL@ -d $(DESTDIR)$(INCLUDEDIR)/xar
-	@INSTALL@ -m 0644 $(LIBXAR_INCS) $(DESTDIR)$(INCLUDEDIR)/xar
-	@INSTALL@ -d $(DESTDIR)$(LIBDIR)
-	@INSTALL@ -m 0444 $(LIBXAR_S) $(DESTDIR)$(LIBDIR)
-ifneq ($(words "" $(LIBXAR_LNAME)), 1)
-	rm -f $(DESTDIR)$(LIBDIR)/$(LIBXAR_LNAME)
-	ln -s $(LIBXAR_SNAME) $(DESTDIR)$(LIBDIR)/$(LIBXAR_LNAME)
-endif
-
-lib_uninstall :
-	rm -rf $(DESTDIR)$(INCLUDEDIR)/xar
-	rm -f $(DESTDIR)$(LIBDIR)/$(LIBXAR_SNAME)
-ifneq ($(words "" $(LIBXAR_LNAME)), 1)
-	rm -f $(DESTDIR)$(LIBDIR)/$(LIBXAR_LNAME)
-endif
-
-lib_clean :
-	rm -f $(LIBRXAR_S) $(LIBRXAR_L)
-	rm -f $(LIBXAR_S) $(LIBXAR_L)
-	rm -f $(LIBXAR_SRCS:@srcroot@%.c=@objroot@%.o)
-	rm -f $(LIBXAR_SRCS:@srcroot@%.c=@objroot@%.d)
-
-lib_distclean :
-
-#
-# Various flags.
-#
-
-CPPFLAGS := -I at objroot@include $(CPPFLAGS)
-CPPFLAGS := -I at srcroot@include $(CPPFLAGS)
-
-#
-# Build rules.
-#
-
-# librxar is a version of the xar library that is usable without first
-# installing libxar.
-$(LIBRXAR_S) : $(LIBXAR_SRCS:@srcroot@%.c=@objroot@%.o)
-	@mkdir -p $(@D)
-ifeq (elf, @abi@)
-	$(CC) -shared -Wl,-soname,$(LIBXAR_SNAME) -o $@ $+ @LIBS@
-endif
-ifeq (macho, @abi@)
-	$(CC) -dynamiclib -compatibility_version @LIB_REV@ -current_version @LIB_REV@ -install_name @abs_objroot@$(LIBRXAR_S) -o $@ $+ $(LDFLAGS) @LIBS@
-endif
-ifeq (aout, @abi@)
-	$(CC) -shared -o $@ $+
-endif
-ifneq ($(words "" $(LIBRXAR_L)), 1)
-	rm -f $(LIBRXAR_L)
-	ln -s $(LIBRXAR_SNAME) $(LIBRXAR_L)
-endif
-
-$(LIBXAR_S) : $(LIBXAR_SRCS:@srcroot@%.c=@objroot@%.o)
-	@mkdir -p $(@D)
-ifeq (elf, @abi@)
-	$(CC) -shared -Wl,-soname,$(LIBXAR_SNAME) -o $@ $+ @LIBS@
-endif
-ifeq (macho, @abi@)
-	$(CC) -dynamiclib -compatibility_version @LIB_REV@ -current_version @LIB_REV@ -install_name $(LIBDIR)/$(LIBXAR_SNAME) -o $@ $+ $(LDFLAGS) @LIBS@
-endif
-ifeq (aout, @abi@)
-	$(CC) -shared -o $@ $+
-endif
-ifneq ($(words "" $(LIBXAR_L)), 1)
-	rm -f $(LIBXAR_L)
-	ln -s $(LIBXAR_SNAME) $(LIBXAR_L)
-endif
-
- at objroot@lib/%.o : @srcroot at lib/%.c
-	@mkdir -p $(@D)
-	$(CC) $(S_CFLAGS) $(CPPFLAGS) -c $< -o $@
-	@$(SHELL) -ec "$(CC) -MM $(CPPFLAGS) $< | sed \"s/\($(subst /,\/,$(notdir $(basename $@)))\)\.o\([ :]*\)/$(subst /,\/,$(strip $(dir $@)))\1.o \2/g\" > $(@:%.o=%.d)"

Copied: branches/release_1_4/base/src/programs/xar/lib/Makefile.inc.in (from rev 23968, trunk/base/src/programs/xar/lib/Makefile.inc.in)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/Makefile.inc.in	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/Makefile.inc.in	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,140 @@
+#
+# File lists.
+#
+
+# Internal headers.
+LIBXAR_IINCS := asprintf.h
+
+LIBXAR_IINCS := $(patsubst %, @srcroot at include/%, $(LIBXAR_IINCS))
+LIBXAR_IINCS += @objroot at include/config.h
+
+# Headers.
+LIBXAR_INCS :=
+
+LIBXAR_INCS := $(patsubst %, @srcroot at include/%, $(LIBXAR_INCS))
+LIBXAR_INCS += @objroot at include/xar.h
+
+# Sources.
+LIBXAR_SRCS := archive.c arcmod.c b64.c bzxar.c darwinattr.c data.c err.c
+LIBXAR_SRCS += ext2.c fbsdattr.c filetree.c io.c linuxattr.c md5.c stat.c
+LIBXAR_SRCS += subdoc.c util.c zxar.c script.c macho.c
+
+LIBXAR_SRCS := $(patsubst %, @srcroot at lib/%, $(LIBXAR_SRCS))
+
+# Libraries.  librxar is created such that it's possible to run xar without
+# first installing libxar.
+
+ifeq (elf, @abi@)
+LIBRXAR_SNAME := librxar.so. at LIB_REV@
+LIBRXAR_LNAME := librxar.so
+LIBRXAR_L := @objroot at lib/$(LIBRXAR_LNAME)
+LIBXAR_SNAME := libxar.so. at LIB_REV@
+LIBXAR_LNAME := libxar.so
+LIBXAR_L := @objroot at lib/$(LIBXAR_LNAME)
+endif
+ifeq (macho, @abi@)
+LIBRXAR_SNAME := librxar. at LIB_REV@.dylib
+LIBRXAR_LNAME := librxar.dylib
+LIBRXAR_L := @objroot at lib/$(LIBRXAR_LNAME)
+LIBXAR_SNAME := libxar. at LIB_REV@.dylib
+LIBXAR_LNAME := libxar.dylib
+LIBXAR_L := @objroot at lib/$(LIBXAR_LNAME)
+endif
+ifeq (aout, @abi@)
+LIBRXAR_SNAME := librxar.so. at LIB_REV@.0
+LIBRXAR_LNAME :=
+LIBRXAR_L :=
+LIBXAR_SNAME := libxar.so. at LIB_REV@.0
+LIBXAR_LNAME :=
+LIBXAR_L :=
+endif
+LIBRXAR_S := @objroot at lib/$(LIBRXAR_SNAME)
+LIBXAR_S := @objroot at lib/$(LIBXAR_SNAME)
+
+#
+# Include generated dependency files.
+#
+-include $(LIBXAR_SRCS:@srcroot@%.c=@objroot@%.d)
+
+LDFLAGS := -L at objroot@lib $(LDFLAGS)
+
+#
+# User make'ables.
+#
+
+lib_all : $(LIBRXAR_S) $(LIBXAR_S)
+
+lib_install : $(LIBXAR_S)
+	@INSTALL@ -d $(DESTDIR)$(INCLUDEDIR)/xar
+	@INSTALL@ -m 0644 $(LIBXAR_INCS) $(DESTDIR)$(INCLUDEDIR)/xar
+	@INSTALL@ -d $(DESTDIR)$(LIBDIR)
+	@INSTALL@ -m 0444 $(LIBXAR_S) $(DESTDIR)$(LIBDIR)
+ifneq ($(words "" $(LIBXAR_LNAME)), 1)
+	rm -f $(DESTDIR)$(LIBDIR)/$(LIBXAR_LNAME)
+	ln -s $(LIBXAR_SNAME) $(DESTDIR)$(LIBDIR)/$(LIBXAR_LNAME)
+endif
+
+lib_uninstall :
+	rm -rf $(DESTDIR)$(INCLUDEDIR)/xar
+	rm -f $(DESTDIR)$(LIBDIR)/$(LIBXAR_SNAME)
+ifneq ($(words "" $(LIBXAR_LNAME)), 1)
+	rm -f $(DESTDIR)$(LIBDIR)/$(LIBXAR_LNAME)
+endif
+
+lib_clean :
+	rm -f $(LIBRXAR_S) $(LIBRXAR_L)
+	rm -f $(LIBXAR_S) $(LIBXAR_L)
+	rm -f $(LIBXAR_SRCS:@srcroot@%.c=@objroot@%.o)
+	rm -f $(LIBXAR_SRCS:@srcroot@%.c=@objroot@%.d)
+
+lib_distclean :
+
+#
+# Various flags.
+#
+
+CPPFLAGS := -I at objroot@include $(CPPFLAGS)
+CPPFLAGS := -I at srcroot@include $(CPPFLAGS)
+
+#
+# Build rules.
+#
+
+# librxar is a version of the xar library that is usable without first
+# installing libxar.
+$(LIBRXAR_S) : $(LIBXAR_SRCS:@srcroot@%.c=@objroot@%.o)
+	@mkdir -p $(@D)
+ifeq (elf, @abi@)
+	$(CC) -shared -Wl,-soname,$(LIBXAR_SNAME) -o $@ $+ @LIBS@
+endif
+ifeq (macho, @abi@)
+	$(CC) -dynamiclib -compatibility_version @LIB_REV@ -current_version @LIB_REV@ -install_name @abs_objroot@$(LIBRXAR_S) -o $@ $+ $(LDFLAGS) @LIBS@
+endif
+ifeq (aout, @abi@)
+	$(CC) -shared -o $@ $+
+endif
+ifneq ($(words "" $(LIBRXAR_L)), 1)
+	rm -f $(LIBRXAR_L)
+	ln -s $(LIBRXAR_SNAME) $(LIBRXAR_L)
+endif
+
+$(LIBXAR_S) : $(LIBXAR_SRCS:@srcroot@%.c=@objroot@%.o)
+	@mkdir -p $(@D)
+ifeq (elf, @abi@)
+	$(CC) -shared -Wl,-soname,$(LIBXAR_SNAME) -o $@ $+ @LIBS@
+endif
+ifeq (macho, @abi@)
+	$(CC) -dynamiclib -compatibility_version @LIB_REV@ -current_version @LIB_REV@ -install_name $(LIBDIR)/$(LIBXAR_SNAME) -o $@ $+ $(LDFLAGS) @LIBS@
+endif
+ifeq (aout, @abi@)
+	$(CC) -shared -o $@ $+
+endif
+ifneq ($(words "" $(LIBXAR_L)), 1)
+	rm -f $(LIBXAR_L)
+	ln -s $(LIBXAR_SNAME) $(LIBXAR_L)
+endif
+
+ at objroot@lib/%.o : @srcroot at lib/%.c
+	@mkdir -p $(@D)
+	$(CC) $(S_CFLAGS) $(CPPFLAGS) -c $< -o $@
+	@$(SHELL) -ec "$(CC) -MM $(CPPFLAGS) $< | sed \"s/\($(subst /,\/,$(notdir $(basename $@)))\)\.o\([ :]*\)/$(subst /,\/,$(strip $(dir $@)))\1.o \2/g\" > $(@:%.o=%.d)"

Deleted: branches/release_1_4/base/src/programs/xar/lib/appledouble.h
===================================================================
--- trunk/base/src/programs/xar/lib/appledouble.h	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/appledouble.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,103 +0,0 @@
-/* Information pulled from:
- * "AppleSingle/AppleDouble Formats for Foreign Files Developer's Note"
- * (c) Apple Computer 1990
- * File assembled by Rob Braun (bbraun at synack.net)
- */
- 
-#ifndef __APPLEDOUBLE__
-#define __APPLEDOUBLE__
-
-#include <sys/types.h>
-#include <stdint.h>
-
-/* Structure of an AppleSingle file:
- *   ----------------------
- *   | AppleSingleHeader  |
- *   |--------------------|
- *   | ASH.entries # of   |
- *   | AppleSingleEntry   |
- *   | Descriptors        |
- *   |         1          |
- *   |         .          |
- *   |         .          |
- *   |         n          |
- *   |--------------------|
- *   |   Datablock 1      |
- *   |--------------------|
- *   |   Datablock 2      |
- *   |--------------------|
- *   |   Datablock n      |
- *   ----------------------
- */
-
-struct AppleSingleHeader {
-	uint32_t     magic;       /* Magic Number (0x00051600 for AS) */
-	uint32_t     version;     /* Version #.  0x00020000 */
-	char         filler[16];  /* All zeros */
-	uint16_t     entries;     /* Number of entries in the file */
-};
-
-#define XAR_ASH_SIZE 26   /* sizeof(struct AppleSingleHeader) will be wrong
-                           * due to padding. */
-
-#define APPLESINGLE_MAGIC 0x00051600
-#define APPLEDOUBLE_MAGIC 0x00051607
-
-#define APPLESINGLE_VERSION 0x00020000
-#define APPLEDOUBLE_VERSION 0x00020000
-
-struct AppleSingleEntry {
-	uint32_t     entry_id;    /* What the entry is.  See defines below */
-	uint32_t     offset;      /* offset of data, offset beginning of file */
-	uint32_t     length;      /* length of data.  can be 0 */
-};
-
-/* Valid entry_id values */
-/* Entries 1, 3, and 8 are typically created for all files.
- * Macintosh Icon entries are rare, since those are typically in the resource 
- * fork.
- */
-#define AS_ID_DATA       1  /* Data fork */
-#define AS_ID_RESOURCE   2  /* Resource fork */
-#define AS_ID_NAME       3  /* Name of the file */
-#define AS_ID_COMMENT    4  /* Standard Macintosh comment */
-#define AS_ID_BWICON     5  /* Standard Macintosh B&W icon */
-#define AS_ID_COLORICON  6  /* Standard Macintosh Color icon */
-/* There is no 7 */
-#define AS_ID_DATES      8  /* File creation date, modification date, etc. */
-#define AS_ID_FINDER     9  /* Finder Information */
-#define AS_ID_MAC       10  /* Macintosh File information, attributes, etc. */
-#define AS_ID_PRODOS    11  /* ProDOS file information */
-#define AS_ID_MSDOS     12  /* MS-DOS file information */
-#define AS_ID_SHORTNAME 13  /* AFP short name */
-#define AS_ID_AFPINFO   14  /* AFP file information */
-#define AS_ID_AFPDIR    15  /* AFP directory id */
-/* 1-0x7FFFFFFF are reserved by Apple */
-
-/* File Dates are stored as the # of seconds before or after
- * 12am Jan 1, 2000 GMT.  The default value is 0x80000000.
- */
-struct MacTimes {
-	uint32_t  creation;
-	uint32_t  modification;
-	uint32_t  backup;
-	uint32_t  access;
-};
-
-/* Finder Information is two 16 byte quantities. 
- * Newly created files have all 0's in both entries.
- */
-
-/* Macintosh File Info entry (10) a 32 bit bitmask. */
-
-/* Entries can be placed in any order, although Apple recommends:
- * Place the data block (1) last.
- * Finder Info, File Dates Info, and Macintosh File Info first.
- * Allocate resource for entries in 4K blocks.
- */
-
-/* AppleDouble files are simply AppleSingle files without the data fork.
- * The magic number is different as a read optimization. 
- */
-
-#endif /* __APPLEDOUBLE__ */

Copied: branches/release_1_4/base/src/programs/xar/lib/appledouble.h (from rev 23968, trunk/base/src/programs/xar/lib/appledouble.h)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/appledouble.h	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/appledouble.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,103 @@
+/* Information pulled from:
+ * "AppleSingle/AppleDouble Formats for Foreign Files Developer's Note"
+ * (c) Apple Computer 1990
+ * File assembled by Rob Braun (bbraun at synack.net)
+ */
+ 
+#ifndef __APPLEDOUBLE__
+#define __APPLEDOUBLE__
+
+#include <sys/types.h>
+#include <stdint.h>
+
+/* Structure of an AppleSingle file:
+ *   ----------------------
+ *   | AppleSingleHeader  |
+ *   |--------------------|
+ *   | ASH.entries # of   |
+ *   | AppleSingleEntry   |
+ *   | Descriptors        |
+ *   |         1          |
+ *   |         .          |
+ *   |         .          |
+ *   |         n          |
+ *   |--------------------|
+ *   |   Datablock 1      |
+ *   |--------------------|
+ *   |   Datablock 2      |
+ *   |--------------------|
+ *   |   Datablock n      |
+ *   ----------------------
+ */
+
+struct AppleSingleHeader {
+	uint32_t     magic;       /* Magic Number (0x00051600 for AS) */
+	uint32_t     version;     /* Version #.  0x00020000 */
+	char         filler[16];  /* All zeros */
+	uint16_t     entries;     /* Number of entries in the file */
+};
+
+#define XAR_ASH_SIZE 26   /* sizeof(struct AppleSingleHeader) will be wrong
+                           * due to padding. */
+
+#define APPLESINGLE_MAGIC 0x00051600
+#define APPLEDOUBLE_MAGIC 0x00051607
+
+#define APPLESINGLE_VERSION 0x00020000
+#define APPLEDOUBLE_VERSION 0x00020000
+
+struct AppleSingleEntry {
+	uint32_t     entry_id;    /* What the entry is.  See defines below */
+	uint32_t     offset;      /* offset of data, offset beginning of file */
+	uint32_t     length;      /* length of data.  can be 0 */
+};
+
+/* Valid entry_id values */
+/* Entries 1, 3, and 8 are typically created for all files.
+ * Macintosh Icon entries are rare, since those are typically in the resource 
+ * fork.
+ */
+#define AS_ID_DATA       1  /* Data fork */
+#define AS_ID_RESOURCE   2  /* Resource fork */
+#define AS_ID_NAME       3  /* Name of the file */
+#define AS_ID_COMMENT    4  /* Standard Macintosh comment */
+#define AS_ID_BWICON     5  /* Standard Macintosh B&W icon */
+#define AS_ID_COLORICON  6  /* Standard Macintosh Color icon */
+/* There is no 7 */
+#define AS_ID_DATES      8  /* File creation date, modification date, etc. */
+#define AS_ID_FINDER     9  /* Finder Information */
+#define AS_ID_MAC       10  /* Macintosh File information, attributes, etc. */
+#define AS_ID_PRODOS    11  /* ProDOS file information */
+#define AS_ID_MSDOS     12  /* MS-DOS file information */
+#define AS_ID_SHORTNAME 13  /* AFP short name */
+#define AS_ID_AFPINFO   14  /* AFP file information */
+#define AS_ID_AFPDIR    15  /* AFP directory id */
+/* 1-0x7FFFFFFF are reserved by Apple */
+
+/* File Dates are stored as the # of seconds before or after
+ * 12am Jan 1, 2000 GMT.  The default value is 0x80000000.
+ */
+struct MacTimes {
+	uint32_t  creation;
+	uint32_t  modification;
+	uint32_t  backup;
+	uint32_t  access;
+};
+
+/* Finder Information is two 16 byte quantities. 
+ * Newly created files have all 0's in both entries.
+ */
+
+/* Macintosh File Info entry (10) a 32 bit bitmask. */
+
+/* Entries can be placed in any order, although Apple recommends:
+ * Place the data block (1) last.
+ * Finder Info, File Dates Info, and Macintosh File Info first.
+ * Allocate resource for entries in 4K blocks.
+ */
+
+/* AppleDouble files are simply AppleSingle files without the data fork.
+ * The magic number is different as a read optimization. 
+ */
+
+#endif /* __APPLEDOUBLE__ */

Deleted: branches/release_1_4/base/src/programs/xar/lib/archive.c
===================================================================
--- trunk/base/src/programs/xar/lib/archive.c	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/archive.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,988 +0,0 @@
-/*
- * Copyright (c) 2005 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of his contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 03-Apr-2005
- * DRI: Rob Braun <bbraun at opendarwin.org>
- */
-#define _FILE_OFFSET_BITS 64
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <libgen.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <arpa/inet.h> /* for ntoh{l,s} */
-#include <inttypes.h>  /* for PRIu64 */
-#include <libxml/xmlwriter.h>
-#include <libxml/xmlreader.h>
-#include <libxml/xmlstring.h>
-#include "config.h"
-#ifndef HAVE_ASPRINTF
-#include "asprintf.h"
-#endif
-#include "xar.h"
-#include "filetree.h"
-#include "archive.h"
-#include "arcmod.h"
-#include "util.h"
-#include "subdoc.h"
-#include "darwinattr.h"
-
-#ifndef O_EXLOCK
-#define O_EXLOCK 0
-#endif
-#ifndef O_SHLOCK
-#define O_SHLOCK 0
-#endif
-
-static int32_t xar_unserialize(xar_t x);
-void xar_serialize(xar_t x, const char *file);
-
-/* xar_new
- * Returns: newly allocated xar_t structure
- * Summary: just does basicallocation and initialization of 
- * xar_t structure.
- */
-static xar_t xar_new() {
-	xar_t ret;
-	ret = malloc(sizeof(struct __xar_t));
-	if(!ret) return NULL;
-	memset(XAR(ret), 0, sizeof(struct __xar_t));
-	XAR(ret)->readbuf_len = 4096;
-	XAR(ret)->readbuf = malloc(XAR(ret)->readbuf_len);
-	if(!XAR(ret)->readbuf) {
-		free((void *)ret);
-		return NULL;
-	}
-	XAR(ret)->offset = 0;
-
-	XAR(ret)->zs.zalloc = Z_NULL;
-	XAR(ret)->zs.zfree = Z_NULL;
-	XAR(ret)->zs.opaque = Z_NULL;
-	XAR(ret)->ino_hash = xmlHashCreate(0);
-	XAR(ret)->link_hash = xmlHashCreate(0);
-	XAR(ret)->csum_hash = xmlHashCreate(0);
-	XAR(ret)->subdocs = NULL;
-	
-	return ret;
-}
-
-/* xar_parse_header
- * x: archive to operate on.
- * Returns: 0 on success, -1 on failure
- * Summary: internal helper function to read in the xar header.
- */
-static int32_t xar_parse_header(xar_t x) {
-	ssize_t r;
-	int off = 0;
-	int sz2read = 0;
-
-	/* read just the magic, verify it, read the header length,
-	 * then read in the size of the header according to the
-	 * recorded header length, or the length of the structure
-	 * we expect, whichever is smaller.  Then seek forward
-	 * if the recorded header length is greater than the 
-	 * expected header length.
-	 */
-	r = xar_read_fd(XAR(x)->fd, (char *)&XAR(x)->header.magic+off, sizeof(XAR(x)->header.magic)-off);
-	if ( r == -1 )
-		return r;
-
-	/* Verify the header.  If the header doesn't match, exit without
-	 * attempting to read any more.
-	 */
-	XAR(x)->header.magic = ntohl(XAR(x)->header.magic);
-
-	if( XAR(x)->header.magic != XAR_HEADER_MAGIC ) {
-		return -1;
-	}
-
-	r = xar_read_fd(XAR(x)->fd, (char *)&XAR(x)->header.size+off, sizeof(XAR(x)->header.size)-off);
-	if ( r == -1 )
-		return r;
-
-	XAR(x)->header.size = ntohs(XAR(x)->header.size);
-
-	if( XAR(x)->header.size > sizeof(xar_header_t) )
-		sz2read = sizeof(xar_header_t);
-	else
-		sz2read = XAR(x)->header.size;
-
-	off = sizeof(XAR(x)->header.magic) + sizeof(XAR(x)->header.size);
-	r = xar_read_fd(XAR(x)->fd, ((char *)&XAR(x)->header)+off, sizeof(xar_header_t)-off);
-	if ( r == -1 )
-		return r;
-
-	XAR(x)->header.version = ntohs(XAR(x)->header.version);
-	XAR(x)->header.toc_length_compressed = xar_ntoh64(XAR(x)->header.toc_length_compressed);
-	XAR(x)->header.toc_length_uncompressed = xar_ntoh64(XAR(x)->header.toc_length_uncompressed);
-	XAR(x)->header.cksum_alg = ntohl(XAR(x)->header.cksum_alg);
-
-	off = XAR(x)->header.size - sz2read;
-	if( off > 0 )
-		r = lseek(XAR(x)->fd, (off_t)off, SEEK_CUR);
-
-	if ( (r == -1) && (errno != ESPIPE) )
-		/* Some fatal error here perhaps? */ ;
-
-	return 0;
-}
-
-/* xar_open
- * file: filename to open
- * flags: flags on how to open the file.  0 for readonly, !0 for read/write
- * Returns: allocated and initialized xar structure with an open
- * file descriptor to the target xar file.  If the xarchive is opened
- * for writing, the file is created, and a heap file is opened.
- */
-xar_t xar_open(const char *file, int32_t flags) {
-	xar_t ret;
-
-	ret = xar_new();
-	if( !ret ) return NULL;
-	if( !file )
-		file = "-";
-	XAR(ret)->filename = strdup(file);
-	OpenSSL_add_all_digests();
-	if( flags ) {
-		char *tmp1, *tmp2, *tmp3, *tmp4;
-		tmp1 = tmp2 = strdup(file);
-		tmp3 = dirname(tmp2);
-		XAR(ret)->dirname = strdup(tmp3);
-		/* Create the heap file in the directory which will contain
-		 * the target archive.  /tmp or elsewhere may fill up.
-		 */
-		asprintf(&tmp4, "%s/xar.heap.XXXXXX", tmp3);
-		free(tmp1);
-		if( strcmp(file, "-") == 0 )
-			XAR(ret)->fd = 1;
-		else
-			XAR(ret)->fd = open(file, O_WRONLY | O_CREAT | O_TRUNC | O_EXLOCK, 0644);
-		XAR(ret)->heap_fd = mkstemp(tmp4);
-		if( XAR(ret)->heap_fd < 0 ) {
-			close(XAR(ret)->fd);
-			free(XAR(ret));
-			return NULL;
-		}
-		unlink(tmp4);
-		free(tmp4);
-
-		deflateInit(&XAR(ret)->zs, Z_BEST_COMPRESSION);
-
-		if( XAR(ret)->fd < 0 ) {
-			xar_close(ret);
-			return NULL;
-		}
-
-		/* default to using sha1, if nothing else is
-		 * specified.
-		 */
-		XAR(ret)->heap_offset += 20;
-		XAR(ret)->heap_len += 20;
-		
-		xar_opt_set(ret, XAR_OPT_COMPRESSION, XAR_OPT_VAL_GZIP);
-	} else {
-		unsigned char toccksum[EVP_MAX_MD_SIZE];
-		unsigned char cval[EVP_MAX_MD_SIZE];
-		unsigned int tlen;
-		const EVP_MD *md;
-
-		if( strcmp(file, "-") == 0 )
-			XAR(ret)->fd = 0;
-		else
-			XAR(ret)->fd = open(file, O_RDONLY | O_SHLOCK);
-		XAR(ret)->heap_fd = -1;
-		inflateInit(&XAR(ret)->zs);
-		if( XAR(ret)->fd < 0 ) {
-			xar_close(ret);
-			return NULL;
-		}
-
-		if( xar_parse_header(ret) != 0 ) {
-			xar_close(ret);
-			return NULL;
-		}
-
-		switch(XAR(ret)->header.cksum_alg) {
-		case XAR_CKSUM_NONE:
-			break;
-		case XAR_CKSUM_SHA1:
-			XAR(ret)->docksum = 1;
-			md = EVP_get_digestbyname("sha1");
-			EVP_DigestInit(&XAR(ret)->toc_ctx, md);
-			break;
-		case XAR_CKSUM_MD5:
-			XAR(ret)->docksum = 1;
-			md = EVP_get_digestbyname("md5");
-			EVP_DigestInit(&XAR(ret)->toc_ctx, md);
-			break;
-		default:
-			fprintf(stderr, "Unknown hashing algorithm, skipping\n");
-			break;
-		};
-
-		if( xar_unserialize(ret) != 0 ) {
-			xar_close(ret);
-			return NULL;
-		}
-
-		if( !XAR(ret)->docksum )
-			return ret;
-
-		EVP_DigestFinal(&XAR(ret)->toc_ctx, toccksum, &tlen);
-
-		xar_read_fd(XAR(ret)->fd, cval, tlen);
-		XAR(ret)->heap_offset += tlen;
-		if( memcmp(cval, toccksum, tlen) != 0 ) {
-			fprintf(stderr, "Checksums do not match!\n");
-			xar_close(ret);
-			return NULL;
-		}
-	}
-
-	return ret;
-}
-
-/* xar_close
- * x: the xar_t to close
- * Summary: closes all open file descriptors, frees all
- * file structures and options, deallocates the xar_t its self.
- * Returns 0 for success, -1 for failure.
- */
-int xar_close(xar_t x) {
-	xar_attr_t a;
-	xar_file_t f;
-	int ret, retval = 0;
-
-	/* If we're creating an archive */
-	if( XAR(x)->heap_fd != -1 ) {
-		char *tmpser;
-		void *rbuf, *wbuf = NULL;
-		int fd, r, off, wbytes, rbytes;
-		long rsize, wsize;
-		z_stream zs;
-		uint64_t ungztoc, gztoc;
-		unsigned char chkstr[EVP_MAX_MD_SIZE];
-		int tocfd;
-
-		tmpser = (char *)xar_opt_get(x, XAR_OPT_TOCCKSUM);
-		/* If no checksum type is specified, default to sha1 */
-		if( !tmpser ) tmpser = XAR_OPT_VAL_SHA1;
-
-		if( (strcmp(tmpser, XAR_OPT_VAL_NONE) != 0) ) {
-			const EVP_MD *md;
-			xar_prop_set(XAR_FILE(x), "checksum", NULL);
-			if( strcmp(tmpser, XAR_OPT_VAL_SHA1) == 0 ) {
-				md = EVP_get_digestbyname("sha1");
-				EVP_DigestInit(&XAR(x)->toc_ctx, md);
-				XAR(x)->header.cksum_alg = htonl(XAR_CKSUM_SHA1);
-				xar_attr_set(XAR_FILE(x), "checksum", "style", XAR_OPT_VAL_SHA1);
-				xar_prop_set(XAR_FILE(x), "checksum/size", "20");
-			}
-			if( strcmp(tmpser, XAR_OPT_VAL_MD5) == 0 ) {
-				md = EVP_get_digestbyname("md5");
-				EVP_DigestInit(&XAR(x)->toc_ctx, md);
-				XAR(x)->header.cksum_alg = htonl(XAR_CKSUM_MD5);
-				xar_attr_set(XAR_FILE(x), "checksum", "style", XAR_OPT_VAL_MD5);
-				xar_prop_set(XAR_FILE(x), "checksum/size", "16");
-			}
-
-			xar_prop_set(XAR_FILE(x), "checksum/offset", "0");
-			XAR(x)->docksum = 1;
-		} else {
-			XAR(x)->docksum = 0;
-			XAR(x)->header.cksum_alg = XAR_CKSUM_NONE;
-		}
-
-		/* serialize the toc to a tmp file */
-		asprintf(&tmpser, "%s/xar.toc.XXXXXX", XAR(x)->dirname);
-		fd = mkstemp(tmpser);
-		xar_serialize(x, tmpser);
-		unlink(tmpser);
-		free(tmpser);
-		asprintf(&tmpser, "%s/xar.toc.XXXXXX", XAR(x)->dirname);
-		tocfd = mkstemp(tmpser);
-		unlink(tmpser);
-		free(tmpser);
-		
-	
-		/* read the toc from the tmp file, compress it, and write it
-	 	* out to the archive.
-	 	*/
-		rsize = wsize = 4096;
-		const char * opt = xar_opt_get(x, XAR_OPT_RSIZE);
-		if ( opt ) {
-		  rsize = strtol(opt, NULL, 0);
-		  if ( ((rsize == LONG_MAX) || (rsize == LONG_MIN)) && (errno == ERANGE) ) {
-		    rsize = wsize;
-		  }
-		}
-		
-		rbuf = malloc(rsize);
-		if( !rbuf ) {
-			retval = -1;
-			goto CLOSE_BAIL;
-		}
-		zs.zalloc = Z_NULL;
-		zs.zfree = Z_NULL;
-		zs.opaque = Z_NULL;
-		deflateInit(&zs, Z_BEST_COMPRESSION);
-	
-		ungztoc = gztoc = 0;
-	
-		while(1) {
-			r = read(fd, rbuf, rsize);
-			if( (r < 0) && (errno == EINTR) )
-				continue;
-			if( r == 0 )
-				break;
-	
-			ungztoc += r;
-	
-			zs.avail_in = r;
-			zs.next_in = (void *)rbuf;
-			zs.next_out = NULL;
-			zs.avail_out = 0;
-
-			wsize = rsize/2;
-	
-			off = 0;
-			while( zs.avail_in != 0 ) {
-				wsize *= 2;
-				wbuf = realloc(wbuf, wsize);
-
-				zs.next_out = wbuf + off;
-				zs.avail_out = wsize - off;
-
-				ret = deflate(&zs, Z_SYNC_FLUSH);
-				off = wsize - zs.avail_out;
-			}
-	
-			wbytes = off;
-			off = 0;
-			do {
-				r = write(tocfd, wbuf+off, wbytes-off);
-				if( (r < 0) && (errno = EINTR) )
-					continue;
-				if( r < 0 ) {
-					
-				}
-				if( XAR(x)->docksum )
-					EVP_DigestUpdate(&XAR(x)->toc_ctx, wbuf+off, r);
-				off += r;
-				gztoc += r;
-			} while( off < wbytes );
-
-		}
-
-		zs.next_in = NULL;
-		zs.avail_in = 0;
-		zs.next_out = wbuf;
-		zs.avail_out = wsize;
-
-		deflate(&zs, Z_FINISH);
-		r = write(tocfd, wbuf, wsize - zs.avail_out);
-		gztoc += r;
-		if( XAR(x)->docksum )
-			EVP_DigestUpdate(&XAR(x)->toc_ctx, wbuf, r);
-		
-		deflateEnd(&zs);
-
-		/* populate the header and write it out */
-		XAR(x)->header.magic = htonl(XAR_HEADER_MAGIC);
-		XAR(x)->header.size = ntohs(sizeof(xar_header_t));
-		XAR(x)->header.version = ntohs(1);
-		XAR(x)->header.toc_length_uncompressed = xar_ntoh64(ungztoc);
-		XAR(x)->header.toc_length_compressed = xar_ntoh64(gztoc);
-
-		write(XAR(x)->fd, &XAR(x)->header, sizeof(xar_header_t));
-
-		/* Copy the temp compressed toc file into the file */
-		lseek(tocfd, (off_t)0, SEEK_SET);
-		while(1) {
-			r = read(tocfd, rbuf, rsize);
-			if( (r < 0) && (errno == EINTR) )
-				continue;
-			if( r == 0 )
-				break;
-
-			wbytes = r;
-			off = 0;
-			do {
-				r = write(XAR(x)->fd, rbuf+off, wbytes-off);
-				if( (r < 0) && (errno = EINTR) )
-					continue;
-				/* XXX: handle r <= 0 cases */
-				off += r;
-			} while( off < wbytes );
-		}
-
-		if( XAR(x)->docksum ) {
-			unsigned int l = r;
-			memset(chkstr, 0, sizeof(chkstr));
-			EVP_DigestFinal(&XAR(x)->toc_ctx, chkstr, &l);
-			r = l;
-			write(XAR(x)->fd, chkstr, r);
-		}
-
-		/* copy the heap from the temporary heap into the archive */
-		if( lseek(XAR(x)->heap_fd, (off_t)0, SEEK_SET) < 0 ) {
-			fprintf(stderr, "Error lseeking to offset 0: %s\n", strerror(errno));
-			exit(1);
-		}
-		rbytes = 0;
-		while(1) {
-			if( (XAR(x)->heap_len - rbytes) < rsize )
-				rsize = XAR(x)->heap_len - rbytes;
-
-			r = read(XAR(x)->heap_fd, rbuf, rsize);
-			if( (r < 0 ) && (errno == EINTR) )
-				continue;
-			if( r == 0 )
-				break;
-	
-			rbytes += r;
-			wbytes = r;
-			off = 0;
-			do {
-				r = write(XAR(x)->fd, rbuf+off, wbytes);
-				if( (r < 0 ) && (errno == EINTR) )
-					continue;
-				if( r < 0 ) {
-					retval = -1;
-					goto CLOSEEND;
-				}
-				off += r;
-			} while( off < wbytes );
-
-			if( rbytes >= XAR(x)->heap_len )
-				break;
-		}
-CLOSEEND:
-		free(rbuf);
-		free(wbuf);
-		deflateEnd(&XAR(x)->zs);
-	} else {
-		inflateEnd(&XAR(x)->zs);
-	}
-		
-CLOSE_BAIL:
-	/* continue deallocating the archive and return */
-	while(XAR(x)->subdocs) {
-		xar_subdoc_remove(XAR(x)->subdocs);
-	}
-
-	while(XAR(x)->attrs) {
-		a = XAR(x)->attrs;
-		XAR(x)->attrs = XAR_ATTR(a)->next;
-		xar_attr_free(a);
-	}
-
-	while(XAR(x)->files) {
-		f = XAR(x)->files;
-		XAR(x)->files = XAR_FILE(f)->next;
-		xar_file_free(f);
-	}
-
-	xmlHashFree(XAR(x)->ino_hash, NULL);
-	xmlHashFree(XAR(x)->link_hash, NULL);
-	xmlHashFree(XAR(x)->csum_hash, NULL);
-	close(XAR(x)->fd);
-	close(XAR(x)->heap_fd);
-	free((char *)XAR(x)->filename);
-	free((char *)XAR(x)->dirname);
-	free(XAR(x)->readbuf);
-	free((void *)x);
-
-	return retval;
-}
-
-/* xar_opt_get
- * x: archive to get the option from
- * option: name of the option
- * Returns: a pointer to the value of the option
- */
-const char *xar_opt_get(xar_t x, const char *option) {
-	xar_attr_t i;
-	for(i = XAR(x)->attrs; i && XAR_ATTR(i)->next; i = XAR_ATTR(i)->next) {
-		if(strcmp(XAR_ATTR(i)->key, option)==0)
-			return XAR_ATTR(i)->value;
-	}
-	if( i && (strcmp(XAR_ATTR(i)->key, option)==0) )
-		return XAR_ATTR(i)->value;
-	return NULL;
-}
-
-/* xar_opt_set
- * x: the archive to set the option of
- * option: the name of the option to set the value of
- * value: the value to set the option to
- * Returns: 0 for sucess, -1 for failure
- */
-int32_t xar_opt_set(xar_t x, const char *option, const char *value) {
-	xar_attr_t i, a;
-
-	if( (strcmp(option, XAR_OPT_TOCCKSUM) == 0) ) {
-		if( strcmp(value, XAR_OPT_VAL_NONE) == 0 ) {
-			XAR(x)->heap_offset = 0;
-		}
-		if( strcmp(value, XAR_OPT_VAL_SHA1) == 0 ) {
-			XAR(x)->heap_offset = 20;
-		}
-		if( strcmp(value, XAR_OPT_VAL_MD5) == 0 ) {
-			XAR(x)->heap_offset = 16;
-		}
-	}
-	for(i = XAR(x)->attrs; i ; i = XAR_ATTR(i)->next) {
-		if(strcmp(XAR_ATTR(i)->key, option)==0) {
-			free((char*)XAR_ATTR(i)->value);
-			XAR_ATTR(i)->value = strdup(value);
-			return 0;
-		}
-	}
-	a = xar_attr_new();
-	XAR_ATTR(a)->key = strdup(option);
-	XAR_ATTR(a)->value = strdup(value);
-	XAR_ATTR(a)->next = XAR(x)->attrs;
-	XAR(x)->attrs = a;
-	return 0;
-}
-
-/* xar_add_node
- * x: archive the file should belong to
- * f: parent node, possibly NULL
- * name: name of the node to add
- * Returns: newly allocated and populated node
- * Summary: helper function which adds a child of f and populates
- * its properties.  If f is NULL, the node will be added as a top
- * level node of the archive, x.
- */
-static xar_file_t xar_add_node(xar_t x, xar_file_t f, const char *name, const char *prefix, int srcpath) {
-	xar_file_t ret;
-	const char *path; 
-	char *tmp;
-	char idstr[32];
-
-	if( !f ) {
-		asprintf(&tmp, "%s%s%s", XAR(x)->path_prefix, prefix, name);
-		if( lstat(tmp, &XAR(x)->sbcache) != 0 ) {
-			free(tmp);
-			return NULL;
-		}
-
-		ret = xar_file_new(NULL);
-		if( !ret )
-			return NULL;
-		memset(idstr, 0, sizeof(idstr));
-		snprintf(idstr, sizeof(idstr)-1, "%"PRIu64, ++XAR(x)->last_fileid);
-		xar_attr_set(ret, NULL, "id", idstr);
-		XAR_FILE(ret)->parent = NULL;
-		XAR_FILE(ret)->fspath = tmp;
-		if( XAR(x)->files == NULL )
-			XAR(x)->files = ret;
-		else {
-			XAR_FILE(ret)->next = XAR(x)->files;
-			XAR(x)->files = ret;
-		}
-	} else {
-		path = XAR_FILE(f)->fspath;
-		if( strcmp(prefix, "../") == 0 ) {
-			int len1, len2;
-			len1 = strlen(path);
-			len2 = strlen(name);
-			if( (len1>=len2) && (strcmp(path+(len1-len2), name) == 0) ) {
-				return f;
-			}
-			
-		}
-		asprintf(&tmp, "%s/%s%s", path, prefix, name);
-		if( lstat(tmp, &XAR(x)->sbcache) != 0 ) {
-			free(tmp);
-			return NULL;
-		}
-
-		ret = xar_file_new(f);
-		if( !ret )
-			return NULL;
-		memset(idstr, 0, sizeof(idstr));
-		snprintf(idstr, sizeof(idstr)-1, "%"PRIu64, ++XAR(x)->last_fileid);
-		xar_attr_set(ret, NULL, "id", idstr);
-		XAR_FILE(ret)->fspath = tmp;
-	}
-
-	xar_prop_set(ret, "name", name);
-
-	if( xar_arcmod_archive(x, ret, XAR_FILE(ret)->fspath) < 0 ) {
-		xar_file_t i;
-		if( f ) {
-			for( i = XAR_FILE(f)->children; i && (XAR_FILE(i)->next != ret); i = XAR_FILE(i)->next );
-		} else {
-			for( i = XAR(x)->files; i && (XAR_FILE(i)->next != ret); i = XAR_FILE(i)->next );
-		}
-		if( i )
-			XAR_FILE(i)->next = XAR_FILE(ret)->next;
-		xar_file_free(ret);
-		return NULL;
-	}
-
-	return ret;
-}
-
-/* xar_add_r
- * Summary: a recursive helper function for adding a node to the
- * tree.  This will search all children of node f, looking for
- * the path component.  If found, will recurse into it.  If not,
- * will add the path component to the tree, and recurse into it.
- * If f is NULL, will start with x->files.
- */
-static xar_file_t xar_add_r(xar_t x, xar_file_t f, const char *path, const char *prefix) {
-	xar_file_t i = NULL, ret, ret2, start = NULL;
-	char *tmp1, *tmp2, *tmp3;
-
-	if( path && (path[0] == '\0') ) {
-		return f;
-	}
-
-	tmp1 = tmp2 = strdup(path);
-	tmp3 = strsep(&tmp2, "/");
-
-	if( tmp3 && tmp2 && (tmp3[0] == '\0') ) {
-		ret2 = xar_add_r(x, f, tmp2, "");
-		free(tmp1);
-		return ret2;
-	}
-
-	if( strcmp(tmp3, "..") == 0 ) {
-		char *prefixstr;
-		if( !XAR(x)->skipwarn ) {
-			xar_err_new(x);
-			xar_err_set_string(x, "Skipping .. in path");
-			xar_err_callback(x, XAR_SEVERITY_WARNING, XAR_ERR_ARCHIVE_CREATION);
-			XAR(x)->skipwarn = 1;
-		}
-		asprintf(&prefixstr, "%s../", prefix);
-		ret2 = xar_add_r(x, f, tmp2, prefixstr);
-		free(prefixstr);
-		free(tmp1);
-		return ret2;
-	}
-
-	if( strcmp(tmp3, ".") == 0 ) {
-		if( tmp2 )
-			ret2 = xar_add_r(x, f, tmp2, prefix);
-		else
-			ret2 = NULL;
-		free(tmp1);
-		return ret2;
-	}
-
-	if( !f ) {
-		start = XAR(x)->files;
-	} else {
-		start = XAR_FILE(f)->children;
-	}
-
-	/* Search all the siblings */
-	for( i = start; i; i = XAR_FILE(i)->next ) {
-		const char *n;
-		xar_prop_get(i, "name", &n);
-		if( strcmp(n, tmp3) == 0 ) {
-			if( !tmp2 ) {
-				/* Node already exists, and it is i */
-				free(tmp1);
-				return i;
-			}
-			ret2 = xar_add_r(x, i, tmp2, "");
-			free(tmp1);
-			return ret2;
-		}
-	}
-
-	/* tmp3 was not found in children of start, so we add it */
-	if( tmp2 ) {
-		ret = xar_add_node(x, f, tmp3, prefix, 1);
-	} else {
-		ret = xar_add_node(x, f, tmp3, prefix, 0);
-	}
-
-	if( !ret ) {
-		free(tmp1);
-		return NULL;
-	}
-
-	if( !tmp2 ) {
-		/* We've added the final piece, done, don't recurse */
-		free(tmp1);
-		return ret;
-	}
-
-	/* still more to add, recurse */
-	ret2 = xar_add_r(x, ret, tmp2, "");
-	free(tmp1);
-	return ret2;
-}
-
-/* xar_add
- * x: archive to add the file to
- * path: path to file
- * Returns: allocated an populated xar_file_t representing the 
- * specified file.
- * Summary: if a full path "foo/bar/blah" is specified, then any
- * directories not already existing in the archive will be added
- * automagically.  The returned xar_file_t represents the file
- * specified, not the parent of the directory tree.
- * For instance, if "foo/bar/blah" is specified, the xar_file_t
- * representing "blah" will be returned.
- */
-xar_file_t xar_add(xar_t x, const char *path) {
-
-	if( xar_underbar_check(x, NULL, path) )
-		return NULL;
-
-	if( path[0] == '/' ) {
-		XAR(x)->path_prefix = "/";
-		path++;
-	} else
-		XAR(x)->path_prefix = "";
-	return xar_add_r(x, NULL, path, "");
-}
-
-/* xar_extract_tofile
- * x: archive to extract from
- * f: file associated with x
- * Returns 0 on success, -1 on failure
- * Summary: This actually does the file extraction.
- * No traversal is performed, it is assumed all directory paths
- * leading up to f already exist.
- */
-int32_t xar_extract_tofile(xar_t x, xar_file_t f, const char *path) {
-	return xar_arcmod_extract(x, f, path);
-}
-
-/* xar_extract
- * x: archive to extract from
- * path: path to file to extract
- * Returns 0 on success, -1 on failure.
- * Summary: This is the entry point for extraction.  This will find
- * the file node described by path, extract any directories needed
- * to extract the node, and finally extract the file.
- * Example: xar_extract(x, "foo/bar/blah")
- * If foo does not exist, xar_extract will extract foo from the
- * archive, extract bar from the archive, and then extract blah.
- * Total extractions will be "foo", "foo/bar", and "foo/bar/blah".
- */
-int32_t xar_extract(xar_t x, xar_file_t f) {
-	struct stat sb;
-	char *tmp1, *dname;
-	xar_file_t tmpf;
-	
-	if( (strstr(XAR_FILE(f)->fspath, "/") != NULL) && (stat(XAR_FILE(f)->fspath, &sb)) ) {
-		tmp1 = strdup(XAR_FILE(f)->fspath);
-		dname = dirname(tmp1);
-		tmpf = xar_file_find(XAR(x)->files, dname);
-		if( !tmpf ) {
-			xar_err_set_string(x, "Unable to find file");
-			xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
-			return -1;
-		}
-		free(tmp1);
-		xar_extract(x, tmpf);
-	}
-	
-	return xar_extract_tofile(x, f, XAR_FILE(f)->fspath);
-}
-
-/* read_callback
- * context: context passed through from the reader
- * buffer: buffer to read into
- * len: size of buffer
- * Returns: number of bytes read or -1 in case of error
- * Summary: internal callback for xmlReaderForIO.
- */
-static int read_callback(void *context, char *buffer, int len) {
-	xar_t x = (xar_t)context;
-	int ret, off = 0;
-
-	if ( ((!XAR(x)->offset) || (XAR(x)->offset == XAR(x)->readbuf_len)) && (XAR(x)->toc_count != XAR(x)->header.toc_length_compressed) ) {
-		XAR(x)->offset = 0;
-		if( (XAR(x)->readbuf_len - off) + XAR(x)->toc_count > XAR(x)->header.toc_length_compressed )
-			ret = xar_read_fd(XAR(x)->fd, XAR(x)->readbuf, XAR(x)->header.toc_length_compressed - XAR(x)->toc_count);
-		else
-			ret = read(XAR(x)->fd, XAR(x)->readbuf, XAR(x)->readbuf_len);
-		if ( ret == -1 )
-			return ret;
-
-		if ( XAR(x)->docksum )
-			EVP_DigestUpdate(&XAR(x)->toc_ctx, XAR(x)->readbuf, ret);
-
-		XAR(x)->toc_count += ret;
-		off += ret;
-	}
-
-	if( off && (off < XAR(x)->readbuf_len) )
-		XAR(x)->readbuf_len = off;
-	XAR(x)->zs.next_in = XAR(x)->readbuf + XAR(x)->offset;
-	XAR(x)->zs.avail_in = XAR(x)->readbuf_len - XAR(x)->offset;
-	XAR(x)->zs.next_out = (void *)buffer;
-	XAR(x)->zs.avail_out = len;
-
-	ret = inflate(&XAR(x)->zs, Z_SYNC_FLUSH);
-	if( ret < 0 )
-		return -1;
-
-	XAR(x)->offset = XAR(x)->readbuf_len - XAR(x)->zs.avail_in;
-
-	return len - XAR(x)->zs.avail_out;
-}
-
-/* close_callback
- * context: this will be a xar_t
- * Returns: 0 or -1 in case of error
- * Summary: this is the callback for xmlTextReaderForIO to close the IO
- */
-static int close_callback(void *context) {
-	return 0;
-}
-
-/* xar_serialize
- * x: xar to serialize
- * file: file to serialize to
- * Summary: serializes the archive out to xml.
- */
-void xar_serialize(xar_t x, const char *file) {
-	xmlTextWriterPtr writer;
-	xar_subdoc_t i;
-
-	writer = xmlNewTextWriterFilename(file, 0);
-	xmlTextWriterStartDocument(writer, "1.0", "UTF-8", NULL);
-	xmlTextWriterSetIndent(writer, 4);
-	xmlTextWriterStartElement(writer, BAD_CAST("xar"));
-
-	for( i = XAR(x)->subdocs; i; i = xar_subdoc_next(i) )
-		xar_subdoc_serialize(i, writer, 1);
-
-	xmlTextWriterStartElement(writer, BAD_CAST("toc"));
-
-	if( XAR(x)->props )
-		xar_prop_serialize(XAR(x)->props, writer);
-
-	if( XAR(x)->files )
-		xar_file_serialize(XAR(x)->files, writer);
-
-	xmlTextWriterEndDocument(writer);
-	xmlFreeTextWriter(writer);
-	return;
-}
-
-/* xar_unserialize
- * x: xar archive to unserialize to.  Must have been allocated with xar_open
- * file: the xml filename to unserialize from
- * Summary: Takes the TOC representation from file and creates the
- * corresponding in-memory representation.
- */
-static int32_t xar_unserialize(xar_t x) {
-	xmlTextReaderPtr reader;
-	xar_file_t f = NULL;
-	const xmlChar *name, *prefix, *uri;
-	int type, noattr;
-
-	reader = xmlReaderForIO(read_callback, close_callback, XAR(x), NULL, NULL, 0);
-	if( !reader ) return -1;
-
-	while( xmlTextReaderRead(reader) == 1 ) {
-		type = xmlTextReaderNodeType(reader);
-		noattr = xmlTextReaderAttributeCount(reader);
-		name = xmlTextReaderConstLocalName(reader);
-		if( type == XML_READER_TYPE_ELEMENT ) {
-			if(strcmp((const char*)name, "xar") == 0) {
-				while( xmlTextReaderRead(reader) == 1 ) {
-					type = xmlTextReaderNodeType(reader);
-					noattr = xmlTextReaderAttributeCount(reader);
-					name = xmlTextReaderConstLocalName(reader);
-					if( type == XML_READER_TYPE_ELEMENT ) {
-						if(strcmp((const char*)name, "toc") == 0) {
-							while( xmlTextReaderRead(reader) == 1 ) {
-								type = xmlTextReaderNodeType(reader);
-								noattr = xmlTextReaderAttributeCount(reader);
-								name = xmlTextReaderConstLocalName(reader);
-								if( type == XML_READER_TYPE_ELEMENT ) {
-									if(strcmp((const char*)name, "file") == 0) {
-										f = xar_file_unserialize(x, NULL, reader);
-										XAR_FILE(f)->next = XAR(x)->files;
-										XAR(x)->files = f;
-									} else {
-										xar_prop_unserialize(XAR_FILE(x), NULL, reader);
-									}
-								}
-							}
-						} else {
-							xar_subdoc_t s;
-							int i;
-
-							prefix = xmlTextReaderPrefix(reader);
-							uri = xmlTextReaderNamespaceUri(reader);
-
-							i = xmlTextReaderAttributeCount(reader);
-							if( i > 0 ) {
-								for(i = xmlTextReaderMoveToFirstAttribute(reader); i == 1; i = xmlTextReaderMoveToNextAttribute(reader)) {
-									xar_attr_t a;
-									const char *aname = (const char *)xmlTextReaderConstLocalName(reader);
-									const char *avalue = (const char *)xmlTextReaderConstValue(reader);
-									
-									if( aname && (strcmp("subdoc_name", aname) == 0) ) {
-										name = (const unsigned char *)avalue;
-									} else {
-										a = xar_attr_new();
-										XAR_ATTR(a)->key = strdup(aname);
-										XAR_ATTR(a)->value = strdup(avalue);
-										XAR_ATTR(a)->next = XAR_SUBDOC(s)->attrs;
-										XAR_SUBDOC(s)->attrs = XAR_ATTR(a);
-									}
-								}
-							}
-
-							s = xar_subdoc_new(x, (const char *)name);
-							xar_subdoc_unserialize(s, reader);
-						}
-					}
-					if( (type == XML_READER_TYPE_END_ELEMENT) && (strcmp((const char *)name, "toc")==0) ) {
-						break;
-					}
-
-				}
-			}
-		}
-	}
-		
-	xmlFreeTextReader(reader);
-	return 0;
-}

Copied: branches/release_1_4/base/src/programs/xar/lib/archive.c (from rev 23968, trunk/base/src/programs/xar/lib/archive.c)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/archive.c	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/archive.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,988 @@
+/*
+ * Copyright (c) 2005 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of his contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 03-Apr-2005
+ * DRI: Rob Braun <bbraun at opendarwin.org>
+ */
+#define _FILE_OFFSET_BITS 64
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <libgen.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <arpa/inet.h> /* for ntoh{l,s} */
+#include <inttypes.h>  /* for PRIu64 */
+#include <libxml/xmlwriter.h>
+#include <libxml/xmlreader.h>
+#include <libxml/xmlstring.h>
+#include "config.h"
+#ifndef HAVE_ASPRINTF
+#include "asprintf.h"
+#endif
+#include "xar.h"
+#include "filetree.h"
+#include "archive.h"
+#include "arcmod.h"
+#include "util.h"
+#include "subdoc.h"
+#include "darwinattr.h"
+
+#ifndef O_EXLOCK
+#define O_EXLOCK 0
+#endif
+#ifndef O_SHLOCK
+#define O_SHLOCK 0
+#endif
+
+static int32_t xar_unserialize(xar_t x);
+void xar_serialize(xar_t x, const char *file);
+
+/* xar_new
+ * Returns: newly allocated xar_t structure
+ * Summary: just does basicallocation and initialization of 
+ * xar_t structure.
+ */
+static xar_t xar_new() {
+	xar_t ret;
+	ret = malloc(sizeof(struct __xar_t));
+	if(!ret) return NULL;
+	memset(XAR(ret), 0, sizeof(struct __xar_t));
+	XAR(ret)->readbuf_len = 4096;
+	XAR(ret)->readbuf = malloc(XAR(ret)->readbuf_len);
+	if(!XAR(ret)->readbuf) {
+		free((void *)ret);
+		return NULL;
+	}
+	XAR(ret)->offset = 0;
+
+	XAR(ret)->zs.zalloc = Z_NULL;
+	XAR(ret)->zs.zfree = Z_NULL;
+	XAR(ret)->zs.opaque = Z_NULL;
+	XAR(ret)->ino_hash = xmlHashCreate(0);
+	XAR(ret)->link_hash = xmlHashCreate(0);
+	XAR(ret)->csum_hash = xmlHashCreate(0);
+	XAR(ret)->subdocs = NULL;
+	
+	return ret;
+}
+
+/* xar_parse_header
+ * x: archive to operate on.
+ * Returns: 0 on success, -1 on failure
+ * Summary: internal helper function to read in the xar header.
+ */
+static int32_t xar_parse_header(xar_t x) {
+	ssize_t r;
+	int off = 0;
+	int sz2read = 0;
+
+	/* read just the magic, verify it, read the header length,
+	 * then read in the size of the header according to the
+	 * recorded header length, or the length of the structure
+	 * we expect, whichever is smaller.  Then seek forward
+	 * if the recorded header length is greater than the 
+	 * expected header length.
+	 */
+	r = xar_read_fd(XAR(x)->fd, (char *)&XAR(x)->header.magic+off, sizeof(XAR(x)->header.magic)-off);
+	if ( r == -1 )
+		return r;
+
+	/* Verify the header.  If the header doesn't match, exit without
+	 * attempting to read any more.
+	 */
+	XAR(x)->header.magic = ntohl(XAR(x)->header.magic);
+
+	if( XAR(x)->header.magic != XAR_HEADER_MAGIC ) {
+		return -1;
+	}
+
+	r = xar_read_fd(XAR(x)->fd, (char *)&XAR(x)->header.size+off, sizeof(XAR(x)->header.size)-off);
+	if ( r == -1 )
+		return r;
+
+	XAR(x)->header.size = ntohs(XAR(x)->header.size);
+
+	if( XAR(x)->header.size > sizeof(xar_header_t) )
+		sz2read = sizeof(xar_header_t);
+	else
+		sz2read = XAR(x)->header.size;
+
+	off = sizeof(XAR(x)->header.magic) + sizeof(XAR(x)->header.size);
+	r = xar_read_fd(XAR(x)->fd, ((char *)&XAR(x)->header)+off, sizeof(xar_header_t)-off);
+	if ( r == -1 )
+		return r;
+
+	XAR(x)->header.version = ntohs(XAR(x)->header.version);
+	XAR(x)->header.toc_length_compressed = xar_ntoh64(XAR(x)->header.toc_length_compressed);
+	XAR(x)->header.toc_length_uncompressed = xar_ntoh64(XAR(x)->header.toc_length_uncompressed);
+	XAR(x)->header.cksum_alg = ntohl(XAR(x)->header.cksum_alg);
+
+	off = XAR(x)->header.size - sz2read;
+	if( off > 0 )
+		r = lseek(XAR(x)->fd, (off_t)off, SEEK_CUR);
+
+	if ( (r == -1) && (errno != ESPIPE) )
+		/* Some fatal error here perhaps? */ ;
+
+	return 0;
+}
+
+/* xar_open
+ * file: filename to open
+ * flags: flags on how to open the file.  0 for readonly, !0 for read/write
+ * Returns: allocated and initialized xar structure with an open
+ * file descriptor to the target xar file.  If the xarchive is opened
+ * for writing, the file is created, and a heap file is opened.
+ */
+xar_t xar_open(const char *file, int32_t flags) {
+	xar_t ret;
+
+	ret = xar_new();
+	if( !ret ) return NULL;
+	if( !file )
+		file = "-";
+	XAR(ret)->filename = strdup(file);
+	OpenSSL_add_all_digests();
+	if( flags ) {
+		char *tmp1, *tmp2, *tmp3, *tmp4;
+		tmp1 = tmp2 = strdup(file);
+		tmp3 = dirname(tmp2);
+		XAR(ret)->dirname = strdup(tmp3);
+		/* Create the heap file in the directory which will contain
+		 * the target archive.  /tmp or elsewhere may fill up.
+		 */
+		asprintf(&tmp4, "%s/xar.heap.XXXXXX", tmp3);
+		free(tmp1);
+		if( strcmp(file, "-") == 0 )
+			XAR(ret)->fd = 1;
+		else
+			XAR(ret)->fd = open(file, O_WRONLY | O_CREAT | O_TRUNC | O_EXLOCK, 0644);
+		XAR(ret)->heap_fd = mkstemp(tmp4);
+		if( XAR(ret)->heap_fd < 0 ) {
+			close(XAR(ret)->fd);
+			free(XAR(ret));
+			return NULL;
+		}
+		unlink(tmp4);
+		free(tmp4);
+
+		deflateInit(&XAR(ret)->zs, Z_BEST_COMPRESSION);
+
+		if( XAR(ret)->fd < 0 ) {
+			xar_close(ret);
+			return NULL;
+		}
+
+		/* default to using sha1, if nothing else is
+		 * specified.
+		 */
+		XAR(ret)->heap_offset += 20;
+		XAR(ret)->heap_len += 20;
+		
+		xar_opt_set(ret, XAR_OPT_COMPRESSION, XAR_OPT_VAL_GZIP);
+	} else {
+		unsigned char toccksum[EVP_MAX_MD_SIZE];
+		unsigned char cval[EVP_MAX_MD_SIZE];
+		unsigned int tlen;
+		const EVP_MD *md;
+
+		if( strcmp(file, "-") == 0 )
+			XAR(ret)->fd = 0;
+		else
+			XAR(ret)->fd = open(file, O_RDONLY | O_SHLOCK);
+		XAR(ret)->heap_fd = -1;
+		inflateInit(&XAR(ret)->zs);
+		if( XAR(ret)->fd < 0 ) {
+			xar_close(ret);
+			return NULL;
+		}
+
+		if( xar_parse_header(ret) != 0 ) {
+			xar_close(ret);
+			return NULL;
+		}
+
+		switch(XAR(ret)->header.cksum_alg) {
+		case XAR_CKSUM_NONE:
+			break;
+		case XAR_CKSUM_SHA1:
+			XAR(ret)->docksum = 1;
+			md = EVP_get_digestbyname("sha1");
+			EVP_DigestInit(&XAR(ret)->toc_ctx, md);
+			break;
+		case XAR_CKSUM_MD5:
+			XAR(ret)->docksum = 1;
+			md = EVP_get_digestbyname("md5");
+			EVP_DigestInit(&XAR(ret)->toc_ctx, md);
+			break;
+		default:
+			fprintf(stderr, "Unknown hashing algorithm, skipping\n");
+			break;
+		};
+
+		if( xar_unserialize(ret) != 0 ) {
+			xar_close(ret);
+			return NULL;
+		}
+
+		if( !XAR(ret)->docksum )
+			return ret;
+
+		EVP_DigestFinal(&XAR(ret)->toc_ctx, toccksum, &tlen);
+
+		xar_read_fd(XAR(ret)->fd, cval, tlen);
+		XAR(ret)->heap_offset += tlen;
+		if( memcmp(cval, toccksum, tlen) != 0 ) {
+			fprintf(stderr, "Checksums do not match!\n");
+			xar_close(ret);
+			return NULL;
+		}
+	}
+
+	return ret;
+}
+
+/* xar_close
+ * x: the xar_t to close
+ * Summary: closes all open file descriptors, frees all
+ * file structures and options, deallocates the xar_t its self.
+ * Returns 0 for success, -1 for failure.
+ */
+int xar_close(xar_t x) {
+	xar_attr_t a;
+	xar_file_t f;
+	int ret, retval = 0;
+
+	/* If we're creating an archive */
+	if( XAR(x)->heap_fd != -1 ) {
+		char *tmpser;
+		void *rbuf, *wbuf = NULL;
+		int fd, r, off, wbytes, rbytes;
+		long rsize, wsize;
+		z_stream zs;
+		uint64_t ungztoc, gztoc;
+		unsigned char chkstr[EVP_MAX_MD_SIZE];
+		int tocfd;
+
+		tmpser = (char *)xar_opt_get(x, XAR_OPT_TOCCKSUM);
+		/* If no checksum type is specified, default to sha1 */
+		if( !tmpser ) tmpser = XAR_OPT_VAL_SHA1;
+
+		if( (strcmp(tmpser, XAR_OPT_VAL_NONE) != 0) ) {
+			const EVP_MD *md;
+			xar_prop_set(XAR_FILE(x), "checksum", NULL);
+			if( strcmp(tmpser, XAR_OPT_VAL_SHA1) == 0 ) {
+				md = EVP_get_digestbyname("sha1");
+				EVP_DigestInit(&XAR(x)->toc_ctx, md);
+				XAR(x)->header.cksum_alg = htonl(XAR_CKSUM_SHA1);
+				xar_attr_set(XAR_FILE(x), "checksum", "style", XAR_OPT_VAL_SHA1);
+				xar_prop_set(XAR_FILE(x), "checksum/size", "20");
+			}
+			if( strcmp(tmpser, XAR_OPT_VAL_MD5) == 0 ) {
+				md = EVP_get_digestbyname("md5");
+				EVP_DigestInit(&XAR(x)->toc_ctx, md);
+				XAR(x)->header.cksum_alg = htonl(XAR_CKSUM_MD5);
+				xar_attr_set(XAR_FILE(x), "checksum", "style", XAR_OPT_VAL_MD5);
+				xar_prop_set(XAR_FILE(x), "checksum/size", "16");
+			}
+
+			xar_prop_set(XAR_FILE(x), "checksum/offset", "0");
+			XAR(x)->docksum = 1;
+		} else {
+			XAR(x)->docksum = 0;
+			XAR(x)->header.cksum_alg = XAR_CKSUM_NONE;
+		}
+
+		/* serialize the toc to a tmp file */
+		asprintf(&tmpser, "%s/xar.toc.XXXXXX", XAR(x)->dirname);
+		fd = mkstemp(tmpser);
+		xar_serialize(x, tmpser);
+		unlink(tmpser);
+		free(tmpser);
+		asprintf(&tmpser, "%s/xar.toc.XXXXXX", XAR(x)->dirname);
+		tocfd = mkstemp(tmpser);
+		unlink(tmpser);
+		free(tmpser);
+		
+	
+		/* read the toc from the tmp file, compress it, and write it
+	 	* out to the archive.
+	 	*/
+		rsize = wsize = 4096;
+		const char * opt = xar_opt_get(x, XAR_OPT_RSIZE);
+		if ( opt ) {
+		  rsize = strtol(opt, NULL, 0);
+		  if ( ((rsize == LONG_MAX) || (rsize == LONG_MIN)) && (errno == ERANGE) ) {
+		    rsize = wsize;
+		  }
+		}
+		
+		rbuf = malloc(rsize);
+		if( !rbuf ) {
+			retval = -1;
+			goto CLOSE_BAIL;
+		}
+		zs.zalloc = Z_NULL;
+		zs.zfree = Z_NULL;
+		zs.opaque = Z_NULL;
+		deflateInit(&zs, Z_BEST_COMPRESSION);
+	
+		ungztoc = gztoc = 0;
+	
+		while(1) {
+			r = read(fd, rbuf, rsize);
+			if( (r < 0) && (errno == EINTR) )
+				continue;
+			if( r == 0 )
+				break;
+	
+			ungztoc += r;
+	
+			zs.avail_in = r;
+			zs.next_in = (void *)rbuf;
+			zs.next_out = NULL;
+			zs.avail_out = 0;
+
+			wsize = rsize/2;
+	
+			off = 0;
+			while( zs.avail_in != 0 ) {
+				wsize *= 2;
+				wbuf = realloc(wbuf, wsize);
+
+				zs.next_out = wbuf + off;
+				zs.avail_out = wsize - off;
+
+				ret = deflate(&zs, Z_SYNC_FLUSH);
+				off = wsize - zs.avail_out;
+			}
+	
+			wbytes = off;
+			off = 0;
+			do {
+				r = write(tocfd, wbuf+off, wbytes-off);
+				if( (r < 0) && (errno = EINTR) )
+					continue;
+				if( r < 0 ) {
+					
+				}
+				if( XAR(x)->docksum )
+					EVP_DigestUpdate(&XAR(x)->toc_ctx, wbuf+off, r);
+				off += r;
+				gztoc += r;
+			} while( off < wbytes );
+
+		}
+
+		zs.next_in = NULL;
+		zs.avail_in = 0;
+		zs.next_out = wbuf;
+		zs.avail_out = wsize;
+
+		deflate(&zs, Z_FINISH);
+		r = write(tocfd, wbuf, wsize - zs.avail_out);
+		gztoc += r;
+		if( XAR(x)->docksum )
+			EVP_DigestUpdate(&XAR(x)->toc_ctx, wbuf, r);
+		
+		deflateEnd(&zs);
+
+		/* populate the header and write it out */
+		XAR(x)->header.magic = htonl(XAR_HEADER_MAGIC);
+		XAR(x)->header.size = ntohs(sizeof(xar_header_t));
+		XAR(x)->header.version = ntohs(1);
+		XAR(x)->header.toc_length_uncompressed = xar_ntoh64(ungztoc);
+		XAR(x)->header.toc_length_compressed = xar_ntoh64(gztoc);
+
+		write(XAR(x)->fd, &XAR(x)->header, sizeof(xar_header_t));
+
+		/* Copy the temp compressed toc file into the file */
+		lseek(tocfd, (off_t)0, SEEK_SET);
+		while(1) {
+			r = read(tocfd, rbuf, rsize);
+			if( (r < 0) && (errno == EINTR) )
+				continue;
+			if( r == 0 )
+				break;
+
+			wbytes = r;
+			off = 0;
+			do {
+				r = write(XAR(x)->fd, rbuf+off, wbytes-off);
+				if( (r < 0) && (errno = EINTR) )
+					continue;
+				/* XXX: handle r <= 0 cases */
+				off += r;
+			} while( off < wbytes );
+		}
+
+		if( XAR(x)->docksum ) {
+			unsigned int l = r;
+			memset(chkstr, 0, sizeof(chkstr));
+			EVP_DigestFinal(&XAR(x)->toc_ctx, chkstr, &l);
+			r = l;
+			write(XAR(x)->fd, chkstr, r);
+		}
+
+		/* copy the heap from the temporary heap into the archive */
+		if( lseek(XAR(x)->heap_fd, (off_t)0, SEEK_SET) < 0 ) {
+			fprintf(stderr, "Error lseeking to offset 0: %s\n", strerror(errno));
+			exit(1);
+		}
+		rbytes = 0;
+		while(1) {
+			if( (XAR(x)->heap_len - rbytes) < rsize )
+				rsize = XAR(x)->heap_len - rbytes;
+
+			r = read(XAR(x)->heap_fd, rbuf, rsize);
+			if( (r < 0 ) && (errno == EINTR) )
+				continue;
+			if( r == 0 )
+				break;
+	
+			rbytes += r;
+			wbytes = r;
+			off = 0;
+			do {
+				r = write(XAR(x)->fd, rbuf+off, wbytes);
+				if( (r < 0 ) && (errno == EINTR) )
+					continue;
+				if( r < 0 ) {
+					retval = -1;
+					goto CLOSEEND;
+				}
+				off += r;
+			} while( off < wbytes );
+
+			if( rbytes >= XAR(x)->heap_len )
+				break;
+		}
+CLOSEEND:
+		free(rbuf);
+		free(wbuf);
+		deflateEnd(&XAR(x)->zs);
+	} else {
+		inflateEnd(&XAR(x)->zs);
+	}
+		
+CLOSE_BAIL:
+	/* continue deallocating the archive and return */
+	while(XAR(x)->subdocs) {
+		xar_subdoc_remove(XAR(x)->subdocs);
+	}
+
+	while(XAR(x)->attrs) {
+		a = XAR(x)->attrs;
+		XAR(x)->attrs = XAR_ATTR(a)->next;
+		xar_attr_free(a);
+	}
+
+	while(XAR(x)->files) {
+		f = XAR(x)->files;
+		XAR(x)->files = XAR_FILE(f)->next;
+		xar_file_free(f);
+	}
+
+	xmlHashFree(XAR(x)->ino_hash, NULL);
+	xmlHashFree(XAR(x)->link_hash, NULL);
+	xmlHashFree(XAR(x)->csum_hash, NULL);
+	close(XAR(x)->fd);
+	close(XAR(x)->heap_fd);
+	free((char *)XAR(x)->filename);
+	free((char *)XAR(x)->dirname);
+	free(XAR(x)->readbuf);
+	free((void *)x);
+
+	return retval;
+}
+
+/* xar_opt_get
+ * x: archive to get the option from
+ * option: name of the option
+ * Returns: a pointer to the value of the option
+ */
+const char *xar_opt_get(xar_t x, const char *option) {
+	xar_attr_t i;
+	for(i = XAR(x)->attrs; i && XAR_ATTR(i)->next; i = XAR_ATTR(i)->next) {
+		if(strcmp(XAR_ATTR(i)->key, option)==0)
+			return XAR_ATTR(i)->value;
+	}
+	if( i && (strcmp(XAR_ATTR(i)->key, option)==0) )
+		return XAR_ATTR(i)->value;
+	return NULL;
+}
+
+/* xar_opt_set
+ * x: the archive to set the option of
+ * option: the name of the option to set the value of
+ * value: the value to set the option to
+ * Returns: 0 for sucess, -1 for failure
+ */
+int32_t xar_opt_set(xar_t x, const char *option, const char *value) {
+	xar_attr_t i, a;
+
+	if( (strcmp(option, XAR_OPT_TOCCKSUM) == 0) ) {
+		if( strcmp(value, XAR_OPT_VAL_NONE) == 0 ) {
+			XAR(x)->heap_offset = 0;
+		}
+		if( strcmp(value, XAR_OPT_VAL_SHA1) == 0 ) {
+			XAR(x)->heap_offset = 20;
+		}
+		if( strcmp(value, XAR_OPT_VAL_MD5) == 0 ) {
+			XAR(x)->heap_offset = 16;
+		}
+	}
+	for(i = XAR(x)->attrs; i ; i = XAR_ATTR(i)->next) {
+		if(strcmp(XAR_ATTR(i)->key, option)==0) {
+			free((char*)XAR_ATTR(i)->value);
+			XAR_ATTR(i)->value = strdup(value);
+			return 0;
+		}
+	}
+	a = xar_attr_new();
+	XAR_ATTR(a)->key = strdup(option);
+	XAR_ATTR(a)->value = strdup(value);
+	XAR_ATTR(a)->next = XAR(x)->attrs;
+	XAR(x)->attrs = a;
+	return 0;
+}
+
+/* xar_add_node
+ * x: archive the file should belong to
+ * f: parent node, possibly NULL
+ * name: name of the node to add
+ * Returns: newly allocated and populated node
+ * Summary: helper function which adds a child of f and populates
+ * its properties.  If f is NULL, the node will be added as a top
+ * level node of the archive, x.
+ */
+static xar_file_t xar_add_node(xar_t x, xar_file_t f, const char *name, const char *prefix, int srcpath) {
+	xar_file_t ret;
+	const char *path; 
+	char *tmp;
+	char idstr[32];
+
+	if( !f ) {
+		asprintf(&tmp, "%s%s%s", XAR(x)->path_prefix, prefix, name);
+		if( lstat(tmp, &XAR(x)->sbcache) != 0 ) {
+			free(tmp);
+			return NULL;
+		}
+
+		ret = xar_file_new(NULL);
+		if( !ret )
+			return NULL;
+		memset(idstr, 0, sizeof(idstr));
+		snprintf(idstr, sizeof(idstr)-1, "%"PRIu64, ++XAR(x)->last_fileid);
+		xar_attr_set(ret, NULL, "id", idstr);
+		XAR_FILE(ret)->parent = NULL;
+		XAR_FILE(ret)->fspath = tmp;
+		if( XAR(x)->files == NULL )
+			XAR(x)->files = ret;
+		else {
+			XAR_FILE(ret)->next = XAR(x)->files;
+			XAR(x)->files = ret;
+		}
+	} else {
+		path = XAR_FILE(f)->fspath;
+		if( strcmp(prefix, "../") == 0 ) {
+			int len1, len2;
+			len1 = strlen(path);
+			len2 = strlen(name);
+			if( (len1>=len2) && (strcmp(path+(len1-len2), name) == 0) ) {
+				return f;
+			}
+			
+		}
+		asprintf(&tmp, "%s/%s%s", path, prefix, name);
+		if( lstat(tmp, &XAR(x)->sbcache) != 0 ) {
+			free(tmp);
+			return NULL;
+		}
+
+		ret = xar_file_new(f);
+		if( !ret )
+			return NULL;
+		memset(idstr, 0, sizeof(idstr));
+		snprintf(idstr, sizeof(idstr)-1, "%"PRIu64, ++XAR(x)->last_fileid);
+		xar_attr_set(ret, NULL, "id", idstr);
+		XAR_FILE(ret)->fspath = tmp;
+	}
+
+	xar_prop_set(ret, "name", name);
+
+	if( xar_arcmod_archive(x, ret, XAR_FILE(ret)->fspath) < 0 ) {
+		xar_file_t i;
+		if( f ) {
+			for( i = XAR_FILE(f)->children; i && (XAR_FILE(i)->next != ret); i = XAR_FILE(i)->next );
+		} else {
+			for( i = XAR(x)->files; i && (XAR_FILE(i)->next != ret); i = XAR_FILE(i)->next );
+		}
+		if( i )
+			XAR_FILE(i)->next = XAR_FILE(ret)->next;
+		xar_file_free(ret);
+		return NULL;
+	}
+
+	return ret;
+}
+
+/* xar_add_r
+ * Summary: a recursive helper function for adding a node to the
+ * tree.  This will search all children of node f, looking for
+ * the path component.  If found, will recurse into it.  If not,
+ * will add the path component to the tree, and recurse into it.
+ * If f is NULL, will start with x->files.
+ */
+static xar_file_t xar_add_r(xar_t x, xar_file_t f, const char *path, const char *prefix) {
+	xar_file_t i = NULL, ret, ret2, start = NULL;
+	char *tmp1, *tmp2, *tmp3;
+
+	if( path && (path[0] == '\0') ) {
+		return f;
+	}
+
+	tmp1 = tmp2 = strdup(path);
+	tmp3 = strsep(&tmp2, "/");
+
+	if( tmp3 && tmp2 && (tmp3[0] == '\0') ) {
+		ret2 = xar_add_r(x, f, tmp2, "");
+		free(tmp1);
+		return ret2;
+	}
+
+	if( strcmp(tmp3, "..") == 0 ) {
+		char *prefixstr;
+		if( !XAR(x)->skipwarn ) {
+			xar_err_new(x);
+			xar_err_set_string(x, "Skipping .. in path");
+			xar_err_callback(x, XAR_SEVERITY_WARNING, XAR_ERR_ARCHIVE_CREATION);
+			XAR(x)->skipwarn = 1;
+		}
+		asprintf(&prefixstr, "%s../", prefix);
+		ret2 = xar_add_r(x, f, tmp2, prefixstr);
+		free(prefixstr);
+		free(tmp1);
+		return ret2;
+	}
+
+	if( strcmp(tmp3, ".") == 0 ) {
+		if( tmp2 )
+			ret2 = xar_add_r(x, f, tmp2, prefix);
+		else
+			ret2 = NULL;
+		free(tmp1);
+		return ret2;
+	}
+
+	if( !f ) {
+		start = XAR(x)->files;
+	} else {
+		start = XAR_FILE(f)->children;
+	}
+
+	/* Search all the siblings */
+	for( i = start; i; i = XAR_FILE(i)->next ) {
+		const char *n;
+		xar_prop_get(i, "name", &n);
+		if( strcmp(n, tmp3) == 0 ) {
+			if( !tmp2 ) {
+				/* Node already exists, and it is i */
+				free(tmp1);
+				return i;
+			}
+			ret2 = xar_add_r(x, i, tmp2, "");
+			free(tmp1);
+			return ret2;
+		}
+	}
+
+	/* tmp3 was not found in children of start, so we add it */
+	if( tmp2 ) {
+		ret = xar_add_node(x, f, tmp3, prefix, 1);
+	} else {
+		ret = xar_add_node(x, f, tmp3, prefix, 0);
+	}
+
+	if( !ret ) {
+		free(tmp1);
+		return NULL;
+	}
+
+	if( !tmp2 ) {
+		/* We've added the final piece, done, don't recurse */
+		free(tmp1);
+		return ret;
+	}
+
+	/* still more to add, recurse */
+	ret2 = xar_add_r(x, ret, tmp2, "");
+	free(tmp1);
+	return ret2;
+}
+
+/* xar_add
+ * x: archive to add the file to
+ * path: path to file
+ * Returns: allocated an populated xar_file_t representing the 
+ * specified file.
+ * Summary: if a full path "foo/bar/blah" is specified, then any
+ * directories not already existing in the archive will be added
+ * automagically.  The returned xar_file_t represents the file
+ * specified, not the parent of the directory tree.
+ * For instance, if "foo/bar/blah" is specified, the xar_file_t
+ * representing "blah" will be returned.
+ */
+xar_file_t xar_add(xar_t x, const char *path) {
+
+	if( xar_underbar_check(x, NULL, path) )
+		return NULL;
+
+	if( path[0] == '/' ) {
+		XAR(x)->path_prefix = "/";
+		path++;
+	} else
+		XAR(x)->path_prefix = "";
+	return xar_add_r(x, NULL, path, "");
+}
+
+/* xar_extract_tofile
+ * x: archive to extract from
+ * f: file associated with x
+ * Returns 0 on success, -1 on failure
+ * Summary: This actually does the file extraction.
+ * No traversal is performed, it is assumed all directory paths
+ * leading up to f already exist.
+ */
+int32_t xar_extract_tofile(xar_t x, xar_file_t f, const char *path) {
+	return xar_arcmod_extract(x, f, path);
+}
+
+/* xar_extract
+ * x: archive to extract from
+ * path: path to file to extract
+ * Returns 0 on success, -1 on failure.
+ * Summary: This is the entry point for extraction.  This will find
+ * the file node described by path, extract any directories needed
+ * to extract the node, and finally extract the file.
+ * Example: xar_extract(x, "foo/bar/blah")
+ * If foo does not exist, xar_extract will extract foo from the
+ * archive, extract bar from the archive, and then extract blah.
+ * Total extractions will be "foo", "foo/bar", and "foo/bar/blah".
+ */
+int32_t xar_extract(xar_t x, xar_file_t f) {
+	struct stat sb;
+	char *tmp1, *dname;
+	xar_file_t tmpf;
+	
+	if( (strstr(XAR_FILE(f)->fspath, "/") != NULL) && (stat(XAR_FILE(f)->fspath, &sb)) ) {
+		tmp1 = strdup(XAR_FILE(f)->fspath);
+		dname = dirname(tmp1);
+		tmpf = xar_file_find(XAR(x)->files, dname);
+		if( !tmpf ) {
+			xar_err_set_string(x, "Unable to find file");
+			xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
+			return -1;
+		}
+		free(tmp1);
+		xar_extract(x, tmpf);
+	}
+	
+	return xar_extract_tofile(x, f, XAR_FILE(f)->fspath);
+}
+
+/* read_callback
+ * context: context passed through from the reader
+ * buffer: buffer to read into
+ * len: size of buffer
+ * Returns: number of bytes read or -1 in case of error
+ * Summary: internal callback for xmlReaderForIO.
+ */
+static int read_callback(void *context, char *buffer, int len) {
+	xar_t x = (xar_t)context;
+	int ret, off = 0;
+
+	if ( ((!XAR(x)->offset) || (XAR(x)->offset == XAR(x)->readbuf_len)) && (XAR(x)->toc_count != XAR(x)->header.toc_length_compressed) ) {
+		XAR(x)->offset = 0;
+		if( (XAR(x)->readbuf_len - off) + XAR(x)->toc_count > XAR(x)->header.toc_length_compressed )
+			ret = xar_read_fd(XAR(x)->fd, XAR(x)->readbuf, XAR(x)->header.toc_length_compressed - XAR(x)->toc_count);
+		else
+			ret = read(XAR(x)->fd, XAR(x)->readbuf, XAR(x)->readbuf_len);
+		if ( ret == -1 )
+			return ret;
+
+		if ( XAR(x)->docksum )
+			EVP_DigestUpdate(&XAR(x)->toc_ctx, XAR(x)->readbuf, ret);
+
+		XAR(x)->toc_count += ret;
+		off += ret;
+	}
+
+	if( off && (off < XAR(x)->readbuf_len) )
+		XAR(x)->readbuf_len = off;
+	XAR(x)->zs.next_in = XAR(x)->readbuf + XAR(x)->offset;
+	XAR(x)->zs.avail_in = XAR(x)->readbuf_len - XAR(x)->offset;
+	XAR(x)->zs.next_out = (void *)buffer;
+	XAR(x)->zs.avail_out = len;
+
+	ret = inflate(&XAR(x)->zs, Z_SYNC_FLUSH);
+	if( ret < 0 )
+		return -1;
+
+	XAR(x)->offset = XAR(x)->readbuf_len - XAR(x)->zs.avail_in;
+
+	return len - XAR(x)->zs.avail_out;
+}
+
+/* close_callback
+ * context: this will be a xar_t
+ * Returns: 0 or -1 in case of error
+ * Summary: this is the callback for xmlTextReaderForIO to close the IO
+ */
+static int close_callback(void *context) {
+	return 0;
+}
+
+/* xar_serialize
+ * x: xar to serialize
+ * file: file to serialize to
+ * Summary: serializes the archive out to xml.
+ */
+void xar_serialize(xar_t x, const char *file) {
+	xmlTextWriterPtr writer;
+	xar_subdoc_t i;
+
+	writer = xmlNewTextWriterFilename(file, 0);
+	xmlTextWriterStartDocument(writer, "1.0", "UTF-8", NULL);
+	xmlTextWriterSetIndent(writer, 4);
+	xmlTextWriterStartElement(writer, BAD_CAST("xar"));
+
+	for( i = XAR(x)->subdocs; i; i = xar_subdoc_next(i) )
+		xar_subdoc_serialize(i, writer, 1);
+
+	xmlTextWriterStartElement(writer, BAD_CAST("toc"));
+
+	if( XAR(x)->props )
+		xar_prop_serialize(XAR(x)->props, writer);
+
+	if( XAR(x)->files )
+		xar_file_serialize(XAR(x)->files, writer);
+
+	xmlTextWriterEndDocument(writer);
+	xmlFreeTextWriter(writer);
+	return;
+}
+
+/* xar_unserialize
+ * x: xar archive to unserialize to.  Must have been allocated with xar_open
+ * file: the xml filename to unserialize from
+ * Summary: Takes the TOC representation from file and creates the
+ * corresponding in-memory representation.
+ */
+static int32_t xar_unserialize(xar_t x) {
+	xmlTextReaderPtr reader;
+	xar_file_t f = NULL;
+	const xmlChar *name, *prefix, *uri;
+	int type, noattr;
+
+	reader = xmlReaderForIO(read_callback, close_callback, XAR(x), NULL, NULL, 0);
+	if( !reader ) return -1;
+
+	while( xmlTextReaderRead(reader) == 1 ) {
+		type = xmlTextReaderNodeType(reader);
+		noattr = xmlTextReaderAttributeCount(reader);
+		name = xmlTextReaderConstLocalName(reader);
+		if( type == XML_READER_TYPE_ELEMENT ) {
+			if(strcmp((const char*)name, "xar") == 0) {
+				while( xmlTextReaderRead(reader) == 1 ) {
+					type = xmlTextReaderNodeType(reader);
+					noattr = xmlTextReaderAttributeCount(reader);
+					name = xmlTextReaderConstLocalName(reader);
+					if( type == XML_READER_TYPE_ELEMENT ) {
+						if(strcmp((const char*)name, "toc") == 0) {
+							while( xmlTextReaderRead(reader) == 1 ) {
+								type = xmlTextReaderNodeType(reader);
+								noattr = xmlTextReaderAttributeCount(reader);
+								name = xmlTextReaderConstLocalName(reader);
+								if( type == XML_READER_TYPE_ELEMENT ) {
+									if(strcmp((const char*)name, "file") == 0) {
+										f = xar_file_unserialize(x, NULL, reader);
+										XAR_FILE(f)->next = XAR(x)->files;
+										XAR(x)->files = f;
+									} else {
+										xar_prop_unserialize(XAR_FILE(x), NULL, reader);
+									}
+								}
+							}
+						} else {
+							xar_subdoc_t s;
+							int i;
+
+							prefix = xmlTextReaderPrefix(reader);
+							uri = xmlTextReaderNamespaceUri(reader);
+
+							i = xmlTextReaderAttributeCount(reader);
+							if( i > 0 ) {
+								for(i = xmlTextReaderMoveToFirstAttribute(reader); i == 1; i = xmlTextReaderMoveToNextAttribute(reader)) {
+									xar_attr_t a;
+									const char *aname = (const char *)xmlTextReaderConstLocalName(reader);
+									const char *avalue = (const char *)xmlTextReaderConstValue(reader);
+									
+									if( aname && (strcmp("subdoc_name", aname) == 0) ) {
+										name = (const unsigned char *)avalue;
+									} else {
+										a = xar_attr_new();
+										XAR_ATTR(a)->key = strdup(aname);
+										XAR_ATTR(a)->value = strdup(avalue);
+										XAR_ATTR(a)->next = XAR_SUBDOC(s)->attrs;
+										XAR_SUBDOC(s)->attrs = XAR_ATTR(a);
+									}
+								}
+							}
+
+							s = xar_subdoc_new(x, (const char *)name);
+							xar_subdoc_unserialize(s, reader);
+						}
+					}
+					if( (type == XML_READER_TYPE_END_ELEMENT) && (strcmp((const char *)name, "toc")==0) ) {
+						break;
+					}
+
+				}
+			}
+		}
+	}
+		
+	xmlFreeTextReader(reader);
+	return 0;
+}

Deleted: branches/release_1_4/base/src/programs/xar/lib/archive.h
===================================================================
--- trunk/base/src/programs/xar/lib/archive.h	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/archive.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2005 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of his contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 03-Apr-2005
- * DRI: Rob Braun <bbraun at opendarwin.org>
- */
-
-#ifndef _XAR_ARCHIVE_H_
-#define _XAR_ARCHIVE_H_
-#include <zlib.h>
-#include <libxml/hash.h>
-#include <openssl/evp.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "xar.h"
-#include "filetree.h"
-
-struct errctx {
-	const char *str;
-	int         saved_errno;
-	xar_file_t  file;
-	void       *usrctx;
-};
-
-struct __xar_t {
-	xar_prop_t props;
-	xar_attr_t attrs;      /* archive options, such as rsize */
-	const char *prefix;
-	const char *ns;
-	const char *filler1;
-	const char *filler2;
-	xar_file_t files;      /* file forest */
-	const char *filename;  /* name of the archive we are operating on */
-	char *dirname;         /* directory of the archive, used in creation */
-	int fd;                /* open file descriptor for the archive */
-	int heap_fd;           /* fd for tmp heap archive, used in creation */
-	off_t heap_offset;     /* current offset within the heap */
-	off_t heap_len;        /* current length of the heap */
-	xar_header_t header;   /* header of the xar archive */
-	void *readbuf;         /* buffer for reading/writing compressed toc */
-	size_t readbuf_len;    /* length of readbuf */
-	size_t offset;         /* offset into readbuf for keeping track
-	                        * between callbacks. */
-	size_t toc_count;      /* current bytes read of the toc */
-	z_stream zs;           /* gz state for compressing/decompressing toc */
-	char *path_prefix;     /* used for distinguishing absolute paths */
-	err_handler ercallback; /* callback for errors/warnings */
-	struct errctx errctx;   /* error callback context */
-	xar_subdoc_t subdocs;   /* linked list of subdocs */
-	uint64_t last_fileid;   /* unique fileid's in the archive */
-	xmlHashTablePtr ino_hash;/* Hash for looking up hardlinked files (add)*/
-	xmlHashTablePtr link_hash;/* Hash for looking up hardlinked files (extract)*/
-	xmlHashTablePtr csum_hash;/* Hash for looking up checksums of files */
-	EVP_MD_CTX toc_ctx;
-	int docksum;
-	int skipwarn;
-	struct stat sbcache;
-};
-
-#define XAR(x) ((struct __xar_t *)(x))
-
-#endif /* _XAR_ARCHIVE_H_ */

Copied: branches/release_1_4/base/src/programs/xar/lib/archive.h (from rev 23968, trunk/base/src/programs/xar/lib/archive.h)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/archive.h	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/archive.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2005 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of his contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 03-Apr-2005
+ * DRI: Rob Braun <bbraun at opendarwin.org>
+ */
+
+#ifndef _XAR_ARCHIVE_H_
+#define _XAR_ARCHIVE_H_
+#include <zlib.h>
+#include <libxml/hash.h>
+#include <openssl/evp.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include "xar.h"
+#include "filetree.h"
+
+struct errctx {
+	const char *str;
+	int         saved_errno;
+	xar_file_t  file;
+	void       *usrctx;
+};
+
+struct __xar_t {
+	xar_prop_t props;
+	xar_attr_t attrs;      /* archive options, such as rsize */
+	const char *prefix;
+	const char *ns;
+	const char *filler1;
+	const char *filler2;
+	xar_file_t files;      /* file forest */
+	const char *filename;  /* name of the archive we are operating on */
+	char *dirname;         /* directory of the archive, used in creation */
+	int fd;                /* open file descriptor for the archive */
+	int heap_fd;           /* fd for tmp heap archive, used in creation */
+	off_t heap_offset;     /* current offset within the heap */
+	off_t heap_len;        /* current length of the heap */
+	xar_header_t header;   /* header of the xar archive */
+	void *readbuf;         /* buffer for reading/writing compressed toc */
+	size_t readbuf_len;    /* length of readbuf */
+	size_t offset;         /* offset into readbuf for keeping track
+	                        * between callbacks. */
+	size_t toc_count;      /* current bytes read of the toc */
+	z_stream zs;           /* gz state for compressing/decompressing toc */
+	char *path_prefix;     /* used for distinguishing absolute paths */
+	err_handler ercallback; /* callback for errors/warnings */
+	struct errctx errctx;   /* error callback context */
+	xar_subdoc_t subdocs;   /* linked list of subdocs */
+	uint64_t last_fileid;   /* unique fileid's in the archive */
+	xmlHashTablePtr ino_hash;/* Hash for looking up hardlinked files (add)*/
+	xmlHashTablePtr link_hash;/* Hash for looking up hardlinked files (extract)*/
+	xmlHashTablePtr csum_hash;/* Hash for looking up checksums of files */
+	EVP_MD_CTX toc_ctx;
+	int docksum;
+	int skipwarn;
+	struct stat sbcache;
+};
+
+#define XAR(x) ((struct __xar_t *)(x))
+
+#endif /* _XAR_ARCHIVE_H_ */

Deleted: branches/release_1_4/base/src/programs/xar/lib/arcmod.c
===================================================================
--- trunk/base/src/programs/xar/lib/arcmod.c	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/arcmod.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 2005 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of his contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 03-Apr-2005
- * DRI: Rob Braun <bbraun at opendarwin.org>
- */
-
-#include "arcmod.h"
-#include "stat.h"
-#include "data.h"
-#include "linuxattr.h"
-#include "fbsdattr.h"
-#include "darwinattr.h"
-#include "ext2.h"
-
-struct arcmod xar_arcmods[] = {
-	{ xar_stat_archive, xar_stat_extract },      /* must be first */
-	{ xar_linuxattr_archive, xar_linuxattr_extract },
-	{ xar_fbsdattr_archive, xar_fbsdattr_extract },
-	{ xar_darwinattr_archive, xar_darwinattr_extract },
-	{ xar_ext2attr_archive, xar_ext2attr_extract },
-	{ xar_data_archive, xar_data_extract },
-	/* Add new modules here */
-	{ NULL, xar_set_perm }
-};
-
-/* xar_arcmod_archive
- * x: archive to add the file to
- * f: node representing the file
- * file: the filesystem path to the file
- * Returns: 0 on success
- * Summary: This is the entry point to actual file archival.
- */
-int32_t xar_arcmod_archive(xar_t x, xar_file_t f, const char *file) {
-	int i;
-	int32_t ret;
-	for(i = 0; i < (sizeof(xar_arcmods)/sizeof(struct arcmod)); i++) {
-		if( xar_arcmods[i].archive ) {
-			ret = xar_arcmods[i].archive(x, f, file);
-			if( ret < 0 ) {
-				return ret;
-			}
-			if( ret > 0 ) {
-				return 0;
-			}
-		}
-	}
-	return 0;
-}
-
-/* xar_arcmod_extract
- * x: archive to extract the file from
- * f: node representing the file
- * file: the filesystem path to the target file
- * Returns: 0 on success
- * Summary: This is the entry point to actual file archival.
- */
-int32_t xar_arcmod_extract(xar_t x, xar_file_t f, const char *file) {
-	int i;
-	int32_t ret;
-	for(i = 0; i < (sizeof(xar_arcmods)/sizeof(struct arcmod)); i++) {
-		if( xar_arcmods[i].extract ) {
-			ret = xar_arcmods[i].extract(x, f, file);
-			if( ret < 0 ) {
-				return ret;
-			}
-			if( ret > 0 ) {
-				return 0;
-			}
-		}
-	}
-	return 0;
-}

Copied: branches/release_1_4/base/src/programs/xar/lib/arcmod.c (from rev 23968, trunk/base/src/programs/xar/lib/arcmod.c)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/arcmod.c	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/arcmod.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2005 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of his contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 03-Apr-2005
+ * DRI: Rob Braun <bbraun at opendarwin.org>
+ */
+
+#include "arcmod.h"
+#include "stat.h"
+#include "data.h"
+#include "linuxattr.h"
+#include "fbsdattr.h"
+#include "darwinattr.h"
+#include "ext2.h"
+
+struct arcmod xar_arcmods[] = {
+	{ xar_stat_archive, xar_stat_extract },      /* must be first */
+	{ xar_linuxattr_archive, xar_linuxattr_extract },
+	{ xar_fbsdattr_archive, xar_fbsdattr_extract },
+	{ xar_darwinattr_archive, xar_darwinattr_extract },
+	{ xar_ext2attr_archive, xar_ext2attr_extract },
+	{ xar_data_archive, xar_data_extract },
+	/* Add new modules here */
+	{ NULL, xar_set_perm }
+};
+
+/* xar_arcmod_archive
+ * x: archive to add the file to
+ * f: node representing the file
+ * file: the filesystem path to the file
+ * Returns: 0 on success
+ * Summary: This is the entry point to actual file archival.
+ */
+int32_t xar_arcmod_archive(xar_t x, xar_file_t f, const char *file) {
+	int i;
+	int32_t ret;
+	for(i = 0; i < (sizeof(xar_arcmods)/sizeof(struct arcmod)); i++) {
+		if( xar_arcmods[i].archive ) {
+			ret = xar_arcmods[i].archive(x, f, file);
+			if( ret < 0 ) {
+				return ret;
+			}
+			if( ret > 0 ) {
+				return 0;
+			}
+		}
+	}
+	return 0;
+}
+
+/* xar_arcmod_extract
+ * x: archive to extract the file from
+ * f: node representing the file
+ * file: the filesystem path to the target file
+ * Returns: 0 on success
+ * Summary: This is the entry point to actual file archival.
+ */
+int32_t xar_arcmod_extract(xar_t x, xar_file_t f, const char *file) {
+	int i;
+	int32_t ret;
+	for(i = 0; i < (sizeof(xar_arcmods)/sizeof(struct arcmod)); i++) {
+		if( xar_arcmods[i].extract ) {
+			ret = xar_arcmods[i].extract(x, f, file);
+			if( ret < 0 ) {
+				return ret;
+			}
+			if( ret > 0 ) {
+				return 0;
+			}
+		}
+	}
+	return 0;
+}

Deleted: branches/release_1_4/base/src/programs/xar/lib/arcmod.h
===================================================================
--- trunk/base/src/programs/xar/lib/arcmod.h	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/arcmod.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2005 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of his contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 03-Apr-2005
- * DRI: Rob Braun <bbraun at opendarwin.org>
- */
-
-#ifndef _XAR_ARCMOD_H_
-#define _XAR_ARCMOD_H_
-#include "xar.h"
-#include "filetree.h"
-
-
-typedef int32_t (*arcmod_archive)(xar_t x, xar_file_t f, const char* file);
-typedef int32_t (*arcmod_extract)(xar_t x, xar_file_t f, const char* file);
-
-struct arcmod {
-	arcmod_archive archive;
-	arcmod_extract extract;
-};
-
-int32_t xar_arcmod_archive(xar_t x, xar_file_t f, const char *file);
-int32_t xar_arcmod_extract(xar_t x, xar_file_t f, const char *file);
-
-#endif /* _XAR_ARCMOD_H_ */

Copied: branches/release_1_4/base/src/programs/xar/lib/arcmod.h (from rev 23968, trunk/base/src/programs/xar/lib/arcmod.h)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/arcmod.h	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/arcmod.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2005 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of his contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 03-Apr-2005
+ * DRI: Rob Braun <bbraun at opendarwin.org>
+ */
+
+#ifndef _XAR_ARCMOD_H_
+#define _XAR_ARCMOD_H_
+#include "xar.h"
+#include "filetree.h"
+
+
+typedef int32_t (*arcmod_archive)(xar_t x, xar_file_t f, const char* file);
+typedef int32_t (*arcmod_extract)(xar_t x, xar_file_t f, const char* file);
+
+struct arcmod {
+	arcmod_archive archive;
+	arcmod_extract extract;
+};
+
+int32_t xar_arcmod_archive(xar_t x, xar_file_t f, const char *file);
+int32_t xar_arcmod_extract(xar_t x, xar_file_t f, const char *file);
+
+#endif /* _XAR_ARCMOD_H_ */

Deleted: branches/release_1_4/base/src/programs/xar/lib/asprintf.h
===================================================================
--- trunk/base/src/programs/xar/lib/asprintf.h	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/asprintf.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,91 +0,0 @@
-//==============================================================================
-//
-// Copyright (C) 2005 Jason Evans <jasone at canonware.com>.  All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// 1. Redistributions of source code must retain the above copyright notice(s),
-//    this list of conditions and the following disclaimer unmodified other than
-//    the allowable addition of one or more copyright notices.
-//
-// 2. Redistributions in binary form must reproduce the above copyright
-//    notice(s), this list of conditions and the following disclaimer in the
-//    documentation and/or other materials provided with the distribution.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) `AS IS' AND ANY EXPRESS
-// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
-// NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
-// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-//==============================================================================
-//
-// Emulate vasprintf() and asprintf().
-//
-//==============================================================================
-
-#include <stdio.h>
-#include <stdarg.h>
-
-int
-vasprintf(char **rResult, const char *aFormat, va_list aAp)
-{
-    int rVal;
-    char *result;
-    va_list ap;
-#define XarAsprintfStartLen 16
-
-    result = (char *) malloc(XarAsprintfStartLen);
-    if (result == NULL)
-    {
-	rVal = -1;
-	goto RETURN;
-    }
-
-    va_copy(ap, aAp);
-    rVal = vsnprintf(result, XarAsprintfStartLen, aFormat, ap);
-    va_end(ap);
-
-    if (rVal == -1)
-    {
-	goto RETURN;
-    }
-    else if (rVal >= XarAsprintfStartLen)
-    {
-	free(result);
-	result = (char *) malloc(rVal + 1);
-	if (result == NULL)
-	{
-	    rVal = -1;
-	    goto RETURN;
-	}
-
-	va_copy(ap, aAp);
-	rVal = vsnprintf(result, rVal + 1, aFormat, aAp);
-	va_end(ap);
-    }
-
-    *rResult = result;
-    RETURN:
-#undef XarAsprintfStartLen
-    return rVal;
-}
-
-static int
-asprintf(char **rResult, const char *aFormat, ...)
-{
-    int rVal;
-    va_list ap;
-
-    va_start(ap, aFormat);
-    rVal = vasprintf(rResult, aFormat, ap);
-    va_end(ap);
-
-    return rVal;
-}

Copied: branches/release_1_4/base/src/programs/xar/lib/asprintf.h (from rev 23968, trunk/base/src/programs/xar/lib/asprintf.h)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/asprintf.h	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/asprintf.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,91 @@
+//==============================================================================
+//
+// Copyright (C) 2005 Jason Evans <jasone at canonware.com>.  All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice(s),
+//    this list of conditions and the following disclaimer unmodified other than
+//    the allowable addition of one or more copyright notices.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+//    notice(s), this list of conditions and the following disclaimer in the
+//    documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) `AS IS' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+// NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+//==============================================================================
+//
+// Emulate vasprintf() and asprintf().
+//
+//==============================================================================
+
+#include <stdio.h>
+#include <stdarg.h>
+
+int
+vasprintf(char **rResult, const char *aFormat, va_list aAp)
+{
+    int rVal;
+    char *result;
+    va_list ap;
+#define XarAsprintfStartLen 16
+
+    result = (char *) malloc(XarAsprintfStartLen);
+    if (result == NULL)
+    {
+	rVal = -1;
+	goto RETURN;
+    }
+
+    va_copy(ap, aAp);
+    rVal = vsnprintf(result, XarAsprintfStartLen, aFormat, ap);
+    va_end(ap);
+
+    if (rVal == -1)
+    {
+	goto RETURN;
+    }
+    else if (rVal >= XarAsprintfStartLen)
+    {
+	free(result);
+	result = (char *) malloc(rVal + 1);
+	if (result == NULL)
+	{
+	    rVal = -1;
+	    goto RETURN;
+	}
+
+	va_copy(ap, aAp);
+	rVal = vsnprintf(result, rVal + 1, aFormat, aAp);
+	va_end(ap);
+    }
+
+    *rResult = result;
+    RETURN:
+#undef XarAsprintfStartLen
+    return rVal;
+}
+
+static int
+asprintf(char **rResult, const char *aFormat, ...)
+{
+    int rVal;
+    va_list ap;
+
+    va_start(ap, aFormat);
+    rVal = vasprintf(rResult, aFormat, ap);
+    va_end(ap);
+
+    return rVal;
+}

Deleted: branches/release_1_4/base/src/programs/xar/lib/b64.c
===================================================================
--- trunk/base/src/programs/xar/lib/b64.c	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/b64.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,207 +0,0 @@
-/*
- * Copyright (c) 2004 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 1-Oct-2004
- * DRI: Rob Braun <bbraun at synack.net>
- */
-
-#include <stdlib.h>
-#include <string.h>
-
-static unsigned char table [] = {
-'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',
-'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
-'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
-'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
-'s', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2',
-'3', '4', '5', '6', '7', '8', '9', '+', '/' };
-
-unsigned char* xar_to_base64(const unsigned char* input, int len)
-{
-    unsigned char b6;
-    /*UNUSED unsigned char tmp; */
-    unsigned char count = 0;
-    int i=0;
-    unsigned char* output;
-    int outsize = (((float)len)*4/3)+5;
-
-    output = malloc(outsize);
-    if( !output )
-        return NULL;
-
-    while(1) {
-        if( i >= len ) {
-            output[count++] = '\n';
-            output[count++] = '\0';
-            return output;
-        }
-        b6 = input[i];
-        b6 >>= 2;
-        output[count++] = table[b6];
-
-        b6 = input[i++];
-        b6 &= 0x03;
-        b6 <<= 4;
-        if( i >= len ) {
-            output[count++] = table[b6];
-            output[count++] = '=';
-            output[count++] = '=';
-            output[count++] = '\n';
-            output[count++] = '\0';
-            return output;
-        }
-        b6 |= input[i] >> 4;
-        output[count++] = table[b6];
-
-        b6 = input[i++] & 0x0F;
-        b6 <<= 2;
-        if( i >= len ) {
-            output[count++] = table[b6];
-            output[count++] = '=';
-            output[count++] = '\n';
-            output[count++] = '\0';
-            return output;
-        }
-        b6 |= input[i] >> 6;
-        output[count++] = table[b6];
-
-        b6 = input[i++] & 0x3F;
-        output[count++] = table[b6];
-    }
-}
-
-#ifdef _BTEST_
-int main(int argc, char* argv[]) {
-    unsigned char* enc = benc(argv[1], strlen(argv[1]));
-    printf("%s", enc);
-    printf("%s\n", bdec(enc, strlen(enc)));
-}
-#endif
-
-
-/*
- * The code below derives from "Secure Programming Cookbook for C and
- * C++"* and adapted by Kogule, Ryo (kogule at opendarwin.org).
- *
- * *John Viega and Matt Messier, O'Reilly, 2003
- *  http://www.secureprogramming.com/
- */
-
-static char b64revtb[256] = {
-  -3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*0-15*/
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*16-31*/
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, /*32-47*/
-  52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -2, -1, -1, /*48-63*/
-  -1,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, /*64-79*/
-  15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, /*80-95*/
-  -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, /*96-111*/
-  41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1, /*112-127*/
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*128-143*/
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*144-159*/
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*160-175*/
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*176-191*/
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*192-207*/
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*208-223*/
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*224-239*/
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1  /*240-255*/
-};
-
-static unsigned int raw_base64_decode(
-  const unsigned char *input, unsigned char *output, int len)
-{
-
-    unsigned int  x, i = 0, ignr = 0;
-    unsigned char buf[3], pad = 0;
-
-    while (i <= len || !pad) {
-        x = b64revtb[input[i++]];
-        switch (x) {
-            case -3: /* NULL TERMINATOR */
-                if ((i - ignr - 1) % 4) return 1;
-                return 0;
-            case -2: /* PADDING CHARACTER */
-                if ((i - ignr - 1) % 4 < 2) {
-                    /* Invalid here */
-                    return 1;
-                } else if ((i - ignr - 1) % 4 == 2) {
-                    /* Make sure there's appropriate padding */
-                    if (input[i] != '=') return 1;
-                    buf[2] = 0;
-                    pad = 2;
-                    break;
-                } else {
-                    pad = 1;
-                    break;
-                }
-                return 0;
-            case -1:
-                ignr++;
-                break;
-            default:
-                switch ((i - ignr - 1) % 4) {
-                    case 0:
-                        buf[0] = x << 2;
-                        break;
-                    case 1:
-                        buf[0] |= (x >> 4);
-                        buf[1] = x << 4;
-                        break;
-                    case 2:
-                        buf[1] |= (x >> 2);
-                        buf[2] = x << 6;
-                        break;
-                    case 3:
-                        buf[2] |= x;
-                        for (x = 0;  x < 3 - pad;  x++) *output++ = buf[x];
-                        break;
-                }
-                break;
-        }
-    }
-    if (i > len) return 2;
-    for (x = 0;  x < 3 - pad;  x++) *output++ = buf[x];
-    return 0;
-}
-
-unsigned char* xar_from_base64(const unsigned char* input, int len)
-{
-    int err;
-    unsigned char *output;
-
-    output = malloc(3 * (len / 4 + 1));
-    if (!output) return NULL;
-
-    err = raw_base64_decode(input, output, len);
-
-    if (err) {
-        free(output);
-        return NULL;
-    }
-    return output;
-}

Copied: branches/release_1_4/base/src/programs/xar/lib/b64.c (from rev 23968, trunk/base/src/programs/xar/lib/b64.c)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/b64.c	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/b64.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,207 @@
+/*
+ * Copyright (c) 2004 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 1-Oct-2004
+ * DRI: Rob Braun <bbraun at synack.net>
+ */
+
+#include <stdlib.h>
+#include <string.h>
+
+static unsigned char table [] = {
+'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',
+'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
+'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
+'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
+'s', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2',
+'3', '4', '5', '6', '7', '8', '9', '+', '/' };
+
+unsigned char* xar_to_base64(const unsigned char* input, int len)
+{
+    unsigned char b6;
+    /*UNUSED unsigned char tmp; */
+    unsigned char count = 0;
+    int i=0;
+    unsigned char* output;
+    int outsize = (((float)len)*4/3)+5;
+
+    output = malloc(outsize);
+    if( !output )
+        return NULL;
+
+    while(1) {
+        if( i >= len ) {
+            output[count++] = '\n';
+            output[count++] = '\0';
+            return output;
+        }
+        b6 = input[i];
+        b6 >>= 2;
+        output[count++] = table[b6];
+
+        b6 = input[i++];
+        b6 &= 0x03;
+        b6 <<= 4;
+        if( i >= len ) {
+            output[count++] = table[b6];
+            output[count++] = '=';
+            output[count++] = '=';
+            output[count++] = '\n';
+            output[count++] = '\0';
+            return output;
+        }
+        b6 |= input[i] >> 4;
+        output[count++] = table[b6];
+
+        b6 = input[i++] & 0x0F;
+        b6 <<= 2;
+        if( i >= len ) {
+            output[count++] = table[b6];
+            output[count++] = '=';
+            output[count++] = '\n';
+            output[count++] = '\0';
+            return output;
+        }
+        b6 |= input[i] >> 6;
+        output[count++] = table[b6];
+
+        b6 = input[i++] & 0x3F;
+        output[count++] = table[b6];
+    }
+}
+
+#ifdef _BTEST_
+int main(int argc, char* argv[]) {
+    unsigned char* enc = benc(argv[1], strlen(argv[1]));
+    printf("%s", enc);
+    printf("%s\n", bdec(enc, strlen(enc)));
+}
+#endif
+
+
+/*
+ * The code below derives from "Secure Programming Cookbook for C and
+ * C++"* and adapted by Kogule, Ryo (kogule at opendarwin.org).
+ *
+ * *John Viega and Matt Messier, O'Reilly, 2003
+ *  http://www.secureprogramming.com/
+ */
+
+static char b64revtb[256] = {
+  -3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*0-15*/
+  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*16-31*/
+  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, /*32-47*/
+  52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -2, -1, -1, /*48-63*/
+  -1,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, /*64-79*/
+  15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, /*80-95*/
+  -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, /*96-111*/
+  41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1, /*112-127*/
+  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*128-143*/
+  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*144-159*/
+  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*160-175*/
+  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*176-191*/
+  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*192-207*/
+  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*208-223*/
+  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*224-239*/
+  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1  /*240-255*/
+};
+
+static unsigned int raw_base64_decode(
+  const unsigned char *input, unsigned char *output, int len)
+{
+
+    unsigned int  x, i = 0, ignr = 0;
+    unsigned char buf[3], pad = 0;
+
+    while (i <= len || !pad) {
+        x = b64revtb[input[i++]];
+        switch (x) {
+            case -3: /* NULL TERMINATOR */
+                if ((i - ignr - 1) % 4) return 1;
+                return 0;
+            case -2: /* PADDING CHARACTER */
+                if ((i - ignr - 1) % 4 < 2) {
+                    /* Invalid here */
+                    return 1;
+                } else if ((i - ignr - 1) % 4 == 2) {
+                    /* Make sure there's appropriate padding */
+                    if (input[i] != '=') return 1;
+                    buf[2] = 0;
+                    pad = 2;
+                    break;
+                } else {
+                    pad = 1;
+                    break;
+                }
+                return 0;
+            case -1:
+                ignr++;
+                break;
+            default:
+                switch ((i - ignr - 1) % 4) {
+                    case 0:
+                        buf[0] = x << 2;
+                        break;
+                    case 1:
+                        buf[0] |= (x >> 4);
+                        buf[1] = x << 4;
+                        break;
+                    case 2:
+                        buf[1] |= (x >> 2);
+                        buf[2] = x << 6;
+                        break;
+                    case 3:
+                        buf[2] |= x;
+                        for (x = 0;  x < 3 - pad;  x++) *output++ = buf[x];
+                        break;
+                }
+                break;
+        }
+    }
+    if (i > len) return 2;
+    for (x = 0;  x < 3 - pad;  x++) *output++ = buf[x];
+    return 0;
+}
+
+unsigned char* xar_from_base64(const unsigned char* input, int len)
+{
+    int err;
+    unsigned char *output;
+
+    output = malloc(3 * (len / 4 + 1));
+    if (!output) return NULL;
+
+    err = raw_base64_decode(input, output, len);
+
+    if (err) {
+        free(output);
+        return NULL;
+    }
+    return output;
+}

Deleted: branches/release_1_4/base/src/programs/xar/lib/b64.h
===================================================================
--- trunk/base/src/programs/xar/lib/b64.h	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/b64.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,13 +0,0 @@
-/*
- * Rob Braun <bbraun at synack.net>
- * 1-Oct-2004
- * Copyright (c) 2004 Rob Braun.  All rights reserved.
- */
-
-#ifndef _XAR_BASE64_H_
-#define _XAR_BASE64_H_
-
-unsigned char* xar_to_base64(const unsigned char* input, int len);
-unsigned char* xar_from_base64(const unsigned char* input, int len);
-
-#endif /* _XAR_BASE64_H_ */

Copied: branches/release_1_4/base/src/programs/xar/lib/b64.h (from rev 23968, trunk/base/src/programs/xar/lib/b64.h)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/b64.h	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/b64.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,13 @@
+/*
+ * Rob Braun <bbraun at synack.net>
+ * 1-Oct-2004
+ * Copyright (c) 2004 Rob Braun.  All rights reserved.
+ */
+
+#ifndef _XAR_BASE64_H_
+#define _XAR_BASE64_H_
+
+unsigned char* xar_to_base64(const unsigned char* input, int len);
+unsigned char* xar_from_base64(const unsigned char* input, int len);
+
+#endif /* _XAR_BASE64_H_ */

Deleted: branches/release_1_4/base/src/programs/xar/lib/bzxar.c
===================================================================
--- trunk/base/src/programs/xar/lib/bzxar.c	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/bzxar.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,197 +0,0 @@
-/*
- * Copyright (c) 2005 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of his contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 03-Apr-2005
- * DRI: Rob Braun <bbraun at opendarwin.org>
- */
-
-#include "config.h"
-#ifndef HAVE_ASPRINTF
-#include "asprintf.h"
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#ifdef HAVE_LIBBZ2
-#include <bzlib.h>
-#endif
-#include "xar.h"
-#include "filetree.h"
-#include "io.h"
-
-#ifdef HAVE_LIBBZ2
-static int initted = 0;
-static bz_stream zs;
-#endif
-
-int xar_bzip_fromheap_done(xar_t x, xar_file_t f, const char *attr);
-
-int xar_bzip_fromheap_in(xar_t x, xar_file_t f, const char *attr, void **in, size_t *inlen) {
-#ifdef HAVE_LIBBZ2
-	const char *opt;
-	void *out = NULL;
-	size_t outlen, offset = 0;
-	int r;
-	char *tmpstr;
-
-	asprintf(&tmpstr, "%s/encoding", attr);
-	opt = xar_attr_get(f, tmpstr, "style");
-	free(tmpstr);
-	if( !opt ) return 0;
-	if( strcmp(opt, "application/x-bzip2") != 0 ) return 0;
-
-	if( !initted ) {
-		zs.bzalloc = NULL;
-		zs.bzfree = NULL;
-		zs.opaque = NULL;
-
-		BZ2_bzDecompressInit(&zs, 0, 0);
-		initted = 1;
-	}
-
-	outlen = *inlen;
-
-	zs.next_in = *in;
-	zs.avail_in = *inlen;
-	zs.next_out = out;
-	zs.avail_out = 0;
-
-	while( zs.avail_in != 0 ) {
-		outlen = outlen * 2;
-		out = realloc(out, outlen);
-		if( out == NULL ) abort();
-
-		zs.next_out = out + offset;
-		zs.avail_out = outlen - offset;
-
-		r = BZ2_bzDecompress(&zs);
-		if( (r != BZ_OK) && (r != BZ_STREAM_END) ) {
-			xar_err_new(x);
-			xar_err_set_file(x, f);
-			xar_err_set_string(x, "Error decompressing file");
-			xar_err_callback(x, XAR_SEVERITY_FATAL, XAR_ERR_ARCHIVE_EXTRACTION);
-			return -1;
-		}
-		offset += outlen - offset - zs.avail_out;
-		if( (r == BZ_STREAM_END) && (offset == 0) ) {
-			xar_bzip_fromheap_done(x, f, attr);
-			offset += outlen - offset - zs.avail_out;
-			break;
-		}
-	}
-
-	free(*in);
-	*in = out;
-	*inlen = offset;
-#endif /* HAVE_LIBBZ2 */
-	return 0;
-}
-
-int xar_bzip_fromheap_done(xar_t x, xar_file_t f, const char *attr) {
-#ifdef HAVE_LIBBZ2
-	initted = 0;
-	BZ2_bzDecompressEnd(&zs);
-#endif /* HAVE_LIBBZ2 */
-	return 0;
-}
-int xar_bzip_toheap_done(xar_t x, xar_file_t f, const char *attr) {
-#ifdef HAVE_LIBBZ2
-	const char *opt;
-	char *tmpstr;
-
-	opt = xar_opt_get(x, XAR_OPT_COMPRESSION);
-	if( !opt )
-		return 0;
-
-	if( strcmp(opt, XAR_OPT_VAL_BZIP) != 0 )
-		return 0;
-
-	initted = 0;
-	BZ2_bzCompressEnd(&zs);
-
-	asprintf(&tmpstr, "%s/encoding", attr);
-	if( f ) {
-		xar_prop_set(f, tmpstr, NULL);
-		xar_attr_set(f, tmpstr, "style", "application/x-bzip2");
-	}
-	free(tmpstr);
-
-#endif /* HAVE_LIBBZ2 */
-	return 0;
-}
-
-int32_t xar_bzip_toheap_in(xar_t x, xar_file_t f, const char *attr, void **in, size_t *inlen) {
-#ifdef HAVE_LIBBZ2
-	void *out = NULL;
-	size_t outlen, offset = 0;
-	int r;
-	const char *opt;
-
-	opt = xar_opt_get(x, XAR_OPT_COMPRESSION);
-	if( !opt )
-		return 0;
-
-	if( strcmp(opt, XAR_OPT_VAL_BZIP) != 0 )
-		return 0;
-
-	if( !initted ) {
-		memset(&zs, 0, sizeof(zs));
-		BZ2_bzCompressInit(&zs, 9, 0, 30);
-		initted = 1;
-	}
-
-	outlen = *inlen/2;
-	if(outlen == 0) outlen = 1024;
-	zs.next_in = *in;
-	zs.avail_in = *inlen;
-	zs.next_out = out;
-	zs.avail_out = 0;
-
-	do {
-		outlen *= 2;
-		out = realloc(out, outlen);
-		if( out == NULL ) abort();
-
-		zs.next_out = out + offset;
-		zs.avail_out = outlen - offset;
-
-		if( *inlen == 0 )
-			r = BZ2_bzCompress(&zs, BZ_FINISH);
-		else
-			r = BZ2_bzCompress(&zs, BZ_RUN);
-		offset = outlen - zs.avail_out;
-	} while( zs.avail_in != 0 );
-
-	free(*in);
-	*in = out;
-	*inlen = offset;
-#endif /* HAVE_LIBBZ2 */
-	return 0;
-}

Copied: branches/release_1_4/base/src/programs/xar/lib/bzxar.c (from rev 23968, trunk/base/src/programs/xar/lib/bzxar.c)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/bzxar.c	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/bzxar.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,197 @@
+/*
+ * Copyright (c) 2005 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of his contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 03-Apr-2005
+ * DRI: Rob Braun <bbraun at opendarwin.org>
+ */
+
+#include "config.h"
+#ifndef HAVE_ASPRINTF
+#include "asprintf.h"
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#ifdef HAVE_LIBBZ2
+#include <bzlib.h>
+#endif
+#include "xar.h"
+#include "filetree.h"
+#include "io.h"
+
+#ifdef HAVE_LIBBZ2
+static int initted = 0;
+static bz_stream zs;
+#endif
+
+int xar_bzip_fromheap_done(xar_t x, xar_file_t f, const char *attr);
+
+int xar_bzip_fromheap_in(xar_t x, xar_file_t f, const char *attr, void **in, size_t *inlen) {
+#ifdef HAVE_LIBBZ2
+	const char *opt;
+	void *out = NULL;
+	size_t outlen, offset = 0;
+	int r;
+	char *tmpstr;
+
+	asprintf(&tmpstr, "%s/encoding", attr);
+	opt = xar_attr_get(f, tmpstr, "style");
+	free(tmpstr);
+	if( !opt ) return 0;
+	if( strcmp(opt, "application/x-bzip2") != 0 ) return 0;
+
+	if( !initted ) {
+		zs.bzalloc = NULL;
+		zs.bzfree = NULL;
+		zs.opaque = NULL;
+
+		BZ2_bzDecompressInit(&zs, 0, 0);
+		initted = 1;
+	}
+
+	outlen = *inlen;
+
+	zs.next_in = *in;
+	zs.avail_in = *inlen;
+	zs.next_out = out;
+	zs.avail_out = 0;
+
+	while( zs.avail_in != 0 ) {
+		outlen = outlen * 2;
+		out = realloc(out, outlen);
+		if( out == NULL ) abort();
+
+		zs.next_out = out + offset;
+		zs.avail_out = outlen - offset;
+
+		r = BZ2_bzDecompress(&zs);
+		if( (r != BZ_OK) && (r != BZ_STREAM_END) ) {
+			xar_err_new(x);
+			xar_err_set_file(x, f);
+			xar_err_set_string(x, "Error decompressing file");
+			xar_err_callback(x, XAR_SEVERITY_FATAL, XAR_ERR_ARCHIVE_EXTRACTION);
+			return -1;
+		}
+		offset += outlen - offset - zs.avail_out;
+		if( (r == BZ_STREAM_END) && (offset == 0) ) {
+			xar_bzip_fromheap_done(x, f, attr);
+			offset += outlen - offset - zs.avail_out;
+			break;
+		}
+	}
+
+	free(*in);
+	*in = out;
+	*inlen = offset;
+#endif /* HAVE_LIBBZ2 */
+	return 0;
+}
+
+int xar_bzip_fromheap_done(xar_t x, xar_file_t f, const char *attr) {
+#ifdef HAVE_LIBBZ2
+	initted = 0;
+	BZ2_bzDecompressEnd(&zs);
+#endif /* HAVE_LIBBZ2 */
+	return 0;
+}
+int xar_bzip_toheap_done(xar_t x, xar_file_t f, const char *attr) {
+#ifdef HAVE_LIBBZ2
+	const char *opt;
+	char *tmpstr;
+
+	opt = xar_opt_get(x, XAR_OPT_COMPRESSION);
+	if( !opt )
+		return 0;
+
+	if( strcmp(opt, XAR_OPT_VAL_BZIP) != 0 )
+		return 0;
+
+	initted = 0;
+	BZ2_bzCompressEnd(&zs);
+
+	asprintf(&tmpstr, "%s/encoding", attr);
+	if( f ) {
+		xar_prop_set(f, tmpstr, NULL);
+		xar_attr_set(f, tmpstr, "style", "application/x-bzip2");
+	}
+	free(tmpstr);
+
+#endif /* HAVE_LIBBZ2 */
+	return 0;
+}
+
+int32_t xar_bzip_toheap_in(xar_t x, xar_file_t f, const char *attr, void **in, size_t *inlen) {
+#ifdef HAVE_LIBBZ2
+	void *out = NULL;
+	size_t outlen, offset = 0;
+	int r;
+	const char *opt;
+
+	opt = xar_opt_get(x, XAR_OPT_COMPRESSION);
+	if( !opt )
+		return 0;
+
+	if( strcmp(opt, XAR_OPT_VAL_BZIP) != 0 )
+		return 0;
+
+	if( !initted ) {
+		memset(&zs, 0, sizeof(zs));
+		BZ2_bzCompressInit(&zs, 9, 0, 30);
+		initted = 1;
+	}
+
+	outlen = *inlen/2;
+	if(outlen == 0) outlen = 1024;
+	zs.next_in = *in;
+	zs.avail_in = *inlen;
+	zs.next_out = out;
+	zs.avail_out = 0;
+
+	do {
+		outlen *= 2;
+		out = realloc(out, outlen);
+		if( out == NULL ) abort();
+
+		zs.next_out = out + offset;
+		zs.avail_out = outlen - offset;
+
+		if( *inlen == 0 )
+			r = BZ2_bzCompress(&zs, BZ_FINISH);
+		else
+			r = BZ2_bzCompress(&zs, BZ_RUN);
+		offset = outlen - zs.avail_out;
+	} while( zs.avail_in != 0 );
+
+	free(*in);
+	*in = out;
+	*inlen = offset;
+#endif /* HAVE_LIBBZ2 */
+	return 0;
+}

Deleted: branches/release_1_4/base/src/programs/xar/lib/bzxar.h
===================================================================
--- trunk/base/src/programs/xar/lib/bzxar.h	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/bzxar.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2005 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of his contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 03-Apr-2005
- * DRI: Rob Braun <bbraun at opendarwin.org>
- */
-
-#ifndef _XAR_BZLIB_H_
-#define _XAR_BZLIB_H_
-
-int xar_bzip_fromheap_in(xar_t x, xar_file_t f, const char *, void **in, size_t *inlen);
-int xar_bzip_fromheap_done(xar_t x, xar_file_t f, const char *);
-
-int32_t xar_bzip_toheap_in(xar_t x, xar_file_t f, const char *, void **in, size_t *inlen);
-int xar_bzip_toheap_done(xar_t x, xar_file_t f, const char *);
-
-#endif /* _XAR_BZLIB_H_ */

Copied: branches/release_1_4/base/src/programs/xar/lib/bzxar.h (from rev 23968, trunk/base/src/programs/xar/lib/bzxar.h)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/bzxar.h	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/bzxar.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2005 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of his contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 03-Apr-2005
+ * DRI: Rob Braun <bbraun at opendarwin.org>
+ */
+
+#ifndef _XAR_BZLIB_H_
+#define _XAR_BZLIB_H_
+
+int xar_bzip_fromheap_in(xar_t x, xar_file_t f, const char *, void **in, size_t *inlen);
+int xar_bzip_fromheap_done(xar_t x, xar_file_t f, const char *);
+
+int32_t xar_bzip_toheap_in(xar_t x, xar_file_t f, const char *, void **in, size_t *inlen);
+int xar_bzip_toheap_done(xar_t x, xar_file_t f, const char *);
+
+#endif /* _XAR_BZLIB_H_ */

Deleted: branches/release_1_4/base/src/programs/xar/lib/darwinattr.c
===================================================================
--- trunk/base/src/programs/xar/lib/darwinattr.c	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/darwinattr.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,581 +0,0 @@
-/*
- * Copyright (c) 2004 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 24-Apr-2005
- * DRI: Rob Braun <bbraun at synack.net>
- */
-
-#include "config.h"
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <libgen.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <arpa/inet.h>
-#include "xar.h"
-#include "arcmod.h"
-#include "b64.h"
-#include <errno.h>
-#include <string.h>
-#include "util.h"
-#include "linuxattr.h"
-#include "io.h"
-#include "appledouble.h"
-#include "stat.h"
-
-#if defined(HAVE_SYS_XATTR_H)
-#include <sys/xattr.h>
-#endif
-
-static int Fd;
-
-#if defined(__APPLE__)
-#ifdef HAVE_GETATTRLIST
-#include <sys/attr.h>
-#include <sys/vnode.h>
-struct fi {
-    uint32_t     length;
-    fsobj_type_t objtype;
-    char finderinfo[32];
-};
-
-static char *Gfinfo = NULL;
-
-/* finfo_read
- * This is for archiving the finderinfo via the getattrlist method.
- * This function is used from the nonea_archive() function.
- */
-static int32_t finfo_read(xar_t x, xar_file_t f, void *buf, size_t len) {
-	if( len < 32 )
-		return -1;
-
-	if( Gfinfo == NULL )
-		return 0;
-
-	memcpy(buf, Gfinfo, 32);
-	Gfinfo = NULL;
-	return 32;
-}
-
-/* finfo_write
- * This is for extracting the finderinfo via the setattrlist method.
- * This function is used from the nonea_extract() function.
- */
-static int32_t finfo_write(xar_t x, xar_file_t f, void *buf, size_t len) {
-	struct attrlist attrs;
-	struct fi finfo;
-
-	if( len < 32 )
-		return -1;
-	if( Gfinfo == NULL )
-		return 0;
-
-	memset(&attrs, 0, sizeof(attrs));
-	attrs.bitmapcount = ATTR_BIT_MAP_COUNT;
-	attrs.commonattr = ATTR_CMN_OBJTYPE | ATTR_CMN_FNDRINFO;
-
-	getattrlist(Gfinfo, &attrs, &finfo, sizeof(finfo), 0);
-
-	attrs.commonattr = ATTR_CMN_FNDRINFO;
-	if( setattrlist(Gfinfo, &attrs, buf, 32, 0) != 0 )
-		return -1;
-
-	Gfinfo = NULL;
-	return 32;
-}
-#endif /* HAVE_GETATTRLIST */
-
-/* xar_rsrc_read
- * This is the read callback function for archiving the resource fork via
- * the ..namedfork method.  This callback is used from nonea_archive()
- */
-static int32_t xar_rsrc_read(xar_t x, xar_file_t f, void *inbuf, size_t bsize) {
-	int32_t r;
-
-	while(1) {
-		r = read(Fd, inbuf, bsize);
-		if( (r < 0) && (errno == EINTR) )
-			continue;
-		return r;
-	}
-}
-#endif /* __APPLE__ */
-
-/* xar_rsrc_write
- * This is the write callback function for writing the resource fork
- * back to the file via ..namedfork method.  This is the callback used
- * in nonea_extract() and underbar_extract().
- */
-static int32_t xar_rsrc_write(xar_t x, xar_file_t f, void *buf, size_t len) {
-	int32_t r;
-	size_t off = 0;
-	do {
-		r = write(Fd, buf+off, len-off);
-		if( (r < 0) && (errno != EINTR) )
-			return r;
-		off += r;
-	} while( off < len );
-	return off;
-}
-
-#ifdef __APPLE__
-#if defined(HAVE_GETXATTR)
-static char *Gbuf = NULL;
-static int   Glen = 0;
-static int   Goff = 0;
-
-static int32_t xar_ea_read(xar_t x, xar_file_t f, void *buf, size_t len) {
-	if( Gbuf == NULL )
-		return 0;
-
-	if( (Glen-Goff) <= len ) {
-		int siz = Glen-Goff;
-		memcpy(buf, Gbuf+Goff, siz);
-		free(Gbuf);
-		Gbuf = NULL;
-		Goff = 0;
-		Glen = 0;
-		return siz;
-	}
-
-	memcpy(buf, Gbuf+Goff, len);
-	Goff += len;
-
-	if( Goff == Glen ) {
-		free(Gbuf);
-		Gbuf = NULL;
-		Goff = 0;
-		Glen = 0;
-	}
-
-	return len;
-}
-
-static int32_t xar_ea_write(xar_t x, xar_file_t f, void *buf, size_t len) {
-	if( Gbuf == NULL )
-		return 0;
-
-	if( Goff == Glen )
-		return 0;
-
-	if( (Glen-Goff) <= len ) {
-		int siz = Glen-Goff;
-		memcpy(Gbuf+Goff, buf, siz);
-		return siz;
-	}
-
-	memcpy(Gbuf+Goff, buf, len);
-	Goff += len;
-
-	return len;
-}
-
-static int32_t ea_archive(xar_t x, xar_file_t f, const char* file) {
-	char *buf, *i;
-	int ret, bufsz;
-	int32_t retval = 0;
-
-	ret = listxattr(file, NULL, 0, XATTR_NOFOLLOW);
-	if( ret < 0 )
-		return -1;
-	if( ret == 0 )
-		return 0;
-	bufsz = ret;
-
-TRYAGAIN:
-	buf = malloc(bufsz);
-	if( !buf )
-		goto TRYAGAIN;
-	ret = listxattr(file, buf, bufsz, XATTR_NOFOLLOW);
-	if( ret < 0 ) {
-		switch(errno) {
-		case ERANGE: bufsz = bufsz*2; free(buf); goto TRYAGAIN;
-		case ENOTSUP: retval = 0; goto BAIL;
-		default: retval = -1; goto BAIL;
-		};
-	}
-	if( ret == 0 ) {
-		retval = 0;
-		goto BAIL;
-	}
-
-	for( i = buf; (i-buf) < ret; i += strlen(i)+1 ) {
-		char tempnam[1024];
-		ret = getxattr(file, i, NULL, 0, 0, XATTR_NOFOLLOW);
-		if( ret < 0 )
-			continue;
-		Glen = ret;
-		Gbuf = malloc(Glen);
-		if( !Gbuf )
-			goto BAIL;
-
-		ret = getxattr(file, i, Gbuf, Glen, 0, XATTR_NOFOLLOW);
-		if( ret < 0 ) {
-			free(Gbuf);
-			Gbuf = NULL;
-			Glen = 0;
-			continue;
-		}
-
-		memset(tempnam, 0, sizeof(tempnam));
-		snprintf(tempnam, sizeof(tempnam)-1, "ea/%s", i);
-		xar_attrcopy_to_heap(x, f, tempnam, xar_ea_read);
-	}
-BAIL:
-	free(buf);
-	return retval;
-}
-
-static int32_t ea_extract(xar_t x, xar_file_t f, const char* file) {
-	const char *prop;
-	xar_iter_t iter;
-	
-	iter = xar_iter_new();
-	for(prop = xar_prop_first(f, iter); prop; prop = xar_prop_next(iter)) {
-		const char *opt;
-		char sz[1024];
-		int len;
-
-		if( strncmp(prop, XAR_EA_FORK, strlen(XAR_EA_FORK)) )
-			continue;
-		if( strlen(prop) <= strlen(XAR_EA_FORK) )
-			continue;
-
-		memset(sz, 0, sizeof(sz));
-		snprintf(sz, sizeof(sz)-1, "%s/size", prop);
-		xar_prop_get(f, sz, &opt);
-		if( !opt )
-			continue;
-
-		len = strtol(opt, NULL, 10);
-		Gbuf = malloc(len);
-		if( !Gbuf )
-			return -1;
-		Glen = len;
-
-		xar_attrcopy_from_heap(x, f, prop, xar_ea_write);
-
-		setxattr(file, prop+strlen(XAR_EA_FORK)+1, Gbuf, Glen, 0, XATTR_NOFOLLOW);
-		free(Gbuf);
-		Gbuf = NULL;
-		Glen = 0;
-		Goff = 0;
-	}
-
-	return 0;
-}
-#endif /* HAVE_GETXATTR */
-
-/* nonea_archive
- * Archive the finderinfo and resource fork through getattrlist and
- * ..namedfork methods rather than via EAs.  This is mainly for 10.3
- * and earlier support
- */
-static int32_t nonea_archive(xar_t x, xar_file_t f, const char* file) {
-	char rsrcname[4096];
-	struct stat sb;
-#ifdef HAVE_GETATTRLIST
-	struct attrlist attrs;
-	struct fi finfo;
-	int ret;
-	char z[32];
-	
-	memset(&attrs, 0, sizeof(attrs));
-	attrs.bitmapcount = ATTR_BIT_MAP_COUNT;
-	attrs.commonattr = ATTR_CMN_OBJTYPE | ATTR_CMN_FNDRINFO;
-
-	ret = getattrlist(file, &attrs, &finfo, sizeof(finfo), 0);
-	if( ret != 0 )
-		return -1;
-
-	memset(z, 0, sizeof(z));
-	if( memcmp(finfo.finderinfo, z, sizeof(finfo.finderinfo)) != 0 ) {
-		Gfinfo = finfo.finderinfo;
-		xar_attrcopy_to_heap(x, f, "ea/com.apple.FinderInfo", finfo_read);
-	}
-#endif /* HAVE_GETATTRLIST */
-
-
-	memset(rsrcname, 0, sizeof(rsrcname));
-	snprintf(rsrcname, sizeof(rsrcname)-1, "%s/..namedfork/rsrc", file);
-	if( lstat(rsrcname, &sb) != 0 )
-		return 0;
-
-	if( sb.st_size == 0 )
-		return 0;
-
-	Fd = open(rsrcname, O_RDONLY, 0);
-	if( Fd < 0 )
-		return -1;
-
-	xar_attrcopy_to_heap(x, f, "ea/com.apple.ResourceFork", xar_rsrc_read);
-	close(Fd);
-	return 0;
-}
-
-/* nonea_extract
- * Extract the finderinfo and resource fork through setattrlist and
- * ..namedfork methods rather than via EAs.  This is mainly for 10.3
- * and earlier support
- */
-static int32_t nonea_extract(xar_t x, xar_file_t f, const char* file) {
-	char rsrcname[4096];
-#ifdef HAVE_SETATTRLIST
-	struct attrlist attrs;
-	struct fi finfo;
-	int ret;
-	
-	memset(&attrs, 0, sizeof(attrs));
-	attrs.bitmapcount = ATTR_BIT_MAP_COUNT;
-	attrs.commonattr = ATTR_CMN_OBJTYPE | ATTR_CMN_FNDRINFO;
-
-	ret = getattrlist(file, &attrs, &finfo, sizeof(finfo), 0);
-	if( ret != 0 )
-		return -1;
-
-	Gfinfo = (char *)file;
-
-	xar_attrcopy_from_heap(x, f, "ea/com.apple.FinderInfo", finfo_write);
-#endif /* HAVE_SETATTRLIST */
-	
-	memset(rsrcname, 0, sizeof(rsrcname));
-	snprintf(rsrcname, sizeof(rsrcname)-1, "%s/..namedfork/rsrc", file);
-	Fd = open(rsrcname, O_RDWR|O_TRUNC);
-	if( Fd < 0 )
-		return 0;
-
-	xar_attrcopy_from_heap(x, f, "ea/com.apple.ResourceFork", xar_rsrc_write);
-	close(Fd);
-	return 0;
-}
-#endif /* __APPLE__ */
-
-/* xar_underbar_check
- * Check to see if the file we're archiving is a ._ file.  If so,
- * stop the archival process.
- */
-int32_t xar_underbar_check(xar_t x, xar_file_t f, const char* file) {
-	char *bname, *tmp;
-
-	tmp = strdup(file);
-	bname = basename(tmp);
-
-	if(bname && (bname[0] == '.') && (bname[1] == '_')) {
-		free(tmp);
-		return 1;
-	}
-
-	free(tmp);
-	return 0;
-}
-
-#ifdef __APPLE__
-/* This only really makes sense on OSX */
-static int32_t underbar_archive(xar_t x, xar_file_t f, const char* file) {
-	struct stat sb;
-	char underbarname[4096], z[32];
-	char *dname, *bname, *tmp, *tmp2;
-	struct AppleSingleHeader ash;
-	struct AppleSingleEntry  ase;
-	int num_entries = 0, i, r;
-	off_t off;
-
-	tmp = strdup(file);
-	tmp2 = strdup(file);
-	dname = dirname(tmp2);
-	bname = basename(tmp);
-
-	memset(underbarname, 0, sizeof(underbarname));
-	snprintf(underbarname, sizeof(underbarname)-1, "%s/._%s", dname, bname);
-	free(tmp);
-	free(tmp2);
-	
-	if( stat(underbarname, &sb) != 0 )
-		return 0;
-
-	Fd = open(underbarname, O_RDONLY);
-	if( Fd < 0 )
-		return -1;
-
-	memset(&ash, 0, sizeof(ash));
-	memset(&ase, 0, sizeof(ase));
-	r = read(Fd, &ash, XAR_ASH_SIZE);
-	if( r < XAR_ASH_SIZE )
-		return -1;
-
-	if( ntohl(ash.magic) != APPLEDOUBLE_MAGIC )
-		return -1;
-	if( ntohl(ash.version) != APPLEDOUBLE_VERSION )
-		return -1;
-
-	off = XAR_ASH_SIZE;
-	num_entries = ntohs(ash.entries);
-
-	for(i = 0; i < num_entries; i++) {
-		off_t entoff;
-		r = read(Fd, &ase, sizeof(ase));
-		if( r < sizeof(ase) )
-			return -1;
-		off+=r;
-
-		if( ntohl(ase.entry_id) == AS_ID_FINDER ) {
-			entoff = (off_t)ntohl(ase.offset);
-			if( lseek(Fd, entoff, SEEK_SET) == -1 )
-				return -1;
-			r = read(Fd, z, sizeof(z));
-			if( r < sizeof(z) )
-				return -1;
-			
-			Gfinfo = z;
-			xar_attrcopy_to_heap(x, f, "ea/com.apple.FinderInfo", finfo_read);
-			if( lseek(Fd, (off_t)off, SEEK_SET) == -1 )
-				return -1;
-		}
-		if( ntohl(ase.entry_id) == AS_ID_RESOURCE ) {
-			entoff = (off_t)ntohl(ase.offset);
-			if( lseek(Fd, entoff, SEEK_SET) == -1 )
-				return -1;
-
-			xar_attrcopy_to_heap(x, f, "ea/com.apple.ResourceFork", xar_rsrc_read);
-
-			if( lseek(Fd, (off_t)off, SEEK_SET) == -1 )
-				return -1;
-		}
-	}
-
-	close(Fd);
-	return 0;
-}
-#endif
-
-/* underbar_extract
- * Extract finderinfo and resource fork information to an appledouble
- * ._ file.
- */
-static int32_t underbar_extract(xar_t x, xar_file_t f, const char* file) {
-	char underbarname[4096];
-	char *dname, *bname, *tmp, *tmp2;
-	const char *rsrclenstr;
-	struct AppleSingleHeader ash;
-	struct AppleSingleEntry  ase;
-	int num_entries = 0, rsrclen = 0, have_rsrc = 0, have_fi = 0;
-
-	if( xar_prop_get(f, "ea/com.apple.FinderInfo", NULL) == 0 ) {
-		have_fi = 1;
-		num_entries++;
-	}
-
-	if( xar_prop_get(f, "ea/com.apple.ResourceFork", NULL) == 0 ) {
-		have_rsrc = 1;
-		num_entries++;
-	}
-
-	if( num_entries == 0 )
-		return 0;
-
-	tmp = strdup(file);
-	tmp2 = strdup(file);
-	dname = dirname(tmp2);
-	bname = basename(tmp);
-
-	memset(underbarname, 0, sizeof(underbarname));
-	snprintf(underbarname, sizeof(underbarname)-1, "%s/._%s", dname, bname);
-	free(tmp);
-	free(tmp2);
-
-	Fd = open(underbarname, O_RDWR | O_CREAT | O_TRUNC, 0);
-	if( Fd < 0 )
-		return -1;
-
-	xar_prop_get(f, "ea/com.apple.ResourceFork/size", &rsrclenstr);
-	if( rsrclenstr ) 
-		rsrclen = strtol(rsrclenstr, NULL, 10);
-
-	memset(&ash, 0, sizeof(ash));
-	memset(&ase, 0, sizeof(ase));
-	ash.magic = htonl(APPLEDOUBLE_MAGIC);
-	ash.version = htonl(APPLEDOUBLE_VERSION);
-	ash.entries = htons(num_entries);
-
-	write(Fd, &ash, XAR_ASH_SIZE);
-
-	ase.offset = htonl(XAR_ASH_SIZE + ntohs(ash.entries)*12);
-	if( have_fi ) {
-		ase.entry_id = htonl(AS_ID_FINDER);
-		ase.length = htonl(32);
-		write(Fd, &ase, 12);
-	}
-
-	if( have_rsrc ) {
-		ase.entry_id = htonl(AS_ID_RESOURCE);
-		ase.offset = htonl(ntohl(ase.offset) + ntohl(ase.length));
-		ase.length = htonl(rsrclen);
-		write(Fd, &ase, 12);
-	}
-	
-	if( have_fi )
-		xar_attrcopy_from_heap(x, f, "ea/com.apple.FinderInfo", xar_rsrc_write);
-	if( have_rsrc )
-		xar_attrcopy_from_heap(x, f, "ea/com.apple.ResourceFork", xar_rsrc_write);
-	close(Fd);
-
-	xar_set_perm(x, f, underbarname);
-	
-	return 0;
-}
-
-
-int32_t xar_darwinattr_archive(xar_t x, xar_file_t f, const char* file)
-{
-#if defined(__APPLE__)
-#if defined(HAVE_GETXATTR)
-	if( ea_archive(x, f, file) == 0 )
-		return 0;
-#endif
-	if( nonea_archive(x, f, file) == 0 )
-		return 0;
-	return underbar_archive(x, f, file);
-#endif /* __APPLE__ */
-	return 0;
-}
-
-int32_t xar_darwinattr_extract(xar_t x, xar_file_t f, const char* file)
-{
-#if defined(__APPLE__)
-#if defined(HAVE_GETXATTR)
-	if( ea_extract(x, f, file) == 0 )
-		return 0;
-#endif
-
-	if( nonea_extract(x, f, file) == 0 )
-		return 0;
-#endif /* __APPLE__ */
-	return underbar_extract(x, f, file);
-}

Copied: branches/release_1_4/base/src/programs/xar/lib/darwinattr.c (from rev 23968, trunk/base/src/programs/xar/lib/darwinattr.c)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/darwinattr.c	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/darwinattr.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,581 @@
+/*
+ * Copyright (c) 2004 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 24-Apr-2005
+ * DRI: Rob Braun <bbraun at synack.net>
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <libgen.h>
+#include <sys/fcntl.h>
+#include <sys/stat.h>
+#include <arpa/inet.h>
+#include "xar.h"
+#include "arcmod.h"
+#include "b64.h"
+#include <errno.h>
+#include <string.h>
+#include "util.h"
+#include "linuxattr.h"
+#include "io.h"
+#include "appledouble.h"
+#include "stat.h"
+
+#if defined(HAVE_SYS_XATTR_H)
+#include <sys/xattr.h>
+#endif
+
+static int Fd;
+
+#if defined(__APPLE__)
+#ifdef HAVE_GETATTRLIST
+#include <sys/attr.h>
+#include <sys/vnode.h>
+struct fi {
+    uint32_t     length;
+    fsobj_type_t objtype;
+    char finderinfo[32];
+};
+
+static char *Gfinfo = NULL;
+
+/* finfo_read
+ * This is for archiving the finderinfo via the getattrlist method.
+ * This function is used from the nonea_archive() function.
+ */
+static int32_t finfo_read(xar_t x, xar_file_t f, void *buf, size_t len) {
+	if( len < 32 )
+		return -1;
+
+	if( Gfinfo == NULL )
+		return 0;
+
+	memcpy(buf, Gfinfo, 32);
+	Gfinfo = NULL;
+	return 32;
+}
+
+/* finfo_write
+ * This is for extracting the finderinfo via the setattrlist method.
+ * This function is used from the nonea_extract() function.
+ */
+static int32_t finfo_write(xar_t x, xar_file_t f, void *buf, size_t len) {
+	struct attrlist attrs;
+	struct fi finfo;
+
+	if( len < 32 )
+		return -1;
+	if( Gfinfo == NULL )
+		return 0;
+
+	memset(&attrs, 0, sizeof(attrs));
+	attrs.bitmapcount = ATTR_BIT_MAP_COUNT;
+	attrs.commonattr = ATTR_CMN_OBJTYPE | ATTR_CMN_FNDRINFO;
+
+	getattrlist(Gfinfo, &attrs, &finfo, sizeof(finfo), 0);
+
+	attrs.commonattr = ATTR_CMN_FNDRINFO;
+	if( setattrlist(Gfinfo, &attrs, buf, 32, 0) != 0 )
+		return -1;
+
+	Gfinfo = NULL;
+	return 32;
+}
+#endif /* HAVE_GETATTRLIST */
+
+/* xar_rsrc_read
+ * This is the read callback function for archiving the resource fork via
+ * the ..namedfork method.  This callback is used from nonea_archive()
+ */
+static int32_t xar_rsrc_read(xar_t x, xar_file_t f, void *inbuf, size_t bsize) {
+	int32_t r;
+
+	while(1) {
+		r = read(Fd, inbuf, bsize);
+		if( (r < 0) && (errno == EINTR) )
+			continue;
+		return r;
+	}
+}
+#endif /* __APPLE__ */
+
+/* xar_rsrc_write
+ * This is the write callback function for writing the resource fork
+ * back to the file via ..namedfork method.  This is the callback used
+ * in nonea_extract() and underbar_extract().
+ */
+static int32_t xar_rsrc_write(xar_t x, xar_file_t f, void *buf, size_t len) {
+	int32_t r;
+	size_t off = 0;
+	do {
+		r = write(Fd, buf+off, len-off);
+		if( (r < 0) && (errno != EINTR) )
+			return r;
+		off += r;
+	} while( off < len );
+	return off;
+}
+
+#ifdef __APPLE__
+#if defined(HAVE_GETXATTR)
+static char *Gbuf = NULL;
+static int   Glen = 0;
+static int   Goff = 0;
+
+static int32_t xar_ea_read(xar_t x, xar_file_t f, void *buf, size_t len) {
+	if( Gbuf == NULL )
+		return 0;
+
+	if( (Glen-Goff) <= len ) {
+		int siz = Glen-Goff;
+		memcpy(buf, Gbuf+Goff, siz);
+		free(Gbuf);
+		Gbuf = NULL;
+		Goff = 0;
+		Glen = 0;
+		return siz;
+	}
+
+	memcpy(buf, Gbuf+Goff, len);
+	Goff += len;
+
+	if( Goff == Glen ) {
+		free(Gbuf);
+		Gbuf = NULL;
+		Goff = 0;
+		Glen = 0;
+	}
+
+	return len;
+}
+
+static int32_t xar_ea_write(xar_t x, xar_file_t f, void *buf, size_t len) {
+	if( Gbuf == NULL )
+		return 0;
+
+	if( Goff == Glen )
+		return 0;
+
+	if( (Glen-Goff) <= len ) {
+		int siz = Glen-Goff;
+		memcpy(Gbuf+Goff, buf, siz);
+		return siz;
+	}
+
+	memcpy(Gbuf+Goff, buf, len);
+	Goff += len;
+
+	return len;
+}
+
+static int32_t ea_archive(xar_t x, xar_file_t f, const char* file) {
+	char *buf, *i;
+	int ret, bufsz;
+	int32_t retval = 0;
+
+	ret = listxattr(file, NULL, 0, XATTR_NOFOLLOW);
+	if( ret < 0 )
+		return -1;
+	if( ret == 0 )
+		return 0;
+	bufsz = ret;
+
+TRYAGAIN:
+	buf = malloc(bufsz);
+	if( !buf )
+		goto TRYAGAIN;
+	ret = listxattr(file, buf, bufsz, XATTR_NOFOLLOW);
+	if( ret < 0 ) {
+		switch(errno) {
+		case ERANGE: bufsz = bufsz*2; free(buf); goto TRYAGAIN;
+		case ENOTSUP: retval = 0; goto BAIL;
+		default: retval = -1; goto BAIL;
+		};
+	}
+	if( ret == 0 ) {
+		retval = 0;
+		goto BAIL;
+	}
+
+	for( i = buf; (i-buf) < ret; i += strlen(i)+1 ) {
+		char tempnam[1024];
+		ret = getxattr(file, i, NULL, 0, 0, XATTR_NOFOLLOW);
+		if( ret < 0 )
+			continue;
+		Glen = ret;
+		Gbuf = malloc(Glen);
+		if( !Gbuf )
+			goto BAIL;
+
+		ret = getxattr(file, i, Gbuf, Glen, 0, XATTR_NOFOLLOW);
+		if( ret < 0 ) {
+			free(Gbuf);
+			Gbuf = NULL;
+			Glen = 0;
+			continue;
+		}
+
+		memset(tempnam, 0, sizeof(tempnam));
+		snprintf(tempnam, sizeof(tempnam)-1, "ea/%s", i);
+		xar_attrcopy_to_heap(x, f, tempnam, xar_ea_read);
+	}
+BAIL:
+	free(buf);
+	return retval;
+}
+
+static int32_t ea_extract(xar_t x, xar_file_t f, const char* file) {
+	const char *prop;
+	xar_iter_t iter;
+	
+	iter = xar_iter_new();
+	for(prop = xar_prop_first(f, iter); prop; prop = xar_prop_next(iter)) {
+		const char *opt;
+		char sz[1024];
+		int len;
+
+		if( strncmp(prop, XAR_EA_FORK, strlen(XAR_EA_FORK)) )
+			continue;
+		if( strlen(prop) <= strlen(XAR_EA_FORK) )
+			continue;
+
+		memset(sz, 0, sizeof(sz));
+		snprintf(sz, sizeof(sz)-1, "%s/size", prop);
+		xar_prop_get(f, sz, &opt);
+		if( !opt )
+			continue;
+
+		len = strtol(opt, NULL, 10);
+		Gbuf = malloc(len);
+		if( !Gbuf )
+			return -1;
+		Glen = len;
+
+		xar_attrcopy_from_heap(x, f, prop, xar_ea_write);
+
+		setxattr(file, prop+strlen(XAR_EA_FORK)+1, Gbuf, Glen, 0, XATTR_NOFOLLOW);
+		free(Gbuf);
+		Gbuf = NULL;
+		Glen = 0;
+		Goff = 0;
+	}
+
+	return 0;
+}
+#endif /* HAVE_GETXATTR */
+
+/* nonea_archive
+ * Archive the finderinfo and resource fork through getattrlist and
+ * ..namedfork methods rather than via EAs.  This is mainly for 10.3
+ * and earlier support
+ */
+static int32_t nonea_archive(xar_t x, xar_file_t f, const char* file) {
+	char rsrcname[4096];
+	struct stat sb;
+#ifdef HAVE_GETATTRLIST
+	struct attrlist attrs;
+	struct fi finfo;
+	int ret;
+	char z[32];
+	
+	memset(&attrs, 0, sizeof(attrs));
+	attrs.bitmapcount = ATTR_BIT_MAP_COUNT;
+	attrs.commonattr = ATTR_CMN_OBJTYPE | ATTR_CMN_FNDRINFO;
+
+	ret = getattrlist(file, &attrs, &finfo, sizeof(finfo), 0);
+	if( ret != 0 )
+		return -1;
+
+	memset(z, 0, sizeof(z));
+	if( memcmp(finfo.finderinfo, z, sizeof(finfo.finderinfo)) != 0 ) {
+		Gfinfo = finfo.finderinfo;
+		xar_attrcopy_to_heap(x, f, "ea/com.apple.FinderInfo", finfo_read);
+	}
+#endif /* HAVE_GETATTRLIST */
+
+
+	memset(rsrcname, 0, sizeof(rsrcname));
+	snprintf(rsrcname, sizeof(rsrcname)-1, "%s/..namedfork/rsrc", file);
+	if( lstat(rsrcname, &sb) != 0 )
+		return 0;
+
+	if( sb.st_size == 0 )
+		return 0;
+
+	Fd = open(rsrcname, O_RDONLY, 0);
+	if( Fd < 0 )
+		return -1;
+
+	xar_attrcopy_to_heap(x, f, "ea/com.apple.ResourceFork", xar_rsrc_read);
+	close(Fd);
+	return 0;
+}
+
+/* nonea_extract
+ * Extract the finderinfo and resource fork through setattrlist and
+ * ..namedfork methods rather than via EAs.  This is mainly for 10.3
+ * and earlier support
+ */
+static int32_t nonea_extract(xar_t x, xar_file_t f, const char* file) {
+	char rsrcname[4096];
+#ifdef HAVE_SETATTRLIST
+	struct attrlist attrs;
+	struct fi finfo;
+	int ret;
+	
+	memset(&attrs, 0, sizeof(attrs));
+	attrs.bitmapcount = ATTR_BIT_MAP_COUNT;
+	attrs.commonattr = ATTR_CMN_OBJTYPE | ATTR_CMN_FNDRINFO;
+
+	ret = getattrlist(file, &attrs, &finfo, sizeof(finfo), 0);
+	if( ret != 0 )
+		return -1;
+
+	Gfinfo = (char *)file;
+
+	xar_attrcopy_from_heap(x, f, "ea/com.apple.FinderInfo", finfo_write);
+#endif /* HAVE_SETATTRLIST */
+	
+	memset(rsrcname, 0, sizeof(rsrcname));
+	snprintf(rsrcname, sizeof(rsrcname)-1, "%s/..namedfork/rsrc", file);
+	Fd = open(rsrcname, O_RDWR|O_TRUNC);
+	if( Fd < 0 )
+		return 0;
+
+	xar_attrcopy_from_heap(x, f, "ea/com.apple.ResourceFork", xar_rsrc_write);
+	close(Fd);
+	return 0;
+}
+#endif /* __APPLE__ */
+
+/* xar_underbar_check
+ * Check to see if the file we're archiving is a ._ file.  If so,
+ * stop the archival process.
+ */
+int32_t xar_underbar_check(xar_t x, xar_file_t f, const char* file) {
+	char *bname, *tmp;
+
+	tmp = strdup(file);
+	bname = basename(tmp);
+
+	if(bname && (bname[0] == '.') && (bname[1] == '_')) {
+		free(tmp);
+		return 1;
+	}
+
+	free(tmp);
+	return 0;
+}
+
+#ifdef __APPLE__
+/* This only really makes sense on OSX */
+static int32_t underbar_archive(xar_t x, xar_file_t f, const char* file) {
+	struct stat sb;
+	char underbarname[4096], z[32];
+	char *dname, *bname, *tmp, *tmp2;
+	struct AppleSingleHeader ash;
+	struct AppleSingleEntry  ase;
+	int num_entries = 0, i, r;
+	off_t off;
+
+	tmp = strdup(file);
+	tmp2 = strdup(file);
+	dname = dirname(tmp2);
+	bname = basename(tmp);
+
+	memset(underbarname, 0, sizeof(underbarname));
+	snprintf(underbarname, sizeof(underbarname)-1, "%s/._%s", dname, bname);
+	free(tmp);
+	free(tmp2);
+	
+	if( stat(underbarname, &sb) != 0 )
+		return 0;
+
+	Fd = open(underbarname, O_RDONLY);
+	if( Fd < 0 )
+		return -1;
+
+	memset(&ash, 0, sizeof(ash));
+	memset(&ase, 0, sizeof(ase));
+	r = read(Fd, &ash, XAR_ASH_SIZE);
+	if( r < XAR_ASH_SIZE )
+		return -1;
+
+	if( ntohl(ash.magic) != APPLEDOUBLE_MAGIC )
+		return -1;
+	if( ntohl(ash.version) != APPLEDOUBLE_VERSION )
+		return -1;
+
+	off = XAR_ASH_SIZE;
+	num_entries = ntohs(ash.entries);
+
+	for(i = 0; i < num_entries; i++) {
+		off_t entoff;
+		r = read(Fd, &ase, sizeof(ase));
+		if( r < sizeof(ase) )
+			return -1;
+		off+=r;
+
+		if( ntohl(ase.entry_id) == AS_ID_FINDER ) {
+			entoff = (off_t)ntohl(ase.offset);
+			if( lseek(Fd, entoff, SEEK_SET) == -1 )
+				return -1;
+			r = read(Fd, z, sizeof(z));
+			if( r < sizeof(z) )
+				return -1;
+			
+			Gfinfo = z;
+			xar_attrcopy_to_heap(x, f, "ea/com.apple.FinderInfo", finfo_read);
+			if( lseek(Fd, (off_t)off, SEEK_SET) == -1 )
+				return -1;
+		}
+		if( ntohl(ase.entry_id) == AS_ID_RESOURCE ) {
+			entoff = (off_t)ntohl(ase.offset);
+			if( lseek(Fd, entoff, SEEK_SET) == -1 )
+				return -1;
+
+			xar_attrcopy_to_heap(x, f, "ea/com.apple.ResourceFork", xar_rsrc_read);
+
+			if( lseek(Fd, (off_t)off, SEEK_SET) == -1 )
+				return -1;
+		}
+	}
+
+	close(Fd);
+	return 0;
+}
+#endif
+
+/* underbar_extract
+ * Extract finderinfo and resource fork information to an appledouble
+ * ._ file.
+ */
+static int32_t underbar_extract(xar_t x, xar_file_t f, const char* file) {
+	char underbarname[4096];
+	char *dname, *bname, *tmp, *tmp2;
+	const char *rsrclenstr;
+	struct AppleSingleHeader ash;
+	struct AppleSingleEntry  ase;
+	int num_entries = 0, rsrclen = 0, have_rsrc = 0, have_fi = 0;
+
+	if( xar_prop_get(f, "ea/com.apple.FinderInfo", NULL) == 0 ) {
+		have_fi = 1;
+		num_entries++;
+	}
+
+	if( xar_prop_get(f, "ea/com.apple.ResourceFork", NULL) == 0 ) {
+		have_rsrc = 1;
+		num_entries++;
+	}
+
+	if( num_entries == 0 )
+		return 0;
+
+	tmp = strdup(file);
+	tmp2 = strdup(file);
+	dname = dirname(tmp2);
+	bname = basename(tmp);
+
+	memset(underbarname, 0, sizeof(underbarname));
+	snprintf(underbarname, sizeof(underbarname)-1, "%s/._%s", dname, bname);
+	free(tmp);
+	free(tmp2);
+
+	Fd = open(underbarname, O_RDWR | O_CREAT | O_TRUNC, 0);
+	if( Fd < 0 )
+		return -1;
+
+	xar_prop_get(f, "ea/com.apple.ResourceFork/size", &rsrclenstr);
+	if( rsrclenstr ) 
+		rsrclen = strtol(rsrclenstr, NULL, 10);
+
+	memset(&ash, 0, sizeof(ash));
+	memset(&ase, 0, sizeof(ase));
+	ash.magic = htonl(APPLEDOUBLE_MAGIC);
+	ash.version = htonl(APPLEDOUBLE_VERSION);
+	ash.entries = htons(num_entries);
+
+	write(Fd, &ash, XAR_ASH_SIZE);
+
+	ase.offset = htonl(XAR_ASH_SIZE + ntohs(ash.entries)*12);
+	if( have_fi ) {
+		ase.entry_id = htonl(AS_ID_FINDER);
+		ase.length = htonl(32);
+		write(Fd, &ase, 12);
+	}
+
+	if( have_rsrc ) {
+		ase.entry_id = htonl(AS_ID_RESOURCE);
+		ase.offset = htonl(ntohl(ase.offset) + ntohl(ase.length));
+		ase.length = htonl(rsrclen);
+		write(Fd, &ase, 12);
+	}
+	
+	if( have_fi )
+		xar_attrcopy_from_heap(x, f, "ea/com.apple.FinderInfo", xar_rsrc_write);
+	if( have_rsrc )
+		xar_attrcopy_from_heap(x, f, "ea/com.apple.ResourceFork", xar_rsrc_write);
+	close(Fd);
+
+	xar_set_perm(x, f, underbarname);
+	
+	return 0;
+}
+
+
+int32_t xar_darwinattr_archive(xar_t x, xar_file_t f, const char* file)
+{
+#if defined(__APPLE__)
+#if defined(HAVE_GETXATTR)
+	if( ea_archive(x, f, file) == 0 )
+		return 0;
+#endif
+	if( nonea_archive(x, f, file) == 0 )
+		return 0;
+	return underbar_archive(x, f, file);
+#endif /* __APPLE__ */
+	return 0;
+}
+
+int32_t xar_darwinattr_extract(xar_t x, xar_file_t f, const char* file)
+{
+#if defined(__APPLE__)
+#if defined(HAVE_GETXATTR)
+	if( ea_extract(x, f, file) == 0 )
+		return 0;
+#endif
+
+	if( nonea_extract(x, f, file) == 0 )
+		return 0;
+#endif /* __APPLE__ */
+	return underbar_extract(x, f, file);
+}

Deleted: branches/release_1_4/base/src/programs/xar/lib/darwinattr.h
===================================================================
--- trunk/base/src/programs/xar/lib/darwinattr.h	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/darwinattr.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,11 +0,0 @@
-/*
- * Rob Braun <bbraun at synack.net>
- * 23-Apr-2005
- * Copyright (c) 2004 Rob Braun.  All rights reserved.
- */
-#ifndef _XAR_DARWINATTR_H_
-#define _XAR_DARWINATTR_H_
-int32_t xar_underbar_check(xar_t x, xar_file_t f, const char* file);
-int32_t xar_darwinattr_archive(xar_t x, xar_file_t f, const char* file);
-int32_t xar_darwinattr_extract(xar_t x, xar_file_t f, const char* file);
-#endif /* _XAR_DARWINATTR_H_ */

Copied: branches/release_1_4/base/src/programs/xar/lib/darwinattr.h (from rev 23968, trunk/base/src/programs/xar/lib/darwinattr.h)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/darwinattr.h	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/darwinattr.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,11 @@
+/*
+ * Rob Braun <bbraun at synack.net>
+ * 23-Apr-2005
+ * Copyright (c) 2004 Rob Braun.  All rights reserved.
+ */
+#ifndef _XAR_DARWINATTR_H_
+#define _XAR_DARWINATTR_H_
+int32_t xar_underbar_check(xar_t x, xar_file_t f, const char* file);
+int32_t xar_darwinattr_archive(xar_t x, xar_file_t f, const char* file);
+int32_t xar_darwinattr_extract(xar_t x, xar_file_t f, const char* file);
+#endif /* _XAR_DARWINATTR_H_ */

Deleted: branches/release_1_4/base/src/programs/xar/lib/data.c
===================================================================
--- trunk/base/src/programs/xar/lib/data.c	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/data.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,124 +0,0 @@
-#define _FILE_OFFSET_BITS 64
-#include <stdlib.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <limits.h>
-#include <unistd.h>
-#include <inttypes.h>
-#include <sys/types.h>
-
-#include "xar.h"
-#include "filetree.h"
-#include "archive.h"
-#include "io.h"
-
-#ifndef O_EXLOCK
-#define O_EXLOCK 0
-#endif
-
-static int Fd;
-
-int32_t xar_data_read(xar_t x, xar_file_t f, void *inbuf, size_t bsize) {
-	int32_t r;
-
-	while(1) {
-		r = read(Fd, inbuf, bsize);
-		if( (r < 0) && (errno == EINTR) )
-			continue;
-		return r;
-	}
-}
-
-int32_t xar_data_write(xar_t x, xar_file_t f, void *buf, size_t len) {
-	int32_t r;
-	size_t off = 0;
-	do {
-		r = write(Fd, buf+off, len-off);
-		if( (r < 0) && (errno != EINTR) )
-			return r;
-		off += r;
-	} while( off < len );
-	return off;
-}
-
-/* xar_data_archive
- * This is the arcmod archival entry point for archiving the file's
- * data into the heap file.
- */
-int32_t xar_data_archive(xar_t x, xar_file_t f, const char *file) {
-	const char *opt;
-	int32_t retval = 0;
-
-	xar_prop_get(f, "type", &opt);
-	if(!opt) return 0;
-	if( strcmp(opt, "file") != 0 ) {
-		if( strcmp(opt, "hardlink") == 0 ) {
-			opt = xar_attr_get(f, "type", "link");
-			if( !opt )
-				return 0;
-			if( strcmp(opt, "original") != 0 )
-				return 0;
-			/* else, we're an original hardlink, so keep going */
-		} else
-			return 0;
-	}
-
-	Fd = open(file, O_RDONLY);
-	if( Fd < 0 ) {
-		xar_err_new(x);
-		xar_err_set_file(x, f);
-		xar_err_set_string(x, "io: Could not open file");
-		xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_CREATION);
-		return -1;
-	}
-
-	retval = xar_attrcopy_to_heap(x, f, "data", xar_data_read);
-
-	close(Fd);
-	return retval;
-}
-
-int32_t xar_data_extract(xar_t x, xar_file_t f, const char *file) {
-	const char *opt;
-
-        /* Only regular files are copied in and out of the heap here */
-        xar_prop_get(f, "type", &opt);
-        if( !opt ) return 0;
-        if( strcmp(opt, "file") != 0 ) {
-                if( strcmp(opt, "hardlink") == 0 ) {
-                        opt = xar_attr_get(f, "type", "link");
-                        if( !opt )
-                                return 0;
-                        if( strcmp(opt, "original") != 0 )
-                                return 0; 
-                        /* else, we're an original hardlink, so keep going */
-                } else
-                        return 0;
-        }
-
-        /* mode 600 since other modules may need to operate on the file
-         * prior to the real permissions being set.
-         */
-TRYAGAIN:
-        Fd = open(file, O_RDWR|O_TRUNC|O_EXLOCK, 0600);
-        if( Fd < 0 ) {
-		if( errno == ENOENT ) {
-			xar_file_t parent = XAR_FILE(f)->parent;
-			if( parent && (xar_extract(x, parent) == 0) )
-				goto TRYAGAIN;
-		}
-			
-               	xar_err_new(x);
-               	xar_err_set_file(x, f);
-               	xar_err_set_string(x, "io: Could not create file");
-               	xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
-               	return -1;
-        }
-
-	xar_attrcopy_from_heap(x, f, "data", xar_data_write);
-	close(Fd);
-	return 0;
-}
-

Copied: branches/release_1_4/base/src/programs/xar/lib/data.c (from rev 23968, trunk/base/src/programs/xar/lib/data.c)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/data.c	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/data.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,124 @@
+#define _FILE_OFFSET_BITS 64
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <string.h>
+#include <limits.h>
+#include <unistd.h>
+#include <inttypes.h>
+#include <sys/types.h>
+
+#include "xar.h"
+#include "filetree.h"
+#include "archive.h"
+#include "io.h"
+
+#ifndef O_EXLOCK
+#define O_EXLOCK 0
+#endif
+
+static int Fd;
+
+int32_t xar_data_read(xar_t x, xar_file_t f, void *inbuf, size_t bsize) {
+	int32_t r;
+
+	while(1) {
+		r = read(Fd, inbuf, bsize);
+		if( (r < 0) && (errno == EINTR) )
+			continue;
+		return r;
+	}
+}
+
+int32_t xar_data_write(xar_t x, xar_file_t f, void *buf, size_t len) {
+	int32_t r;
+	size_t off = 0;
+	do {
+		r = write(Fd, buf+off, len-off);
+		if( (r < 0) && (errno != EINTR) )
+			return r;
+		off += r;
+	} while( off < len );
+	return off;
+}
+
+/* xar_data_archive
+ * This is the arcmod archival entry point for archiving the file's
+ * data into the heap file.
+ */
+int32_t xar_data_archive(xar_t x, xar_file_t f, const char *file) {
+	const char *opt;
+	int32_t retval = 0;
+
+	xar_prop_get(f, "type", &opt);
+	if(!opt) return 0;
+	if( strcmp(opt, "file") != 0 ) {
+		if( strcmp(opt, "hardlink") == 0 ) {
+			opt = xar_attr_get(f, "type", "link");
+			if( !opt )
+				return 0;
+			if( strcmp(opt, "original") != 0 )
+				return 0;
+			/* else, we're an original hardlink, so keep going */
+		} else
+			return 0;
+	}
+
+	Fd = open(file, O_RDONLY);
+	if( Fd < 0 ) {
+		xar_err_new(x);
+		xar_err_set_file(x, f);
+		xar_err_set_string(x, "io: Could not open file");
+		xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_CREATION);
+		return -1;
+	}
+
+	retval = xar_attrcopy_to_heap(x, f, "data", xar_data_read);
+
+	close(Fd);
+	return retval;
+}
+
+int32_t xar_data_extract(xar_t x, xar_file_t f, const char *file) {
+	const char *opt;
+
+        /* Only regular files are copied in and out of the heap here */
+        xar_prop_get(f, "type", &opt);
+        if( !opt ) return 0;
+        if( strcmp(opt, "file") != 0 ) {
+                if( strcmp(opt, "hardlink") == 0 ) {
+                        opt = xar_attr_get(f, "type", "link");
+                        if( !opt )
+                                return 0;
+                        if( strcmp(opt, "original") != 0 )
+                                return 0; 
+                        /* else, we're an original hardlink, so keep going */
+                } else
+                        return 0;
+        }
+
+        /* mode 600 since other modules may need to operate on the file
+         * prior to the real permissions being set.
+         */
+TRYAGAIN:
+        Fd = open(file, O_RDWR|O_TRUNC|O_EXLOCK, 0600);
+        if( Fd < 0 ) {
+		if( errno == ENOENT ) {
+			xar_file_t parent = XAR_FILE(f)->parent;
+			if( parent && (xar_extract(x, parent) == 0) )
+				goto TRYAGAIN;
+		}
+			
+               	xar_err_new(x);
+               	xar_err_set_file(x, f);
+               	xar_err_set_string(x, "io: Could not create file");
+               	xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
+               	return -1;
+        }
+
+	xar_attrcopy_from_heap(x, f, "data", xar_data_write);
+	close(Fd);
+	return 0;
+}
+

Deleted: branches/release_1_4/base/src/programs/xar/lib/data.h
===================================================================
--- trunk/base/src/programs/xar/lib/data.h	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/data.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,10 +0,0 @@
-/*
- * Rob Braun <bbraun at synack.net>
- * 21-Apr-2004
- * Copyright (c) 2004 Rob Braun.  All rights reserved.
- */
-#ifndef _XAR_DATA_H_
-#define _XAR_DATA_H_
-int32_t xar_data_archive(xar_t x, xar_file_t f, const char* file);
-int32_t xar_data_extract(xar_t x, xar_file_t f, const char* file);
-#endif /* _XAR_DATA_H_ */

Copied: branches/release_1_4/base/src/programs/xar/lib/data.h (from rev 23968, trunk/base/src/programs/xar/lib/data.h)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/data.h	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/data.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,10 @@
+/*
+ * Rob Braun <bbraun at synack.net>
+ * 21-Apr-2004
+ * Copyright (c) 2004 Rob Braun.  All rights reserved.
+ */
+#ifndef _XAR_DATA_H_
+#define _XAR_DATA_H_
+int32_t xar_data_archive(xar_t x, xar_file_t f, const char* file);
+int32_t xar_data_extract(xar_t x, xar_file_t f, const char* file);
+#endif /* _XAR_DATA_H_ */

Deleted: branches/release_1_4/base/src/programs/xar/lib/err.c
===================================================================
--- trunk/base/src/programs/xar/lib/err.c	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/err.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2005 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of his contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 03-Apr-2005
- * DRI: Rob Braun <bbraun at opendarwin.org>
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include "xar.h"
-#include "archive.h"
-
-#define ECTX(x) ((struct errctx *)(x))
-
-void xar_register_errhandler(xar_t x, err_handler callback, void *usrctx) {
-	ECTX(&XAR(x)->errctx)->usrctx = usrctx;
-	XAR(x)->ercallback = callback;
-	return;
-}
-
-xar_file_t xar_err_get_file(xar_errctx_t ctx) {
-	return ECTX(ctx)->file;
-}
-
-void  xar_err_set_file(xar_t x, xar_file_t f) {
-	XAR(x)->errctx.file = f;
-	return;
-}
-
-const char *xar_err_get_string(xar_errctx_t ctx) {
-	return ECTX(ctx)->str;
-}
-
-void  xar_err_set_string(xar_t x, const char *str) {
-	XAR(x)->errctx.str = str;
-	return;
-}
-
-int xar_err_get_errno(xar_errctx_t ctx) {
-	return ECTX(ctx)->saved_errno;
-}
-
-void  xar_err_set_errno(xar_t x, int e) {
-	XAR(x)->errctx.saved_errno = e;
-	return;
-}
-
-void xar_err_new(xar_t x) {
-	memset(&XAR(x)->errctx, 0, sizeof(struct errctx));
-	XAR(x)->errctx.saved_errno = errno;
-	return;
-}
-
-int32_t xar_err_callback(xar_t x, int32_t sev, int32_t err) {
-	if( XAR(x)->ercallback )
-		return XAR(x)->ercallback(sev, err, &XAR(x)->errctx, ECTX(&XAR(x)->errctx)->usrctx);
-	return 0;
-}

Copied: branches/release_1_4/base/src/programs/xar/lib/err.c (from rev 23968, trunk/base/src/programs/xar/lib/err.c)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/err.c	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/err.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2005 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of his contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 03-Apr-2005
+ * DRI: Rob Braun <bbraun at opendarwin.org>
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include "xar.h"
+#include "archive.h"
+
+#define ECTX(x) ((struct errctx *)(x))
+
+void xar_register_errhandler(xar_t x, err_handler callback, void *usrctx) {
+	ECTX(&XAR(x)->errctx)->usrctx = usrctx;
+	XAR(x)->ercallback = callback;
+	return;
+}
+
+xar_file_t xar_err_get_file(xar_errctx_t ctx) {
+	return ECTX(ctx)->file;
+}
+
+void  xar_err_set_file(xar_t x, xar_file_t f) {
+	XAR(x)->errctx.file = f;
+	return;
+}
+
+const char *xar_err_get_string(xar_errctx_t ctx) {
+	return ECTX(ctx)->str;
+}
+
+void  xar_err_set_string(xar_t x, const char *str) {
+	XAR(x)->errctx.str = str;
+	return;
+}
+
+int xar_err_get_errno(xar_errctx_t ctx) {
+	return ECTX(ctx)->saved_errno;
+}
+
+void  xar_err_set_errno(xar_t x, int e) {
+	XAR(x)->errctx.saved_errno = e;
+	return;
+}
+
+void xar_err_new(xar_t x) {
+	memset(&XAR(x)->errctx, 0, sizeof(struct errctx));
+	XAR(x)->errctx.saved_errno = errno;
+	return;
+}
+
+int32_t xar_err_callback(xar_t x, int32_t sev, int32_t err) {
+	if( XAR(x)->ercallback )
+		return XAR(x)->ercallback(sev, err, &XAR(x)->errctx, ECTX(&XAR(x)->errctx)->usrctx);
+	return 0;
+}

Deleted: branches/release_1_4/base/src/programs/xar/lib/ext2.c
===================================================================
--- trunk/base/src/programs/xar/lib/ext2.c	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/ext2.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,235 +0,0 @@
-/*
- * Copyright (c) 2004 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 26-Oct-2004
- * DRI: Rob Braun <bbraun at synack.net>
- * Ported from xar-unsaxy 16-Apr-2005
- */
-
-#include "config.h"
-#ifndef HAVE_ASPRINTF
-#include "asprintf.h"
-#endif
-#include <stdio.h>
-#include <unistd.h>
-#include "xar.h"
-#include "arcmod.h"
-#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include "ext2.h"
-
-#ifdef HAVE_EXT2FS_EXT2_FS_H
-#include <ext2fs/ext2_fs.h>
-#else
-#if defined(HAVE_LINUX_EXT2_FS_H)
-typedef uint32_t u32;
-typedef uint8_t u8;
-#include <linux/ext2_fs.h>
-#endif
-#endif
-
-#define XAR_EXT2_FORK "ext2"
-
-#if defined(HAVE_EXT2FS_EXT2_FS_H) || defined(HAVE_LINUX_EXT2_FS_H)
-static void x_addprop(xar_file_t f, const char *name) {
-	char opt[1024];
-	memset(opt, 0, sizeof(opt));
-	snprintf(opt, sizeof(opt)-1, "%s/%s", XAR_ATTR_FORK, name);
-	xar_prop_set(f, opt, NULL);
-	xar_attr_set(f, opt, "fstype", "ext2");
-	return;
-}
-#endif
-
-int xar_ext2attr_archive(xar_t x, xar_file_t f, const char* file)
-{
-	int ret = 0;
-#if defined(HAVE_EXT2FS_EXT2_FS_H) || defined(HAVE_LINUX_EXT2_FS_H)
-	int fd, flags=0, version;
-	char *vstr;
-
-	fd = open(file, O_RDONLY);
-	if( fd < 0 ) {
-		return 0;
-	}
-	if( ioctl(fd, EXT2_IOC_GETVERSION, &version) < 0 ) {
-		ret = 0;
-		goto BAIL;
-	}
-	if( ioctl(fd, EXT2_IOC_GETFLAGS, &flags) < 0 ) {
-		ret = 0;
-		goto BAIL;
-	}
-
-	if( flags == 0 ) goto BAIL;
-
-	xar_prop_set(f, XAR_EXT2_FORK, NULL);
-	asprintf(&vstr, "%d", version);
-	xar_attr_set(f, XAR_EXT2_FORK, "version", vstr);
-	free(vstr);
-
-	if(! (flags & ~EXT2_SECRM_FL) )
-		x_addprop(f, "SecureDeletion");
-	if(! (flags & ~EXT2_UNRM_FL) )
-		x_addprop(f, "Undelete");
-	if(! (flags & ~EXT2_COMPR_FL) )
-		x_addprop(f, "Compress");
-	if(! (flags & ~EXT2_SYNC_FL) )
-		x_addprop(f, "Synchronous");
-	if(! (flags & ~EXT2_IMMUTABLE_FL) )
-		x_addprop(f, "Immutable");
-	if(! (flags & ~EXT2_APPEND_FL) )
-		x_addprop(f, "AppendOnly");
-	if(! (flags & ~EXT2_NODUMP_FL) )
-		x_addprop(f, "NoDump");
-	if(! (flags & ~EXT2_NOATIME_FL) )
-		x_addprop(f, "NoAtime");
-	if(! (flags & ~EXT2_DIRTY_FL) )
-		x_addprop(f, "CompDirty");
-	if(! (flags & ~EXT2_COMPRBLK_FL) )
-		x_addprop(f, "CompBlock");
-#ifdef EXT2_NOCOMPR_FL
-	if(! (flags & ~EXT2_NOCOMPR_FL) )
-		x_addprop(f, "NoCompBlock");
-#endif
-	if(! (flags & ~EXT2_ECOMPR_FL) )
-		x_addprop(f, "CompError");
-	if(! (flags & ~EXT2_BTREE_FL) )
-		x_addprop(f, "BTree");
-	if(! (flags & ~EXT2_INDEX_FL) )
-		x_addprop(f, "HashIndexed");
-	if(! (flags & ~EXT2_IMAGIC_FL) )
-		x_addprop(f, "iMagic");
-#ifdef EXT3_JOURNAL_DATA_FL
-	if(! (flags & ~EXT3_JOURNAL_DATA_FL) )
-		x_addprop(f, "Journaled");
-#endif
-	if(! (flags & ~EXT2_NOTAIL_FL) )
-		x_addprop(f, "NoTail");
-	if(! (flags & ~EXT2_DIRSYNC_FL) )
-		x_addprop(f, "DirSync");
-	if(! (flags & ~EXT2_TOPDIR_FL) )
-		x_addprop(f, "TopDir");
-	if(! (flags & ~EXT2_RESERVED_FL) )
-		x_addprop(f, "Reserved");
-
-BAIL:
-	close(fd);
-#endif
-	return ret;
-}
-
-#if defined(HAVE_EXT2FS_EXT2_FS_H) || defined(HAVE_LINUX_EXT2_FS_H)
-static int32_t e2prop_get(xar_file_t f, const char *name, char **value) {
-	char v[1024];
-
-	memset(v, 0, sizeof(v));
-	snprintf(v, sizeof(v)-1, "%s/%s", XAR_ATTR_FORK, name);
-	return xar_prop_get(f, v, (const char**)value);
-}
-#endif
-
-int xar_ext2attr_extract(xar_t x, xar_file_t f, const char* file)
-{
-#if defined(HAVE_EXT2FS_EXT2_FS_H) || defined(HAVE_LINUX_EXT2_FS_H)
-	int fd = -1, version, flags = 0;
-	char *tmp;
-
-	if( xar_prop_get(f, XAR_EXT2_FORK, NULL) == 0 ) {
-		const char *temp;
-		temp = xar_attr_get(f, XAR_EXT2_FORK, "version");
-		version = strtol(temp, NULL, 10);
-		fd = open(file, O_RDONLY);
-		if( fd < 0 )
-			return 0;
-		ioctl(fd, EXT2_IOC_SETVERSION, &version);
-	}
-
-	if( xar_prop_get(f, XAR_ATTR_FORK, NULL)  ) {
-		if( fd >= 0 ) close(fd);
-		return 0;
-	}
-
-	if( e2prop_get(f, "SecureDeletion", (char **)&tmp) == 0 )
-		flags |= EXT2_SECRM_FL;
-	if( e2prop_get(f, "Undelete", (char **)&tmp) == 0 )
-		flags |= EXT2_UNRM_FL ;
-	if( e2prop_get(f, "Compress", (char **)&tmp) == 0 )
-		flags |= EXT2_COMPR_FL ;
-	if( e2prop_get(f, "Synchronous", (char **)&tmp) == 0 )
-		flags |= EXT2_SYNC_FL ;
-	if( e2prop_get(f, "SystemImmutable", (char **)&tmp) == 0 )
-		flags |= EXT2_IMMUTABLE_FL ;
-	if( e2prop_get(f, "AppendOnly", (char **)&tmp) == 0 )
-		flags |= EXT2_APPEND_FL ;
-	if( e2prop_get(f, "NoDump", (char **)&tmp) == 0 )
-		flags |= EXT2_NODUMP_FL ;
-	if( e2prop_get(f, "NoAtime", (char **)&tmp) == 0 )
-		flags |= EXT2_NOATIME_FL ;
-	if( e2prop_get(f, "CompDirty", (char **)&tmp) == 0 )
-		flags |= EXT2_DIRTY_FL ;
-	if( e2prop_get(f, "CompBlock", (char **)&tmp) == 0 )
-		flags |= EXT2_COMPRBLK_FL ;
-#ifdef EXT2_NOCOMPR_FL
-	if( e2prop_get(f, "NoCompBlock", (char **)&tmp) == 0 )
-		flags |= EXT2_NOCOMPR_FL ;
-#endif
-	if( e2prop_get(f, "CompError", (char **)&tmp) == 0 )
-		flags |= EXT2_ECOMPR_FL ;
-	if( e2prop_get(f, "BTree", (char **)&tmp) == 0 )
-		flags |= EXT2_BTREE_FL ;
-	if( e2prop_get(f, "HashIndexed", (char **)&tmp) == 0 )
-		flags |= EXT2_INDEX_FL ;
-	if( e2prop_get(f, "iMagic", (char **)&tmp) == 0 )
-		flags |= EXT2_IMAGIC_FL ;
-#ifdef EXT3_JOURNAL_DATA_FL
-	if( e2prop_get(f, "Journaled", (char **)&tmp) == 0 )
-		flags |= EXT3_JOURNAL_DATA_FL ;
-#endif
-	if( e2prop_get(f, "NoTail", (char **)&tmp) == 0 )
-		flags |= EXT2_NOTAIL_FL ;
-	if( e2prop_get(f, "DirSync", (char **)&tmp) == 0 )
-		flags |= EXT2_DIRSYNC_FL ;
-	if( e2prop_get(f, "TopDir", (char **)&tmp) == 0 )
-		flags |= EXT2_TOPDIR_FL ;
-
-	if( fd < 0 ) {
-		fd = open(file, O_RDONLY);
-		if( fd < 0 )
-			return 0;
-	}
-
-	ioctl(fd, EXT2_IOC_SETFLAGS, &flags);
-	close(fd);
-#endif
-	return 0;
-}

Copied: branches/release_1_4/base/src/programs/xar/lib/ext2.c (from rev 23968, trunk/base/src/programs/xar/lib/ext2.c)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/ext2.c	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/ext2.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,235 @@
+/*
+ * Copyright (c) 2004 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 26-Oct-2004
+ * DRI: Rob Braun <bbraun at synack.net>
+ * Ported from xar-unsaxy 16-Apr-2005
+ */
+
+#include "config.h"
+#ifndef HAVE_ASPRINTF
+#include "asprintf.h"
+#endif
+#include <stdio.h>
+#include <unistd.h>
+#include "xar.h"
+#include "arcmod.h"
+#include <errno.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include "ext2.h"
+
+#ifdef HAVE_EXT2FS_EXT2_FS_H
+#include <ext2fs/ext2_fs.h>
+#else
+#if defined(HAVE_LINUX_EXT2_FS_H)
+typedef uint32_t u32;
+typedef uint8_t u8;
+#include <linux/ext2_fs.h>
+#endif
+#endif
+
+#define XAR_EXT2_FORK "ext2"
+
+#if defined(HAVE_EXT2FS_EXT2_FS_H) || defined(HAVE_LINUX_EXT2_FS_H)
+static void x_addprop(xar_file_t f, const char *name) {
+	char opt[1024];
+	memset(opt, 0, sizeof(opt));
+	snprintf(opt, sizeof(opt)-1, "%s/%s", XAR_ATTR_FORK, name);
+	xar_prop_set(f, opt, NULL);
+	xar_attr_set(f, opt, "fstype", "ext2");
+	return;
+}
+#endif
+
+int xar_ext2attr_archive(xar_t x, xar_file_t f, const char* file)
+{
+	int ret = 0;
+#if defined(HAVE_EXT2FS_EXT2_FS_H) || defined(HAVE_LINUX_EXT2_FS_H)
+	int fd, flags=0, version;
+	char *vstr;
+
+	fd = open(file, O_RDONLY);
+	if( fd < 0 ) {
+		return 0;
+	}
+	if( ioctl(fd, EXT2_IOC_GETVERSION, &version) < 0 ) {
+		ret = 0;
+		goto BAIL;
+	}
+	if( ioctl(fd, EXT2_IOC_GETFLAGS, &flags) < 0 ) {
+		ret = 0;
+		goto BAIL;
+	}
+
+	if( flags == 0 ) goto BAIL;
+
+	xar_prop_set(f, XAR_EXT2_FORK, NULL);
+	asprintf(&vstr, "%d", version);
+	xar_attr_set(f, XAR_EXT2_FORK, "version", vstr);
+	free(vstr);
+
+	if(! (flags & ~EXT2_SECRM_FL) )
+		x_addprop(f, "SecureDeletion");
+	if(! (flags & ~EXT2_UNRM_FL) )
+		x_addprop(f, "Undelete");
+	if(! (flags & ~EXT2_COMPR_FL) )
+		x_addprop(f, "Compress");
+	if(! (flags & ~EXT2_SYNC_FL) )
+		x_addprop(f, "Synchronous");
+	if(! (flags & ~EXT2_IMMUTABLE_FL) )
+		x_addprop(f, "Immutable");
+	if(! (flags & ~EXT2_APPEND_FL) )
+		x_addprop(f, "AppendOnly");
+	if(! (flags & ~EXT2_NODUMP_FL) )
+		x_addprop(f, "NoDump");
+	if(! (flags & ~EXT2_NOATIME_FL) )
+		x_addprop(f, "NoAtime");
+	if(! (flags & ~EXT2_DIRTY_FL) )
+		x_addprop(f, "CompDirty");
+	if(! (flags & ~EXT2_COMPRBLK_FL) )
+		x_addprop(f, "CompBlock");
+#ifdef EXT2_NOCOMPR_FL
+	if(! (flags & ~EXT2_NOCOMPR_FL) )
+		x_addprop(f, "NoCompBlock");
+#endif
+	if(! (flags & ~EXT2_ECOMPR_FL) )
+		x_addprop(f, "CompError");
+	if(! (flags & ~EXT2_BTREE_FL) )
+		x_addprop(f, "BTree");
+	if(! (flags & ~EXT2_INDEX_FL) )
+		x_addprop(f, "HashIndexed");
+	if(! (flags & ~EXT2_IMAGIC_FL) )
+		x_addprop(f, "iMagic");
+#ifdef EXT3_JOURNAL_DATA_FL
+	if(! (flags & ~EXT3_JOURNAL_DATA_FL) )
+		x_addprop(f, "Journaled");
+#endif
+	if(! (flags & ~EXT2_NOTAIL_FL) )
+		x_addprop(f, "NoTail");
+	if(! (flags & ~EXT2_DIRSYNC_FL) )
+		x_addprop(f, "DirSync");
+	if(! (flags & ~EXT2_TOPDIR_FL) )
+		x_addprop(f, "TopDir");
+	if(! (flags & ~EXT2_RESERVED_FL) )
+		x_addprop(f, "Reserved");
+
+BAIL:
+	close(fd);
+#endif
+	return ret;
+}
+
+#if defined(HAVE_EXT2FS_EXT2_FS_H) || defined(HAVE_LINUX_EXT2_FS_H)
+static int32_t e2prop_get(xar_file_t f, const char *name, char **value) {
+	char v[1024];
+
+	memset(v, 0, sizeof(v));
+	snprintf(v, sizeof(v)-1, "%s/%s", XAR_ATTR_FORK, name);
+	return xar_prop_get(f, v, (const char**)value);
+}
+#endif
+
+int xar_ext2attr_extract(xar_t x, xar_file_t f, const char* file)
+{
+#if defined(HAVE_EXT2FS_EXT2_FS_H) || defined(HAVE_LINUX_EXT2_FS_H)
+	int fd = -1, version, flags = 0;
+	char *tmp;
+
+	if( xar_prop_get(f, XAR_EXT2_FORK, NULL) == 0 ) {
+		const char *temp;
+		temp = xar_attr_get(f, XAR_EXT2_FORK, "version");
+		version = strtol(temp, NULL, 10);
+		fd = open(file, O_RDONLY);
+		if( fd < 0 )
+			return 0;
+		ioctl(fd, EXT2_IOC_SETVERSION, &version);
+	}
+
+	if( xar_prop_get(f, XAR_ATTR_FORK, NULL)  ) {
+		if( fd >= 0 ) close(fd);
+		return 0;
+	}
+
+	if( e2prop_get(f, "SecureDeletion", (char **)&tmp) == 0 )
+		flags |= EXT2_SECRM_FL;
+	if( e2prop_get(f, "Undelete", (char **)&tmp) == 0 )
+		flags |= EXT2_UNRM_FL ;
+	if( e2prop_get(f, "Compress", (char **)&tmp) == 0 )
+		flags |= EXT2_COMPR_FL ;
+	if( e2prop_get(f, "Synchronous", (char **)&tmp) == 0 )
+		flags |= EXT2_SYNC_FL ;
+	if( e2prop_get(f, "SystemImmutable", (char **)&tmp) == 0 )
+		flags |= EXT2_IMMUTABLE_FL ;
+	if( e2prop_get(f, "AppendOnly", (char **)&tmp) == 0 )
+		flags |= EXT2_APPEND_FL ;
+	if( e2prop_get(f, "NoDump", (char **)&tmp) == 0 )
+		flags |= EXT2_NODUMP_FL ;
+	if( e2prop_get(f, "NoAtime", (char **)&tmp) == 0 )
+		flags |= EXT2_NOATIME_FL ;
+	if( e2prop_get(f, "CompDirty", (char **)&tmp) == 0 )
+		flags |= EXT2_DIRTY_FL ;
+	if( e2prop_get(f, "CompBlock", (char **)&tmp) == 0 )
+		flags |= EXT2_COMPRBLK_FL ;
+#ifdef EXT2_NOCOMPR_FL
+	if( e2prop_get(f, "NoCompBlock", (char **)&tmp) == 0 )
+		flags |= EXT2_NOCOMPR_FL ;
+#endif
+	if( e2prop_get(f, "CompError", (char **)&tmp) == 0 )
+		flags |= EXT2_ECOMPR_FL ;
+	if( e2prop_get(f, "BTree", (char **)&tmp) == 0 )
+		flags |= EXT2_BTREE_FL ;
+	if( e2prop_get(f, "HashIndexed", (char **)&tmp) == 0 )
+		flags |= EXT2_INDEX_FL ;
+	if( e2prop_get(f, "iMagic", (char **)&tmp) == 0 )
+		flags |= EXT2_IMAGIC_FL ;
+#ifdef EXT3_JOURNAL_DATA_FL
+	if( e2prop_get(f, "Journaled", (char **)&tmp) == 0 )
+		flags |= EXT3_JOURNAL_DATA_FL ;
+#endif
+	if( e2prop_get(f, "NoTail", (char **)&tmp) == 0 )
+		flags |= EXT2_NOTAIL_FL ;
+	if( e2prop_get(f, "DirSync", (char **)&tmp) == 0 )
+		flags |= EXT2_DIRSYNC_FL ;
+	if( e2prop_get(f, "TopDir", (char **)&tmp) == 0 )
+		flags |= EXT2_TOPDIR_FL ;
+
+	if( fd < 0 ) {
+		fd = open(file, O_RDONLY);
+		if( fd < 0 )
+			return 0;
+	}
+
+	ioctl(fd, EXT2_IOC_SETFLAGS, &flags);
+	close(fd);
+#endif
+	return 0;
+}

Deleted: branches/release_1_4/base/src/programs/xar/lib/ext2.h
===================================================================
--- trunk/base/src/programs/xar/lib/ext2.h	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/ext2.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,11 +0,0 @@
-/*
- * Rob Braun <bbraun at synack.net>
- * 26-Oct-2004
- * Copyright (c) 2004 Rob Braun.  All rights reserved.
- */
-#ifndef _XAR_EXT2_H_
-#define _XAR_EXT2_H_
-#define XAR_ATTR_FORK "attribute"
-int xar_ext2attr_archive(xar_t x, xar_file_t f, const char* file);
-int xar_ext2attr_extract(xar_t x, xar_file_t f, const char* file);
-#endif /* _XAR_EXT2_H_ */

Copied: branches/release_1_4/base/src/programs/xar/lib/ext2.h (from rev 23968, trunk/base/src/programs/xar/lib/ext2.h)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/ext2.h	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/ext2.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,11 @@
+/*
+ * Rob Braun <bbraun at synack.net>
+ * 26-Oct-2004
+ * Copyright (c) 2004 Rob Braun.  All rights reserved.
+ */
+#ifndef _XAR_EXT2_H_
+#define _XAR_EXT2_H_
+#define XAR_ATTR_FORK "attribute"
+int xar_ext2attr_archive(xar_t x, xar_file_t f, const char* file);
+int xar_ext2attr_extract(xar_t x, xar_file_t f, const char* file);
+#endif /* _XAR_EXT2_H_ */

Deleted: branches/release_1_4/base/src/programs/xar/lib/fbsdattr.c
===================================================================
--- trunk/base/src/programs/xar/lib/fbsdattr.c	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/fbsdattr.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,247 +0,0 @@
-/*
- * Copyright (c) 2004 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 28-Oct-2004
- * DRI: Rob Braun <bbraun at synack.net>
- */
-
-#include "config.h"
-#include <unistd.h>
-#include "xar.h"
-#include "arcmod.h"
-#include "b64.h"
-#include "io.h"
-#include "archive.h"
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-
-/* FreeBSD Extended Attribute Headers */
-#ifdef HAVE_SYS_EXTATTR_H
-#include <sys/extattr.h>
-#endif
-#ifdef HAVE_LIBUTIL_H
-#include <libutil.h>
-#endif
-
-#ifdef HAVE_SYS_EXTATTR_H
-#include <sys/param.h>
-#include <sys/mount.h>
-#include <sys/extattr.h>
-#endif
-
-#ifdef HAVE_SYS_EXTATTR_H
-static const char *Gfile = NULL;
-static const char *Gattr = NULL;
-static void *Gbuf = NULL;
-static int Goff = 0;
-static int Gbufsz = 0;
-static int Gns = 0;
-
-int32_t xar_fbsdattr_read(xar_t x, xar_file_t f, void *buf, size_t len) {
-	if( !Gbuf ) {
-		Gbufsz = extattr_get_link(Gfile, Gns, Gattr, NULL, 0);
-		if( Gbufsz < 0 )
-			return -1;
-		Gbuf = malloc(Gbufsz);
-		if( !Gbuf )
-			return -1;
-
-		Gbufsz = extattr_get_link(Gfile, Gns, Gattr, Gbuf, Gbufsz);
-	}
-
-	if( (Gbufsz - Goff) <= len ) {
-		int32_t ret;
-
-		ret = Gbufsz - Goff;
-		memcpy(buf, Gbuf+Goff, ret);
-		Goff += ret;
-		return(ret);
-	} else {
-		memcpy(buf, Gbuf+Goff, len);
-		Gbuf += len;
-		return(len);
-	}
-
-}
-int32_t xar_fbsdattr_write(xar_t x, xar_file_t f, void *buf, size_t len) {
-	return extattr_set_link(Gfile, Gns, Gattr, buf, len);
-}
-#endif
-
-int32_t xar_fbsdattr_archive(xar_t x, xar_file_t f, const char* file)
-{
-#ifdef HAVE_SYS_EXTATTR_H
-	char *buf = NULL;
-	int ret, retval=0, bufsz, i;
-	struct statfs sfs;
-	char *fsname = NULL;
-	int namespace = EXTATTR_NAMESPACE_USER;
-
-TRYAGAIN:
-	/* extattr_list_link()'s man page does not define the return
-	 * value.  The kernel source comments say 0 for success, -1 for
-	 * failure.  However, the observed behavior is # of bytes 
-	 * used, 0 if none, -1 on error.
-	 * Also, errno is not documented to be set to anything useful
-	 * if buf is too small.  We are using an undocumented "feature"
-	 * that if the data argument is NULL, it will return the number
-	 * of bytes that would have been written (beware, return value
-	 * does not indicate success or failure on it's own.  Need to
-	 * check the return value *and* the parameters.
-	 */
-	ret = extattr_list_link(file, namespace, NULL, 0);
-	if( ret < 0 ) {
-		if( namespace == EXTATTR_NAMESPACE_USER ) {
-			namespace = EXTATTR_NAMESPACE_SYSTEM;
-			goto TRYAGAIN;
-		} else {
-			goto BAIL;
-		}
-	}
-	bufsz = ret;
-	buf = malloc(bufsz);
-	if( !buf ) {
-		retval = -1;
-		goto BAIL;
-	}
-	memset(buf, 0, bufsz);
-	ret = extattr_list_link(file, namespace, buf, bufsz);
-	if( ret < 0 ) {
-		switch(errno) {
-		case ENOTSUP: retval=0; goto BAIL;
-		default: retval=-1; goto BAIL;
-		};
-	}
-	/* Even though 0 is a documented success, observed behavior
-	 * indicates 0 means all perms were satisfied, etc, but
-	 * no extattrs were found to list.
-	 */
-	if( ret == 0 ) {
-		if( namespace == EXTATTR_NAMESPACE_USER ) {
-			namespace = EXTATTR_NAMESPACE_SYSTEM;
-			goto TRYAGAIN;
-		} else {
-			goto BAIL;
-		}
-	}
-
-
-	statfs(file, &sfs);
-
-	fsname = sfs.f_fstypename;
-
-	/* extattr_list_link() does not return the series of keys NUL
-	 * separated, as documented in the man page.  Instead, it 
-	 * returns things DNS style, with a 1 byte length followed by
-	 * the key, repeated for as many keys as there are.
-	 */
-	for( i=0; i < ret; i++ ) {
-		char key[256];
-		char *ns;
-		char tempnam[1024];
-
-		memset(key, 0, sizeof(key));
-		memcpy(key, buf+i+1, buf[i]);
-		i += buf[i] ;
-
-		extattr_namespace_to_string(namespace, &ns);
-		memset(tempnam, 0, sizeof(tempnam));
-		snprintf(tempnam, sizeof(tempnam)-1, "%s/%s.%s", XAR_EA_FORK, ns, key);
-		Gns = namespace;
-		Gfile = file;
-		Gattr = key;
-
-		xar_attr_set(f, tempnam, "fstype", fsname);
-		xar_attrcopy_to_heap(x, f, tempnam, xar_fbsdattr_read);
-
-		free(Gbuf);
-		Gbuf = NULL;
-		Goff = 0;
-	}
-
-	if( namespace == EXTATTR_NAMESPACE_USER ) {
-		namespace = EXTATTR_NAMESPACE_SYSTEM;
-		free(buf);
-		goto TRYAGAIN;
-	}
-
-BAIL:
-	free(buf);
-	return ret;
-#else
-	return 0;
-#endif
-}
-
-int32_t xar_fbsdattr_extract(xar_t x, xar_file_t f, const char* file)
-{
-#ifdef HAVE_SYS_EXTATTR_H
-	char *fsname = "bogus";
-	const char *prop;
-	struct statfs sfs;
-	int eaopt = 0;
-	xar_iter_t iter;
-
-	statfs(file, &sfs);
-	fsname = sfs.f_fstypename;
-
-	iter = xar_iter_new();
-	for(prop = xar_prop_first(f, iter); prop; prop = xar_prop_next(iter)) {
-		const char *tmp, *fs;
-
-		if( strncmp(prop, XAR_EA_FORK, strlen(XAR_EA_FORK) != 0 ) )
-			continue;
-		if( strlen(prop) <= (strlen(XAR_EA_FORK)+1) )
-			continue;
-		fs = xar_attr_get(f, prop, "fstype");
-		if( !eaopt && fs && strcmp(fs, fsname) != 0 ) {
-			continue;
-		}
-
-		tmp = prop + strlen(XAR_EA_FORK) + 1;
-		if( strncmp(tmp, "user.", 5) == 0 ) {
-			Gns = EXTATTR_NAMESPACE_USER;
-			Gattr = tmp + 5;
-		} else if( strncmp(tmp, "system.", 7) == 0 ) {
-			Gns = EXTATTR_NAMESPACE_SYSTEM;
-			Gattr = tmp + 7;
-		} else {
-			continue;
-		}
-
-		Gfile = file;
-		xar_attrcopy_from_heap(x, f, prop, xar_fbsdattr_write);
-	}
-
-	xar_iter_free(iter);
-
-#endif
-	return 0;
-}

Copied: branches/release_1_4/base/src/programs/xar/lib/fbsdattr.c (from rev 23968, trunk/base/src/programs/xar/lib/fbsdattr.c)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/fbsdattr.c	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/fbsdattr.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,247 @@
+/*
+ * Copyright (c) 2004 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 28-Oct-2004
+ * DRI: Rob Braun <bbraun at synack.net>
+ */
+
+#include "config.h"
+#include <unistd.h>
+#include "xar.h"
+#include "arcmod.h"
+#include "b64.h"
+#include "io.h"
+#include "archive.h"
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+
+/* FreeBSD Extended Attribute Headers */
+#ifdef HAVE_SYS_EXTATTR_H
+#include <sys/extattr.h>
+#endif
+#ifdef HAVE_LIBUTIL_H
+#include <libutil.h>
+#endif
+
+#ifdef HAVE_SYS_EXTATTR_H
+#include <sys/param.h>
+#include <sys/mount.h>
+#include <sys/extattr.h>
+#endif
+
+#ifdef HAVE_SYS_EXTATTR_H
+static const char *Gfile = NULL;
+static const char *Gattr = NULL;
+static void *Gbuf = NULL;
+static int Goff = 0;
+static int Gbufsz = 0;
+static int Gns = 0;
+
+int32_t xar_fbsdattr_read(xar_t x, xar_file_t f, void *buf, size_t len) {
+	if( !Gbuf ) {
+		Gbufsz = extattr_get_link(Gfile, Gns, Gattr, NULL, 0);
+		if( Gbufsz < 0 )
+			return -1;
+		Gbuf = malloc(Gbufsz);
+		if( !Gbuf )
+			return -1;
+
+		Gbufsz = extattr_get_link(Gfile, Gns, Gattr, Gbuf, Gbufsz);
+	}
+
+	if( (Gbufsz - Goff) <= len ) {
+		int32_t ret;
+
+		ret = Gbufsz - Goff;
+		memcpy(buf, Gbuf+Goff, ret);
+		Goff += ret;
+		return(ret);
+	} else {
+		memcpy(buf, Gbuf+Goff, len);
+		Gbuf += len;
+		return(len);
+	}
+
+}
+int32_t xar_fbsdattr_write(xar_t x, xar_file_t f, void *buf, size_t len) {
+	return extattr_set_link(Gfile, Gns, Gattr, buf, len);
+}
+#endif
+
+int32_t xar_fbsdattr_archive(xar_t x, xar_file_t f, const char* file)
+{
+#ifdef HAVE_SYS_EXTATTR_H
+	char *buf = NULL;
+	int ret, retval=0, bufsz, i;
+	struct statfs sfs;
+	char *fsname = NULL;
+	int namespace = EXTATTR_NAMESPACE_USER;
+
+TRYAGAIN:
+	/* extattr_list_link()'s man page does not define the return
+	 * value.  The kernel source comments say 0 for success, -1 for
+	 * failure.  However, the observed behavior is # of bytes 
+	 * used, 0 if none, -1 on error.
+	 * Also, errno is not documented to be set to anything useful
+	 * if buf is too small.  We are using an undocumented "feature"
+	 * that if the data argument is NULL, it will return the number
+	 * of bytes that would have been written (beware, return value
+	 * does not indicate success or failure on it's own.  Need to
+	 * check the return value *and* the parameters.
+	 */
+	ret = extattr_list_link(file, namespace, NULL, 0);
+	if( ret < 0 ) {
+		if( namespace == EXTATTR_NAMESPACE_USER ) {
+			namespace = EXTATTR_NAMESPACE_SYSTEM;
+			goto TRYAGAIN;
+		} else {
+			goto BAIL;
+		}
+	}
+	bufsz = ret;
+	buf = malloc(bufsz);
+	if( !buf ) {
+		retval = -1;
+		goto BAIL;
+	}
+	memset(buf, 0, bufsz);
+	ret = extattr_list_link(file, namespace, buf, bufsz);
+	if( ret < 0 ) {
+		switch(errno) {
+		case ENOTSUP: retval=0; goto BAIL;
+		default: retval=-1; goto BAIL;
+		};
+	}
+	/* Even though 0 is a documented success, observed behavior
+	 * indicates 0 means all perms were satisfied, etc, but
+	 * no extattrs were found to list.
+	 */
+	if( ret == 0 ) {
+		if( namespace == EXTATTR_NAMESPACE_USER ) {
+			namespace = EXTATTR_NAMESPACE_SYSTEM;
+			goto TRYAGAIN;
+		} else {
+			goto BAIL;
+		}
+	}
+
+
+	statfs(file, &sfs);
+
+	fsname = sfs.f_fstypename;
+
+	/* extattr_list_link() does not return the series of keys NUL
+	 * separated, as documented in the man page.  Instead, it 
+	 * returns things DNS style, with a 1 byte length followed by
+	 * the key, repeated for as many keys as there are.
+	 */
+	for( i=0; i < ret; i++ ) {
+		char key[256];
+		char *ns;
+		char tempnam[1024];
+
+		memset(key, 0, sizeof(key));
+		memcpy(key, buf+i+1, buf[i]);
+		i += buf[i] ;
+
+		extattr_namespace_to_string(namespace, &ns);
+		memset(tempnam, 0, sizeof(tempnam));
+		snprintf(tempnam, sizeof(tempnam)-1, "%s/%s.%s", XAR_EA_FORK, ns, key);
+		Gns = namespace;
+		Gfile = file;
+		Gattr = key;
+
+		xar_attr_set(f, tempnam, "fstype", fsname);
+		xar_attrcopy_to_heap(x, f, tempnam, xar_fbsdattr_read);
+
+		free(Gbuf);
+		Gbuf = NULL;
+		Goff = 0;
+	}
+
+	if( namespace == EXTATTR_NAMESPACE_USER ) {
+		namespace = EXTATTR_NAMESPACE_SYSTEM;
+		free(buf);
+		goto TRYAGAIN;
+	}
+
+BAIL:
+	free(buf);
+	return ret;
+#else
+	return 0;
+#endif
+}
+
+int32_t xar_fbsdattr_extract(xar_t x, xar_file_t f, const char* file)
+{
+#ifdef HAVE_SYS_EXTATTR_H
+	char *fsname = "bogus";
+	const char *prop;
+	struct statfs sfs;
+	int eaopt = 0;
+	xar_iter_t iter;
+
+	statfs(file, &sfs);
+	fsname = sfs.f_fstypename;
+
+	iter = xar_iter_new();
+	for(prop = xar_prop_first(f, iter); prop; prop = xar_prop_next(iter)) {
+		const char *tmp, *fs;
+
+		if( strncmp(prop, XAR_EA_FORK, strlen(XAR_EA_FORK) != 0 ) )
+			continue;
+		if( strlen(prop) <= (strlen(XAR_EA_FORK)+1) )
+			continue;
+		fs = xar_attr_get(f, prop, "fstype");
+		if( !eaopt && fs && strcmp(fs, fsname) != 0 ) {
+			continue;
+		}
+
+		tmp = prop + strlen(XAR_EA_FORK) + 1;
+		if( strncmp(tmp, "user.", 5) == 0 ) {
+			Gns = EXTATTR_NAMESPACE_USER;
+			Gattr = tmp + 5;
+		} else if( strncmp(tmp, "system.", 7) == 0 ) {
+			Gns = EXTATTR_NAMESPACE_SYSTEM;
+			Gattr = tmp + 7;
+		} else {
+			continue;
+		}
+
+		Gfile = file;
+		xar_attrcopy_from_heap(x, f, prop, xar_fbsdattr_write);
+	}
+
+	xar_iter_free(iter);
+
+#endif
+	return 0;
+}

Deleted: branches/release_1_4/base/src/programs/xar/lib/fbsdattr.h
===================================================================
--- trunk/base/src/programs/xar/lib/fbsdattr.h	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/fbsdattr.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,10 +0,0 @@
-/*
- * Rob Braun <bbraun at synack.net>
- * 26-Oct-2004
- * Copyright (c) 2004 Rob Braun.  All rights reserved.
- */
-#ifndef _XAR_FBSDATTR_H_
-#define _XAR_FBSDATTR_H_
-int32_t xar_fbsdattr_archive(xar_t x, xar_file_t f, const char* file);
-int32_t xar_fbsdattr_extract(xar_t x, xar_file_t f, const char* file);
-#endif /* _XAR_FBSDATTR_H_ */

Copied: branches/release_1_4/base/src/programs/xar/lib/fbsdattr.h (from rev 23968, trunk/base/src/programs/xar/lib/fbsdattr.h)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/fbsdattr.h	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/fbsdattr.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,10 @@
+/*
+ * Rob Braun <bbraun at synack.net>
+ * 26-Oct-2004
+ * Copyright (c) 2004 Rob Braun.  All rights reserved.
+ */
+#ifndef _XAR_FBSDATTR_H_
+#define _XAR_FBSDATTR_H_
+int32_t xar_fbsdattr_archive(xar_t x, xar_file_t f, const char* file);
+int32_t xar_fbsdattr_extract(xar_t x, xar_file_t f, const char* file);
+#endif /* _XAR_FBSDATTR_H_ */

Deleted: branches/release_1_4/base/src/programs/xar/lib/filetree.c
===================================================================
--- trunk/base/src/programs/xar/lib/filetree.c	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/filetree.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,961 +0,0 @@
-/*
- * Copyright (c) 2005 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of his contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 03-Apr-2005
- * DRI: Rob Braun <bbraun at opendarwin.org>
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include <libgen.h>
-#include <libxml/xmlwriter.h>
-#include <libxml/xmlreader.h>
-#include <libxml/xmlstring.h>
-
-#include "config.h"
-#ifndef HAVE_ASPRINTF
-#include "asprintf.h"
-#endif
-#include "xar.h"
-#include "filetree.h"
-#include "archive.h"
-#include "b64.h"
-
-/* Overview:
- * xar_file_t's exist within a xar_archive_t.  xar_prop_t's exist
- * within xar_file_t's and xar_attr_t's exist within xar_prop_t's
- * and xar_file_t's.
- * Basically, a xar_file_t is a container for xar_prop_t's.
- * xar_attr_t's are things like: <foo bar=5>blah</foo>
- * In this example, foo is the key of a xar_prop_t, and blah is
- * the value.  bar is the key of a xar_attr_t which is part of
- * foo's xar_prop_t, and 5 is bar's value.
- * xar_file_t's have xar_attr_t's for the case of:
- * <file id=42>
- * The file has an attribute of "id" with a value of "42".
- */
-
-struct __xar_iter_t {
-	const void *iter;
-	char *path;
-	void *node;
-	int nochild;
-};
-
-/* Convenience macros for dereferencing the structs */
-#define XAR_ITER(x) ((struct __xar_iter_t *)(x))
-
-xar_prop_t xar_prop_find(xar_prop_t p, const char *key);
-
-/* xar_attr_prop
- * Returns: a newly allocated and initialized property attribute.
- * It is the caller's responsibility to associate the attribute
- * with either a file or a property.
- */
-xar_attr_t xar_attr_new(void) {
-	xar_attr_t ret;
-
-	ret = malloc(sizeof(struct __xar_attr_t));
-	if(!ret) return NULL;
-
-	XAR_ATTR(ret)->key = NULL;
-	XAR_ATTR(ret)->value = NULL;
-	XAR_ATTR(ret)->next = NULL;
-	XAR_ATTR(ret)->ns = NULL;
-	return ret;
-}
-
-/* xar_attr_set
- * f: the file the attribute is associated with
- * prop: The property key the attribute is associated with.  This can
- *       be NULL to signify the attribute should be set for the file,
- *       rather than the property.
- * key: The name of the attribute to set.
- * value: The value of the attribute.
- * Returns: 0 on success, -1 on failure.
- * Summary: Basically, sets an attribute.  The only tricky part is
- * it can set an attribute on a property or a file.
- */
-int32_t xar_attr_set(xar_file_t f, const char *prop, const char *key, const char *value) {
-	xar_prop_t p = NULL;
-	xar_attr_t a, i;
-
-	if( !prop ) {
-		a = XAR_FILE(f)->attrs;
-	} else {
-		p = xar_prop_find(XAR_FILE(f)->props, prop);
-		if( !p ) return -1;
-		a = XAR_PROP(p)->attrs;
-	}
-
-	if( !a ) {
-		a = xar_attr_new();
-		if(!prop)
-			XAR_FILE(f)->attrs = a;
-		else
-			XAR_PROP(p)->attrs = a;
-		XAR_ATTR(a)->key = strdup(key);
-		XAR_ATTR(a)->value = strdup(value);
-		return 0;
-	}
-
-	for(i = a; i && XAR_ATTR(i)->next; i = XAR_ATTR(i)->next) {
-		if(strcmp(XAR_ATTR(i)->key, key)==0) {
-			free((char*)XAR_ATTR(i)->value);
-			XAR_ATTR(i)->value = strdup(value);
-			return 0;
-		}
-	}
-	a = xar_attr_new();
-	if(!prop) {
-		XAR_ATTR(a)->next = XAR_ATTR(XAR_FILE(f)->attrs);
-		XAR_FILE(f)->attrs = a;
-	} else {
-		XAR_ATTR(a)->next = XAR_ATTR(XAR_PROP(p)->attrs);
-		XAR_PROP(p)->attrs = a;
-	}
-	XAR_ATTR(a)->key = strdup(key);
-	XAR_ATTR(a)->value = strdup(value);
-	return 0;
-}
-
-/* xar_attr_get
- * f: file to find the associated attribute in
- * prop: name of the property the attribute is of.  May be NULL to specify
- *       the file's attributes.
- * key: name of the attribute to search for.
- * Returns: a reference to the value of the attribute.
- */
-const char *xar_attr_get(xar_file_t f, const char *prop, const char *key) {
-	xar_prop_t p = NULL;
-	xar_attr_t a, i;
-
-	if( !prop )
-		a = XAR_FILE(f)->attrs;
-	else {
-		p = xar_prop_find(XAR_FILE(f)->props, prop);
-		if( !p ) return NULL;
-		a = XAR_PROP(p)->attrs;
-	}
-
-	if( !a ) return NULL;
-
-	for(i = a; i && XAR_ATTR(i)->next; i = XAR_ATTR(i)->next) {
-		if(strcmp(XAR_ATTR(i)->key, key)==0) {
-			return XAR_ATTR(i)->value;
-		}
-	}
-	if( i && (strcmp(XAR_ATTR(i)->key, key)==0))
-		return XAR_ATTR(i)->value;
-	return NULL;
-}
-
-/* xar_attr_free
- * a: attribute to free
- * Summary: frees the attribute structure and everything inside it.
- * It is the caller's responsibility to ensure the linked list gets
- * updated.  This will *not* do anything to ensure the consistency
- * of the attribute linked list.
- */
-void xar_attr_free(xar_attr_t a) {
-	if(!a) return;
-	free((char*)XAR_ATTR(a)->key);
-	free((char*)XAR_ATTR(a)->value);
-	free(XAR_ATTR(a));
-	return;
-}
-
-/* xar_attr_first
- * f: file to associate the iterator with
- * prop: the name of the property within the file to associate the iterator with
- * i: an iterator as returned by xar_iter_new
- * Returns: a pointer to the value of the first attribute associated with the
- * property 'prop' associated with the file 'f'
- * Summary: This MUST be called prior to calling xar_attr_next,
- * to iterate over the attributes of property key 'prop'.
- */
-const char *xar_attr_first(xar_file_t f, const char *prop, xar_iter_t i) {
-	xar_prop_t p = NULL;
-	xar_attr_t a;
-
-	if( !prop )
-		a = XAR_FILE(f)->attrs;
-	else {
-		p = xar_prop_find(XAR_FILE(f)->props, prop);
-		if( !p ) return NULL;
-		a = XAR_PROP(p)->attrs;
-	}
-
-	if( !a ) return NULL;
-
-	XAR_ITER(i)->iter = a;
-	free(XAR_ITER(i)->node);
-	XAR_ITER(i)->node = strdup(XAR_ATTR(a)->key);
-	return XAR_ITER(i)->node;
-}
-
-/* xar_attr_next
- * i: iterator allocated by xar_iter_new, and initialized with xar_attr_first
- * Returns: a pointer to the key of the next attribute associated with
- * the iterator.  NULL will be returned when there are no more attributes
- * to find.
- */
-const char *xar_attr_next(xar_iter_t i) {
-	xar_attr_t a = XAR_ITER(i)->iter;
-
-	if( XAR_ATTR(a)->next == NULL )
-		return NULL;
-
-	XAR_ITER(i)->iter = XAR_ATTR(a)->next;
-	free(XAR_ITER(i)->node);
-	XAR_ITER(i)->node = strdup(XAR_ATTR(XAR_ITER(i)->iter)->key);
-	return XAR_ITER(i)->node;
-}
-
-/* xar_iter_new
- * Returns a newly allocated iterator for use on files, properties, or
- * attributes.
- */
-xar_iter_t xar_iter_new() {
-	xar_iter_t ret = malloc(sizeof(struct __xar_iter_t));
-	if(!ret) return NULL;
-
-	XAR_ITER(ret)->iter = NULL;
-	XAR_ITER(ret)->path = NULL;
-	XAR_ITER(ret)->node = NULL;
-	XAR_ITER(ret)->nochild = 0;
-	return ret;
-}
-
-/* xar_iter_free
- * Frees memory associated with the specified iterator
- */
-void xar_iter_free(xar_iter_t i) {
-	free(XAR_ITER(i)->node);
-	free(XAR_ITER(i));
-}
-
-/* xar_prop_first
- * f: file to associate the iterator with
- * i: an iterator as returned by xar_iter_new
- * Returns: a pointer to the value of the first property associated with
- * the file 'f'.
- * Summary: This MUST be called first prior to calling xar_prop_next,
- * to iterate over properties of file 'f'.  This has the side effect of
- * associating the iterator with the file's properties, which is needed
- * before xar_prop_next.
- */
-const char *xar_prop_first(xar_file_t f, xar_iter_t i) {
-	XAR_ITER(i)->iter = XAR_FILE(f)->props;
-	free(XAR_ITER(i)->node);
-	XAR_ITER(i)->node = strdup(XAR_PROP(XAR_ITER(i)->iter)->key);
-	return XAR_ITER(i)->node;
-}
-
-/* xar_prop_next
- * i: iterator allocated by xar_iter_new, and initialized with xar_prop_first
- * Returns: a pointer to the value of the next property associated with
- * the iterator.  NULL will be returned when there are no more properties
- * to find.  If a property has a NULL value, the string "" will be returned.
- * This will recurse down child properties, flattening the namespace and
- * adding separators.  For instance a1->b1->c1, a1 will first be returned,
- * the subsequent call will return "a1/b1", and the next call will return
- * "a1/b1/c1", etc.
- */
-const char *xar_prop_next(xar_iter_t i) {
-	xar_prop_t p = XAR_ITER(i)->iter;
-	if( !(XAR_ITER(i)->nochild) && XAR_PROP(p)->children ) {
-		char *tmp = XAR_ITER(i)->path;
-		if( tmp ) {
-			asprintf(&XAR_ITER(i)->path, "%s/%s", tmp, XAR_PROP(p)->key);
-			free(tmp);
-		} else
-			XAR_ITER(i)->path = strdup(XAR_PROP(p)->key);
-		XAR_ITER(i)->iter = p = XAR_PROP(p)->children;
-		goto SUCCESS;
-	}
-	XAR_ITER(i)->nochild = 0;
-
-	if( XAR_PROP(p)->next ) {
-		XAR_ITER(i)->iter = p = XAR_PROP(p)->next;
-		goto SUCCESS;
-	}
-
-	if( XAR_PROP(p)->parent ) {
-		char *tmp1, *tmp2;
-		char *dname;
-
-		if( strstr(XAR_ITER(i)->path, "/") ) {
-		tmp1 = tmp2 = XAR_ITER(i)->path;
-		dname = dirname(tmp2);
-		XAR_ITER(i)->path = strdup(dname);
-		free(tmp1);
-		} else {
-			free(XAR_ITER(i)->path);
-			XAR_ITER(i)->path = NULL;
-		}
-
-		XAR_ITER(i)->iter = p = XAR_PROP(p)->parent;
-		XAR_ITER(i)->nochild = 1;
-		return xar_prop_next(i);
-	}
-
-	return NULL;
-SUCCESS:
-	free(XAR_ITER(i)->node);
-	if( XAR_ITER(i)->path )
-		asprintf((char **)&XAR_ITER(i)->node, "%s/%s", XAR_ITER(i)->path, XAR_PROP(p)->key);
-	else {
-		if(XAR_PROP(p)->key == NULL)
-			XAR_ITER(i)->node = strdup("");
-		else
-			XAR_ITER(i)->node = strdup(XAR_PROP(p)->key);
-	}
-	return XAR_ITER(i)->node;
-}
-
-/* xar_prop_new
- * f: file to associate the new file with.  May not be NULL
- * parent: the parent property of the new property.  May be NULL
- * Returns: a newly allocated and initialized property.  
- * Summary: in addition to allocating the new property, it
- * will be inserted into the parent node's list of children,
- * and/or added to the file's list of properties, as appropriate.
- */
-xar_prop_t xar_prop_new(xar_file_t f, xar_prop_t parent) {
-	xar_prop_t p;
-
-	p = malloc(sizeof(struct __xar_prop_t));
-	if( !p ) return NULL;
-
-	XAR_PROP(p)->key = NULL;
-	XAR_PROP(p)->value = NULL;
-	XAR_PROP(p)->children = NULL;
-	XAR_PROP(p)->next = NULL;
-	XAR_PROP(p)->attrs = NULL;
-	XAR_PROP(p)->parent = parent;
-	XAR_PROP(p)->file = f;
-	XAR_PROP(p)->prefix = XAR_FILE(f)->prefix;
-	XAR_PROP(p)->ns = NULL;
-	if(parent) {
-		if( !XAR_PROP(parent)->children ) {
-			XAR_PROP(parent)->children = p;
-		} else {
-			XAR_PROP(p)->next = XAR_PROP(parent)->children;
-			XAR_PROP(parent)->children = p;
-
-		}
-	} else {
-		if( XAR_FILE(f)->props == NULL ) {
-			XAR_FILE(f)->props = p;
-		} else {
-			XAR_PROP(p)->next = XAR_FILE(f)->props;
-			XAR_FILE(f)->props = p;
-		}
-	}
-
-	return p;
-}
-
-/* xar_prop_find
- * p: property to check
- * key: name of property to find.
- * Returns: reference to the property with the specified key
- * Summary: A node's name may be specified by a path, such as 
- * "a1/b1/c1", and child nodes will be searched for each 
- * "/" separator.  
- */
-xar_prop_t xar_prop_find(xar_prop_t p, const char *key) {
-	xar_prop_t i, ret;
-	char *tmp1, *tmp2, *tmp3;
-
-	if( !p ) return NULL;
-	tmp2 = tmp1 = strdup(key);
-	tmp3 = strsep(&tmp2, "/");
-	i = p;
-	do {
-		if( strcmp(tmp3, XAR_PROP(i)->key) == 0 ) {
-			if( tmp2 == NULL ) {
-				free(tmp1);
-				return i;
-			}
-			ret = xar_prop_find(XAR_PROP(i)->children, tmp2);
-			free(tmp1);
-			return ret;
-		}
-		i = XAR_PROP(i)->next;
-	} while(i);
-	free(tmp1);
-	return NULL;
-}
-
-/* xar_prop_set_r
- * p: property to recurse down and set the property of
- * key: key of the property to set
- * value: desired value of the property
- * Returns: 0 on sucess, -1 on failure.
- * Summary: This is an internal helper function for xar_prop_set() which
- * does the recursion down the property tree.
- */
-static xar_prop_t xar_prop_set_r(xar_file_t f, xar_prop_t p, const char *key, const char *value, int overwrite) {
-	xar_prop_t i, ret, ret2, start;
-	char *tmp1, *tmp2, *tmp3;
-
-	tmp2 = tmp1 = strdup(key);
-	tmp3 = strsep(&tmp2, "/");
-
-	if( !p ) {
-		start = XAR_FILE(f)->props;
-	} else {
-		start = XAR_PROP(p)->children;
-	}
-	
-	for( i = start; i; i = XAR_PROP(i)->next ) {
-		if( strcmp(tmp3, XAR_PROP(i)->key) == 0 ) {
-			if( !tmp2 ) {
-				if( overwrite ) {
-					free((char *)XAR_PROP(i)->value);
-					if( value )
-						XAR_PROP(i)->value = strdup(value);
-					free(tmp1);
-					return i;
-				} else {
-					ret = xar_prop_new(f, p);
-					if( !ret ) {
-						free(tmp1);
-						return ret;
-					}
-					if( value )
-						XAR_PROP(ret)->value = strdup(value);
-					XAR_PROP(ret)->key = strdup(tmp3);
-					free(tmp1);
-					return ret;
-				}
-			}
-
-			ret2 = xar_prop_set_r(f, i, tmp2, value, overwrite);
-			free(tmp1);
-			return ret2;
-		}
-	}
-
-	ret = xar_prop_new(f, p);
-	if( !ret ) {
-		free(tmp1);
-		return ret;
-	}
-
-	if( !tmp2 ) {
-		if( value )
-			XAR_PROP(ret)->value = strdup(value);
-		XAR_PROP(ret)->key = strdup(tmp3);
-		free(tmp1);
-		return ret;
-	}
-
-	XAR_PROP(ret)->key = strdup(tmp3);
-	XAR_PROP(ret)->value = NULL;
-
-	ret2 = xar_prop_set_r(f, ret, tmp2, value, overwrite);
-	free(tmp1);
-	return ret2;
-}
-
-/* xar_prop_set
- * f: file to set the property on
- * key: key of the property to set
- * value: desired value of the property
- * Returns: 0 on success, -1 on failure
- * Summary: If the property already exists, its value is overwritten
- * by 'value'.  If the property does not exist, it is created.
- * Copies of key and value are kept in the tree.  The caller may do
- * what they wish with these values after the call returns.
- * References to these copies will be returned by iterating over
- * the properties, or by calling xar_prop_get().
- * These copies will be released when the property is released.
- *
- * Note that you *CANNOT* have a node with a value and children.
- * This implementation will let you, but the serialization to xml
- * will not be what you're hoping for.
- */
-int32_t xar_prop_set(xar_file_t f, const char *key, const char *value) {
-	if( xar_prop_set_r(f, NULL, key, value, 1) )
-		return 0;
-	return -1;
-}
-
-/* xar_prop_create
- * Identical to xar_prop_set, except it will not overwrite an existing
- * property, it will create another one.
- */
-int32_t xar_prop_create(xar_file_t f, const char *key, const char *value) {
-	if( xar_prop_set_r(f, NULL, key, value, 0) )
-		return 0;
-	return -1;
-}
-
-/* xar_prop_get
- * f: file to look for the property in
- * key: name of property to find.
- * value: on return, *value will point to the value of the property
- * value may be NULL, in which case, only the existence of the property
- * is tested.
- * Returns: 0 for success, -1 on failure
- * Summary: A node's name may be specified by a path, such as 
- * "a1/b1/c1", and child nodes will be searched for each 
- * "/" separator.  
- */
-int32_t xar_prop_get(xar_file_t f, const char *key, const char **value) {
-	xar_prop_t r = xar_prop_find(XAR_FILE(f)->props, key);
-	if( !r ) {
-		if(value)
-			*value = NULL;
-		return -1;
-	}
-	if(value)
-		*value = XAR_PROP(r)->value;
-	return 0;
-}
-
-/* xar_prop_free
- * p: property to free
- * Summary: frees the specified property and all its children.
- * Stored copies of the key and value will be released, as will
- * all attributes.
- */
-void xar_prop_free(xar_prop_t p) {
-	xar_prop_t i;
-	xar_attr_t a;
-	while( XAR_PROP(p)->children ) {
-		i = XAR_PROP(p)->children;
-		XAR_PROP(p)->children = XAR_PROP(i)->next;
-		xar_prop_free(i);
-	}
-	while(XAR_PROP(p)->attrs) {
-		a = XAR_PROP(p)->attrs;
-		XAR_PROP(p)->attrs = XAR_ATTR(a)->next;
-		xar_attr_free(a);
-	}
-	free((char*)XAR_PROP(p)->key);
-	free((char*)XAR_PROP(p)->value);
-	free(XAR_PROP(p));
-}
-
-void xar_prop_unset(xar_file_t f, const char *key) {
-	xar_prop_t r = xar_prop_find(XAR_FILE(f)->props, key);
-	xar_prop_t i;
-	if( !r ) {
-		return;
-	}
-	if( XAR_PROP(r)->parent ) {
-		i = XAR_PROP(r)->parent->children;
-	} else {
-		i = XAR_FILE(f)->props;
-	}
-
-	while( i && (XAR_PROP(i)->next != XAR_PROP(r)) ) {
-		i = XAR_PROP(i)->next;
-	}
-	if( i && (XAR_PROP(i)->next == XAR_PROP(r)) ) {
-		XAR_PROP(i)->next = XAR_PROP(r)->next;
-		xar_prop_free(r);
-	}
-	return;
-}
-
-/* xar_file_new
- * f: parent file of the file to be created.  May be NULL
- * Returns: a newly allocated file structure.
- */
-xar_file_t xar_file_new(xar_file_t f) {
-	xar_file_t ret, i;
-
-	ret = malloc(sizeof(struct __xar_file_t));
-	if(!ret) return NULL;
-
-	XAR_FILE(ret)->parent = f;
-	XAR_FILE(ret)->next = NULL;
-	XAR_FILE(ret)->children = NULL;
-	XAR_FILE(ret)->props = NULL;
-	XAR_FILE(ret)->attrs = NULL;
-	XAR_FILE(ret)->prefix = NULL;
-	XAR_FILE(ret)->ns = NULL;
-	XAR_FILE(ret)->fspath = NULL;
-	if( f ) {
-		if( !XAR_FILE(f)->children ) {
-			XAR_FILE(f)->children = ret;
-		} else {
-			for(i = XAR_FILE(f)->children; XAR_FILE(i)->next; i = XAR_FILE(i)->next);
-			XAR_FILE(i)->next = ret;
-		}
-	}
-
-	return ret;
-}
-
-/* xar_file_free
- * f: file to free
- * Summary: frees the specified file and all children,
- * properties, and attributes associated with the file.
- */
-void xar_file_free(xar_file_t f) {
-	xar_file_t i;
-	xar_prop_t n;
-	xar_attr_t a;
-	while(XAR_FILE(f)->children) {
-		i = XAR_FILE(f)->children;
-		XAR_FILE(f)->children = XAR_FILE(i)->next;
-		xar_file_free(i);
-	}
-	while(XAR_FILE(f)->props) {
-		n = XAR_FILE(f)->props;
-		XAR_FILE(f)->props = XAR_PROP(n)->next;
-		xar_prop_free(n);
-	}
-	while(XAR_FILE(f)->attrs) {
-		a = XAR_FILE(f)->attrs;
-		XAR_FILE(f)->attrs = XAR_ATTR(a)->next;
-		xar_attr_free(a);
-	}
-	free((char *)XAR_FILE(f)->fspath);
-	free(XAR_FILE(f));
-}
-
-/* xar_file_first
- * x: archive to associate the iterator with
- * i: an iterator as returned by xar_iter_new
- * Returns: a pointer to the name of the first file associated with
- * the archive 'x'.
- * Summary: This MUST be called first prior to calling xar_file_next,
- * to iterate over files of archive 'x'.  This has the side effect of
- * associating the iterator with the archive's files, which is needed
- * before xar_file_next.
- */
-xar_file_t xar_file_first(xar_t x, xar_iter_t i) {
-	XAR_ITER(i)->iter = XAR(x)->files;
-	free(XAR_ITER(i)->node);
-	return XAR_ITER(i)->iter;
-}
-
-/* xar_file_next
- * i: iterator allocated by xar_iter_new, and initialized with xar_file_first
- * Returns: a pointer to the name of the next file associated with
- * the iterator.  NULL will be returned when there are no more files
- * to find.  
- * This will recurse down child files (directories), flattening the 
- * namespace and adding separators.  For instance a1->b1->c1, a1 will 
- * first be returned, the subsequent call will return "a1/b1", and the 
- * next call will return "a1/b1/c1", etc.
- */
-xar_file_t xar_file_next(xar_iter_t i) {
-	xar_file_t f = XAR_ITER(i)->iter;
-	const char *name;
-	if( !(XAR_ITER(i)->nochild) && XAR_FILE(f)->children ) {
-		char *tmp = XAR_ITER(i)->path;
-		xar_prop_get(f, "name", &name);
-		if( tmp ) {
-			asprintf(&XAR_ITER(i)->path, "%s/%s", tmp, name);
-			free(tmp);
-		} else
-			XAR_ITER(i)->path = strdup(name);
-		XAR_ITER(i)->iter = f = XAR_FILE(f)->children;
-		goto FSUCCESS;
-	}
-	XAR_ITER(i)->nochild = 0;
-
-	if( XAR_FILE(f)->next ) {
-		XAR_ITER(i)->iter = f = XAR_FILE(f)->next;
-		goto FSUCCESS;
-	}
-
-	if( XAR_FILE(f)->parent ) {
-		char *tmp1, *tmp2;
-		char *dname;
-
-		if( strstr(XAR_ITER(i)->path, "/") ) {
-			tmp1 = tmp2 = XAR_ITER(i)->path;
-			dname = dirname(tmp2);
-			XAR_ITER(i)->path = strdup(dname);
-			free(tmp1);
-		} else {
-			free(XAR_ITER(i)->path);
-			XAR_ITER(i)->path = NULL;
-		}
-
-		XAR_ITER(i)->iter = f = XAR_FILE(f)->parent;
-		XAR_ITER(i)->nochild = 1;
-		return xar_file_next(i);
-	}
-
-	return NULL;
-FSUCCESS:
-	xar_prop_get(f, "name", &name);
-	XAR_ITER(i)->iter = (void *)f;
-
-	return XAR_ITER(i)->iter;
-}
-
-/* xar_file_find
- * f: file subtree to look under
- * path: path to file to find
- * Returns the file_t describing the file, or NULL if not found.
- */
-xar_file_t xar_file_find(xar_file_t f, const char *path) {
-	xar_file_t i, ret;
-	char *tmp1, *tmp2, *tmp3;
-
-	if( !f ) return NULL;
-	tmp2 = tmp1 = strdup(path);
-	tmp3 = strsep(&tmp2, "/");
-	i = f;
-	do {
-		const char *name;
-		xar_prop_get(i, "name", &name);
-		if( name == NULL ) continue;
-		if( strcmp(tmp3, name) == 0 ) {
-			if( tmp2 == NULL ) {
-				free(tmp1);
-				return i;
-			}
-			ret = xar_file_find(XAR_FILE(i)->children, tmp2);
-			free(tmp1);
-			return ret;
-		}
-		i = XAR_FILE(i)->next;
-	} while(i);
-	free(tmp1);
-	return NULL;
-}
-
-
-/* xar_prop_serialize
- * p: property to serialize
- * writer: the xmlTextWriterPtr allocated by xmlNewTextWriter*()
- * Summary: recursively serializes the property passed to it, including
- * children, siblings, attributes, etc.
- */
-void xar_prop_serialize(xar_prop_t p, xmlTextWriterPtr writer) {
-	xar_prop_t i;
-	xar_attr_t a;
-
-	if( !p )
-		return;
-	i = p;
-	do {
-		if( XAR_PROP(i)->prefix || XAR_PROP(i)->ns )
-			xmlTextWriterStartElementNS(writer, BAD_CAST(XAR_PROP(i)->prefix), BAD_CAST(XAR_PROP(i)->key), NULL);
-		else
-			xmlTextWriterStartElement(writer, BAD_CAST(XAR_PROP(i)->key));
-		for(a = XAR_PROP(i)->attrs; a; a = XAR_ATTR(a)->next) {
-			xmlTextWriterWriteAttributeNS(writer, BAD_CAST(XAR_ATTR(a)->ns), BAD_CAST(XAR_ATTR(a)->key), NULL, BAD_CAST(XAR_ATTR(a)->value));
-		}
-		if( XAR_PROP(i)->value ) {
-			if( strcmp(XAR_PROP(i)->key, "name") == 0 ) {
-				unsigned char *tmp;
-				int outlen = strlen(XAR_PROP(i)->value);
-				int inlen, len;
-
-				inlen = len = outlen;
-
-				tmp = malloc(len);
-				assert(tmp);
-				if( UTF8Toisolat1(tmp, &len, BAD_CAST(XAR_PROP(i)->value), &inlen) < 0 ) {
-					xmlTextWriterWriteAttribute(writer, BAD_CAST("enctype"), BAD_CAST("base64"));
-					xmlTextWriterWriteBase64(writer, XAR_PROP(i)->value, 0, strlen(XAR_PROP(i)->value));
-				} else
-					xmlTextWriterWriteString(writer, BAD_CAST(XAR_PROP(i)->value));
-				free(tmp);
-			} else
-				xmlTextWriterWriteString(writer, BAD_CAST(XAR_PROP(i)->value));
-		}
-
-		if( XAR_PROP(i)->children ) {
-			xar_prop_serialize(XAR_PROP(i)->children, writer);
-		}
-		xmlTextWriterEndElement(writer);
-
-		i = XAR_PROP(i)->next;
-	} while(i);
-}
-
-/* xar_file_serialize
- * f: file to serialize
- * writer: the xmlTextWriterPtr allocated by xmlNewTextWriter*()
- * Summary: recursively serializes the file passed to it, including
- * children, siblings, properties, attributes, etc.
- */
-void xar_file_serialize(xar_file_t f, xmlTextWriterPtr writer) {
-	xar_file_t i;
-	xar_attr_t a;
-
-	i = f;
-	do {
-		xmlTextWriterStartElement(writer, BAD_CAST("file"));
-		for(a = XAR_FILE(i)->attrs; a; a = XAR_ATTR(a)->next) {
-			xmlTextWriterWriteAttribute(writer, BAD_CAST(XAR_ATTR(a)->key), BAD_CAST(XAR_ATTR(a)->value));
-		}
-		xar_prop_serialize(XAR_FILE(i)->props, writer);
-		if( XAR_FILE(i)->children )
-			xar_file_serialize(XAR_FILE(i)->children, writer);
-		xmlTextWriterEndElement(writer);
-		i = XAR_FILE(i)->next;
-	} while(i);
-	return;
-}
-
-/* xar_prop_unserialize
- * f: file the property is to belong to
- * p: parent property, may be NULL
- * reader: xmlTextReaderPtr already allocated
- */
-int32_t xar_prop_unserialize(xar_file_t f, xar_prop_t parent, xmlTextReaderPtr reader) {
-	const char *name, *value, *ns;
-	int type, i, isempty = 0;
-	int isname = 0, isencoded = 0;
-	xar_prop_t p;
-
-	p = xar_prop_new(f, parent);
-	if( xmlTextReaderIsEmptyElement(reader) )
-		isempty = 1;
-	i = xmlTextReaderAttributeCount(reader);
-	name = (const char *)xmlTextReaderConstLocalName(reader);
-	XAR_PROP(p)->key = strdup(name);
-	ns = (const char *)xmlTextReaderConstPrefix(reader);
-	if( ns ) XAR_PROP(p)->prefix = strdup(ns);
-	if( strcmp(name, "name") == 0 )
-		isname = 1;
-	if( i > 0 ) {
-		for(i = xmlTextReaderMoveToFirstAttribute(reader); i == 1; i = xmlTextReaderMoveToNextAttribute(reader)) {
-			xar_attr_t a;
-			const char *name = (const char *)xmlTextReaderConstLocalName(reader);
-			const char *value = (const char *)xmlTextReaderConstValue(reader);
-			const char *ns = (const char *)xmlTextReaderConstPrefix(reader);
-			if( isname && (strcmp(name, "enctype") == 0) && (strcmp(value, "base64") == 0) ) {
-				isencoded = 1;
-			} else {
-				a = xar_attr_new();
-				XAR_ATTR(a)->key = strdup(name);
-				XAR_ATTR(a)->value = strdup(value);
-				if(ns) XAR_ATTR(a)->ns = strdup(ns);
-				XAR_ATTR(a)->next = XAR_PROP(p)->attrs;
-				XAR_PROP(p)->attrs = a;
-			}
-		}
-	}
-	if( isempty )
-		return 0;
-	while( xmlTextReaderRead(reader) == 1) {
-		type = xmlTextReaderNodeType(reader);
-		switch(type) {
-		case XML_READER_TYPE_ELEMENT:
-			xar_prop_unserialize(f, p, reader);
-			break;
-		case XML_READER_TYPE_TEXT:
-			value = (const char *)xmlTextReaderConstValue(reader);
-			free((char*)XAR_PROP(p)->value);
-			if( isencoded )
-				XAR_PROP(p)->value = (const char *)xar_from_base64(BAD_CAST(value), strlen(value));
-			else
-				XAR_PROP(p)->value = strdup(value);
-			if( isname ) {
-				if( XAR_FILE(f)->parent ) {
-					asprintf((char **)&XAR_FILE(f)->fspath, "%s/%s", XAR_FILE(XAR_FILE(f)->parent)->fspath, XAR_PROP(p)->value);
-				} else {
-					XAR_FILE(f)->fspath = strdup(XAR_PROP(p)->value);
-				}
-			}
-			break;
-		case XML_READER_TYPE_END_ELEMENT:
-			return 0;
-			break;
-		}
-	}
-
-	/* XXX: Should never be reached */
-	return 0;
-}
-
-/* xar_file_unserialize
- * x: archive we're unserializing to
- * parent: The parent file of the file to be unserialized.  May be NULL
- * reader: The xmlTextReaderPtr we are reading the xml from.
- * Summary: Takes a <file> node, and adds all attributes, child properties,
- * and child files.
- */
-xar_file_t xar_file_unserialize(xar_t x, xar_file_t parent, xmlTextReaderPtr reader) {
-	xar_file_t ret;
-	const char *name;
-	int type, i;
-
-	ret = xar_file_new(parent);
-
-	i = xmlTextReaderAttributeCount(reader);
-	if( i > 0 ) {
-		for(i = xmlTextReaderMoveToFirstAttribute(reader); i == 1; i = xmlTextReaderMoveToNextAttribute(reader)) {
-			xar_attr_t a;
-			const char *name = (const char *)xmlTextReaderConstLocalName(reader);
-			const char *value = (const char *)xmlTextReaderConstValue(reader);
-			a = xar_attr_new();
-			XAR_ATTR(a)->key = strdup(name);
-			XAR_ATTR(a)->value = strdup(value);
-			XAR_ATTR(a)->next = XAR_FILE(ret)->attrs;
-			XAR_FILE(ret)->attrs = a;
-		}
-	}
-
-	while( xmlTextReaderRead(reader) == 1 ) {
-		type = xmlTextReaderNodeType(reader);
-		name = (const char *)xmlTextReaderConstLocalName(reader);
-		if( (type == XML_READER_TYPE_END_ELEMENT) && (strcmp(name, "file")==0) ) {
-			const char *opt;
-			xar_prop_get(ret, "type", &opt);
-			if( opt && (strcmp(opt, "hardlink") == 0) ) {
-				opt = xar_attr_get(ret, "type", "link");
-				if( opt && (strcmp(opt, "original") == 0) ) {
-					opt = xar_attr_get(ret, NULL, "id");
-					xmlHashAddEntry(XAR(x)->link_hash, BAD_CAST(opt), XAR_FILE(ret));
-				}
-			}
-			return ret;
-		}
-
-		if( type == XML_READER_TYPE_ELEMENT ) {
-			if( strcmp(name, "file")==0 )
-				xar_file_unserialize(x, ret, reader);
-			else
-				xar_prop_unserialize(ret, NULL, reader);
-		}
-	}
-
-	/* XXX Should never be reached */
-	return ret;
-}
-

Copied: branches/release_1_4/base/src/programs/xar/lib/filetree.c (from rev 23968, trunk/base/src/programs/xar/lib/filetree.c)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/filetree.c	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/filetree.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,961 @@
+/*
+ * Copyright (c) 2005 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of his contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 03-Apr-2005
+ * DRI: Rob Braun <bbraun at opendarwin.org>
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include <libgen.h>
+#include <libxml/xmlwriter.h>
+#include <libxml/xmlreader.h>
+#include <libxml/xmlstring.h>
+
+#include "config.h"
+#ifndef HAVE_ASPRINTF
+#include "asprintf.h"
+#endif
+#include "xar.h"
+#include "filetree.h"
+#include "archive.h"
+#include "b64.h"
+
+/* Overview:
+ * xar_file_t's exist within a xar_archive_t.  xar_prop_t's exist
+ * within xar_file_t's and xar_attr_t's exist within xar_prop_t's
+ * and xar_file_t's.
+ * Basically, a xar_file_t is a container for xar_prop_t's.
+ * xar_attr_t's are things like: <foo bar=5>blah</foo>
+ * In this example, foo is the key of a xar_prop_t, and blah is
+ * the value.  bar is the key of a xar_attr_t which is part of
+ * foo's xar_prop_t, and 5 is bar's value.
+ * xar_file_t's have xar_attr_t's for the case of:
+ * <file id=42>
+ * The file has an attribute of "id" with a value of "42".
+ */
+
+struct __xar_iter_t {
+	const void *iter;
+	char *path;
+	void *node;
+	int nochild;
+};
+
+/* Convenience macros for dereferencing the structs */
+#define XAR_ITER(x) ((struct __xar_iter_t *)(x))
+
+xar_prop_t xar_prop_find(xar_prop_t p, const char *key);
+
+/* xar_attr_prop
+ * Returns: a newly allocated and initialized property attribute.
+ * It is the caller's responsibility to associate the attribute
+ * with either a file or a property.
+ */
+xar_attr_t xar_attr_new(void) {
+	xar_attr_t ret;
+
+	ret = malloc(sizeof(struct __xar_attr_t));
+	if(!ret) return NULL;
+
+	XAR_ATTR(ret)->key = NULL;
+	XAR_ATTR(ret)->value = NULL;
+	XAR_ATTR(ret)->next = NULL;
+	XAR_ATTR(ret)->ns = NULL;
+	return ret;
+}
+
+/* xar_attr_set
+ * f: the file the attribute is associated with
+ * prop: The property key the attribute is associated with.  This can
+ *       be NULL to signify the attribute should be set for the file,
+ *       rather than the property.
+ * key: The name of the attribute to set.
+ * value: The value of the attribute.
+ * Returns: 0 on success, -1 on failure.
+ * Summary: Basically, sets an attribute.  The only tricky part is
+ * it can set an attribute on a property or a file.
+ */
+int32_t xar_attr_set(xar_file_t f, const char *prop, const char *key, const char *value) {
+	xar_prop_t p = NULL;
+	xar_attr_t a, i;
+
+	if( !prop ) {
+		a = XAR_FILE(f)->attrs;
+	} else {
+		p = xar_prop_find(XAR_FILE(f)->props, prop);
+		if( !p ) return -1;
+		a = XAR_PROP(p)->attrs;
+	}
+
+	if( !a ) {
+		a = xar_attr_new();
+		if(!prop)
+			XAR_FILE(f)->attrs = a;
+		else
+			XAR_PROP(p)->attrs = a;
+		XAR_ATTR(a)->key = strdup(key);
+		XAR_ATTR(a)->value = strdup(value);
+		return 0;
+	}
+
+	for(i = a; i && XAR_ATTR(i)->next; i = XAR_ATTR(i)->next) {
+		if(strcmp(XAR_ATTR(i)->key, key)==0) {
+			free((char*)XAR_ATTR(i)->value);
+			XAR_ATTR(i)->value = strdup(value);
+			return 0;
+		}
+	}
+	a = xar_attr_new();
+	if(!prop) {
+		XAR_ATTR(a)->next = XAR_ATTR(XAR_FILE(f)->attrs);
+		XAR_FILE(f)->attrs = a;
+	} else {
+		XAR_ATTR(a)->next = XAR_ATTR(XAR_PROP(p)->attrs);
+		XAR_PROP(p)->attrs = a;
+	}
+	XAR_ATTR(a)->key = strdup(key);
+	XAR_ATTR(a)->value = strdup(value);
+	return 0;
+}
+
+/* xar_attr_get
+ * f: file to find the associated attribute in
+ * prop: name of the property the attribute is of.  May be NULL to specify
+ *       the file's attributes.
+ * key: name of the attribute to search for.
+ * Returns: a reference to the value of the attribute.
+ */
+const char *xar_attr_get(xar_file_t f, const char *prop, const char *key) {
+	xar_prop_t p = NULL;
+	xar_attr_t a, i;
+
+	if( !prop )
+		a = XAR_FILE(f)->attrs;
+	else {
+		p = xar_prop_find(XAR_FILE(f)->props, prop);
+		if( !p ) return NULL;
+		a = XAR_PROP(p)->attrs;
+	}
+
+	if( !a ) return NULL;
+
+	for(i = a; i && XAR_ATTR(i)->next; i = XAR_ATTR(i)->next) {
+		if(strcmp(XAR_ATTR(i)->key, key)==0) {
+			return XAR_ATTR(i)->value;
+		}
+	}
+	if( i && (strcmp(XAR_ATTR(i)->key, key)==0))
+		return XAR_ATTR(i)->value;
+	return NULL;
+}
+
+/* xar_attr_free
+ * a: attribute to free
+ * Summary: frees the attribute structure and everything inside it.
+ * It is the caller's responsibility to ensure the linked list gets
+ * updated.  This will *not* do anything to ensure the consistency
+ * of the attribute linked list.
+ */
+void xar_attr_free(xar_attr_t a) {
+	if(!a) return;
+	free((char*)XAR_ATTR(a)->key);
+	free((char*)XAR_ATTR(a)->value);
+	free(XAR_ATTR(a));
+	return;
+}
+
+/* xar_attr_first
+ * f: file to associate the iterator with
+ * prop: the name of the property within the file to associate the iterator with
+ * i: an iterator as returned by xar_iter_new
+ * Returns: a pointer to the value of the first attribute associated with the
+ * property 'prop' associated with the file 'f'
+ * Summary: This MUST be called prior to calling xar_attr_next,
+ * to iterate over the attributes of property key 'prop'.
+ */
+const char *xar_attr_first(xar_file_t f, const char *prop, xar_iter_t i) {
+	xar_prop_t p = NULL;
+	xar_attr_t a;
+
+	if( !prop )
+		a = XAR_FILE(f)->attrs;
+	else {
+		p = xar_prop_find(XAR_FILE(f)->props, prop);
+		if( !p ) return NULL;
+		a = XAR_PROP(p)->attrs;
+	}
+
+	if( !a ) return NULL;
+
+	XAR_ITER(i)->iter = a;
+	free(XAR_ITER(i)->node);
+	XAR_ITER(i)->node = strdup(XAR_ATTR(a)->key);
+	return XAR_ITER(i)->node;
+}
+
+/* xar_attr_next
+ * i: iterator allocated by xar_iter_new, and initialized with xar_attr_first
+ * Returns: a pointer to the key of the next attribute associated with
+ * the iterator.  NULL will be returned when there are no more attributes
+ * to find.
+ */
+const char *xar_attr_next(xar_iter_t i) {
+	xar_attr_t a = XAR_ITER(i)->iter;
+
+	if( XAR_ATTR(a)->next == NULL )
+		return NULL;
+
+	XAR_ITER(i)->iter = XAR_ATTR(a)->next;
+	free(XAR_ITER(i)->node);
+	XAR_ITER(i)->node = strdup(XAR_ATTR(XAR_ITER(i)->iter)->key);
+	return XAR_ITER(i)->node;
+}
+
+/* xar_iter_new
+ * Returns a newly allocated iterator for use on files, properties, or
+ * attributes.
+ */
+xar_iter_t xar_iter_new() {
+	xar_iter_t ret = malloc(sizeof(struct __xar_iter_t));
+	if(!ret) return NULL;
+
+	XAR_ITER(ret)->iter = NULL;
+	XAR_ITER(ret)->path = NULL;
+	XAR_ITER(ret)->node = NULL;
+	XAR_ITER(ret)->nochild = 0;
+	return ret;
+}
+
+/* xar_iter_free
+ * Frees memory associated with the specified iterator
+ */
+void xar_iter_free(xar_iter_t i) {
+	free(XAR_ITER(i)->node);
+	free(XAR_ITER(i));
+}
+
+/* xar_prop_first
+ * f: file to associate the iterator with
+ * i: an iterator as returned by xar_iter_new
+ * Returns: a pointer to the value of the first property associated with
+ * the file 'f'.
+ * Summary: This MUST be called first prior to calling xar_prop_next,
+ * to iterate over properties of file 'f'.  This has the side effect of
+ * associating the iterator with the file's properties, which is needed
+ * before xar_prop_next.
+ */
+const char *xar_prop_first(xar_file_t f, xar_iter_t i) {
+	XAR_ITER(i)->iter = XAR_FILE(f)->props;
+	free(XAR_ITER(i)->node);
+	XAR_ITER(i)->node = strdup(XAR_PROP(XAR_ITER(i)->iter)->key);
+	return XAR_ITER(i)->node;
+}
+
+/* xar_prop_next
+ * i: iterator allocated by xar_iter_new, and initialized with xar_prop_first
+ * Returns: a pointer to the value of the next property associated with
+ * the iterator.  NULL will be returned when there are no more properties
+ * to find.  If a property has a NULL value, the string "" will be returned.
+ * This will recurse down child properties, flattening the namespace and
+ * adding separators.  For instance a1->b1->c1, a1 will first be returned,
+ * the subsequent call will return "a1/b1", and the next call will return
+ * "a1/b1/c1", etc.
+ */
+const char *xar_prop_next(xar_iter_t i) {
+	xar_prop_t p = XAR_ITER(i)->iter;
+	if( !(XAR_ITER(i)->nochild) && XAR_PROP(p)->children ) {
+		char *tmp = XAR_ITER(i)->path;
+		if( tmp ) {
+			asprintf(&XAR_ITER(i)->path, "%s/%s", tmp, XAR_PROP(p)->key);
+			free(tmp);
+		} else
+			XAR_ITER(i)->path = strdup(XAR_PROP(p)->key);
+		XAR_ITER(i)->iter = p = XAR_PROP(p)->children;
+		goto SUCCESS;
+	}
+	XAR_ITER(i)->nochild = 0;
+
+	if( XAR_PROP(p)->next ) {
+		XAR_ITER(i)->iter = p = XAR_PROP(p)->next;
+		goto SUCCESS;
+	}
+
+	if( XAR_PROP(p)->parent ) {
+		char *tmp1, *tmp2;
+		char *dname;
+
+		if( strstr(XAR_ITER(i)->path, "/") ) {
+		tmp1 = tmp2 = XAR_ITER(i)->path;
+		dname = dirname(tmp2);
+		XAR_ITER(i)->path = strdup(dname);
+		free(tmp1);
+		} else {
+			free(XAR_ITER(i)->path);
+			XAR_ITER(i)->path = NULL;
+		}
+
+		XAR_ITER(i)->iter = p = XAR_PROP(p)->parent;
+		XAR_ITER(i)->nochild = 1;
+		return xar_prop_next(i);
+	}
+
+	return NULL;
+SUCCESS:
+	free(XAR_ITER(i)->node);
+	if( XAR_ITER(i)->path )
+		asprintf((char **)&XAR_ITER(i)->node, "%s/%s", XAR_ITER(i)->path, XAR_PROP(p)->key);
+	else {
+		if(XAR_PROP(p)->key == NULL)
+			XAR_ITER(i)->node = strdup("");
+		else
+			XAR_ITER(i)->node = strdup(XAR_PROP(p)->key);
+	}
+	return XAR_ITER(i)->node;
+}
+
+/* xar_prop_new
+ * f: file to associate the new file with.  May not be NULL
+ * parent: the parent property of the new property.  May be NULL
+ * Returns: a newly allocated and initialized property.  
+ * Summary: in addition to allocating the new property, it
+ * will be inserted into the parent node's list of children,
+ * and/or added to the file's list of properties, as appropriate.
+ */
+xar_prop_t xar_prop_new(xar_file_t f, xar_prop_t parent) {
+	xar_prop_t p;
+
+	p = malloc(sizeof(struct __xar_prop_t));
+	if( !p ) return NULL;
+
+	XAR_PROP(p)->key = NULL;
+	XAR_PROP(p)->value = NULL;
+	XAR_PROP(p)->children = NULL;
+	XAR_PROP(p)->next = NULL;
+	XAR_PROP(p)->attrs = NULL;
+	XAR_PROP(p)->parent = parent;
+	XAR_PROP(p)->file = f;
+	XAR_PROP(p)->prefix = XAR_FILE(f)->prefix;
+	XAR_PROP(p)->ns = NULL;
+	if(parent) {
+		if( !XAR_PROP(parent)->children ) {
+			XAR_PROP(parent)->children = p;
+		} else {
+			XAR_PROP(p)->next = XAR_PROP(parent)->children;
+			XAR_PROP(parent)->children = p;
+
+		}
+	} else {
+		if( XAR_FILE(f)->props == NULL ) {
+			XAR_FILE(f)->props = p;
+		} else {
+			XAR_PROP(p)->next = XAR_FILE(f)->props;
+			XAR_FILE(f)->props = p;
+		}
+	}
+
+	return p;
+}
+
+/* xar_prop_find
+ * p: property to check
+ * key: name of property to find.
+ * Returns: reference to the property with the specified key
+ * Summary: A node's name may be specified by a path, such as 
+ * "a1/b1/c1", and child nodes will be searched for each 
+ * "/" separator.  
+ */
+xar_prop_t xar_prop_find(xar_prop_t p, const char *key) {
+	xar_prop_t i, ret;
+	char *tmp1, *tmp2, *tmp3;
+
+	if( !p ) return NULL;
+	tmp2 = tmp1 = strdup(key);
+	tmp3 = strsep(&tmp2, "/");
+	i = p;
+	do {
+		if( strcmp(tmp3, XAR_PROP(i)->key) == 0 ) {
+			if( tmp2 == NULL ) {
+				free(tmp1);
+				return i;
+			}
+			ret = xar_prop_find(XAR_PROP(i)->children, tmp2);
+			free(tmp1);
+			return ret;
+		}
+		i = XAR_PROP(i)->next;
+	} while(i);
+	free(tmp1);
+	return NULL;
+}
+
+/* xar_prop_set_r
+ * p: property to recurse down and set the property of
+ * key: key of the property to set
+ * value: desired value of the property
+ * Returns: 0 on sucess, -1 on failure.
+ * Summary: This is an internal helper function for xar_prop_set() which
+ * does the recursion down the property tree.
+ */
+static xar_prop_t xar_prop_set_r(xar_file_t f, xar_prop_t p, const char *key, const char *value, int overwrite) {
+	xar_prop_t i, ret, ret2, start;
+	char *tmp1, *tmp2, *tmp3;
+
+	tmp2 = tmp1 = strdup(key);
+	tmp3 = strsep(&tmp2, "/");
+
+	if( !p ) {
+		start = XAR_FILE(f)->props;
+	} else {
+		start = XAR_PROP(p)->children;
+	}
+	
+	for( i = start; i; i = XAR_PROP(i)->next ) {
+		if( strcmp(tmp3, XAR_PROP(i)->key) == 0 ) {
+			if( !tmp2 ) {
+				if( overwrite ) {
+					free((char *)XAR_PROP(i)->value);
+					if( value )
+						XAR_PROP(i)->value = strdup(value);
+					free(tmp1);
+					return i;
+				} else {
+					ret = xar_prop_new(f, p);
+					if( !ret ) {
+						free(tmp1);
+						return ret;
+					}
+					if( value )
+						XAR_PROP(ret)->value = strdup(value);
+					XAR_PROP(ret)->key = strdup(tmp3);
+					free(tmp1);
+					return ret;
+				}
+			}
+
+			ret2 = xar_prop_set_r(f, i, tmp2, value, overwrite);
+			free(tmp1);
+			return ret2;
+		}
+	}
+
+	ret = xar_prop_new(f, p);
+	if( !ret ) {
+		free(tmp1);
+		return ret;
+	}
+
+	if( !tmp2 ) {
+		if( value )
+			XAR_PROP(ret)->value = strdup(value);
+		XAR_PROP(ret)->key = strdup(tmp3);
+		free(tmp1);
+		return ret;
+	}
+
+	XAR_PROP(ret)->key = strdup(tmp3);
+	XAR_PROP(ret)->value = NULL;
+
+	ret2 = xar_prop_set_r(f, ret, tmp2, value, overwrite);
+	free(tmp1);
+	return ret2;
+}
+
+/* xar_prop_set
+ * f: file to set the property on
+ * key: key of the property to set
+ * value: desired value of the property
+ * Returns: 0 on success, -1 on failure
+ * Summary: If the property already exists, its value is overwritten
+ * by 'value'.  If the property does not exist, it is created.
+ * Copies of key and value are kept in the tree.  The caller may do
+ * what they wish with these values after the call returns.
+ * References to these copies will be returned by iterating over
+ * the properties, or by calling xar_prop_get().
+ * These copies will be released when the property is released.
+ *
+ * Note that you *CANNOT* have a node with a value and children.
+ * This implementation will let you, but the serialization to xml
+ * will not be what you're hoping for.
+ */
+int32_t xar_prop_set(xar_file_t f, const char *key, const char *value) {
+	if( xar_prop_set_r(f, NULL, key, value, 1) )
+		return 0;
+	return -1;
+}
+
+/* xar_prop_create
+ * Identical to xar_prop_set, except it will not overwrite an existing
+ * property, it will create another one.
+ */
+int32_t xar_prop_create(xar_file_t f, const char *key, const char *value) {
+	if( xar_prop_set_r(f, NULL, key, value, 0) )
+		return 0;
+	return -1;
+}
+
+/* xar_prop_get
+ * f: file to look for the property in
+ * key: name of property to find.
+ * value: on return, *value will point to the value of the property
+ * value may be NULL, in which case, only the existence of the property
+ * is tested.
+ * Returns: 0 for success, -1 on failure
+ * Summary: A node's name may be specified by a path, such as 
+ * "a1/b1/c1", and child nodes will be searched for each 
+ * "/" separator.  
+ */
+int32_t xar_prop_get(xar_file_t f, const char *key, const char **value) {
+	xar_prop_t r = xar_prop_find(XAR_FILE(f)->props, key);
+	if( !r ) {
+		if(value)
+			*value = NULL;
+		return -1;
+	}
+	if(value)
+		*value = XAR_PROP(r)->value;
+	return 0;
+}
+
+/* xar_prop_free
+ * p: property to free
+ * Summary: frees the specified property and all its children.
+ * Stored copies of the key and value will be released, as will
+ * all attributes.
+ */
+void xar_prop_free(xar_prop_t p) {
+	xar_prop_t i;
+	xar_attr_t a;
+	while( XAR_PROP(p)->children ) {
+		i = XAR_PROP(p)->children;
+		XAR_PROP(p)->children = XAR_PROP(i)->next;
+		xar_prop_free(i);
+	}
+	while(XAR_PROP(p)->attrs) {
+		a = XAR_PROP(p)->attrs;
+		XAR_PROP(p)->attrs = XAR_ATTR(a)->next;
+		xar_attr_free(a);
+	}
+	free((char*)XAR_PROP(p)->key);
+	free((char*)XAR_PROP(p)->value);
+	free(XAR_PROP(p));
+}
+
+void xar_prop_unset(xar_file_t f, const char *key) {
+	xar_prop_t r = xar_prop_find(XAR_FILE(f)->props, key);
+	xar_prop_t i;
+	if( !r ) {
+		return;
+	}
+	if( XAR_PROP(r)->parent ) {
+		i = XAR_PROP(r)->parent->children;
+	} else {
+		i = XAR_FILE(f)->props;
+	}
+
+	while( i && (XAR_PROP(i)->next != XAR_PROP(r)) ) {
+		i = XAR_PROP(i)->next;
+	}
+	if( i && (XAR_PROP(i)->next == XAR_PROP(r)) ) {
+		XAR_PROP(i)->next = XAR_PROP(r)->next;
+		xar_prop_free(r);
+	}
+	return;
+}
+
+/* xar_file_new
+ * f: parent file of the file to be created.  May be NULL
+ * Returns: a newly allocated file structure.
+ */
+xar_file_t xar_file_new(xar_file_t f) {
+	xar_file_t ret, i;
+
+	ret = malloc(sizeof(struct __xar_file_t));
+	if(!ret) return NULL;
+
+	XAR_FILE(ret)->parent = f;
+	XAR_FILE(ret)->next = NULL;
+	XAR_FILE(ret)->children = NULL;
+	XAR_FILE(ret)->props = NULL;
+	XAR_FILE(ret)->attrs = NULL;
+	XAR_FILE(ret)->prefix = NULL;
+	XAR_FILE(ret)->ns = NULL;
+	XAR_FILE(ret)->fspath = NULL;
+	if( f ) {
+		if( !XAR_FILE(f)->children ) {
+			XAR_FILE(f)->children = ret;
+		} else {
+			for(i = XAR_FILE(f)->children; XAR_FILE(i)->next; i = XAR_FILE(i)->next);
+			XAR_FILE(i)->next = ret;
+		}
+	}
+
+	return ret;
+}
+
+/* xar_file_free
+ * f: file to free
+ * Summary: frees the specified file and all children,
+ * properties, and attributes associated with the file.
+ */
+void xar_file_free(xar_file_t f) {
+	xar_file_t i;
+	xar_prop_t n;
+	xar_attr_t a;
+	while(XAR_FILE(f)->children) {
+		i = XAR_FILE(f)->children;
+		XAR_FILE(f)->children = XAR_FILE(i)->next;
+		xar_file_free(i);
+	}
+	while(XAR_FILE(f)->props) {
+		n = XAR_FILE(f)->props;
+		XAR_FILE(f)->props = XAR_PROP(n)->next;
+		xar_prop_free(n);
+	}
+	while(XAR_FILE(f)->attrs) {
+		a = XAR_FILE(f)->attrs;
+		XAR_FILE(f)->attrs = XAR_ATTR(a)->next;
+		xar_attr_free(a);
+	}
+	free((char *)XAR_FILE(f)->fspath);
+	free(XAR_FILE(f));
+}
+
+/* xar_file_first
+ * x: archive to associate the iterator with
+ * i: an iterator as returned by xar_iter_new
+ * Returns: a pointer to the name of the first file associated with
+ * the archive 'x'.
+ * Summary: This MUST be called first prior to calling xar_file_next,
+ * to iterate over files of archive 'x'.  This has the side effect of
+ * associating the iterator with the archive's files, which is needed
+ * before xar_file_next.
+ */
+xar_file_t xar_file_first(xar_t x, xar_iter_t i) {
+	XAR_ITER(i)->iter = XAR(x)->files;
+	free(XAR_ITER(i)->node);
+	return XAR_ITER(i)->iter;
+}
+
+/* xar_file_next
+ * i: iterator allocated by xar_iter_new, and initialized with xar_file_first
+ * Returns: a pointer to the name of the next file associated with
+ * the iterator.  NULL will be returned when there are no more files
+ * to find.  
+ * This will recurse down child files (directories), flattening the 
+ * namespace and adding separators.  For instance a1->b1->c1, a1 will 
+ * first be returned, the subsequent call will return "a1/b1", and the 
+ * next call will return "a1/b1/c1", etc.
+ */
+xar_file_t xar_file_next(xar_iter_t i) {
+	xar_file_t f = XAR_ITER(i)->iter;
+	const char *name;
+	if( !(XAR_ITER(i)->nochild) && XAR_FILE(f)->children ) {
+		char *tmp = XAR_ITER(i)->path;
+		xar_prop_get(f, "name", &name);
+		if( tmp ) {
+			asprintf(&XAR_ITER(i)->path, "%s/%s", tmp, name);
+			free(tmp);
+		} else
+			XAR_ITER(i)->path = strdup(name);
+		XAR_ITER(i)->iter = f = XAR_FILE(f)->children;
+		goto FSUCCESS;
+	}
+	XAR_ITER(i)->nochild = 0;
+
+	if( XAR_FILE(f)->next ) {
+		XAR_ITER(i)->iter = f = XAR_FILE(f)->next;
+		goto FSUCCESS;
+	}
+
+	if( XAR_FILE(f)->parent ) {
+		char *tmp1, *tmp2;
+		char *dname;
+
+		if( strstr(XAR_ITER(i)->path, "/") ) {
+			tmp1 = tmp2 = XAR_ITER(i)->path;
+			dname = dirname(tmp2);
+			XAR_ITER(i)->path = strdup(dname);
+			free(tmp1);
+		} else {
+			free(XAR_ITER(i)->path);
+			XAR_ITER(i)->path = NULL;
+		}
+
+		XAR_ITER(i)->iter = f = XAR_FILE(f)->parent;
+		XAR_ITER(i)->nochild = 1;
+		return xar_file_next(i);
+	}
+
+	return NULL;
+FSUCCESS:
+	xar_prop_get(f, "name", &name);
+	XAR_ITER(i)->iter = (void *)f;
+
+	return XAR_ITER(i)->iter;
+}
+
+/* xar_file_find
+ * f: file subtree to look under
+ * path: path to file to find
+ * Returns the file_t describing the file, or NULL if not found.
+ */
+xar_file_t xar_file_find(xar_file_t f, const char *path) {
+	xar_file_t i, ret;
+	char *tmp1, *tmp2, *tmp3;
+
+	if( !f ) return NULL;
+	tmp2 = tmp1 = strdup(path);
+	tmp3 = strsep(&tmp2, "/");
+	i = f;
+	do {
+		const char *name;
+		xar_prop_get(i, "name", &name);
+		if( name == NULL ) continue;
+		if( strcmp(tmp3, name) == 0 ) {
+			if( tmp2 == NULL ) {
+				free(tmp1);
+				return i;
+			}
+			ret = xar_file_find(XAR_FILE(i)->children, tmp2);
+			free(tmp1);
+			return ret;
+		}
+		i = XAR_FILE(i)->next;
+	} while(i);
+	free(tmp1);
+	return NULL;
+}
+
+
+/* xar_prop_serialize
+ * p: property to serialize
+ * writer: the xmlTextWriterPtr allocated by xmlNewTextWriter*()
+ * Summary: recursively serializes the property passed to it, including
+ * children, siblings, attributes, etc.
+ */
+void xar_prop_serialize(xar_prop_t p, xmlTextWriterPtr writer) {
+	xar_prop_t i;
+	xar_attr_t a;
+
+	if( !p )
+		return;
+	i = p;
+	do {
+		if( XAR_PROP(i)->prefix || XAR_PROP(i)->ns )
+			xmlTextWriterStartElementNS(writer, BAD_CAST(XAR_PROP(i)->prefix), BAD_CAST(XAR_PROP(i)->key), NULL);
+		else
+			xmlTextWriterStartElement(writer, BAD_CAST(XAR_PROP(i)->key));
+		for(a = XAR_PROP(i)->attrs; a; a = XAR_ATTR(a)->next) {
+			xmlTextWriterWriteAttributeNS(writer, BAD_CAST(XAR_ATTR(a)->ns), BAD_CAST(XAR_ATTR(a)->key), NULL, BAD_CAST(XAR_ATTR(a)->value));
+		}
+		if( XAR_PROP(i)->value ) {
+			if( strcmp(XAR_PROP(i)->key, "name") == 0 ) {
+				unsigned char *tmp;
+				int outlen = strlen(XAR_PROP(i)->value);
+				int inlen, len;
+
+				inlen = len = outlen;
+
+				tmp = malloc(len);
+				assert(tmp);
+				if( UTF8Toisolat1(tmp, &len, BAD_CAST(XAR_PROP(i)->value), &inlen) < 0 ) {
+					xmlTextWriterWriteAttribute(writer, BAD_CAST("enctype"), BAD_CAST("base64"));
+					xmlTextWriterWriteBase64(writer, XAR_PROP(i)->value, 0, strlen(XAR_PROP(i)->value));
+				} else
+					xmlTextWriterWriteString(writer, BAD_CAST(XAR_PROP(i)->value));
+				free(tmp);
+			} else
+				xmlTextWriterWriteString(writer, BAD_CAST(XAR_PROP(i)->value));
+		}
+
+		if( XAR_PROP(i)->children ) {
+			xar_prop_serialize(XAR_PROP(i)->children, writer);
+		}
+		xmlTextWriterEndElement(writer);
+
+		i = XAR_PROP(i)->next;
+	} while(i);
+}
+
+/* xar_file_serialize
+ * f: file to serialize
+ * writer: the xmlTextWriterPtr allocated by xmlNewTextWriter*()
+ * Summary: recursively serializes the file passed to it, including
+ * children, siblings, properties, attributes, etc.
+ */
+void xar_file_serialize(xar_file_t f, xmlTextWriterPtr writer) {
+	xar_file_t i;
+	xar_attr_t a;
+
+	i = f;
+	do {
+		xmlTextWriterStartElement(writer, BAD_CAST("file"));
+		for(a = XAR_FILE(i)->attrs; a; a = XAR_ATTR(a)->next) {
+			xmlTextWriterWriteAttribute(writer, BAD_CAST(XAR_ATTR(a)->key), BAD_CAST(XAR_ATTR(a)->value));
+		}
+		xar_prop_serialize(XAR_FILE(i)->props, writer);
+		if( XAR_FILE(i)->children )
+			xar_file_serialize(XAR_FILE(i)->children, writer);
+		xmlTextWriterEndElement(writer);
+		i = XAR_FILE(i)->next;
+	} while(i);
+	return;
+}
+
+/* xar_prop_unserialize
+ * f: file the property is to belong to
+ * p: parent property, may be NULL
+ * reader: xmlTextReaderPtr already allocated
+ */
+int32_t xar_prop_unserialize(xar_file_t f, xar_prop_t parent, xmlTextReaderPtr reader) {
+	const char *name, *value, *ns;
+	int type, i, isempty = 0;
+	int isname = 0, isencoded = 0;
+	xar_prop_t p;
+
+	p = xar_prop_new(f, parent);
+	if( xmlTextReaderIsEmptyElement(reader) )
+		isempty = 1;
+	i = xmlTextReaderAttributeCount(reader);
+	name = (const char *)xmlTextReaderConstLocalName(reader);
+	XAR_PROP(p)->key = strdup(name);
+	ns = (const char *)xmlTextReaderConstPrefix(reader);
+	if( ns ) XAR_PROP(p)->prefix = strdup(ns);
+	if( strcmp(name, "name") == 0 )
+		isname = 1;
+	if( i > 0 ) {
+		for(i = xmlTextReaderMoveToFirstAttribute(reader); i == 1; i = xmlTextReaderMoveToNextAttribute(reader)) {
+			xar_attr_t a;
+			const char *name = (const char *)xmlTextReaderConstLocalName(reader);
+			const char *value = (const char *)xmlTextReaderConstValue(reader);
+			const char *ns = (const char *)xmlTextReaderConstPrefix(reader);
+			if( isname && (strcmp(name, "enctype") == 0) && (strcmp(value, "base64") == 0) ) {
+				isencoded = 1;
+			} else {
+				a = xar_attr_new();
+				XAR_ATTR(a)->key = strdup(name);
+				XAR_ATTR(a)->value = strdup(value);
+				if(ns) XAR_ATTR(a)->ns = strdup(ns);
+				XAR_ATTR(a)->next = XAR_PROP(p)->attrs;
+				XAR_PROP(p)->attrs = a;
+			}
+		}
+	}
+	if( isempty )
+		return 0;
+	while( xmlTextReaderRead(reader) == 1) {
+		type = xmlTextReaderNodeType(reader);
+		switch(type) {
+		case XML_READER_TYPE_ELEMENT:
+			xar_prop_unserialize(f, p, reader);
+			break;
+		case XML_READER_TYPE_TEXT:
+			value = (const char *)xmlTextReaderConstValue(reader);
+			free((char*)XAR_PROP(p)->value);
+			if( isencoded )
+				XAR_PROP(p)->value = (const char *)xar_from_base64(BAD_CAST(value), strlen(value));
+			else
+				XAR_PROP(p)->value = strdup(value);
+			if( isname ) {
+				if( XAR_FILE(f)->parent ) {
+					asprintf((char **)&XAR_FILE(f)->fspath, "%s/%s", XAR_FILE(XAR_FILE(f)->parent)->fspath, XAR_PROP(p)->value);
+				} else {
+					XAR_FILE(f)->fspath = strdup(XAR_PROP(p)->value);
+				}
+			}
+			break;
+		case XML_READER_TYPE_END_ELEMENT:
+			return 0;
+			break;
+		}
+	}
+
+	/* XXX: Should never be reached */
+	return 0;
+}
+
+/* xar_file_unserialize
+ * x: archive we're unserializing to
+ * parent: The parent file of the file to be unserialized.  May be NULL
+ * reader: The xmlTextReaderPtr we are reading the xml from.
+ * Summary: Takes a <file> node, and adds all attributes, child properties,
+ * and child files.
+ */
+xar_file_t xar_file_unserialize(xar_t x, xar_file_t parent, xmlTextReaderPtr reader) {
+	xar_file_t ret;
+	const char *name;
+	int type, i;
+
+	ret = xar_file_new(parent);
+
+	i = xmlTextReaderAttributeCount(reader);
+	if( i > 0 ) {
+		for(i = xmlTextReaderMoveToFirstAttribute(reader); i == 1; i = xmlTextReaderMoveToNextAttribute(reader)) {
+			xar_attr_t a;
+			const char *name = (const char *)xmlTextReaderConstLocalName(reader);
+			const char *value = (const char *)xmlTextReaderConstValue(reader);
+			a = xar_attr_new();
+			XAR_ATTR(a)->key = strdup(name);
+			XAR_ATTR(a)->value = strdup(value);
+			XAR_ATTR(a)->next = XAR_FILE(ret)->attrs;
+			XAR_FILE(ret)->attrs = a;
+		}
+	}
+
+	while( xmlTextReaderRead(reader) == 1 ) {
+		type = xmlTextReaderNodeType(reader);
+		name = (const char *)xmlTextReaderConstLocalName(reader);
+		if( (type == XML_READER_TYPE_END_ELEMENT) && (strcmp(name, "file")==0) ) {
+			const char *opt;
+			xar_prop_get(ret, "type", &opt);
+			if( opt && (strcmp(opt, "hardlink") == 0) ) {
+				opt = xar_attr_get(ret, "type", "link");
+				if( opt && (strcmp(opt, "original") == 0) ) {
+					opt = xar_attr_get(ret, NULL, "id");
+					xmlHashAddEntry(XAR(x)->link_hash, BAD_CAST(opt), XAR_FILE(ret));
+				}
+			}
+			return ret;
+		}
+
+		if( type == XML_READER_TYPE_ELEMENT ) {
+			if( strcmp(name, "file")==0 )
+				xar_file_unserialize(x, ret, reader);
+			else
+				xar_prop_unserialize(ret, NULL, reader);
+		}
+	}
+
+	/* XXX Should never be reached */
+	return ret;
+}
+

Deleted: branches/release_1_4/base/src/programs/xar/lib/filetree.h
===================================================================
--- trunk/base/src/programs/xar/lib/filetree.h	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/filetree.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2005 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of his contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 03-Apr-2005
- * DRI: Rob Braun <bbraun at opendarwin.org>
- */
-
-#ifndef _XAR_FILETREE_H_
-#define _XAR_FILETREE_H_
-
-#include <libxml/xmlwriter.h>
-#include <libxml/xmlreader.h>
-
-struct __xar_attr_t {
-	const char *key;
-	const char *value;
-	const char *ns;
-	const struct __xar_attr_t *next;
-};
-
-struct __xar_prop_t {
-        const char *key;
-        const char *value;
-        const struct __xar_prop_t *parent;
-        const struct __xar_prop_t *children;
-        const struct __xar_prop_t *next;
-        const struct __xar_attr_t *attrs;
-        const struct __xar_file_t *file;
-	const char *prefix;
-	const char *ns;
-};
-
-struct __xar_file_t {
-	const struct __xar_prop_t *props;
-	const struct __xar_attr_t *attrs;
-	const char *prefix;
-	const char *ns;
-	const char *fspath;
-	const struct __xar_file_t *parent;
-	const struct __xar_file_t *children;
-	const struct __xar_file_t *next;
-};
-
-typedef const struct __xar_prop_t *xar_prop_t;
-typedef const struct __xar_attr_t *xar_attr_t;
-#define XAR_ATTR(x) ((struct __xar_attr_t *)(x))
-#define XAR_FILE(x) ((struct __xar_file_t *)(x))
-#define XAR_PROP(x) ((struct __xar_prop_t *)(x))
-
-void xar_file_free(xar_file_t f);
-xar_attr_t xar_attr_new(void);
-int32_t xar_attr_set(xar_file_t f, const char *prop, const char *key, const char *value);
-const char *xar_attr_get(xar_file_t f, const char *prop, const char *key);
-void xar_attr_free(xar_attr_t a);
-void xar_file_serialize(xar_file_t f, xmlTextWriterPtr writer);
-xar_file_t xar_file_unserialize(xar_t x, xar_file_t parent, xmlTextReaderPtr reader);
-xar_file_t xar_file_find(xar_file_t f, const char *path);
-xar_file_t xar_file_new(xar_file_t f);
-void xar_file_free(xar_file_t f);
-
-void xar_prop_serialize(xar_prop_t p, xmlTextWriterPtr writer);
-int32_t xar_prop_unserialize(xar_file_t f, xar_prop_t parent, xmlTextReaderPtr reader);
-void xar_prop_free(xar_prop_t p);
-xar_prop_t xar_prop_new(xar_file_t f, xar_prop_t parent);
-
-#endif /* _XAR_FILETREE_H_ */

Copied: branches/release_1_4/base/src/programs/xar/lib/filetree.h (from rev 23968, trunk/base/src/programs/xar/lib/filetree.h)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/filetree.h	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/filetree.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2005 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of his contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 03-Apr-2005
+ * DRI: Rob Braun <bbraun at opendarwin.org>
+ */
+
+#ifndef _XAR_FILETREE_H_
+#define _XAR_FILETREE_H_
+
+#include <libxml/xmlwriter.h>
+#include <libxml/xmlreader.h>
+
+struct __xar_attr_t {
+	const char *key;
+	const char *value;
+	const char *ns;
+	const struct __xar_attr_t *next;
+};
+
+struct __xar_prop_t {
+        const char *key;
+        const char *value;
+        const struct __xar_prop_t *parent;
+        const struct __xar_prop_t *children;
+        const struct __xar_prop_t *next;
+        const struct __xar_attr_t *attrs;
+        const struct __xar_file_t *file;
+	const char *prefix;
+	const char *ns;
+};
+
+struct __xar_file_t {
+	const struct __xar_prop_t *props;
+	const struct __xar_attr_t *attrs;
+	const char *prefix;
+	const char *ns;
+	const char *fspath;
+	const struct __xar_file_t *parent;
+	const struct __xar_file_t *children;
+	const struct __xar_file_t *next;
+};
+
+typedef const struct __xar_prop_t *xar_prop_t;
+typedef const struct __xar_attr_t *xar_attr_t;
+#define XAR_ATTR(x) ((struct __xar_attr_t *)(x))
+#define XAR_FILE(x) ((struct __xar_file_t *)(x))
+#define XAR_PROP(x) ((struct __xar_prop_t *)(x))
+
+void xar_file_free(xar_file_t f);
+xar_attr_t xar_attr_new(void);
+int32_t xar_attr_set(xar_file_t f, const char *prop, const char *key, const char *value);
+const char *xar_attr_get(xar_file_t f, const char *prop, const char *key);
+void xar_attr_free(xar_attr_t a);
+void xar_file_serialize(xar_file_t f, xmlTextWriterPtr writer);
+xar_file_t xar_file_unserialize(xar_t x, xar_file_t parent, xmlTextReaderPtr reader);
+xar_file_t xar_file_find(xar_file_t f, const char *path);
+xar_file_t xar_file_new(xar_file_t f);
+void xar_file_free(xar_file_t f);
+
+void xar_prop_serialize(xar_prop_t p, xmlTextWriterPtr writer);
+int32_t xar_prop_unserialize(xar_file_t f, xar_prop_t parent, xmlTextReaderPtr reader);
+void xar_prop_free(xar_prop_t p);
+xar_prop_t xar_prop_new(xar_file_t f, xar_prop_t parent);
+
+#endif /* _XAR_FILETREE_H_ */

Deleted: branches/release_1_4/base/src/programs/xar/lib/io.c
===================================================================
--- trunk/base/src/programs/xar/lib/io.c	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/io.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,449 +0,0 @@
-/*
- * Copyright (c) 2005 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of his contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 03-Apr-2005
- * DRI: Rob Braun <bbraun at opendarwin.org>
- */
-
-#define _FILE_OFFSET_BITS 64
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <limits.h>
-#include <unistd.h>
-#include <inttypes.h>
-#include <sys/types.h>
-#include <assert.h>
-
-#include "config.h"
-#ifndef HAVE_ASPRINTF
-#include "asprintf.h"
-#endif
-#include "xar.h"
-#include "filetree.h"
-#include "archive.h"
-#include "io.h"
-#include "zxar.h"
-#include "bzxar.h"
-#include "md5.h"
-#include "script.h"
-#include "macho.h"
-
-#if !defined(LLONG_MAX) && defined(LONG_LONG_MAX)
-#define LLONG_MAX LONG_LONG_MAX
-#endif
-
-#if !defined(LLONG_MIN) && defined(LONG_LONG_MIN)
-#define LLONG_MIN LONG_LONG_MIN
-#endif
-
-struct datamod xar_datamods[] = {
-	{ (fromheap_in)NULL,
-	  xar_md5_compressed,
-	  xar_md5out_done,
-	  xar_md5_uncompressed,
-	  xar_md5_compressed,
-	  xar_md5_done
-	},
-	{ (fromheap_in)NULL,
-	  (fromheap_out)NULL,
-	  (fromheap_done)NULL,
-	  xar_script_in,
-	  (toheap_out)NULL,
-	  xar_script_done
-	},
-	{ (fromheap_in)NULL,
-	  (fromheap_out)NULL,
-	  (fromheap_done)NULL,
-	  xar_macho_in,
-	  (toheap_out)NULL,
-	  xar_macho_done
-	},
-	{ xar_gzip_fromheap_in,
-	  (fromheap_out)NULL,
-	  xar_gzip_fromheap_done,
-	  xar_gzip_toheap_in,
-	  (toheap_out)NULL,
-	  xar_gzip_toheap_done
-	},
-	{ xar_bzip_fromheap_in,
-	  (fromheap_out)NULL,
-	  xar_bzip_fromheap_done,
-	  xar_bzip_toheap_in,
-	  (toheap_out)NULL,
-	  xar_bzip_toheap_done
-	}
-};
-
-int32_t xar_attrcopy_to_heap(xar_t x, xar_file_t f, const char *attr, read_callback rcb) {
-	int r, off, i;
-	size_t bsize, rsize;
-	int64_t readsize=0, writesize=0, inc = 0;
-	void *inbuf;
-	char *tmpstr = NULL, *tmpstr2 = NULL;
-	const char *opt, *csum;
-	off_t orig_heap_offset = XAR(x)->heap_offset;
-	xar_file_t tmpf = NULL;
-
-	opt = xar_opt_get(x, XAR_OPT_RSIZE);
-	if( !opt ) {
-		bsize = 4096;
-	} else {
-		bsize = strtol(opt, NULL, 0);
-		if( ((bsize == LONG_MAX) || (bsize == LONG_MIN)) && (errno == ERANGE) ) {
-			bsize = 4096;
-		}
-	}
-
-	r = 1;
-	while(r != 0) {
-		inbuf = malloc(bsize);
-		if( !inbuf )
-			return -1;
-
-		r = rcb(x, f, inbuf, bsize);
-		if( r < 0 ) {
-			free(inbuf);
-			return -1;
-		}
-
-		readsize+=r;
-		inc += r;
-		rsize = r;
-
-		/* filter the data through the in modules */
-		for( i = 0; i < (sizeof(xar_datamods)/sizeof(struct datamod)); i++) {
-			if( xar_datamods[i].th_in ) {
-				xar_datamods[i].th_in(x, f, attr, &inbuf, &rsize);
-			}
-		}
-
-		/* filter the data through the out modules */
-		for( i = 0; i < (sizeof(xar_datamods)/sizeof(struct datamod)); i++) {
-			if( xar_datamods[i].th_out )
-				xar_datamods[i].th_out(x, f, attr, inbuf, rsize);
-		}
-
-		off = 0;
-		if( rsize != 0 ) {
-			do {
-				r = write(XAR(x)->heap_fd, inbuf+off, rsize-off);
-				if( (r < 0) && (errno != EINTR) )
-					return -1;
-				off += r;
-				writesize += r;
-			} while( off < rsize );
-		}
-		XAR(x)->heap_offset += off;
-		free(inbuf);
-
-	}
-
-
-	/* If size is 0, don't bother having anything in the heap */
-	if( readsize == 0 ) {
-		XAR(x)->heap_offset = orig_heap_offset;
-		lseek(XAR(x)->heap_fd, -writesize, SEEK_CUR);
-		for( i = 0; i < (sizeof(xar_datamods)/sizeof(struct datamod)); i++) {
-			if( xar_datamods[i].th_done )
-				xar_datamods[i].th_done(x, NULL, attr);
-		}
-		return 0;
-	}
-	/* finish up anything that still needs doing */
-	for( i = 0; i < (sizeof(xar_datamods)/sizeof(struct datamod)); i++) {
-		if( xar_datamods[i].th_done )
-			xar_datamods[i].th_done(x, f, attr);
-	}
-
-	XAR(x)->heap_len += writesize;
-	asprintf(&tmpstr, "%s/archived-checksum", attr);
-	xar_prop_get(f, tmpstr, &csum);
-	free(tmpstr);
-	tmpf = xmlHashLookup(XAR(x)->csum_hash, BAD_CAST(csum));
-	if( tmpf ) {
-		opt = xar_opt_get(x, XAR_OPT_LINKSAME);
-		if( opt && (strcmp(attr, "data") == 0) ) {
-			const char *id = xar_attr_get(tmpf, NULL, "id");
-			xar_prop_set(f, "type", "hardlink");
-			xar_attr_set(f, "type", "link", id);
-			xar_prop_set(tmpf, "type", "hardlink");
-			xar_attr_set(tmpf, "type", "link", "original");
-			xar_prop_unset(f, "data");
-			XAR(x)->heap_offset = orig_heap_offset;
-			lseek(XAR(x)->heap_fd, -writesize, SEEK_CUR);
-			XAR(x)->heap_len -= writesize;
-			return 0;
-		} 
-		opt = xar_opt_get(x, XAR_OPT_COALESCE);
-		if( opt ) {
-			long long tmpoff;
-			const char *offstr;
-			asprintf(&tmpstr2, "%s/offset", attr);
-			xar_prop_get(tmpf, tmpstr2, &offstr);
-			if( tmpstr ) {
-				tmpoff = strtoll(offstr, NULL, 10);
-				XAR(x)->heap_offset = orig_heap_offset;
-				lseek(XAR(x)->heap_fd, -writesize, SEEK_CUR);
-				orig_heap_offset = tmpoff;
-				XAR(x)->heap_len -= writesize;
-			}
-			
-		}
-	} else {
-		xmlHashAddEntry(XAR(x)->csum_hash, BAD_CAST(csum), XAR_FILE(f));
-	}
-
-	asprintf(&tmpstr2, "%s/size", attr);
-	asprintf(&tmpstr, "%"PRIu64, readsize);
-	xar_prop_set(f, tmpstr2, tmpstr);
-	free(tmpstr);
-	free(tmpstr2);
-
-	asprintf(&tmpstr, "%"PRIu64, (uint64_t)orig_heap_offset);
-	asprintf(&tmpstr2, "%s/offset", attr);
-	xar_prop_set(f, tmpstr2, tmpstr);
-	free(tmpstr);
-	free(tmpstr2);
-	
-	tmpstr = (char *)xar_opt_get(x, XAR_OPT_COMPRESSION);
-	if( tmpstr && (strcmp(tmpstr, XAR_OPT_VAL_NONE) == 0) ) {
-		asprintf(&tmpstr2, "%s/encoding", attr);
-		xar_prop_set(f, tmpstr2, NULL);
-		xar_attr_set(f, tmpstr2, "style", "application/octet-stream");
-		free(tmpstr2);
-	}
-
-	asprintf(&tmpstr2, "%s/length", attr);
-	asprintf(&tmpstr, "%"PRIu64, writesize);
-	xar_prop_set(f, tmpstr2, tmpstr);
-	free(tmpstr);
-	free(tmpstr2);
-
-	return 0;
-}
-
-/* xar_copy_from_heap
- * This is the arcmod extraction entry point for extracting the file's
- * data from the heap file.
- * It is assumed the heap_fd is already positioned appropriately.
- */
-int32_t xar_attrcopy_from_heap(xar_t x, xar_file_t f, const char *attr, write_callback wcb) {
-	int r, i;
-	size_t bsize, def_bsize;
-	int64_t fsize, inc = 0, seekoff;
-	void *inbuf;
-	const char *opt;
-	char *tmpstr = NULL;
-
-	opt = xar_opt_get(x, "rsize");
-	if( !opt ) {
-		def_bsize = 4096;
-	} else {
-		def_bsize = strtol(opt, NULL, 0);
-		if( ((def_bsize == LONG_MAX) || (def_bsize == LONG_MIN)) && (errno == ERANGE) ) {
-			def_bsize = 4096;
-		}
-	}
-
-	asprintf(&tmpstr, "%s/offset", attr);
-	xar_prop_get(f, tmpstr, &opt);
-	free(tmpstr);
-	if( !opt ) {
-		wcb(x, f, NULL, 0);
-		return 0;
-	} else {
-		seekoff = strtoll(opt, NULL, 0);
-		if( ((seekoff == LLONG_MAX) || (seekoff == LLONG_MIN)) && (errno == ERANGE) ) {
-			return -1;
-		}
-	}
-
-	seekoff += XAR(x)->toc_count + sizeof(xar_header_t);
-	if( XAR(x)->fd > 1 ) {
-		r = lseek(XAR(x)->fd, seekoff, SEEK_SET);
-		if( r == -1 ) {
-			if( errno == ESPIPE ) {
-				ssize_t rr;
-				char *buf;
-				unsigned int len;
-
-				len = seekoff - XAR(x)->toc_count;
-				len -= sizeof(xar_header_t);
-				if( XAR(x)->heap_offset > len ) {
-					xar_err_new(x);
-					xar_err_set_file(x, f);
-					xar_err_set_string(x, "Unable to seek");
-					xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
-				} else {
-					len -= XAR(x)->heap_offset;
-					buf = malloc(len);
-					assert(buf);
-					rr = read(XAR(x)->fd, buf, len);
-					if( rr < len ) {
-						xar_err_new(x);
-						xar_err_set_file(x, f);
-						xar_err_set_string(x, "Unable to seek");
-						xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
-					}
-					free(buf);
-				}
-			} else {
-				xar_err_new(x);
-				xar_err_set_file(x, f);
-				xar_err_set_string(x, "Unable to seek");
-				xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
-			}
-		}
-	}
-
-	asprintf(&tmpstr, "%s/length", attr);
-	xar_prop_get(f, tmpstr, &opt);
-	free(tmpstr);
-	if( !opt ) {
-		return 0;
-	} else {
-		fsize = strtoll(opt, NULL, 10);
-		if( ((fsize == LLONG_MAX) || (fsize == LLONG_MIN)) && (errno == ERANGE) ) {
-			return -1;
-		}
-	}
-
-	bsize = def_bsize;
-	inbuf = malloc(bsize);
-	if( !inbuf ) {
-		return -1;
-	}
-
-	while(1) {
-		/* Size has been reached */
-		if( fsize == inc )
-			break;
-		if( (fsize - inc) < bsize )
-			bsize = fsize - inc;
-		r = read(XAR(x)->fd, inbuf, bsize);
-		if( r == 0 )
-			break;
-		if( (r < 0) && (errno == EINTR) )
-			continue;
-		if( r < 0 ) {
-			free(inbuf);
-			return -1;
-		}
-
-		XAR(x)->heap_offset += r;
-		inc += r;
-		bsize = r;
-
-		/* filter the data through the in modules */
-		for( i = 0; i < (sizeof(xar_datamods)/sizeof(struct datamod)); i++) {
-			if( xar_datamods[i].fh_in ) {
-				int32_t ret;
-				ret = xar_datamods[i].fh_in(x, f, attr, &inbuf, &bsize);
-				if( ret < 0 )
-					return -1;
-			}
-		}
-
-		/* filter the data through the out modules */
-		for( i = 0; i < (sizeof(xar_datamods)/sizeof(struct datamod)); i++) {
-			if( xar_datamods[i].fh_out ) {
-				int32_t ret;
-				ret = xar_datamods[i].fh_out(x, f, attr, inbuf, bsize);
-				if( ret < 0 )
-					return -1;
-			}
-		}
-
-		wcb(x, f, inbuf, bsize);
-		free(inbuf);
-		bsize = def_bsize;
-		inbuf = malloc(bsize);
-	}
-
-	free(inbuf);
-	/* finish up anything that still needs doing */
-	for( i = 0; i < (sizeof(xar_datamods)/sizeof(struct datamod)); i++) {
-		if( xar_datamods[i].fh_done ) {
-			int32_t ret;
-			ret = xar_datamods[i].fh_done(x, f, attr);
-			if( ret < 0 )
-				return ret;
-		}
-	}
-	return 0;
-}
-
-/* xar_heap_to_archive
- * x: archive to operate on
- * Returns 0 on success, -1 on error
- * Summary: copies the heap into the archive.
- */
-int32_t xar_heap_to_archive(xar_t x) {
-	long bsize;
-	ssize_t r;
-	int off;
-	const char *opt;
-	char *b;
-
-	opt = xar_opt_get(x, "rsize");
-	if( !opt ) {
-		bsize = 4096;
-	} else {
-		bsize = strtol(opt, NULL, 0);
-		if( ((bsize == LONG_MAX) || (bsize == LONG_MIN)) && (errno == ERANGE) ) {
-			bsize = 4096;
-		}
-	}
-
-	b = malloc(bsize);
-	if( !b ) return -1;
-
-	while(1) {
-		r = read(XAR(x)->heap_fd, b, bsize);
-		if( r == 0 ) break;
-		if( (r < 0) && (errno == EINTR) ) continue;
-		if( r < 0 ) {
-			free(b);
-			return -1;
-		}
-
-		off = 0;
-		do {
-			r = write(XAR(x)->fd, b+off, bsize-off);
-			if( (r < 0) && (errno != EINTR) )
-				return -1;
-			off += r;
-		} while( off < bsize );
-	}
-	return 0;
-}

Copied: branches/release_1_4/base/src/programs/xar/lib/io.c (from rev 23968, trunk/base/src/programs/xar/lib/io.c)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/io.c	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/io.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,449 @@
+/*
+ * Copyright (c) 2005 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of his contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 03-Apr-2005
+ * DRI: Rob Braun <bbraun at opendarwin.org>
+ */
+
+#define _FILE_OFFSET_BITS 64
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <string.h>
+#include <limits.h>
+#include <unistd.h>
+#include <inttypes.h>
+#include <sys/types.h>
+#include <assert.h>
+
+#include "config.h"
+#ifndef HAVE_ASPRINTF
+#include "asprintf.h"
+#endif
+#include "xar.h"
+#include "filetree.h"
+#include "archive.h"
+#include "io.h"
+#include "zxar.h"
+#include "bzxar.h"
+#include "md5.h"
+#include "script.h"
+#include "macho.h"
+
+#if !defined(LLONG_MAX) && defined(LONG_LONG_MAX)
+#define LLONG_MAX LONG_LONG_MAX
+#endif
+
+#if !defined(LLONG_MIN) && defined(LONG_LONG_MIN)
+#define LLONG_MIN LONG_LONG_MIN
+#endif
+
+struct datamod xar_datamods[] = {
+	{ (fromheap_in)NULL,
+	  xar_md5_compressed,
+	  xar_md5out_done,
+	  xar_md5_uncompressed,
+	  xar_md5_compressed,
+	  xar_md5_done
+	},
+	{ (fromheap_in)NULL,
+	  (fromheap_out)NULL,
+	  (fromheap_done)NULL,
+	  xar_script_in,
+	  (toheap_out)NULL,
+	  xar_script_done
+	},
+	{ (fromheap_in)NULL,
+	  (fromheap_out)NULL,
+	  (fromheap_done)NULL,
+	  xar_macho_in,
+	  (toheap_out)NULL,
+	  xar_macho_done
+	},
+	{ xar_gzip_fromheap_in,
+	  (fromheap_out)NULL,
+	  xar_gzip_fromheap_done,
+	  xar_gzip_toheap_in,
+	  (toheap_out)NULL,
+	  xar_gzip_toheap_done
+	},
+	{ xar_bzip_fromheap_in,
+	  (fromheap_out)NULL,
+	  xar_bzip_fromheap_done,
+	  xar_bzip_toheap_in,
+	  (toheap_out)NULL,
+	  xar_bzip_toheap_done
+	}
+};
+
+int32_t xar_attrcopy_to_heap(xar_t x, xar_file_t f, const char *attr, read_callback rcb) {
+	int r, off, i;
+	size_t bsize, rsize;
+	int64_t readsize=0, writesize=0, inc = 0;
+	void *inbuf;
+	char *tmpstr = NULL, *tmpstr2 = NULL;
+	const char *opt, *csum;
+	off_t orig_heap_offset = XAR(x)->heap_offset;
+	xar_file_t tmpf = NULL;
+
+	opt = xar_opt_get(x, XAR_OPT_RSIZE);
+	if( !opt ) {
+		bsize = 4096;
+	} else {
+		bsize = strtol(opt, NULL, 0);
+		if( ((bsize == LONG_MAX) || (bsize == LONG_MIN)) && (errno == ERANGE) ) {
+			bsize = 4096;
+		}
+	}
+
+	r = 1;
+	while(r != 0) {
+		inbuf = malloc(bsize);
+		if( !inbuf )
+			return -1;
+
+		r = rcb(x, f, inbuf, bsize);
+		if( r < 0 ) {
+			free(inbuf);
+			return -1;
+		}
+
+		readsize+=r;
+		inc += r;
+		rsize = r;
+
+		/* filter the data through the in modules */
+		for( i = 0; i < (sizeof(xar_datamods)/sizeof(struct datamod)); i++) {
+			if( xar_datamods[i].th_in ) {
+				xar_datamods[i].th_in(x, f, attr, &inbuf, &rsize);
+			}
+		}
+
+		/* filter the data through the out modules */
+		for( i = 0; i < (sizeof(xar_datamods)/sizeof(struct datamod)); i++) {
+			if( xar_datamods[i].th_out )
+				xar_datamods[i].th_out(x, f, attr, inbuf, rsize);
+		}
+
+		off = 0;
+		if( rsize != 0 ) {
+			do {
+				r = write(XAR(x)->heap_fd, inbuf+off, rsize-off);
+				if( (r < 0) && (errno != EINTR) )
+					return -1;
+				off += r;
+				writesize += r;
+			} while( off < rsize );
+		}
+		XAR(x)->heap_offset += off;
+		free(inbuf);
+
+	}
+
+
+	/* If size is 0, don't bother having anything in the heap */
+	if( readsize == 0 ) {
+		XAR(x)->heap_offset = orig_heap_offset;
+		lseek(XAR(x)->heap_fd, -writesize, SEEK_CUR);
+		for( i = 0; i < (sizeof(xar_datamods)/sizeof(struct datamod)); i++) {
+			if( xar_datamods[i].th_done )
+				xar_datamods[i].th_done(x, NULL, attr);
+		}
+		return 0;
+	}
+	/* finish up anything that still needs doing */
+	for( i = 0; i < (sizeof(xar_datamods)/sizeof(struct datamod)); i++) {
+		if( xar_datamods[i].th_done )
+			xar_datamods[i].th_done(x, f, attr);
+	}
+
+	XAR(x)->heap_len += writesize;
+	asprintf(&tmpstr, "%s/archived-checksum", attr);
+	xar_prop_get(f, tmpstr, &csum);
+	free(tmpstr);
+	tmpf = xmlHashLookup(XAR(x)->csum_hash, BAD_CAST(csum));
+	if( tmpf ) {
+		opt = xar_opt_get(x, XAR_OPT_LINKSAME);
+		if( opt && (strcmp(attr, "data") == 0) ) {
+			const char *id = xar_attr_get(tmpf, NULL, "id");
+			xar_prop_set(f, "type", "hardlink");
+			xar_attr_set(f, "type", "link", id);
+			xar_prop_set(tmpf, "type", "hardlink");
+			xar_attr_set(tmpf, "type", "link", "original");
+			xar_prop_unset(f, "data");
+			XAR(x)->heap_offset = orig_heap_offset;
+			lseek(XAR(x)->heap_fd, -writesize, SEEK_CUR);
+			XAR(x)->heap_len -= writesize;
+			return 0;
+		} 
+		opt = xar_opt_get(x, XAR_OPT_COALESCE);
+		if( opt ) {
+			long long tmpoff;
+			const char *offstr;
+			asprintf(&tmpstr2, "%s/offset", attr);
+			xar_prop_get(tmpf, tmpstr2, &offstr);
+			if( tmpstr ) {
+				tmpoff = strtoll(offstr, NULL, 10);
+				XAR(x)->heap_offset = orig_heap_offset;
+				lseek(XAR(x)->heap_fd, -writesize, SEEK_CUR);
+				orig_heap_offset = tmpoff;
+				XAR(x)->heap_len -= writesize;
+			}
+			
+		}
+	} else {
+		xmlHashAddEntry(XAR(x)->csum_hash, BAD_CAST(csum), XAR_FILE(f));
+	}
+
+	asprintf(&tmpstr2, "%s/size", attr);
+	asprintf(&tmpstr, "%"PRIu64, readsize);
+	xar_prop_set(f, tmpstr2, tmpstr);
+	free(tmpstr);
+	free(tmpstr2);
+
+	asprintf(&tmpstr, "%"PRIu64, (uint64_t)orig_heap_offset);
+	asprintf(&tmpstr2, "%s/offset", attr);
+	xar_prop_set(f, tmpstr2, tmpstr);
+	free(tmpstr);
+	free(tmpstr2);
+	
+	tmpstr = (char *)xar_opt_get(x, XAR_OPT_COMPRESSION);
+	if( tmpstr && (strcmp(tmpstr, XAR_OPT_VAL_NONE) == 0) ) {
+		asprintf(&tmpstr2, "%s/encoding", attr);
+		xar_prop_set(f, tmpstr2, NULL);
+		xar_attr_set(f, tmpstr2, "style", "application/octet-stream");
+		free(tmpstr2);
+	}
+
+	asprintf(&tmpstr2, "%s/length", attr);
+	asprintf(&tmpstr, "%"PRIu64, writesize);
+	xar_prop_set(f, tmpstr2, tmpstr);
+	free(tmpstr);
+	free(tmpstr2);
+
+	return 0;
+}
+
+/* xar_copy_from_heap
+ * This is the arcmod extraction entry point for extracting the file's
+ * data from the heap file.
+ * It is assumed the heap_fd is already positioned appropriately.
+ */
+int32_t xar_attrcopy_from_heap(xar_t x, xar_file_t f, const char *attr, write_callback wcb) {
+	int r, i;
+	size_t bsize, def_bsize;
+	int64_t fsize, inc = 0, seekoff;
+	void *inbuf;
+	const char *opt;
+	char *tmpstr = NULL;
+
+	opt = xar_opt_get(x, "rsize");
+	if( !opt ) {
+		def_bsize = 4096;
+	} else {
+		def_bsize = strtol(opt, NULL, 0);
+		if( ((def_bsize == LONG_MAX) || (def_bsize == LONG_MIN)) && (errno == ERANGE) ) {
+			def_bsize = 4096;
+		}
+	}
+
+	asprintf(&tmpstr, "%s/offset", attr);
+	xar_prop_get(f, tmpstr, &opt);
+	free(tmpstr);
+	if( !opt ) {
+		wcb(x, f, NULL, 0);
+		return 0;
+	} else {
+		seekoff = strtoll(opt, NULL, 0);
+		if( ((seekoff == LLONG_MAX) || (seekoff == LLONG_MIN)) && (errno == ERANGE) ) {
+			return -1;
+		}
+	}
+
+	seekoff += XAR(x)->toc_count + sizeof(xar_header_t);
+	if( XAR(x)->fd > 1 ) {
+		r = lseek(XAR(x)->fd, seekoff, SEEK_SET);
+		if( r == -1 ) {
+			if( errno == ESPIPE ) {
+				ssize_t rr;
+				char *buf;
+				unsigned int len;
+
+				len = seekoff - XAR(x)->toc_count;
+				len -= sizeof(xar_header_t);
+				if( XAR(x)->heap_offset > len ) {
+					xar_err_new(x);
+					xar_err_set_file(x, f);
+					xar_err_set_string(x, "Unable to seek");
+					xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
+				} else {
+					len -= XAR(x)->heap_offset;
+					buf = malloc(len);
+					assert(buf);
+					rr = read(XAR(x)->fd, buf, len);
+					if( rr < len ) {
+						xar_err_new(x);
+						xar_err_set_file(x, f);
+						xar_err_set_string(x, "Unable to seek");
+						xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
+					}
+					free(buf);
+				}
+			} else {
+				xar_err_new(x);
+				xar_err_set_file(x, f);
+				xar_err_set_string(x, "Unable to seek");
+				xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
+			}
+		}
+	}
+
+	asprintf(&tmpstr, "%s/length", attr);
+	xar_prop_get(f, tmpstr, &opt);
+	free(tmpstr);
+	if( !opt ) {
+		return 0;
+	} else {
+		fsize = strtoll(opt, NULL, 10);
+		if( ((fsize == LLONG_MAX) || (fsize == LLONG_MIN)) && (errno == ERANGE) ) {
+			return -1;
+		}
+	}
+
+	bsize = def_bsize;
+	inbuf = malloc(bsize);
+	if( !inbuf ) {
+		return -1;
+	}
+
+	while(1) {
+		/* Size has been reached */
+		if( fsize == inc )
+			break;
+		if( (fsize - inc) < bsize )
+			bsize = fsize - inc;
+		r = read(XAR(x)->fd, inbuf, bsize);
+		if( r == 0 )
+			break;
+		if( (r < 0) && (errno == EINTR) )
+			continue;
+		if( r < 0 ) {
+			free(inbuf);
+			return -1;
+		}
+
+		XAR(x)->heap_offset += r;
+		inc += r;
+		bsize = r;
+
+		/* filter the data through the in modules */
+		for( i = 0; i < (sizeof(xar_datamods)/sizeof(struct datamod)); i++) {
+			if( xar_datamods[i].fh_in ) {
+				int32_t ret;
+				ret = xar_datamods[i].fh_in(x, f, attr, &inbuf, &bsize);
+				if( ret < 0 )
+					return -1;
+			}
+		}
+
+		/* filter the data through the out modules */
+		for( i = 0; i < (sizeof(xar_datamods)/sizeof(struct datamod)); i++) {
+			if( xar_datamods[i].fh_out ) {
+				int32_t ret;
+				ret = xar_datamods[i].fh_out(x, f, attr, inbuf, bsize);
+				if( ret < 0 )
+					return -1;
+			}
+		}
+
+		wcb(x, f, inbuf, bsize);
+		free(inbuf);
+		bsize = def_bsize;
+		inbuf = malloc(bsize);
+	}
+
+	free(inbuf);
+	/* finish up anything that still needs doing */
+	for( i = 0; i < (sizeof(xar_datamods)/sizeof(struct datamod)); i++) {
+		if( xar_datamods[i].fh_done ) {
+			int32_t ret;
+			ret = xar_datamods[i].fh_done(x, f, attr);
+			if( ret < 0 )
+				return ret;
+		}
+	}
+	return 0;
+}
+
+/* xar_heap_to_archive
+ * x: archive to operate on
+ * Returns 0 on success, -1 on error
+ * Summary: copies the heap into the archive.
+ */
+int32_t xar_heap_to_archive(xar_t x) {
+	long bsize;
+	ssize_t r;
+	int off;
+	const char *opt;
+	char *b;
+
+	opt = xar_opt_get(x, "rsize");
+	if( !opt ) {
+		bsize = 4096;
+	} else {
+		bsize = strtol(opt, NULL, 0);
+		if( ((bsize == LONG_MAX) || (bsize == LONG_MIN)) && (errno == ERANGE) ) {
+			bsize = 4096;
+		}
+	}
+
+	b = malloc(bsize);
+	if( !b ) return -1;
+
+	while(1) {
+		r = read(XAR(x)->heap_fd, b, bsize);
+		if( r == 0 ) break;
+		if( (r < 0) && (errno == EINTR) ) continue;
+		if( r < 0 ) {
+			free(b);
+			return -1;
+		}
+
+		off = 0;
+		do {
+			r = write(XAR(x)->fd, b+off, bsize-off);
+			if( (r < 0) && (errno != EINTR) )
+				return -1;
+			off += r;
+		} while( off < bsize );
+	}
+	return 0;
+}

Deleted: branches/release_1_4/base/src/programs/xar/lib/io.h
===================================================================
--- trunk/base/src/programs/xar/lib/io.h	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/io.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2005 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of his contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 03-Apr-2005
- * DRI: Rob Braun <bbraun at opendarwin.org>
- */
-
-#ifndef _XAR_IO_H_
-#define _XAR_IO_H_
-
-typedef int (*read_callback)(xar_t, xar_file_t, void *, size_t);
-typedef int (*write_callback)(xar_t, xar_file_t, void *, size_t);
-
-typedef int (*fromheap_in)(xar_t x, xar_file_t f, const char *attr, void **in, size_t *inlen);
-typedef int (*fromheap_out)(xar_t x, xar_file_t f, const char *attr, void *in, size_t inlen);
-typedef int (*fromheap_done)(xar_t x, xar_file_t f, const char *attr);
-
-typedef int (*toheap_in)(xar_t x, xar_file_t f, const char *attr, void **in, size_t *inlen);
-typedef int (*toheap_out)(xar_t x, xar_file_t f, const char *attr, void *in, size_t inlen);
-typedef int (*toheap_done)(xar_t x, xar_file_t f, const char *attr);
-
-struct datamod {
-	fromheap_in      fh_in;
-	fromheap_out     fh_out;
-	fromheap_done    fh_done;
-	toheap_in        th_in;
-	toheap_out       th_out;
-	toheap_done      th_done;
-};
-
-int32_t xar_attrcopy_to_heap(xar_t x, xar_file_t f, const char *attr, read_callback rcb);
-int32_t xar_attrcopy_from_heap(xar_t x, xar_file_t f, const char *attr, write_callback wcb);
-int32_t xar_heap_to_archive(xar_t x);
-
-#endif /* _XAR_IO_H_ */

Copied: branches/release_1_4/base/src/programs/xar/lib/io.h (from rev 23968, trunk/base/src/programs/xar/lib/io.h)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/io.h	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/io.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2005 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of his contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 03-Apr-2005
+ * DRI: Rob Braun <bbraun at opendarwin.org>
+ */
+
+#ifndef _XAR_IO_H_
+#define _XAR_IO_H_
+
+typedef int (*read_callback)(xar_t, xar_file_t, void *, size_t);
+typedef int (*write_callback)(xar_t, xar_file_t, void *, size_t);
+
+typedef int (*fromheap_in)(xar_t x, xar_file_t f, const char *attr, void **in, size_t *inlen);
+typedef int (*fromheap_out)(xar_t x, xar_file_t f, const char *attr, void *in, size_t inlen);
+typedef int (*fromheap_done)(xar_t x, xar_file_t f, const char *attr);
+
+typedef int (*toheap_in)(xar_t x, xar_file_t f, const char *attr, void **in, size_t *inlen);
+typedef int (*toheap_out)(xar_t x, xar_file_t f, const char *attr, void *in, size_t inlen);
+typedef int (*toheap_done)(xar_t x, xar_file_t f, const char *attr);
+
+struct datamod {
+	fromheap_in      fh_in;
+	fromheap_out     fh_out;
+	fromheap_done    fh_done;
+	toheap_in        th_in;
+	toheap_out       th_out;
+	toheap_done      th_done;
+};
+
+int32_t xar_attrcopy_to_heap(xar_t x, xar_file_t f, const char *attr, read_callback rcb);
+int32_t xar_attrcopy_from_heap(xar_t x, xar_file_t f, const char *attr, write_callback wcb);
+int32_t xar_heap_to_archive(xar_t x);
+
+#endif /* _XAR_IO_H_ */

Deleted: branches/release_1_4/base/src/programs/xar/lib/linuxattr.c
===================================================================
--- trunk/base/src/programs/xar/lib/linuxattr.c	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/linuxattr.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,235 +0,0 @@
-/*
- * Copyright (c) 2004 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 26-Oct-2004
- * DRI: Rob Braun <bbraun at synack.net>
- */
-
-#include "config.h"
-#include <stdio.h>
-#include <unistd.h>
-#include <libgen.h>
-#include "xar.h"
-#include "arcmod.h"
-#include "b64.h"
-#include <errno.h>
-#include <string.h>
-#include "util.h"
-#include "linuxattr.h"
-#include "io.h"
-
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-
-#ifdef HAVE_SYS_STATFS_H  /* Nonexistant future OS needs this */
-#include <sys/statfs.h>
-#endif
-
-#ifdef HAVE_SYS_MOUNT_H
-#include <sys/mount.h>
-#endif
-
-#ifdef HAVE_SYS_XATTR_H
-#include <sys/xattr.h>
-#endif
-
-#ifndef EXT3_SUPER_MAGIC
-#define EXT3_SUPER_MAGIC 0xEF53
-#endif
-
-#ifndef JFS_SUPER_MAGIC
-#define JFS_SUPER_MAGIC 0x3153464a
-#endif
-
-#ifndef REISERFS_SUPER_MAGIC
-#define REISERFS_SUPER_MAGIC 0x52654973
-#endif
-
-#ifndef XFS_SUPER_MAGIC
-#define XFS_SUPER_MAGIC 0x58465342
-#endif
-
-#if defined(HAVE_SYS_XATTR_H) && defined(HAVE_LGETXATTR) && !defined(__APPLE__)
-static const char *Gfile = NULL;
-static const char *Gattr = NULL;
-static void *Gbuf = NULL;
-static int Goff = 0;
-static int Gbufsz = 0;
-
-int32_t xar_linuxattr_read(xar_t x, xar_file_t f, void * buf, size_t len) {
-
-	if( !Gbuf ) {
-		int r;
-		Gbufsz = 1024;
-AGAIN2:
-		Gbuf = malloc(Gbufsz);
-		if(!Gbuf)
-			goto AGAIN2;
-		memset(Gbuf, 0, Gbufsz);
-		r = lgetxattr(Gfile, Gattr+strlen(XAR_EA_FORK)+1, Gbuf, Gbufsz);
-		if( r < 0 ) {
-			switch(errno) {
-			case ERANGE: Gbufsz *= 2; free(Gbuf); goto AGAIN2;
-			case ENOTSUP: free(Gbuf); return 0;
-			default: break;
-			};
-			return -1;
-		}
-		Gbufsz = r;
-	}
-
-	if( (Gbufsz-Goff) <= len ) {
-		int32_t ret;
-		ret = Gbufsz - Goff;
-		memcpy(buf, Gbuf+Goff, ret);
-		Goff += ret;
-		return(ret);
-	} else {
-		memcpy(buf, Gbuf+Goff, len);
-		Gbuf += len;
-		return len;
-	}
-}
-
-int32_t xar_linuxattr_write(xar_t x, xar_file_t f, void *buf, size_t len) {
-	return lsetxattr(Gfile, Gattr+strlen(XAR_EA_FORK)+1, buf, len, 0);
-}
-#endif
-
-int32_t xar_linuxattr_archive(xar_t x, xar_file_t f, const char* file)
-{
-#if defined(HAVE_SYS_XATTR_H) && defined(HAVE_LGETXATTR) && !defined(__APPLE__)
-	char *i, *buf = NULL;
-	int ret, retval=0, bufsz = 1024;
-	struct statfs sfs;
-	char *fsname = NULL;
-
-TRYAGAIN:
-	buf = malloc(bufsz);
-	if(!buf)
-		goto TRYAGAIN;
-	ret = llistxattr(file, buf, bufsz);
-	if( ret < 0 ) {
-		switch(errno) {
-		case ERANGE: bufsz = bufsz*2; free(buf); goto TRYAGAIN;
-		case ENOTSUP: retval = 0; goto BAIL;
-		default: retval = -1; goto BAIL;
-		};
-	}
-	if( ret == 0 ) goto BAIL;
-
-	memset(&sfs, 0, sizeof(sfs));
-	statfs(file, &sfs);
-
-	switch(sfs.f_type) {
-	case EXT3_SUPER_MAGIC: fsname = "ext3"; break; /* assume ext3 */
-	case JFS_SUPER_MAGIC:  fsname = "jfs" ; break;
-	case REISERFS_SUPER_MAGIC:fsname = "reiser" ; break;
-	case XFS_SUPER_MAGIC:  fsname = "xfs" ; break;
-	default: retval=0; goto BAIL;
-	};
-
-	for( i=buf; (i-buf) < ret; i += strlen(i)+1 ) {
-		char tmpnam[1024];
-
-		Gbufsz = 0;
-		Goff = 0;
-		Gbuf = NULL;
-		Gfile = file;
-		memset(tmpnam, 0, sizeof(tmpnam));
-		snprintf(tmpnam, sizeof(tmpnam)-1, "%s/%s", XAR_EA_FORK, i);
-		xar_prop_set(f, tmpnam, NULL);
-		xar_attr_set(f, tmpnam, "fstype", fsname);
-		Gattr = tmpnam;
-		xar_attrcopy_to_heap(x, f, tmpnam, xar_linuxattr_read);
-		free(Gbuf);
-		Gattr = NULL;
-	}
-
-BAIL:
-	free(buf);
-	return retval;
-#endif
-	return 0;
-}
-
-int32_t xar_linuxattr_extract(xar_t x, xar_file_t f, const char* file)
-{
-#if defined HAVE_SYS_XATTR_H && defined(HAVE_LSETXATTR) && !defined(__APPLE__)
-	const char *fsname = "bogus";
-	const char *prop;
-	struct statfs sfs;
-	int eaopt = 0;
-	xar_iter_t iter;
-
-
-	/* Check for EA extraction behavior */
-
-	memset(&sfs, 0, sizeof(sfs));
-	if( statfs(file, &sfs) != 0 ) {
-		char *tmp, *bname;
-		tmp = strdup(file);
-		bname = dirname(tmp);
-		statfs(bname, &sfs);
-		free(tmp);
-	}
-	switch(sfs.f_type) {
-	case EXT3_SUPER_MAGIC: fsname = "ext3"; break; /* assume ext3 */
-	case JFS_SUPER_MAGIC:  fsname = "jfs" ; break;
-	case REISERFS_SUPER_MAGIC:fsname = "reiser" ; break;
-	case XFS_SUPER_MAGIC:  fsname = "xfs" ; break;
-	};
-
-	iter = xar_iter_new();
-	for(prop = xar_prop_first(f, iter); prop; prop = xar_prop_next(iter)) {
-		const char *fs;
-
-		if( strncmp(prop, XAR_EA_FORK, strlen(XAR_EA_FORK)) != 0 )
-			continue;
-		if( strlen(prop) <= strlen(XAR_EA_FORK) )
-			continue;
-
-		fs = xar_attr_get(f, prop, "fstype");
-		if( !eaopt && fs && strcmp(fs, fsname) != 0 ) {
-			continue;
-		}
-		if( !fs )
-			continue;
-
-		Gfile = file;
-		Gattr = prop;
-		xar_attrcopy_from_heap(x, f, prop, xar_linuxattr_write);
-
-	}
-	xar_iter_free(iter);
-
-#endif
-	return 0;
-}

Copied: branches/release_1_4/base/src/programs/xar/lib/linuxattr.c (from rev 23968, trunk/base/src/programs/xar/lib/linuxattr.c)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/linuxattr.c	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/linuxattr.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,235 @@
+/*
+ * Copyright (c) 2004 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 26-Oct-2004
+ * DRI: Rob Braun <bbraun at synack.net>
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <libgen.h>
+#include "xar.h"
+#include "arcmod.h"
+#include "b64.h"
+#include <errno.h>
+#include <string.h>
+#include "util.h"
+#include "linuxattr.h"
+#include "io.h"
+
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
+#ifdef HAVE_SYS_STATFS_H  /* Nonexistant future OS needs this */
+#include <sys/statfs.h>
+#endif
+
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+
+#ifdef HAVE_SYS_XATTR_H
+#include <sys/xattr.h>
+#endif
+
+#ifndef EXT3_SUPER_MAGIC
+#define EXT3_SUPER_MAGIC 0xEF53
+#endif
+
+#ifndef JFS_SUPER_MAGIC
+#define JFS_SUPER_MAGIC 0x3153464a
+#endif
+
+#ifndef REISERFS_SUPER_MAGIC
+#define REISERFS_SUPER_MAGIC 0x52654973
+#endif
+
+#ifndef XFS_SUPER_MAGIC
+#define XFS_SUPER_MAGIC 0x58465342
+#endif
+
+#if defined(HAVE_SYS_XATTR_H) && defined(HAVE_LGETXATTR) && !defined(__APPLE__)
+static const char *Gfile = NULL;
+static const char *Gattr = NULL;
+static void *Gbuf = NULL;
+static int Goff = 0;
+static int Gbufsz = 0;
+
+int32_t xar_linuxattr_read(xar_t x, xar_file_t f, void * buf, size_t len) {
+
+	if( !Gbuf ) {
+		int r;
+		Gbufsz = 1024;
+AGAIN2:
+		Gbuf = malloc(Gbufsz);
+		if(!Gbuf)
+			goto AGAIN2;
+		memset(Gbuf, 0, Gbufsz);
+		r = lgetxattr(Gfile, Gattr+strlen(XAR_EA_FORK)+1, Gbuf, Gbufsz);
+		if( r < 0 ) {
+			switch(errno) {
+			case ERANGE: Gbufsz *= 2; free(Gbuf); goto AGAIN2;
+			case ENOTSUP: free(Gbuf); return 0;
+			default: break;
+			};
+			return -1;
+		}
+		Gbufsz = r;
+	}
+
+	if( (Gbufsz-Goff) <= len ) {
+		int32_t ret;
+		ret = Gbufsz - Goff;
+		memcpy(buf, Gbuf+Goff, ret);
+		Goff += ret;
+		return(ret);
+	} else {
+		memcpy(buf, Gbuf+Goff, len);
+		Gbuf += len;
+		return len;
+	}
+}
+
+int32_t xar_linuxattr_write(xar_t x, xar_file_t f, void *buf, size_t len) {
+	return lsetxattr(Gfile, Gattr+strlen(XAR_EA_FORK)+1, buf, len, 0);
+}
+#endif
+
+int32_t xar_linuxattr_archive(xar_t x, xar_file_t f, const char* file)
+{
+#if defined(HAVE_SYS_XATTR_H) && defined(HAVE_LGETXATTR) && !defined(__APPLE__)
+	char *i, *buf = NULL;
+	int ret, retval=0, bufsz = 1024;
+	struct statfs sfs;
+	char *fsname = NULL;
+
+TRYAGAIN:
+	buf = malloc(bufsz);
+	if(!buf)
+		goto TRYAGAIN;
+	ret = llistxattr(file, buf, bufsz);
+	if( ret < 0 ) {
+		switch(errno) {
+		case ERANGE: bufsz = bufsz*2; free(buf); goto TRYAGAIN;
+		case ENOTSUP: retval = 0; goto BAIL;
+		default: retval = -1; goto BAIL;
+		};
+	}
+	if( ret == 0 ) goto BAIL;
+
+	memset(&sfs, 0, sizeof(sfs));
+	statfs(file, &sfs);
+
+	switch(sfs.f_type) {
+	case EXT3_SUPER_MAGIC: fsname = "ext3"; break; /* assume ext3 */
+	case JFS_SUPER_MAGIC:  fsname = "jfs" ; break;
+	case REISERFS_SUPER_MAGIC:fsname = "reiser" ; break;
+	case XFS_SUPER_MAGIC:  fsname = "xfs" ; break;
+	default: retval=0; goto BAIL;
+	};
+
+	for( i=buf; (i-buf) < ret; i += strlen(i)+1 ) {
+		char tmpnam[1024];
+
+		Gbufsz = 0;
+		Goff = 0;
+		Gbuf = NULL;
+		Gfile = file;
+		memset(tmpnam, 0, sizeof(tmpnam));
+		snprintf(tmpnam, sizeof(tmpnam)-1, "%s/%s", XAR_EA_FORK, i);
+		xar_prop_set(f, tmpnam, NULL);
+		xar_attr_set(f, tmpnam, "fstype", fsname);
+		Gattr = tmpnam;
+		xar_attrcopy_to_heap(x, f, tmpnam, xar_linuxattr_read);
+		free(Gbuf);
+		Gattr = NULL;
+	}
+
+BAIL:
+	free(buf);
+	return retval;
+#endif
+	return 0;
+}
+
+int32_t xar_linuxattr_extract(xar_t x, xar_file_t f, const char* file)
+{
+#if defined HAVE_SYS_XATTR_H && defined(HAVE_LSETXATTR) && !defined(__APPLE__)
+	const char *fsname = "bogus";
+	const char *prop;
+	struct statfs sfs;
+	int eaopt = 0;
+	xar_iter_t iter;
+
+
+	/* Check for EA extraction behavior */
+
+	memset(&sfs, 0, sizeof(sfs));
+	if( statfs(file, &sfs) != 0 ) {
+		char *tmp, *bname;
+		tmp = strdup(file);
+		bname = dirname(tmp);
+		statfs(bname, &sfs);
+		free(tmp);
+	}
+	switch(sfs.f_type) {
+	case EXT3_SUPER_MAGIC: fsname = "ext3"; break; /* assume ext3 */
+	case JFS_SUPER_MAGIC:  fsname = "jfs" ; break;
+	case REISERFS_SUPER_MAGIC:fsname = "reiser" ; break;
+	case XFS_SUPER_MAGIC:  fsname = "xfs" ; break;
+	};
+
+	iter = xar_iter_new();
+	for(prop = xar_prop_first(f, iter); prop; prop = xar_prop_next(iter)) {
+		const char *fs;
+
+		if( strncmp(prop, XAR_EA_FORK, strlen(XAR_EA_FORK)) != 0 )
+			continue;
+		if( strlen(prop) <= strlen(XAR_EA_FORK) )
+			continue;
+
+		fs = xar_attr_get(f, prop, "fstype");
+		if( !eaopt && fs && strcmp(fs, fsname) != 0 ) {
+			continue;
+		}
+		if( !fs )
+			continue;
+
+		Gfile = file;
+		Gattr = prop;
+		xar_attrcopy_from_heap(x, f, prop, xar_linuxattr_write);
+
+	}
+	xar_iter_free(iter);
+
+#endif
+	return 0;
+}

Deleted: branches/release_1_4/base/src/programs/xar/lib/linuxattr.h
===================================================================
--- trunk/base/src/programs/xar/lib/linuxattr.h	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/linuxattr.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,10 +0,0 @@
-/*
- * Rob Braun <bbraun at synack.net>
- * 26-Oct-2004
- * Copyright (c) 2004 Rob Braun.  All rights reserved.
- */
-#ifndef _XAR_LINUXATTR_H_
-#define _XAR_LINUXATTR_H_
-int32_t xar_linuxattr_archive(xar_t x, xar_file_t f, const char* file);
-int32_t xar_linuxattr_extract(xar_t x, xar_file_t f, const char* file);
-#endif /* _XAR_LINUXATTR_H_ */

Copied: branches/release_1_4/base/src/programs/xar/lib/linuxattr.h (from rev 23968, trunk/base/src/programs/xar/lib/linuxattr.h)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/linuxattr.h	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/linuxattr.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,10 @@
+/*
+ * Rob Braun <bbraun at synack.net>
+ * 26-Oct-2004
+ * Copyright (c) 2004 Rob Braun.  All rights reserved.
+ */
+#ifndef _XAR_LINUXATTR_H_
+#define _XAR_LINUXATTR_H_
+int32_t xar_linuxattr_archive(xar_t x, xar_file_t f, const char* file);
+int32_t xar_linuxattr_extract(xar_t x, xar_file_t f, const char* file);
+#endif /* _XAR_LINUXATTR_H_ */

Deleted: branches/release_1_4/base/src/programs/xar/lib/macho.c
===================================================================
--- trunk/base/src/programs/xar/lib/macho.c	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/macho.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,177 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <arpa/inet.h>
-
-#include "config.h"
-#ifndef HAVE_ASPRINTF
-#include "asprintf.h"
-#endif
-#include "macho.h"
-#include "util.h"
-#include "xar.h"
-
-#define BIT64 0x01000000
-#define PPC   0x00000012
-#define I386  0x00000007
-
-struct arches {
-	int32_t size;
-	int32_t offset;
-};
-
-static int initted = 0;
-static struct arches *inflight = NULL;
-static int32_t numarches = 0;
-static int32_t curroffset = 0;
-
-static int32_t parse_arch(xar_file_t f, struct mach_header *mh);
-
-int32_t xar_macho_in(xar_t x, xar_file_t f, const char *attr, void **in, size_t *inlen) {
-	struct mach_header *mh = *in;
-	struct fat_header *fh = *in;
-	uint32_t magic;
-	int i;
-
-	if( strcmp(attr, "data") != 0 )
-		return 0;
-
-	if( initted && (inflight != NULL) )
-		return 0;
-
-	/* First, check for fat */
-	magic = htonl(fh->magic);
-	if( magic == 0xcafebabe ) {
-		struct fat_arch *fa = (struct fat_arch *)((unsigned char *)*in + sizeof(struct fat_header));
-		numarches = htonl(fh->nfat_arch);
-
-		/* sanity check, arbitrary number */
-		if( numarches > 7 )
-			return 0;
-
-		xar_prop_set(f, "contents/type", "Mach-O Fat File");
-
-		inflight = malloc( numarches * sizeof(struct arches) );
-		if( !inflight )
-			return -1;
-		
-		for( i = 0; i < numarches; ++i ) {
-			int32_t sz = htonl(fa[i].size);
-			int32_t off = htonl(fa[i].offset);
-
-			inflight[i].size = sz;
-			inflight[i].offset = off;
-		}
-		curroffset += *inlen;
-		return 0;
-	}
-
-	if( inflight ) {
-		for(i = 0; i < numarches; ++i) {
-			if( (inflight[i].offset >= curroffset) && (inflight[i].offset < (curroffset+*inlen)) ) {
-
-				mh = (struct mach_header *)((char *)*in + (inflight[i].offset - curroffset));
-				parse_arch(f, mh);
-			}
-		}
-		curroffset += *inlen;
-		return 0;
-	}
-
-	parse_arch(f, mh);
-
-	curroffset += *inlen;
-
-	return 0;
-}
-
-int32_t xar_macho_done(xar_t x, xar_file_t f, const char *attr) {
-	if( inflight )
-		free(inflight);
-	inflight = NULL;
-	curroffset = 0;
-	numarches = 0;
-	initted = 0;
-	return 0;
-}
-
-static int32_t parse_arch(xar_file_t f, struct mach_header *mh) {
-	const char *cpustr, *typestr;
-	char *typestr2;
-	struct lc *lc;
-	int n, byteflip = 0;;
-	int32_t magic, cpu, type, ncmds;
-
-	magic = mh->magic;
-	cpu = mh->cputype;
-	type = mh->filetype;
-	ncmds = mh->ncmds;
-	if( (magic == 0xcefaedfe) || (magic == 0xcffaedfe) ) {
-		magic = xar_swap32(magic);
-		cpu = xar_swap32(cpu);
-		type = xar_swap32(type);
-		ncmds = xar_swap32(ncmds);
-		byteflip = 1;
-	}
-	if( (magic != 0xfeedface) && (magic != 0xfeedfacf) ) {
-		return 1;
-	}
-	lc = (struct lc *)((unsigned char *)mh + sizeof(struct mach_header));
-	if( magic == 0xfeedfacf ) {
-		lc = (struct lc *)((unsigned char *)lc + 4);
-	}
-	switch(cpu) {
-	case PPC: cpustr = "ppc"; break;
-	case I386: cpustr = "i386"; break;
-	case PPC|BIT64: cpustr = "ppc64"; break;
-	default: cpustr = "unknown"; break;
-	};
-
-	switch(type) {
-	case 0x01: typestr = "Mach-O Object"; break;
-	case 0x02: typestr = "Mach-O Executable"; break;
-	case 0x03: typestr = "Mach-O Fixed VM Library"; break;
-	case 0x04: typestr = "Mach-O core"; break;
-	case 0x05: typestr = "Mach-O Preloaded Executable"; break;
-	case 0x06: typestr = "Mach-O Dylib"; break;
-	case 0x07: typestr = "Mach-O Dylinker"; break;
-	case 0x08: typestr = "Mach-O Bundle"; break;
-	case 0x09: typestr = "Mach-O Stub"; break;
-	default: typestr = "Unknown"; break;
-	};
-
-	if( xar_prop_get(f, "contents/type", (const char **)&typestr2) ) {
-		xar_prop_set(f, "contents/type", typestr);
-	}
-	asprintf(&typestr2, "contents/%s/type", cpustr);
-	xar_prop_set(f, typestr2, typestr);
-	free(typestr2);
-
-	for(n = 0; n < ncmds; ++n) {
-		int32_t cmd, cmdsize, stroff = 0;
-		char *tmpstr = NULL;
-		char *propstr = NULL;
-		cmd = lc->cmd;
-		cmdsize = lc->cmdsize;
-		if( byteflip ) {
-			cmd = xar_swap32(cmd);
-			cmdsize = xar_swap32(cmdsize);
-		}
-		switch(cmd) {
-		case 0xc:
-		case 0xd:
-			stroff = *(int32_t *)((unsigned char *)lc+8);
-			if(byteflip)
-				stroff = xar_swap32(stroff);
-			tmpstr = (char *)((unsigned char *)lc+stroff);
-			asprintf(&propstr, "contents/%s/library",cpustr);
-			xar_prop_create(f, propstr, tmpstr);
-			free(propstr);
-			break;
-		};
-		lc = (struct lc *)((unsigned char *)lc + cmdsize);
-	}
-
-	return 0;
-}

Copied: branches/release_1_4/base/src/programs/xar/lib/macho.c (from rev 23968, trunk/base/src/programs/xar/lib/macho.c)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/macho.c	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/macho.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,177 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <arpa/inet.h>
+
+#include "config.h"
+#ifndef HAVE_ASPRINTF
+#include "asprintf.h"
+#endif
+#include "macho.h"
+#include "util.h"
+#include "xar.h"
+
+#define BIT64 0x01000000
+#define PPC   0x00000012
+#define I386  0x00000007
+
+struct arches {
+	int32_t size;
+	int32_t offset;
+};
+
+static int initted = 0;
+static struct arches *inflight = NULL;
+static int32_t numarches = 0;
+static int32_t curroffset = 0;
+
+static int32_t parse_arch(xar_file_t f, struct mach_header *mh);
+
+int32_t xar_macho_in(xar_t x, xar_file_t f, const char *attr, void **in, size_t *inlen) {
+	struct mach_header *mh = *in;
+	struct fat_header *fh = *in;
+	uint32_t magic;
+	int i;
+
+	if( strcmp(attr, "data") != 0 )
+		return 0;
+
+	if( initted && (inflight != NULL) )
+		return 0;
+
+	/* First, check for fat */
+	magic = htonl(fh->magic);
+	if( magic == 0xcafebabe ) {
+		struct fat_arch *fa = (struct fat_arch *)((unsigned char *)*in + sizeof(struct fat_header));
+		numarches = htonl(fh->nfat_arch);
+
+		/* sanity check, arbitrary number */
+		if( numarches > 7 )
+			return 0;
+
+		xar_prop_set(f, "contents/type", "Mach-O Fat File");
+
+		inflight = malloc( numarches * sizeof(struct arches) );
+		if( !inflight )
+			return -1;
+		
+		for( i = 0; i < numarches; ++i ) {
+			int32_t sz = htonl(fa[i].size);
+			int32_t off = htonl(fa[i].offset);
+
+			inflight[i].size = sz;
+			inflight[i].offset = off;
+		}
+		curroffset += *inlen;
+		return 0;
+	}
+
+	if( inflight ) {
+		for(i = 0; i < numarches; ++i) {
+			if( (inflight[i].offset >= curroffset) && (inflight[i].offset < (curroffset+*inlen)) ) {
+
+				mh = (struct mach_header *)((char *)*in + (inflight[i].offset - curroffset));
+				parse_arch(f, mh);
+			}
+		}
+		curroffset += *inlen;
+		return 0;
+	}
+
+	parse_arch(f, mh);
+
+	curroffset += *inlen;
+
+	return 0;
+}
+
+int32_t xar_macho_done(xar_t x, xar_file_t f, const char *attr) {
+	if( inflight )
+		free(inflight);
+	inflight = NULL;
+	curroffset = 0;
+	numarches = 0;
+	initted = 0;
+	return 0;
+}
+
+static int32_t parse_arch(xar_file_t f, struct mach_header *mh) {
+	const char *cpustr, *typestr;
+	char *typestr2;
+	struct lc *lc;
+	int n, byteflip = 0;;
+	int32_t magic, cpu, type, ncmds;
+
+	magic = mh->magic;
+	cpu = mh->cputype;
+	type = mh->filetype;
+	ncmds = mh->ncmds;
+	if( (magic == 0xcefaedfe) || (magic == 0xcffaedfe) ) {
+		magic = xar_swap32(magic);
+		cpu = xar_swap32(cpu);
+		type = xar_swap32(type);
+		ncmds = xar_swap32(ncmds);
+		byteflip = 1;
+	}
+	if( (magic != 0xfeedface) && (magic != 0xfeedfacf) ) {
+		return 1;
+	}
+	lc = (struct lc *)((unsigned char *)mh + sizeof(struct mach_header));
+	if( magic == 0xfeedfacf ) {
+		lc = (struct lc *)((unsigned char *)lc + 4);
+	}
+	switch(cpu) {
+	case PPC: cpustr = "ppc"; break;
+	case I386: cpustr = "i386"; break;
+	case PPC|BIT64: cpustr = "ppc64"; break;
+	default: cpustr = "unknown"; break;
+	};
+
+	switch(type) {
+	case 0x01: typestr = "Mach-O Object"; break;
+	case 0x02: typestr = "Mach-O Executable"; break;
+	case 0x03: typestr = "Mach-O Fixed VM Library"; break;
+	case 0x04: typestr = "Mach-O core"; break;
+	case 0x05: typestr = "Mach-O Preloaded Executable"; break;
+	case 0x06: typestr = "Mach-O Dylib"; break;
+	case 0x07: typestr = "Mach-O Dylinker"; break;
+	case 0x08: typestr = "Mach-O Bundle"; break;
+	case 0x09: typestr = "Mach-O Stub"; break;
+	default: typestr = "Unknown"; break;
+	};
+
+	if( xar_prop_get(f, "contents/type", (const char **)&typestr2) ) {
+		xar_prop_set(f, "contents/type", typestr);
+	}
+	asprintf(&typestr2, "contents/%s/type", cpustr);
+	xar_prop_set(f, typestr2, typestr);
+	free(typestr2);
+
+	for(n = 0; n < ncmds; ++n) {
+		int32_t cmd, cmdsize, stroff = 0;
+		char *tmpstr = NULL;
+		char *propstr = NULL;
+		cmd = lc->cmd;
+		cmdsize = lc->cmdsize;
+		if( byteflip ) {
+			cmd = xar_swap32(cmd);
+			cmdsize = xar_swap32(cmdsize);
+		}
+		switch(cmd) {
+		case 0xc:
+		case 0xd:
+			stroff = *(int32_t *)((unsigned char *)lc+8);
+			if(byteflip)
+				stroff = xar_swap32(stroff);
+			tmpstr = (char *)((unsigned char *)lc+stroff);
+			asprintf(&propstr, "contents/%s/library",cpustr);
+			xar_prop_create(f, propstr, tmpstr);
+			free(propstr);
+			break;
+		};
+		lc = (struct lc *)((unsigned char *)lc + cmdsize);
+	}
+
+	return 0;
+}

Deleted: branches/release_1_4/base/src/programs/xar/lib/macho.h
===================================================================
--- trunk/base/src/programs/xar/lib/macho.h	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/macho.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,37 +0,0 @@
-#ifndef _MACHO_H_
-#define _MACHO_H_
-
-#include "xar.h"
-
-struct mach_header {
-   uint32_t magic;
-   uint32_t cputype;
-   uint32_t cpusubtype;
-   uint32_t filetype;
-   uint32_t ncmds;
-   uint32_t sizeofcmds;
-   uint32_t flags;
-};
-
-struct lc {
-	uint32_t cmd;
-	uint32_t cmdsize;
-};
-
-struct fat_header {
-	uint32_t magic;
-	uint32_t nfat_arch;
-};
-
-struct fat_arch {
-	uint32_t cputype;
-	uint32_t cpusubtype;
-	uint32_t offset;
-	uint32_t size;
-	uint32_t alighn;
-};
-
-int32_t xar_macho_in(xar_t x, xar_file_t f, const char *attr, void **in, size_t *inlen);
-int32_t xar_macho_done(xar_t x, xar_file_t f, const char *attr);
-
-#endif /* _MACHO_H_ */

Copied: branches/release_1_4/base/src/programs/xar/lib/macho.h (from rev 23968, trunk/base/src/programs/xar/lib/macho.h)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/macho.h	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/macho.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,37 @@
+#ifndef _MACHO_H_
+#define _MACHO_H_
+
+#include "xar.h"
+
+struct mach_header {
+   uint32_t magic;
+   uint32_t cputype;
+   uint32_t cpusubtype;
+   uint32_t filetype;
+   uint32_t ncmds;
+   uint32_t sizeofcmds;
+   uint32_t flags;
+};
+
+struct lc {
+	uint32_t cmd;
+	uint32_t cmdsize;
+};
+
+struct fat_header {
+	uint32_t magic;
+	uint32_t nfat_arch;
+};
+
+struct fat_arch {
+	uint32_t cputype;
+	uint32_t cpusubtype;
+	uint32_t offset;
+	uint32_t size;
+	uint32_t alighn;
+};
+
+int32_t xar_macho_in(xar_t x, xar_file_t f, const char *attr, void **in, size_t *inlen);
+int32_t xar_macho_done(xar_t x, xar_file_t f, const char *attr);
+
+#endif /* _MACHO_H_ */

Deleted: branches/release_1_4/base/src/programs/xar/lib/md5.c
===================================================================
--- trunk/base/src/programs/xar/lib/md5.c	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/md5.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,131 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <zlib.h>
-#include <openssl/evp.h>
-
-#include "config.h"
-#ifndef HAVE_ASPRINTF
-#include "asprintf.h"
-#endif
-#include "xar.h"
-
-static EVP_MD_CTX src_ctx, dst_ctx;
-static int initted = 0;
-
-static char* xar_format_md5(const unsigned char* m);
-
-int32_t xar_md5_uncompressed(xar_t x, xar_file_t f, const char *attr, void **in, size_t *inlen) {
-	const EVP_MD *md;
-
-	if( !initted ) {
-		OpenSSL_add_all_digests();
-		md = EVP_get_digestbyname("md5");
-		if( md == NULL ) return -1;
-		EVP_DigestInit(&src_ctx, md);
-		EVP_DigestInit(&dst_ctx, md);
-		initted = 1;
-	}
-
-	if( *inlen == 0 )
-		return 0;
-
-	EVP_DigestUpdate(&src_ctx, *in, *inlen);
-	return 0;
-}
-
-int32_t xar_md5_compressed(xar_t x, xar_file_t f, const char *attr, void *in, size_t inlen) {
-	const EVP_MD *md;
-
-	if( !initted ) {
-		OpenSSL_add_all_digests();
-		md = EVP_get_digestbyname("md5");
-		if( md == NULL ) return -1;
-		EVP_DigestInit(&src_ctx, md);
-		EVP_DigestInit(&dst_ctx, md);
-		initted = 1;
-	}
-
-	if( inlen == 0 )
-		return 0;
-
-	EVP_DigestUpdate(&dst_ctx, in, inlen);
-	return 0;
-}
-
-int32_t xar_md5_done(xar_t x, xar_file_t f, const char *attr) {
-	unsigned char md5str[EVP_MAX_MD_SIZE];
-	char *str, *tmpstr;
-	unsigned int len;
-
-	memset(md5str, 0, sizeof(md5str));
-	EVP_DigestFinal(&src_ctx, md5str, &len);
-	str = xar_format_md5(md5str);
-	asprintf(&tmpstr, "%s/extracted-checksum", attr);
-	if( f ) {
-		xar_prop_set(f, tmpstr, str);
-		xar_attr_set(f, tmpstr, "style", "md5");
-	}
-	free(tmpstr);
-	free(str);
-
-	memset(md5str, 0, sizeof(md5str));
-	EVP_DigestFinal(&dst_ctx, md5str, &len);
-	str = xar_format_md5(md5str);
-	asprintf(&tmpstr, "%s/archived-checksum", attr);
-	if( f ) {
-		xar_prop_set(f, tmpstr, str);
-		xar_attr_set(f, tmpstr, "style", "md5");
-	}
-	free(tmpstr);
-	free(str);
-
-	initted = 0;
-	return 0;
-}
-
-static char* xar_format_md5(const unsigned char* m) {
-	char* result = NULL;
-	asprintf(&result,
-		"%02x%02x%02x%02x"
-		"%02x%02x%02x%02x"
-		"%02x%02x%02x%02x"
-		"%02x%02x%02x%02x",
-		m[0], m[1], m[2], m[3],
-		m[4], m[5], m[6], m[7],
-		m[8], m[9], m[10], m[11],
-		m[12], m[13], m[14], m[15]);
-	return result;
-}
-
-int32_t xar_md5out_done(xar_t x, xar_file_t f, const char *attr) {
-	const char *uncomp, *uncompstyle;
-	unsigned char md5str[EVP_MAX_MD_SIZE];
-	unsigned int len;
-	char *tmpstr;
-
-	asprintf(&tmpstr, "%s/extracted-checksum", attr);
-	xar_prop_get(f, tmpstr, &uncomp);
-	uncompstyle = xar_attr_get(f, tmpstr, "style");
-	free(tmpstr);
-
-	if( uncomp && uncompstyle && (strcmp(uncompstyle, "md5")==0) ) {
-		char *str;
-		memset(md5str, 0, sizeof(md5str));
-		EVP_DigestFinal(&dst_ctx, md5str, &len);
-		str = xar_format_md5(md5str);
-		if(strcmp(uncomp, str) != 0) {
-			xar_err_new(x);
-			xar_err_set_file(x, f);
-			xar_err_set_string(x, "extracted-checksum MD5's do not match");
-			xar_err_callback(x, XAR_SEVERITY_FATAL, XAR_ERR_ARCHIVE_EXTRACTION);
-		}
-		free(str);
-	}
-
-	EVP_DigestFinal(&src_ctx, md5str, &len);
-	initted = 0;
-
-	return 0;
-}

Copied: branches/release_1_4/base/src/programs/xar/lib/md5.c (from rev 23968, trunk/base/src/programs/xar/lib/md5.c)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/md5.c	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/md5.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,131 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <zlib.h>
+#include <openssl/evp.h>
+
+#include "config.h"
+#ifndef HAVE_ASPRINTF
+#include "asprintf.h"
+#endif
+#include "xar.h"
+
+static EVP_MD_CTX src_ctx, dst_ctx;
+static int initted = 0;
+
+static char* xar_format_md5(const unsigned char* m);
+
+int32_t xar_md5_uncompressed(xar_t x, xar_file_t f, const char *attr, void **in, size_t *inlen) {
+	const EVP_MD *md;
+
+	if( !initted ) {
+		OpenSSL_add_all_digests();
+		md = EVP_get_digestbyname("md5");
+		if( md == NULL ) return -1;
+		EVP_DigestInit(&src_ctx, md);
+		EVP_DigestInit(&dst_ctx, md);
+		initted = 1;
+	}
+
+	if( *inlen == 0 )
+		return 0;
+
+	EVP_DigestUpdate(&src_ctx, *in, *inlen);
+	return 0;
+}
+
+int32_t xar_md5_compressed(xar_t x, xar_file_t f, const char *attr, void *in, size_t inlen) {
+	const EVP_MD *md;
+
+	if( !initted ) {
+		OpenSSL_add_all_digests();
+		md = EVP_get_digestbyname("md5");
+		if( md == NULL ) return -1;
+		EVP_DigestInit(&src_ctx, md);
+		EVP_DigestInit(&dst_ctx, md);
+		initted = 1;
+	}
+
+	if( inlen == 0 )
+		return 0;
+
+	EVP_DigestUpdate(&dst_ctx, in, inlen);
+	return 0;
+}
+
+int32_t xar_md5_done(xar_t x, xar_file_t f, const char *attr) {
+	unsigned char md5str[EVP_MAX_MD_SIZE];
+	char *str, *tmpstr;
+	unsigned int len;
+
+	memset(md5str, 0, sizeof(md5str));
+	EVP_DigestFinal(&src_ctx, md5str, &len);
+	str = xar_format_md5(md5str);
+	asprintf(&tmpstr, "%s/extracted-checksum", attr);
+	if( f ) {
+		xar_prop_set(f, tmpstr, str);
+		xar_attr_set(f, tmpstr, "style", "md5");
+	}
+	free(tmpstr);
+	free(str);
+
+	memset(md5str, 0, sizeof(md5str));
+	EVP_DigestFinal(&dst_ctx, md5str, &len);
+	str = xar_format_md5(md5str);
+	asprintf(&tmpstr, "%s/archived-checksum", attr);
+	if( f ) {
+		xar_prop_set(f, tmpstr, str);
+		xar_attr_set(f, tmpstr, "style", "md5");
+	}
+	free(tmpstr);
+	free(str);
+
+	initted = 0;
+	return 0;
+}
+
+static char* xar_format_md5(const unsigned char* m) {
+	char* result = NULL;
+	asprintf(&result,
+		"%02x%02x%02x%02x"
+		"%02x%02x%02x%02x"
+		"%02x%02x%02x%02x"
+		"%02x%02x%02x%02x",
+		m[0], m[1], m[2], m[3],
+		m[4], m[5], m[6], m[7],
+		m[8], m[9], m[10], m[11],
+		m[12], m[13], m[14], m[15]);
+	return result;
+}
+
+int32_t xar_md5out_done(xar_t x, xar_file_t f, const char *attr) {
+	const char *uncomp, *uncompstyle;
+	unsigned char md5str[EVP_MAX_MD_SIZE];
+	unsigned int len;
+	char *tmpstr;
+
+	asprintf(&tmpstr, "%s/extracted-checksum", attr);
+	xar_prop_get(f, tmpstr, &uncomp);
+	uncompstyle = xar_attr_get(f, tmpstr, "style");
+	free(tmpstr);
+
+	if( uncomp && uncompstyle && (strcmp(uncompstyle, "md5")==0) ) {
+		char *str;
+		memset(md5str, 0, sizeof(md5str));
+		EVP_DigestFinal(&dst_ctx, md5str, &len);
+		str = xar_format_md5(md5str);
+		if(strcmp(uncomp, str) != 0) {
+			xar_err_new(x);
+			xar_err_set_file(x, f);
+			xar_err_set_string(x, "extracted-checksum MD5's do not match");
+			xar_err_callback(x, XAR_SEVERITY_FATAL, XAR_ERR_ARCHIVE_EXTRACTION);
+		}
+		free(str);
+	}
+
+	EVP_DigestFinal(&src_ctx, md5str, &len);
+	initted = 0;
+
+	return 0;
+}

Deleted: branches/release_1_4/base/src/programs/xar/lib/md5.h
===================================================================
--- trunk/base/src/programs/xar/lib/md5.h	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/md5.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2005 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of his contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 03-Apr-2005
- * DRI: Rob Braun <bbraun at opendarwin.org>
- */
-
-#ifndef _XAR_MD5_H_
-#define _XAR_MD5_H_
-
-int32_t xar_md5_compressed(xar_t x, xar_file_t f, const char *, void *in, size_t inlen);
-int32_t xar_md5_uncompressed(xar_t x, xar_file_t f, const char *, void **in, size_t *inlen);
-int32_t xar_md5_done(xar_t x, xar_file_t f, const char *);
-int32_t xar_md5out_done(xar_t x, xar_file_t f, const char *);
-
-#endif /* _XAR_MD5_H_ */

Copied: branches/release_1_4/base/src/programs/xar/lib/md5.h (from rev 23968, trunk/base/src/programs/xar/lib/md5.h)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/md5.h	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/md5.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2005 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of his contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 03-Apr-2005
+ * DRI: Rob Braun <bbraun at opendarwin.org>
+ */
+
+#ifndef _XAR_MD5_H_
+#define _XAR_MD5_H_
+
+int32_t xar_md5_compressed(xar_t x, xar_file_t f, const char *, void *in, size_t inlen);
+int32_t xar_md5_uncompressed(xar_t x, xar_file_t f, const char *, void **in, size_t *inlen);
+int32_t xar_md5_done(xar_t x, xar_file_t f, const char *);
+int32_t xar_md5out_done(xar_t x, xar_file_t f, const char *);
+
+#endif /* _XAR_MD5_H_ */

Deleted: branches/release_1_4/base/src/programs/xar/lib/script.c
===================================================================
--- trunk/base/src/programs/xar/lib/script.c	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/script.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,43 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-
-#include "config.h"
-#ifndef HAVE_ASPRINTF
-#include "asprintf.h"
-#endif
-#include "xar.h"
-
-static int initted = 0;
-
-int32_t xar_script_in(xar_t x, xar_file_t f, const char *attr, void **in, size_t *inlen) {
-	char *buf = *in;
-
-	if( initted )
-		return 0;
-
-	if( (*inlen > 2) && (buf[0] == '#') && (buf[1] == '!') ) {
-		char *exe;
-		int i;
-
-		exe = malloc(*inlen);
-		if( !exe )
-			return -1;
-		memset(exe, 0, *inlen);
-		
-		for(i = 2; (i < *inlen) && (buf[i] != '\0') && (buf[i] != '\n') && (buf[i] != ' '); ++i) {
-			exe[i-2] = buf[i];
-		}
-
-		xar_prop_set(f, "content/type", "script");
-		xar_prop_set(f, "content/interpreter", exe);
-		free(exe);
-	}
-	return 0;
-}
-
-int32_t xar_script_done(xar_t x, xar_file_t f, const char *attr) {
-	initted = 0;
-	return 0;
-}

Copied: branches/release_1_4/base/src/programs/xar/lib/script.c (from rev 23968, trunk/base/src/programs/xar/lib/script.c)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/script.c	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/script.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,43 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+
+#include "config.h"
+#ifndef HAVE_ASPRINTF
+#include "asprintf.h"
+#endif
+#include "xar.h"
+
+static int initted = 0;
+
+int32_t xar_script_in(xar_t x, xar_file_t f, const char *attr, void **in, size_t *inlen) {
+	char *buf = *in;
+
+	if( initted )
+		return 0;
+
+	if( (*inlen > 2) && (buf[0] == '#') && (buf[1] == '!') ) {
+		char *exe;
+		int i;
+
+		exe = malloc(*inlen);
+		if( !exe )
+			return -1;
+		memset(exe, 0, *inlen);
+		
+		for(i = 2; (i < *inlen) && (buf[i] != '\0') && (buf[i] != '\n') && (buf[i] != ' '); ++i) {
+			exe[i-2] = buf[i];
+		}
+
+		xar_prop_set(f, "content/type", "script");
+		xar_prop_set(f, "content/interpreter", exe);
+		free(exe);
+	}
+	return 0;
+}
+
+int32_t xar_script_done(xar_t x, xar_file_t f, const char *attr) {
+	initted = 0;
+	return 0;
+}

Deleted: branches/release_1_4/base/src/programs/xar/lib/script.h
===================================================================
--- trunk/base/src/programs/xar/lib/script.h	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/script.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,7 +0,0 @@
-#ifndef _SCRIPT_H_
-#define _SCRIPT_H_
-
-int32_t xar_script_in(xar_t x, xar_file_t f, const char *attr, void **in, size_t *inlen);
-int32_t xar_script_done(xar_t x, xar_file_t f, const char *attr);
-
-#endif /* _SCRIPT_H_ */

Copied: branches/release_1_4/base/src/programs/xar/lib/script.h (from rev 23968, trunk/base/src/programs/xar/lib/script.h)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/script.h	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/script.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,7 @@
+#ifndef _SCRIPT_H_
+#define _SCRIPT_H_
+
+int32_t xar_script_in(xar_t x, xar_file_t f, const char *attr, void **in, size_t *inlen);
+int32_t xar_script_done(xar_t x, xar_file_t f, const char *attr);
+
+#endif /* _SCRIPT_H_ */

Deleted: branches/release_1_4/base/src/programs/xar/lib/stat.c
===================================================================
--- trunk/base/src/programs/xar/lib/stat.c	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/stat.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,527 +0,0 @@
-/*
- * Copyright (c) 2005 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of his contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 03-Apr-2005
- * DRI: Rob Braun <bbraun at opendarwin.org>
- */
-/*
- * Portions copyright 2003, Apple Computer, Inc.
- * filetype_name() and associated structure.
- * DRI: Kevin Van Vechten <kvv at apple.com>
- */
-#define _FILE_OFFSET_BITS 64
-
-#include "config.h"
-#ifndef HAVE_ASPRINTF
-#include "asprintf.h"
-#endif
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdarg.h>
-#include <inttypes.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/fcntl.h>
-#include <time.h>
-#include <pwd.h>
-#include <grp.h>
-#include <string.h>
-#include <unistd.h>
-#include <limits.h>
-#include <errno.h>
-#include <libxml/hash.h>
-#include <libxml/xmlstring.h>
-#ifdef HAVE_SYS_ACL_H
-#include <sys/acl.h>
-#endif
-#include "xar.h"
-#include "arcmod.h"
-#include "archive.h"
-
-#ifndef LLONG_MIN
-#define LLONG_MIN LONG_LONG_MIN
-#endif
-
-#ifndef LLONG_MAX
-#define LLONG_MAX LONG_LONG_MAX
-#endif
-
-static struct {
-	const char *name;
-	mode_t type;
-} filetypes [] = {
-	{ "file", S_IFREG },
-	{ "directory", S_IFDIR },
-	{ "symlink", S_IFLNK },
-	{ "fifo", S_IFIFO },
-	{ "character special", S_IFCHR },
-	{ "block special", S_IFBLK },
-	{ "socket", S_IFSOCK },
-#ifdef S_IFWHT
-	{ "whiteout", S_IFWHT },
-#endif
-	{ NULL, 0 }
-};
-
-static const char * filetype_name (mode_t mode) {
-	unsigned int i;
-	for (i = 0; filetypes[i].name; i++)
-		if (mode == filetypes[i].type)
-			return (filetypes[i].name);
-	return ("unknown");
-}
-
-static xar_file_t xar_link_lookup(xar_t x, dev_t dev, ino_t ino, xar_file_t f) {
-	char key[32];
-	xar_file_t ret;
-
-	memset(key, 0, sizeof(key));
-	snprintf(key, sizeof(key)-1, "%08" DEV_HEXSTRING "%08" INO_HEXSTRING, DEV_CAST dev, INO_CAST ino);
-	ret = xmlHashLookup(XAR(x)->ino_hash, BAD_CAST(key));
-	if( ret == NULL ) {
-		xmlHashAddEntry(XAR(x)->ino_hash, BAD_CAST(key), XAR_FILE(f));
-		return NULL;
-	}
-	return ret;
-}
-
-static int32_t aacls(xar_file_t f, const char *file) {
-#ifdef HAVE_SYS_ACL_H
-	acl_t a;
-	const char *type;
-
-	xar_prop_get(f, "type", &type);
-	if( !type || (strcmp(type, "symlink") == 0) )
-		return 0;
-
-	a = acl_get_file(file, ACL_TYPE_DEFAULT);
-	if( a ) {
-		char *t;
-		acl_entry_t e;
-
-		/* If the acl is empty, or not valid, skip it */
-		if( acl_get_entry(a, ACL_FIRST_ENTRY, &e) != 1 )
-			goto NEXT;
-
-		t = acl_to_text(a, NULL);
-		if( t ) {
-			xar_prop_set(f, "acl/default", t);
-			acl_free(t);
-		}
-		acl_free(a);
-	}
-NEXT:
-
-	a = acl_get_file(file, ACL_TYPE_ACCESS);
-	if( a ) {
-		char *t;
-		acl_entry_t e;
-
-		/* If the acl is empty, or not valid, skip it */
-		if( acl_get_entry(a, ACL_FIRST_ENTRY, &e) != 1 )
-			goto DONE;
-
-		t = acl_to_text(a, NULL);
-		if( t ) {
-			xar_prop_set(f, "acl/access", t);
-			acl_free(t);
-		}
-		acl_free(a);
-	}
-DONE:
-#endif
-	return 0;
-}
-
-static int32_t eacls(xar_t x, xar_file_t f, const char *file) {
-#ifdef HAVE_SYS_ACL_H
-	const char *t;
-	acl_t a;
-	const char *type;
-
-	xar_prop_get(f, "type", &type);
-	if( !type || (strcmp(type, "symlink") == 0) )
-		return 0;
-
-
-	xar_prop_get(f, "acl/default", &t);
-	if( t ) {
-		a = acl_from_text(t);
-		if( !a ) {
-			xar_err_new(x);
-			xar_err_set_errno(x, errno);
-			xar_err_set_string(x, "Error extracting default acl from toc");
-			xar_err_set_file(x, f);
-			xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
-		} else {
-			if( acl_set_file(file, ACL_TYPE_DEFAULT, a) != 0 ) {
-				xar_err_new(x);
-				xar_err_set_errno(x, errno);
-				xar_err_set_string(x, "Error setting default acl");
-				xar_err_set_file(x, f);
-				xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
-			}
-		}
-	}
-
-	xar_prop_get(f, "acl/access", &t);
-	if( t ) {
-		a = acl_from_text(t);
-		if( !a ) {
-			xar_err_new(x);
-			xar_err_set_errno(x, errno);
-			xar_err_set_string(x, "Error extracting access acl from toc");
-			xar_err_set_file(x, f);
-			xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
-		} else {
-			if( acl_set_file(file, ACL_TYPE_ACCESS, a) != 0 ) {
-				xar_err_new(x);
-				xar_err_set_errno(x, errno);
-				xar_err_set_string(x, "Error setting access acl");
-				xar_err_set_file(x, f);
-				xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
-			}
-		}
-	}
-#endif
-	return 0;
-}
-
-int32_t xar_stat_archive(xar_t x, xar_file_t f, const char *file) {
-	char *tmpstr;
-	struct passwd *pw;
-	struct group *gr;
-	char time[128];
-	struct tm t;
-	const char *type;
-
-	if( S_ISREG(XAR(x)->sbcache.st_mode) && (XAR(x)->sbcache.st_nlink > 1) ) {
-		xar_file_t tmpf;
-		const char *id = xar_attr_get(f, NULL, "id");
-		if( !id ) {
-			xar_err_new(x);
-			xar_err_set_file(x, f);
-			xar_err_set_string(x, "stat: No file id for file");
-			xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_CREATION);
-			return -1;
-		}
-		tmpf = xar_link_lookup(x, XAR(x)->sbcache.st_dev, XAR(x)->sbcache.st_ino, f);
-		xar_prop_set(f, "type", "hardlink");
-		if( tmpf ) {
-			const char *id;
-			id = xar_attr_get(tmpf, NULL, "id");
-			xar_attr_set(f, "type", "link", id);
-		} else {
-			xar_attr_set(f, "type", "link", "original");
-		}
-	} else {
-		type = filetype_name(XAR(x)->sbcache.st_mode & S_IFMT);
-		xar_prop_set(f, "type", type);
-	}
-
-	if( S_ISLNK(XAR(x)->sbcache.st_mode) ) {
-		char link[4096];
-		struct stat lsb;
-
-		memset(link, 0, sizeof(link));
-		readlink(file, link, sizeof(link)-1);
-		xar_prop_set(f, "link", link);
-		if( stat(file, &lsb) != 0 ) {
-			xar_attr_set(f, "link", "type", "broken");
-		} else {
-			type = filetype_name(lsb.st_mode & S_IFMT);
-			xar_attr_set(f, "link", "type", type);
-		}
-	}
-
-	asprintf(&tmpstr, "%04o", XAR(x)->sbcache.st_mode & (~S_IFMT));
-	xar_prop_set(f, "mode", tmpstr);
-	free(tmpstr);
-
-	asprintf(&tmpstr, "%"PRIu64, (uint64_t)XAR(x)->sbcache.st_uid);
-	xar_prop_set(f, "uid", tmpstr);
-	free(tmpstr);
-
-	pw = getpwuid(XAR(x)->sbcache.st_uid);
-	if( pw )
-		xar_prop_set(f, "user", pw->pw_name);
-
-	asprintf(&tmpstr, "%"PRIu64, (uint64_t)XAR(x)->sbcache.st_gid);
-	xar_prop_set(f, "gid", tmpstr);
-	free(tmpstr);
-
-	gr = getgrgid(XAR(x)->sbcache.st_gid);
-	if( gr )
-		xar_prop_set(f, "group", gr->gr_name);
-
-	gmtime_r(&XAR(x)->sbcache.st_atime, &t);
-	memset(time, 0, sizeof(time));
-	strftime(time, sizeof(time), "%FT%T", &t);
-	strcat(time, "Z");
-	xar_prop_set(f, "atime", time);
-
-	gmtime_r(&XAR(x)->sbcache.st_mtime, &t);
-	memset(time, 0, sizeof(time));
-	strftime(time, sizeof(time), "%FT%T", &t);
-	strcat(time, "Z");
-	xar_prop_set(f, "mtime", time);
-
-	gmtime_r(&XAR(x)->sbcache.st_ctime, &t);
-	memset(time, 0, sizeof(time));
-	strftime(time, sizeof(time), "%FT%T", &t);
-	strcat(time, "Z");
-	xar_prop_set(f, "ctime", time);
-
-	aacls(f, file);
-
-	return 0;
-}
-
-int32_t xar_set_perm(xar_t x, xar_file_t f, const char *file) {
-	const char *opt;
-	int32_t m=0, mset=0;
-	uid_t u;
-	gid_t g;
-	const char *timestr;
-	struct tm t;
-	enum {ATIME=0, MTIME};
-	struct timeval tv[2];
-
-	/* in case we don't find anything useful in the archive */
-	u = geteuid();
-	g = getegid();
-
-	opt = xar_opt_get(x, XAR_OPT_OWNERSHIP);
-	if( opt && (strcmp(opt, XAR_OPT_VAL_SYMBOLIC) == 0) ) {
-		struct passwd *pw;
-		struct group *gr;
-
-		xar_prop_get(f, "user", &opt);
-		if( opt ) {
-			pw = getpwnam(opt);
-			if( pw ) {
-				u = pw->pw_uid;
-			}
-		}
-		xar_prop_get(f, "group", &opt);
-		if( opt ) {
-			gr = getgrnam(opt);
-			if( gr ) {
-				g = gr->gr_gid;
-			}
-		}
-	}
-	if( opt && (strcmp(opt, XAR_OPT_VAL_NUMERIC) == 0) ) {
-		xar_prop_get(f, "uid", &opt);
-		if( opt ) {
-			long long tmp;
-			tmp = strtol(opt, NULL, 10);
-			if( ( (tmp == LLONG_MIN) || (tmp == LLONG_MAX) ) && (errno == ERANGE) ) {
-				return -1;
-			}
-			u = (uid_t)tmp;
-		}
-
-		xar_prop_get(f, "gid", &opt);
-		if( opt ) {
-			long long tmp;
-			tmp = strtol(opt, NULL, 10);
-			if( ( (tmp == LLONG_MIN) || (tmp == LLONG_MAX) ) && (errno == ERANGE) ) {
-				return -1;
-			}
-			g = (gid_t)tmp;
-		}
-	}
-
-
-	xar_prop_get(f, "mode", &opt);
-	if( opt ) {
-		long long tmp;
-		tmp = strtoll(opt, NULL, 8);
-		if( ( (tmp == LLONG_MIN) || (tmp == LLONG_MAX) ) && (errno == ERANGE) ) {
-			return -1;
-		}
-		m = (mode_t)tmp;
-		mset = 1;
-	}
-
-	xar_prop_get(f, "type", &opt);
-	if( opt && (strcmp(opt, "symlink") == 0) ) {
-#ifndef __APPLE__
-		if( lchown(file, u, g) ) {
-			xar_err_new(x);
-			xar_err_set_file(x, f);
-			xar_err_set_string(x, "perm: could not lchown symlink");
-			xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
-		}
-#ifndef __linux__
-		if( mset )
-			if( lchmod(file, m) ) {
-				xar_err_new(x);
-				xar_err_set_file(x, f);
-				xar_err_set_string(x, "perm: could not lchmod symlink");
-				xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
-			}
-#endif
-#endif /* __APPLE__ */
-	} else {
-		if( chown(file, u, g) ) {
-			xar_err_new(x);
-			xar_err_set_file(x, f);
-			xar_err_set_string(x, "perm: could not chown file");
-			xar_err_set_errno(x, errno);
-			xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
-		}
-		if( mset )
-			if( chmod(file, m) ) {
-				xar_err_new(x);
-				xar_err_set_file(x, f);
-				xar_err_set_string(x, "perm: could not chmod file");
-				xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
-			}
-	}
-
-	eacls(x, f, file);
-
-	memset(tv, 0, sizeof(struct timeval) * 2);
-	xar_prop_get(f, "atime", &timestr);
-	if( timestr ) {
-		memset(&t, 0, sizeof(t));
-		strptime(timestr, "%FT%T", &t);
-		tv[ATIME].tv_sec = timegm(&t);
-	} else {
-		tv[ATIME].tv_sec = time(NULL);
-	}
-
-	xar_prop_get(f, "mtime", &timestr);
-	if( timestr ) {
-		memset(&t, 0, sizeof(t));
-		strptime(timestr, "%FT%T", &t);
-		tv[MTIME].tv_sec = timegm(&t);
-	} else {
-		tv[MTIME].tv_sec = time(NULL);
-	}
-	utimes(file, tv);
-
-	return 0;
-}
-
-int32_t xar_stat_extract(xar_t x, xar_file_t f, const char *file) {
-	const char *opt;
-	int ret, fd;
-
-	xar_prop_get(f, "type", &opt);
-	if(opt && (strcmp(opt, "directory") == 0)) {
-		ret = mkdir(file, 0700);
-		if( (ret != 0) && (errno != EEXIST) ) {
-			xar_err_new(x);
-			xar_err_set_file(x, f);
-			xar_err_set_string(x, "stat: Could not create directory");
-			xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
-			return ret;
-		}
-		return 0;
-	}
-	if(opt && (strcmp(opt, "symlink") == 0)) {
-		xar_prop_get(f, "link", &opt);
-		if( opt ) {
-			unlink(file);
-			ret = symlink(opt, file);
-			if( ret != 0 ) {
-				xar_err_new(x);
-				xar_err_set_file(x, f);
-				xar_err_set_string(x, "stat: Could not create symlink");
-				xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
-			}
-			return ret;
-		}
-	}
-	if(opt && (strcmp(opt, "hardlink") == 0)) {
-		xar_file_t tmpf;
-		opt = xar_attr_get(f, "type", "link");
-		if( !opt )
-			return 0;
-		if( strcmp(opt, "original") == 0 )
-			goto CREATEFILE;
-
-		tmpf = xmlHashLookup(XAR(x)->link_hash, BAD_CAST(opt));
-		if( !tmpf ) {
-			xar_err_new(x);
-			xar_err_set_file(x, f);
-			xar_err_set_string(x, "stat: Encountered hardlink with no original");
-			xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
-			return -1;
-		}
-
-		unlink(file);
-		if( link(XAR_FILE(tmpf)->fspath, file) != 0 ) {
-			if( errno == ENOENT ) {
-				xar_iter_t i;
-				const char *ptr;
-				i = xar_iter_new(x);
-				for(ptr = xar_prop_first(tmpf, i); ptr; ptr = xar_prop_next(i)) {
-					xar_iter_t a;
-					const char *val = NULL;
-					const char *akey, *aval;
-					if( strncmp("data", ptr, 4) != 0 )
-						continue;
-	
-					if( xar_prop_get(tmpf, ptr, &val) )
-						continue;
-	
-					xar_prop_set(f, ptr, val);
-					a = xar_iter_new(x);
-					for(akey = xar_attr_first(tmpf, ptr, a); akey; akey = xar_attr_next(a)) {
-						aval = xar_attr_get(tmpf, ptr, akey);
-						xar_attr_set(f, ptr, akey, aval);
-					}
-					xar_iter_free(a);
-				}
-				xar_iter_free(i);
-				xar_attr_set(f, "type", "link", "original");
-				return 0;
-			} else {
-				xar_err_new(x);
-				xar_err_set_file(x, f);
-				xar_err_set_string(x, "stat: Could not link hardlink to original");
-				xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
-				return -1;
-			}
-		}
-		return 0;
-	}
-
-CREATEFILE:
-	unlink(file);
-	fd = open(file, O_RDWR|O_CREAT|O_TRUNC, 0600);
-	if( fd > 0 )
-		close(fd);
-	return 0;
-}

Copied: branches/release_1_4/base/src/programs/xar/lib/stat.c (from rev 23968, trunk/base/src/programs/xar/lib/stat.c)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/stat.c	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/stat.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,527 @@
+/*
+ * Copyright (c) 2005 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of his contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 03-Apr-2005
+ * DRI: Rob Braun <bbraun at opendarwin.org>
+ */
+/*
+ * Portions copyright 2003, Apple Computer, Inc.
+ * filetype_name() and associated structure.
+ * DRI: Kevin Van Vechten <kvv at apple.com>
+ */
+#define _FILE_OFFSET_BITS 64
+
+#include "config.h"
+#ifndef HAVE_ASPRINTF
+#include "asprintf.h"
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <inttypes.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/fcntl.h>
+#include <time.h>
+#include <pwd.h>
+#include <grp.h>
+#include <string.h>
+#include <unistd.h>
+#include <limits.h>
+#include <errno.h>
+#include <libxml/hash.h>
+#include <libxml/xmlstring.h>
+#ifdef HAVE_SYS_ACL_H
+#include <sys/acl.h>
+#endif
+#include "xar.h"
+#include "arcmod.h"
+#include "archive.h"
+
+#ifndef LLONG_MIN
+#define LLONG_MIN LONG_LONG_MIN
+#endif
+
+#ifndef LLONG_MAX
+#define LLONG_MAX LONG_LONG_MAX
+#endif
+
+static struct {
+	const char *name;
+	mode_t type;
+} filetypes [] = {
+	{ "file", S_IFREG },
+	{ "directory", S_IFDIR },
+	{ "symlink", S_IFLNK },
+	{ "fifo", S_IFIFO },
+	{ "character special", S_IFCHR },
+	{ "block special", S_IFBLK },
+	{ "socket", S_IFSOCK },
+#ifdef S_IFWHT
+	{ "whiteout", S_IFWHT },
+#endif
+	{ NULL, 0 }
+};
+
+static const char * filetype_name (mode_t mode) {
+	unsigned int i;
+	for (i = 0; filetypes[i].name; i++)
+		if (mode == filetypes[i].type)
+			return (filetypes[i].name);
+	return ("unknown");
+}
+
+static xar_file_t xar_link_lookup(xar_t x, dev_t dev, ino_t ino, xar_file_t f) {
+	char key[32];
+	xar_file_t ret;
+
+	memset(key, 0, sizeof(key));
+	snprintf(key, sizeof(key)-1, "%08" DEV_HEXSTRING "%08" INO_HEXSTRING, DEV_CAST dev, INO_CAST ino);
+	ret = xmlHashLookup(XAR(x)->ino_hash, BAD_CAST(key));
+	if( ret == NULL ) {
+		xmlHashAddEntry(XAR(x)->ino_hash, BAD_CAST(key), XAR_FILE(f));
+		return NULL;
+	}
+	return ret;
+}
+
+static int32_t aacls(xar_file_t f, const char *file) {
+#ifdef HAVE_SYS_ACL_H
+	acl_t a;
+	const char *type;
+
+	xar_prop_get(f, "type", &type);
+	if( !type || (strcmp(type, "symlink") == 0) )
+		return 0;
+
+	a = acl_get_file(file, ACL_TYPE_DEFAULT);
+	if( a ) {
+		char *t;
+		acl_entry_t e;
+
+		/* If the acl is empty, or not valid, skip it */
+		if( acl_get_entry(a, ACL_FIRST_ENTRY, &e) != 1 )
+			goto NEXT;
+
+		t = acl_to_text(a, NULL);
+		if( t ) {
+			xar_prop_set(f, "acl/default", t);
+			acl_free(t);
+		}
+		acl_free(a);
+	}
+NEXT:
+
+	a = acl_get_file(file, ACL_TYPE_ACCESS);
+	if( a ) {
+		char *t;
+		acl_entry_t e;
+
+		/* If the acl is empty, or not valid, skip it */
+		if( acl_get_entry(a, ACL_FIRST_ENTRY, &e) != 1 )
+			goto DONE;
+
+		t = acl_to_text(a, NULL);
+		if( t ) {
+			xar_prop_set(f, "acl/access", t);
+			acl_free(t);
+		}
+		acl_free(a);
+	}
+DONE:
+#endif
+	return 0;
+}
+
+static int32_t eacls(xar_t x, xar_file_t f, const char *file) {
+#ifdef HAVE_SYS_ACL_H
+	const char *t;
+	acl_t a;
+	const char *type;
+
+	xar_prop_get(f, "type", &type);
+	if( !type || (strcmp(type, "symlink") == 0) )
+		return 0;
+
+
+	xar_prop_get(f, "acl/default", &t);
+	if( t ) {
+		a = acl_from_text(t);
+		if( !a ) {
+			xar_err_new(x);
+			xar_err_set_errno(x, errno);
+			xar_err_set_string(x, "Error extracting default acl from toc");
+			xar_err_set_file(x, f);
+			xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
+		} else {
+			if( acl_set_file(file, ACL_TYPE_DEFAULT, a) != 0 ) {
+				xar_err_new(x);
+				xar_err_set_errno(x, errno);
+				xar_err_set_string(x, "Error setting default acl");
+				xar_err_set_file(x, f);
+				xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
+			}
+		}
+	}
+
+	xar_prop_get(f, "acl/access", &t);
+	if( t ) {
+		a = acl_from_text(t);
+		if( !a ) {
+			xar_err_new(x);
+			xar_err_set_errno(x, errno);
+			xar_err_set_string(x, "Error extracting access acl from toc");
+			xar_err_set_file(x, f);
+			xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
+		} else {
+			if( acl_set_file(file, ACL_TYPE_ACCESS, a) != 0 ) {
+				xar_err_new(x);
+				xar_err_set_errno(x, errno);
+				xar_err_set_string(x, "Error setting access acl");
+				xar_err_set_file(x, f);
+				xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
+			}
+		}
+	}
+#endif
+	return 0;
+}
+
+int32_t xar_stat_archive(xar_t x, xar_file_t f, const char *file) {
+	char *tmpstr;
+	struct passwd *pw;
+	struct group *gr;
+	char time[128];
+	struct tm t;
+	const char *type;
+
+	if( S_ISREG(XAR(x)->sbcache.st_mode) && (XAR(x)->sbcache.st_nlink > 1) ) {
+		xar_file_t tmpf;
+		const char *id = xar_attr_get(f, NULL, "id");
+		if( !id ) {
+			xar_err_new(x);
+			xar_err_set_file(x, f);
+			xar_err_set_string(x, "stat: No file id for file");
+			xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_CREATION);
+			return -1;
+		}
+		tmpf = xar_link_lookup(x, XAR(x)->sbcache.st_dev, XAR(x)->sbcache.st_ino, f);
+		xar_prop_set(f, "type", "hardlink");
+		if( tmpf ) {
+			const char *id;
+			id = xar_attr_get(tmpf, NULL, "id");
+			xar_attr_set(f, "type", "link", id);
+		} else {
+			xar_attr_set(f, "type", "link", "original");
+		}
+	} else {
+		type = filetype_name(XAR(x)->sbcache.st_mode & S_IFMT);
+		xar_prop_set(f, "type", type);
+	}
+
+	if( S_ISLNK(XAR(x)->sbcache.st_mode) ) {
+		char link[4096];
+		struct stat lsb;
+
+		memset(link, 0, sizeof(link));
+		readlink(file, link, sizeof(link)-1);
+		xar_prop_set(f, "link", link);
+		if( stat(file, &lsb) != 0 ) {
+			xar_attr_set(f, "link", "type", "broken");
+		} else {
+			type = filetype_name(lsb.st_mode & S_IFMT);
+			xar_attr_set(f, "link", "type", type);
+		}
+	}
+
+	asprintf(&tmpstr, "%04o", XAR(x)->sbcache.st_mode & (~S_IFMT));
+	xar_prop_set(f, "mode", tmpstr);
+	free(tmpstr);
+
+	asprintf(&tmpstr, "%"PRIu64, (uint64_t)XAR(x)->sbcache.st_uid);
+	xar_prop_set(f, "uid", tmpstr);
+	free(tmpstr);
+
+	pw = getpwuid(XAR(x)->sbcache.st_uid);
+	if( pw )
+		xar_prop_set(f, "user", pw->pw_name);
+
+	asprintf(&tmpstr, "%"PRIu64, (uint64_t)XAR(x)->sbcache.st_gid);
+	xar_prop_set(f, "gid", tmpstr);
+	free(tmpstr);
+
+	gr = getgrgid(XAR(x)->sbcache.st_gid);
+	if( gr )
+		xar_prop_set(f, "group", gr->gr_name);
+
+	gmtime_r(&XAR(x)->sbcache.st_atime, &t);
+	memset(time, 0, sizeof(time));
+	strftime(time, sizeof(time), "%FT%T", &t);
+	strcat(time, "Z");
+	xar_prop_set(f, "atime", time);
+
+	gmtime_r(&XAR(x)->sbcache.st_mtime, &t);
+	memset(time, 0, sizeof(time));
+	strftime(time, sizeof(time), "%FT%T", &t);
+	strcat(time, "Z");
+	xar_prop_set(f, "mtime", time);
+
+	gmtime_r(&XAR(x)->sbcache.st_ctime, &t);
+	memset(time, 0, sizeof(time));
+	strftime(time, sizeof(time), "%FT%T", &t);
+	strcat(time, "Z");
+	xar_prop_set(f, "ctime", time);
+
+	aacls(f, file);
+
+	return 0;
+}
+
+int32_t xar_set_perm(xar_t x, xar_file_t f, const char *file) {
+	const char *opt;
+	int32_t m=0, mset=0;
+	uid_t u;
+	gid_t g;
+	const char *timestr;
+	struct tm t;
+	enum {ATIME=0, MTIME};
+	struct timeval tv[2];
+
+	/* in case we don't find anything useful in the archive */
+	u = geteuid();
+	g = getegid();
+
+	opt = xar_opt_get(x, XAR_OPT_OWNERSHIP);
+	if( opt && (strcmp(opt, XAR_OPT_VAL_SYMBOLIC) == 0) ) {
+		struct passwd *pw;
+		struct group *gr;
+
+		xar_prop_get(f, "user", &opt);
+		if( opt ) {
+			pw = getpwnam(opt);
+			if( pw ) {
+				u = pw->pw_uid;
+			}
+		}
+		xar_prop_get(f, "group", &opt);
+		if( opt ) {
+			gr = getgrnam(opt);
+			if( gr ) {
+				g = gr->gr_gid;
+			}
+		}
+	}
+	if( opt && (strcmp(opt, XAR_OPT_VAL_NUMERIC) == 0) ) {
+		xar_prop_get(f, "uid", &opt);
+		if( opt ) {
+			long long tmp;
+			tmp = strtol(opt, NULL, 10);
+			if( ( (tmp == LLONG_MIN) || (tmp == LLONG_MAX) ) && (errno == ERANGE) ) {
+				return -1;
+			}
+			u = (uid_t)tmp;
+		}
+
+		xar_prop_get(f, "gid", &opt);
+		if( opt ) {
+			long long tmp;
+			tmp = strtol(opt, NULL, 10);
+			if( ( (tmp == LLONG_MIN) || (tmp == LLONG_MAX) ) && (errno == ERANGE) ) {
+				return -1;
+			}
+			g = (gid_t)tmp;
+		}
+	}
+
+
+	xar_prop_get(f, "mode", &opt);
+	if( opt ) {
+		long long tmp;
+		tmp = strtoll(opt, NULL, 8);
+		if( ( (tmp == LLONG_MIN) || (tmp == LLONG_MAX) ) && (errno == ERANGE) ) {
+			return -1;
+		}
+		m = (mode_t)tmp;
+		mset = 1;
+	}
+
+	xar_prop_get(f, "type", &opt);
+	if( opt && (strcmp(opt, "symlink") == 0) ) {
+#ifndef __APPLE__
+		if( lchown(file, u, g) ) {
+			xar_err_new(x);
+			xar_err_set_file(x, f);
+			xar_err_set_string(x, "perm: could not lchown symlink");
+			xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
+		}
+#ifndef __linux__
+		if( mset )
+			if( lchmod(file, m) ) {
+				xar_err_new(x);
+				xar_err_set_file(x, f);
+				xar_err_set_string(x, "perm: could not lchmod symlink");
+				xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
+			}
+#endif
+#endif /* __APPLE__ */
+	} else {
+		if( chown(file, u, g) ) {
+			xar_err_new(x);
+			xar_err_set_file(x, f);
+			xar_err_set_string(x, "perm: could not chown file");
+			xar_err_set_errno(x, errno);
+			xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
+		}
+		if( mset )
+			if( chmod(file, m) ) {
+				xar_err_new(x);
+				xar_err_set_file(x, f);
+				xar_err_set_string(x, "perm: could not chmod file");
+				xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
+			}
+	}
+
+	eacls(x, f, file);
+
+	memset(tv, 0, sizeof(struct timeval) * 2);
+	xar_prop_get(f, "atime", &timestr);
+	if( timestr ) {
+		memset(&t, 0, sizeof(t));
+		strptime(timestr, "%FT%T", &t);
+		tv[ATIME].tv_sec = timegm(&t);
+	} else {
+		tv[ATIME].tv_sec = time(NULL);
+	}
+
+	xar_prop_get(f, "mtime", &timestr);
+	if( timestr ) {
+		memset(&t, 0, sizeof(t));
+		strptime(timestr, "%FT%T", &t);
+		tv[MTIME].tv_sec = timegm(&t);
+	} else {
+		tv[MTIME].tv_sec = time(NULL);
+	}
+	utimes(file, tv);
+
+	return 0;
+}
+
+int32_t xar_stat_extract(xar_t x, xar_file_t f, const char *file) {
+	const char *opt;
+	int ret, fd;
+
+	xar_prop_get(f, "type", &opt);
+	if(opt && (strcmp(opt, "directory") == 0)) {
+		ret = mkdir(file, 0700);
+		if( (ret != 0) && (errno != EEXIST) ) {
+			xar_err_new(x);
+			xar_err_set_file(x, f);
+			xar_err_set_string(x, "stat: Could not create directory");
+			xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
+			return ret;
+		}
+		return 0;
+	}
+	if(opt && (strcmp(opt, "symlink") == 0)) {
+		xar_prop_get(f, "link", &opt);
+		if( opt ) {
+			unlink(file);
+			ret = symlink(opt, file);
+			if( ret != 0 ) {
+				xar_err_new(x);
+				xar_err_set_file(x, f);
+				xar_err_set_string(x, "stat: Could not create symlink");
+				xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
+			}
+			return ret;
+		}
+	}
+	if(opt && (strcmp(opt, "hardlink") == 0)) {
+		xar_file_t tmpf;
+		opt = xar_attr_get(f, "type", "link");
+		if( !opt )
+			return 0;
+		if( strcmp(opt, "original") == 0 )
+			goto CREATEFILE;
+
+		tmpf = xmlHashLookup(XAR(x)->link_hash, BAD_CAST(opt));
+		if( !tmpf ) {
+			xar_err_new(x);
+			xar_err_set_file(x, f);
+			xar_err_set_string(x, "stat: Encountered hardlink with no original");
+			xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
+			return -1;
+		}
+
+		unlink(file);
+		if( link(XAR_FILE(tmpf)->fspath, file) != 0 ) {
+			if( errno == ENOENT ) {
+				xar_iter_t i;
+				const char *ptr;
+				i = xar_iter_new(x);
+				for(ptr = xar_prop_first(tmpf, i); ptr; ptr = xar_prop_next(i)) {
+					xar_iter_t a;
+					const char *val = NULL;
+					const char *akey, *aval;
+					if( strncmp("data", ptr, 4) != 0 )
+						continue;
+	
+					if( xar_prop_get(tmpf, ptr, &val) )
+						continue;
+	
+					xar_prop_set(f, ptr, val);
+					a = xar_iter_new(x);
+					for(akey = xar_attr_first(tmpf, ptr, a); akey; akey = xar_attr_next(a)) {
+						aval = xar_attr_get(tmpf, ptr, akey);
+						xar_attr_set(f, ptr, akey, aval);
+					}
+					xar_iter_free(a);
+				}
+				xar_iter_free(i);
+				xar_attr_set(f, "type", "link", "original");
+				return 0;
+			} else {
+				xar_err_new(x);
+				xar_err_set_file(x, f);
+				xar_err_set_string(x, "stat: Could not link hardlink to original");
+				xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
+				return -1;
+			}
+		}
+		return 0;
+	}
+
+CREATEFILE:
+	unlink(file);
+	fd = open(file, O_RDWR|O_CREAT|O_TRUNC, 0600);
+	if( fd > 0 )
+		close(fd);
+	return 0;
+}

Deleted: branches/release_1_4/base/src/programs/xar/lib/stat.h
===================================================================
--- trunk/base/src/programs/xar/lib/stat.h	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/stat.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2005 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of his contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 03-Apr-2005
- * DRI: Rob Braun <bbraun at opendarwin.org>
- */
-
-#ifndef _XAR_STAT_H_
-#define _XAR_STAT_H_
-
-#include "xar.h"
-
-int32_t xar_stat_archive(xar_t x, xar_file_t f, const char *file);
-int32_t xar_stat_extract(xar_t x, xar_file_t f, const char *file);
-int32_t xar_set_perm(xar_t x, xar_file_t f, const char *file);
-
-#endif /* _XAR_STAT_H_ */

Copied: branches/release_1_4/base/src/programs/xar/lib/stat.h (from rev 23968, trunk/base/src/programs/xar/lib/stat.h)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/stat.h	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/stat.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2005 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of his contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 03-Apr-2005
+ * DRI: Rob Braun <bbraun at opendarwin.org>
+ */
+
+#ifndef _XAR_STAT_H_
+#define _XAR_STAT_H_
+
+#include "xar.h"
+
+int32_t xar_stat_archive(xar_t x, xar_file_t f, const char *file);
+int32_t xar_stat_extract(xar_t x, xar_file_t f, const char *file);
+int32_t xar_set_perm(xar_t x, xar_file_t f, const char *file);
+
+#endif /* _XAR_STAT_H_ */

Deleted: branches/release_1_4/base/src/programs/xar/lib/subdoc.c
===================================================================
--- trunk/base/src/programs/xar/lib/subdoc.c	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/subdoc.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,201 +0,0 @@
-/*
- * Copyright (c) 2005 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of his contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 04-Apr-2005
- * DRI: Rob Braun <bbraun at opendarwin.org>
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <libxml/xmlwriter.h>
-#include <libxml/xmlreader.h>
-#include "xar.h"
-#include "subdoc.h"
-#include "archive.h"
-#include "filetree.h"
-
-xar_subdoc_t xar_subdoc_new(xar_t x, const char *name) {
-	xar_subdoc_t ret;
-
-	ret = malloc(sizeof(struct __xar_subdoc_t));
-	if( ! ret )
-		return NULL;
-
-	memset(XAR_SUBDOC(ret), 0, sizeof(struct __xar_subdoc_t));
-	XAR_SUBDOC(ret)->name = strdup(name);
-	XAR_SUBDOC(ret)->next = XAR_SUBDOC(XAR(x)->subdocs);
-	XAR(x)->subdocs = ret;
-	XAR_SUBDOC(ret)->x = x;
-
-	return ret;
-}
-
-int32_t xar_subdoc_prop_set(xar_subdoc_t s, const char *key, const char *value){
-	return xar_prop_set((xar_file_t)s, key, value);
-}
-
-int32_t xar_subdoc_prop_get(xar_subdoc_t s, const char *key, const char **value) {
-	return xar_prop_get((xar_file_t)s, key, value);
-}
-
-int32_t xar_subdoc_attr_set(xar_subdoc_t s, const char *prop, const char *key, const char *value){
-	return xar_attr_set((xar_file_t)s, prop, key, value);
-}
-
-const char *xar_subdoc_attr_get(xar_subdoc_t s, const char *prop, const char *key) {
-	return xar_attr_get((xar_file_t)s, prop, key);
-}
-
-xar_subdoc_t xar_subdoc_first(xar_t x) {
-	return XAR(x)->subdocs;
-}
-
-xar_subdoc_t xar_subdoc_next(xar_subdoc_t s) {
-	return XAR_SUBDOC(s)->next;
-}
-
-const char *xar_subdoc_name(xar_subdoc_t s) {
-	return XAR_SUBDOC(s)->name;
-}
-
-int32_t xar_subdoc_copyout(xar_subdoc_t s, unsigned char **ret, unsigned int *size) {
-	xmlBufferPtr buf;
-	xmlTextWriterPtr writer;
-
-	buf = xmlBufferCreate();
-	if( !buf )
-		return -1;
-
-	writer = xmlNewTextWriterMemory(buf, 0);
-	if( !writer ) {
-		xmlBufferFree(buf);
-		return -1;
-	}
-
-	xmlTextWriterSetIndent(writer, 4);
-	xar_subdoc_serialize(s, writer, 0);
-
-	xmlTextWriterEndDocument(writer);
-	xmlFreeTextWriter(writer);
-
-	if( size != NULL )
-		*size = buf->use;
-	*ret = malloc(buf->size);
-	if( *ret == NULL ) {
-		xmlBufferFree(buf);
-		return -1;
-	}
-
-	assert(size != NULL);
-	memcpy(*ret, buf->content, *size);
-	xmlBufferFree(buf);
-	return 0;
-}
-
-int32_t xar_subdoc_copyin(xar_subdoc_t s, const unsigned char *buf, unsigned int len) {
-	xmlTextReaderPtr reader;
-
-	reader = xmlReaderForMemory((const char *)buf, len, NULL, NULL, 0);
-	if( !reader )
-		return -1;
-
-	xar_subdoc_unserialize(s, reader);
-	xmlFreeTextReader(reader);
-	return 0;
-}
-
-/* xar_subdoc_serialize
- * s: a subdoc structure allocated and initialized by xar_subdoc_new()
- * writer: and xmlTextWriterPtr that has already been opend and initialized
- * and is pointing to the place where the subdocument will be serialized.
- * wrap: an integer describing whether the subdocument is to be wrapped
- * for placement in the xml header of an archive, or if we are trying to
- * reconstruct the original document.  1 for wrapping, 0 for original.
- */
-void xar_subdoc_serialize(xar_subdoc_t s, xmlTextWriterPtr writer, int wrap) {
-	if( !s ) return;
-	if( wrap ) {
-		xmlTextWriterStartElementNS(writer, BAD_CAST(XAR_SUBDOC(s)->prefix), BAD_CAST("subdoc"), BAD_CAST(XAR_SUBDOC(s)->ns));
-		xmlTextWriterWriteAttribute(writer, BAD_CAST("subdoc_name"), BAD_CAST(XAR_SUBDOC(s)->name));
-		if( XAR_SUBDOC(s)->value )
-			xmlTextWriterWriteString(writer, BAD_CAST(XAR_SUBDOC(s)->value));
-	}
-	xar_prop_serialize(XAR_SUBDOC(s)->props, writer);
-	xmlTextWriterEndElement(writer);
-}
-
-void xar_subdoc_remove(xar_subdoc_t s) {
-	xar_prop_t p;
-	xar_subdoc_t tmp = xar_subdoc_first(XAR_SUBDOC(s)->x);
-
-	if( tmp == s ) {
-		XAR(XAR_SUBDOC(s)->x)->subdocs = XAR_SUBDOC(s)->next;
-	} else {
-		while(XAR_SUBDOC(tmp)->next) {
-			if( XAR_SUBDOC(tmp)->next == s ) {
-				XAR_SUBDOC(tmp)->next = XAR_SUBDOC(s)->next;
-				break;
-			}
-			tmp = xar_subdoc_next(tmp);
-		}
-	}
-
-	while(XAR_SUBDOC(s)->props) {
-		p = XAR_SUBDOC(s)->props;
-		XAR_SUBDOC(s)->props = XAR_PROP(XAR_PROP(p)->next);
-		xar_prop_free(p);
-	}
-	free((char *)XAR_SUBDOC(s)->blank1);
-	free((char *)XAR_SUBDOC(s)->name);
-	free((void *)s);
-	return;
-}
-
-void xar_subdoc_unserialize(xar_subdoc_t s, xmlTextReaderPtr reader) {
-	int type;
-
-	while( xmlTextReaderRead(reader) == 1 ) {
-		type = xmlTextReaderNodeType(reader);
-		if( type == XML_READER_TYPE_ELEMENT ) {
-			xar_prop_unserialize((xar_file_t)s, NULL, reader);
-		}
-		if( type == XML_READER_TYPE_TEXT ) {
-			const char *value;
-			value = (const char *)xmlTextReaderConstValue(reader);
-			free((char*)XAR_SUBDOC(s)->value);
-			XAR_SUBDOC(s)->value = strdup(value);
-		}
-		if( type == XML_READER_TYPE_END_ELEMENT ) {
-			break;
-		}
-	}
-
-	return;
-}

Copied: branches/release_1_4/base/src/programs/xar/lib/subdoc.c (from rev 23968, trunk/base/src/programs/xar/lib/subdoc.c)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/subdoc.c	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/subdoc.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,201 @@
+/*
+ * Copyright (c) 2005 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of his contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 04-Apr-2005
+ * DRI: Rob Braun <bbraun at opendarwin.org>
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <libxml/xmlwriter.h>
+#include <libxml/xmlreader.h>
+#include "xar.h"
+#include "subdoc.h"
+#include "archive.h"
+#include "filetree.h"
+
+xar_subdoc_t xar_subdoc_new(xar_t x, const char *name) {
+	xar_subdoc_t ret;
+
+	ret = malloc(sizeof(struct __xar_subdoc_t));
+	if( ! ret )
+		return NULL;
+
+	memset(XAR_SUBDOC(ret), 0, sizeof(struct __xar_subdoc_t));
+	XAR_SUBDOC(ret)->name = strdup(name);
+	XAR_SUBDOC(ret)->next = XAR_SUBDOC(XAR(x)->subdocs);
+	XAR(x)->subdocs = ret;
+	XAR_SUBDOC(ret)->x = x;
+
+	return ret;
+}
+
+int32_t xar_subdoc_prop_set(xar_subdoc_t s, const char *key, const char *value){
+	return xar_prop_set((xar_file_t)s, key, value);
+}
+
+int32_t xar_subdoc_prop_get(xar_subdoc_t s, const char *key, const char **value) {
+	return xar_prop_get((xar_file_t)s, key, value);
+}
+
+int32_t xar_subdoc_attr_set(xar_subdoc_t s, const char *prop, const char *key, const char *value){
+	return xar_attr_set((xar_file_t)s, prop, key, value);
+}
+
+const char *xar_subdoc_attr_get(xar_subdoc_t s, const char *prop, const char *key) {
+	return xar_attr_get((xar_file_t)s, prop, key);
+}
+
+xar_subdoc_t xar_subdoc_first(xar_t x) {
+	return XAR(x)->subdocs;
+}
+
+xar_subdoc_t xar_subdoc_next(xar_subdoc_t s) {
+	return XAR_SUBDOC(s)->next;
+}
+
+const char *xar_subdoc_name(xar_subdoc_t s) {
+	return XAR_SUBDOC(s)->name;
+}
+
+int32_t xar_subdoc_copyout(xar_subdoc_t s, unsigned char **ret, unsigned int *size) {
+	xmlBufferPtr buf;
+	xmlTextWriterPtr writer;
+
+	buf = xmlBufferCreate();
+	if( !buf )
+		return -1;
+
+	writer = xmlNewTextWriterMemory(buf, 0);
+	if( !writer ) {
+		xmlBufferFree(buf);
+		return -1;
+	}
+
+	xmlTextWriterSetIndent(writer, 4);
+	xar_subdoc_serialize(s, writer, 0);
+
+	xmlTextWriterEndDocument(writer);
+	xmlFreeTextWriter(writer);
+
+	if( size != NULL )
+		*size = buf->use;
+	*ret = malloc(buf->size);
+	if( *ret == NULL ) {
+		xmlBufferFree(buf);
+		return -1;
+	}
+
+	assert(size != NULL);
+	memcpy(*ret, buf->content, *size);
+	xmlBufferFree(buf);
+	return 0;
+}
+
+int32_t xar_subdoc_copyin(xar_subdoc_t s, const unsigned char *buf, unsigned int len) {
+	xmlTextReaderPtr reader;
+
+	reader = xmlReaderForMemory((const char *)buf, len, NULL, NULL, 0);
+	if( !reader )
+		return -1;
+
+	xar_subdoc_unserialize(s, reader);
+	xmlFreeTextReader(reader);
+	return 0;
+}
+
+/* xar_subdoc_serialize
+ * s: a subdoc structure allocated and initialized by xar_subdoc_new()
+ * writer: and xmlTextWriterPtr that has already been opend and initialized
+ * and is pointing to the place where the subdocument will be serialized.
+ * wrap: an integer describing whether the subdocument is to be wrapped
+ * for placement in the xml header of an archive, or if we are trying to
+ * reconstruct the original document.  1 for wrapping, 0 for original.
+ */
+void xar_subdoc_serialize(xar_subdoc_t s, xmlTextWriterPtr writer, int wrap) {
+	if( !s ) return;
+	if( wrap ) {
+		xmlTextWriterStartElementNS(writer, BAD_CAST(XAR_SUBDOC(s)->prefix), BAD_CAST("subdoc"), BAD_CAST(XAR_SUBDOC(s)->ns));
+		xmlTextWriterWriteAttribute(writer, BAD_CAST("subdoc_name"), BAD_CAST(XAR_SUBDOC(s)->name));
+		if( XAR_SUBDOC(s)->value )
+			xmlTextWriterWriteString(writer, BAD_CAST(XAR_SUBDOC(s)->value));
+	}
+	xar_prop_serialize(XAR_SUBDOC(s)->props, writer);
+	xmlTextWriterEndElement(writer);
+}
+
+void xar_subdoc_remove(xar_subdoc_t s) {
+	xar_prop_t p;
+	xar_subdoc_t tmp = xar_subdoc_first(XAR_SUBDOC(s)->x);
+
+	if( tmp == s ) {
+		XAR(XAR_SUBDOC(s)->x)->subdocs = XAR_SUBDOC(s)->next;
+	} else {
+		while(XAR_SUBDOC(tmp)->next) {
+			if( XAR_SUBDOC(tmp)->next == s ) {
+				XAR_SUBDOC(tmp)->next = XAR_SUBDOC(s)->next;
+				break;
+			}
+			tmp = xar_subdoc_next(tmp);
+		}
+	}
+
+	while(XAR_SUBDOC(s)->props) {
+		p = XAR_SUBDOC(s)->props;
+		XAR_SUBDOC(s)->props = XAR_PROP(XAR_PROP(p)->next);
+		xar_prop_free(p);
+	}
+	free((char *)XAR_SUBDOC(s)->blank1);
+	free((char *)XAR_SUBDOC(s)->name);
+	free((void *)s);
+	return;
+}
+
+void xar_subdoc_unserialize(xar_subdoc_t s, xmlTextReaderPtr reader) {
+	int type;
+
+	while( xmlTextReaderRead(reader) == 1 ) {
+		type = xmlTextReaderNodeType(reader);
+		if( type == XML_READER_TYPE_ELEMENT ) {
+			xar_prop_unserialize((xar_file_t)s, NULL, reader);
+		}
+		if( type == XML_READER_TYPE_TEXT ) {
+			const char *value;
+			value = (const char *)xmlTextReaderConstValue(reader);
+			free((char*)XAR_SUBDOC(s)->value);
+			XAR_SUBDOC(s)->value = strdup(value);
+		}
+		if( type == XML_READER_TYPE_END_ELEMENT ) {
+			break;
+		}
+	}
+
+	return;
+}

Deleted: branches/release_1_4/base/src/programs/xar/lib/subdoc.h
===================================================================
--- trunk/base/src/programs/xar/lib/subdoc.h	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/subdoc.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2005 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of his contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 03-Apr-2005
- * DRI: Rob Braun <bbraun at opendarwin.org>
- */
-
-#ifndef _XAR_SUBDOC_H_
-#define _XAR_SUBDOC_H_
-
-#include "xar.h"
-#include "filetree.h"
-
-struct __xar_subdoc_t {
-	struct __xar_prop_t  *props;
-	struct __xar_attr_t  *attrs;
-	const char *prefix;
-	const char *ns;
-	const char *blank1; /* filler for xar_file_t compatibility */
-	const char *blank2; /* filler for xar_file_t compatibility */
-	const char *name;
-	struct __xar_subdoc_t *next;
-	const char *value; /* a subdoc should very rarely have a value */
-	xar_t x;
-};
-
-#define XAR_SUBDOC(x) ((struct __xar_subdoc_t *)(x))
-
-void xar_subdoc_unserialize(xar_subdoc_t s, xmlTextReaderPtr reader);
-void xar_subdoc_serialize(xar_subdoc_t s, xmlTextWriterPtr writer, int wrap);
-void xar_subdoc_free(xar_subdoc_t s);
-
-#endif /* _XAR_SUBDOC_H_ */

Copied: branches/release_1_4/base/src/programs/xar/lib/subdoc.h (from rev 23968, trunk/base/src/programs/xar/lib/subdoc.h)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/subdoc.h	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/subdoc.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2005 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of his contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 03-Apr-2005
+ * DRI: Rob Braun <bbraun at opendarwin.org>
+ */
+
+#ifndef _XAR_SUBDOC_H_
+#define _XAR_SUBDOC_H_
+
+#include "xar.h"
+#include "filetree.h"
+
+struct __xar_subdoc_t {
+	struct __xar_prop_t  *props;
+	struct __xar_attr_t  *attrs;
+	const char *prefix;
+	const char *ns;
+	const char *blank1; /* filler for xar_file_t compatibility */
+	const char *blank2; /* filler for xar_file_t compatibility */
+	const char *name;
+	struct __xar_subdoc_t *next;
+	const char *value; /* a subdoc should very rarely have a value */
+	xar_t x;
+};
+
+#define XAR_SUBDOC(x) ((struct __xar_subdoc_t *)(x))
+
+void xar_subdoc_unserialize(xar_subdoc_t s, xmlTextReaderPtr reader);
+void xar_subdoc_serialize(xar_subdoc_t s, xmlTextWriterPtr writer, int wrap);
+void xar_subdoc_free(xar_subdoc_t s);
+
+#endif /* _XAR_SUBDOC_H_ */

Deleted: branches/release_1_4/base/src/programs/xar/lib/util.c
===================================================================
--- trunk/base/src/programs/xar/lib/util.c	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/util.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,136 +0,0 @@
-/*
- * Copyright (c) 2005 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of his contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 03-Apr-2005
- * DRI: Rob Braun <bbraun at opendarwin.org>
- */
-#include <stdio.h>
-#include <stdint.h>
-#include <sys/types.h>
-#include <arpa/inet.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-#include "config.h"
-#ifndef HAVE_ASPRINTF
-#include "asprintf.h"
-#endif
-#include "xar.h"
-#include "filetree.h"
-
-uint64_t xar_ntoh64(uint64_t num) {
-	int t = 1234;
-	union conv {
-		uint64_t i64;
-		uint32_t i32[2];
-	} *in, out;
-
-	if( ntohl(t) == t ) {
-		out.i64 = num;
-		return out.i64;
-	}
-	in = (union conv *)&num;
-	out.i32[1] = ntohl(in->i32[0]);
-	out.i32[0] = ntohl(in->i32[1]);
-	return(out.i64);
-}
-
-uint32_t xar_swap32(uint32_t num) {
-	uint8_t *one, *two;
-	uint32_t ret;
-
-	two = (uint8_t *)&ret;
-	one = (uint8_t *)&num;
-	two[3] = one[0];
-	two[2] = one[1];
-	two[1] = one[2];
-	two[0] = one[3];
-
-	return ret;
-}
-
-/* xar_get_path
- * Summary: returns the archive path of the file f.
- * Caller needs to free the return value.
- */
-char *xar_get_path(xar_file_t f) {
-	char *ret, *tmp;
-	const char *name;
-	xar_file_t i;
-
-	xar_prop_get(f, "name", &name);
-	ret = strdup(name);
-	for(i = XAR_FILE(f)->parent; i; i = XAR_FILE(i)->parent) {
-		const char *name;
-	       	xar_prop_get(i, "name", &name);
-		tmp = ret;
-		asprintf(&ret, "%s/%s", name, tmp);
-		free(tmp);
-	}
-
-	return ret;
-}
-
-/* xar_read_fd
- * Summary: Reads from a file descriptor a certain number of bytes to a specific
- * buffer.  This simple wrapper just handles certain retryable error situations.
- * Returns -1 when it fails fatally; the number of bytes read otherwise.
- */
-ssize_t xar_read_fd( int fd, void * buffer, size_t nbytes ) {
-	ssize_t rb;
-	ssize_t off = 0;
-
-	while ( off < nbytes ) {
-		rb = read(fd, buffer+off, nbytes-off);
-		if( (rb < 1 ) && (errno != EINTR) && (errno != EAGAIN) )
-			return -1;
-		off += rb;
-	}
-
-	return off;
-}
-
-/* xar_write_fd
- * Summary: Writes from a buffer to a file descriptor.  Like xar_read_fd it
- * also just handles certain retryable error situations.
- * Returs -1 when it fails fatally; the number of bytes written otherwise.
- */
-ssize_t xar_write_fd( int fd, void * buffer, size_t nbytes ) {
-	ssize_t rb;
-	ssize_t off = 0;
-
-	while ( off < nbytes ) {
-		rb = write(fd, buffer+off, nbytes-off);
-		if( (rb < 1 ) && (errno != EINTR) && (errno != EAGAIN) )
-			return -1;
-		off += rb;
-	}
-
-	return off;
-}

Copied: branches/release_1_4/base/src/programs/xar/lib/util.c (from rev 23968, trunk/base/src/programs/xar/lib/util.c)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/util.c	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/util.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 2005 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of his contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 03-Apr-2005
+ * DRI: Rob Braun <bbraun at opendarwin.org>
+ */
+#include <stdio.h>
+#include <stdint.h>
+#include <sys/types.h>
+#include <arpa/inet.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include "config.h"
+#ifndef HAVE_ASPRINTF
+#include "asprintf.h"
+#endif
+#include "xar.h"
+#include "filetree.h"
+
+uint64_t xar_ntoh64(uint64_t num) {
+	int t = 1234;
+	union conv {
+		uint64_t i64;
+		uint32_t i32[2];
+	} *in, out;
+
+	if( ntohl(t) == t ) {
+		out.i64 = num;
+		return out.i64;
+	}
+	in = (union conv *)&num;
+	out.i32[1] = ntohl(in->i32[0]);
+	out.i32[0] = ntohl(in->i32[1]);
+	return(out.i64);
+}
+
+uint32_t xar_swap32(uint32_t num) {
+	uint8_t *one, *two;
+	uint32_t ret;
+
+	two = (uint8_t *)&ret;
+	one = (uint8_t *)&num;
+	two[3] = one[0];
+	two[2] = one[1];
+	two[1] = one[2];
+	two[0] = one[3];
+
+	return ret;
+}
+
+/* xar_get_path
+ * Summary: returns the archive path of the file f.
+ * Caller needs to free the return value.
+ */
+char *xar_get_path(xar_file_t f) {
+	char *ret, *tmp;
+	const char *name;
+	xar_file_t i;
+
+	xar_prop_get(f, "name", &name);
+	ret = strdup(name);
+	for(i = XAR_FILE(f)->parent; i; i = XAR_FILE(i)->parent) {
+		const char *name;
+	       	xar_prop_get(i, "name", &name);
+		tmp = ret;
+		asprintf(&ret, "%s/%s", name, tmp);
+		free(tmp);
+	}
+
+	return ret;
+}
+
+/* xar_read_fd
+ * Summary: Reads from a file descriptor a certain number of bytes to a specific
+ * buffer.  This simple wrapper just handles certain retryable error situations.
+ * Returns -1 when it fails fatally; the number of bytes read otherwise.
+ */
+ssize_t xar_read_fd( int fd, void * buffer, size_t nbytes ) {
+	ssize_t rb;
+	ssize_t off = 0;
+
+	while ( off < nbytes ) {
+		rb = read(fd, buffer+off, nbytes-off);
+		if( (rb < 1 ) && (errno != EINTR) && (errno != EAGAIN) )
+			return -1;
+		off += rb;
+	}
+
+	return off;
+}
+
+/* xar_write_fd
+ * Summary: Writes from a buffer to a file descriptor.  Like xar_read_fd it
+ * also just handles certain retryable error situations.
+ * Returs -1 when it fails fatally; the number of bytes written otherwise.
+ */
+ssize_t xar_write_fd( int fd, void * buffer, size_t nbytes ) {
+	ssize_t rb;
+	ssize_t off = 0;
+
+	while ( off < nbytes ) {
+		rb = write(fd, buffer+off, nbytes-off);
+		if( (rb < 1 ) && (errno != EINTR) && (errno != EAGAIN) )
+			return -1;
+		off += rb;
+	}
+
+	return off;
+}

Deleted: branches/release_1_4/base/src/programs/xar/lib/util.h
===================================================================
--- trunk/base/src/programs/xar/lib/util.h	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/util.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2005 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of his contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 03-Apr-2005
- * DRI: Rob Braun <bbraun at opendarwin.org>
- */
-
-#ifndef _XAR_UTIL_H_
-#define _XAR_UTIL_H_
-
-#include <stdint.h>
-#include "xar.h"
-
-
-uint64_t xar_ntoh64(uint64_t num);
-uint32_t xar_swap32(uint32_t num);
-char *xar_get_path(xar_file_t f);
-ssize_t xar_read_fd(int fd, void * buffer, size_t nbytes);
-ssize_t xar_write_fd(int fd, void * buffer, size_t nbytes);
-
-#endif /* _XAR_UTIL_H_ */

Copied: branches/release_1_4/base/src/programs/xar/lib/util.h (from rev 23968, trunk/base/src/programs/xar/lib/util.h)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/util.h	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/util.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2005 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of his contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 03-Apr-2005
+ * DRI: Rob Braun <bbraun at opendarwin.org>
+ */
+
+#ifndef _XAR_UTIL_H_
+#define _XAR_UTIL_H_
+
+#include <stdint.h>
+#include "xar.h"
+
+
+uint64_t xar_ntoh64(uint64_t num);
+uint32_t xar_swap32(uint32_t num);
+char *xar_get_path(xar_file_t f);
+ssize_t xar_read_fd(int fd, void * buffer, size_t nbytes);
+ssize_t xar_write_fd(int fd, void * buffer, size_t nbytes);
+
+#endif /* _XAR_UTIL_H_ */

Deleted: branches/release_1_4/base/src/programs/xar/lib/zxar.c
===================================================================
--- trunk/base/src/programs/xar/lib/zxar.c	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/zxar.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,186 +0,0 @@
-/*
- * Copyright (c) 2005 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of his contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 03-Apr-2005
- * DRI: Rob Braun <bbraun at opendarwin.org>
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <zlib.h>
-#include "config.h"
-#ifndef HAVE_ASPRINTF
-#include "asprintf.h"
-#endif
-#include "xar.h"
-#include "filetree.h"
-#include "io.h"
-
-static int initted = 0;
-static z_stream zs;
-
-int xar_gzip_fromheap_done(xar_t x, xar_file_t f, const char *attr);
-
-int xar_gzip_fromheap_in(xar_t x, xar_file_t f, const char *attr, void **in, size_t *inlen) {
-	const char *opt;
-	void *out = NULL;
-	size_t outlen, offset = 0;
-	int r;
-	char *tmpstr;
-
-	asprintf(&tmpstr, "%s/encoding", attr);
-	opt = xar_attr_get(f, tmpstr, "style");
-	free(tmpstr);
-	if( !opt ) return 0;
-	if( strcmp(opt, "application/x-gzip") != 0 ) return 0;
-
-	if( !initted ) {
-		zs.zalloc = Z_NULL;
-		zs.zfree = Z_NULL;
-		zs.opaque = Z_NULL;
-
-		inflateInit(&zs);
-		initted = 1;
-	}
-
-	outlen = *inlen;
-
-	zs.next_in = *in;
-	zs.avail_in = *inlen;
-	zs.next_out = out;
-	zs.avail_out = 0;
-
-	while( zs.avail_in != 0 ) {
-		outlen = outlen * 2;
-		out = realloc(out, outlen);
-		if( out == NULL ) abort();
-
-		zs.next_out = out + offset;
-		zs.avail_out = outlen - offset;
-
-		r = inflate(&zs, Z_SYNC_FLUSH);
-		if( (r != Z_OK) && (r != Z_STREAM_END) ) {
-			xar_err_new(x);
-			xar_err_set_file(x, f);
-			xar_err_set_string(x, "Error decompressing file");
-			xar_err_callback(x, XAR_SEVERITY_FATAL, XAR_ERR_ARCHIVE_EXTRACTION);
-			return -1;
-		}
-		offset += outlen - offset - zs.avail_out;
-		if( (r == Z_STREAM_END) && (offset == 0) ) {
-			//r = inflate(&zs, Z_FINISH);
-			xar_gzip_fromheap_done(x, f, attr);
-			offset += outlen - offset - zs.avail_out;
-			break;
-		}
-	}
-
-	free(*in);
-	*in = out;
-	*inlen = offset;
-	return 0;
-}
-
-int xar_gzip_fromheap_done(xar_t x, xar_file_t f, const char *attr) {
-	initted = 0;
-	inflateEnd(&zs);
-	return 0;
-}
-int xar_gzip_toheap_done(xar_t x, xar_file_t f, const char *attr) {
-	const char *opt;
-	char *tmpstr;
-
-	opt = xar_opt_get(x, XAR_OPT_COMPRESSION);
-	if( !opt )
-		return 0;
-
-	if( strcmp(opt, XAR_OPT_VAL_GZIP) != 0 )
-		return 0;
-
-	initted = 0;
-	deflateEnd(&zs);
-
-	asprintf(&tmpstr, "%s/encoding", attr);
-	if( f ) {
-		xar_prop_set(f, tmpstr, NULL);
-		xar_attr_set(f, tmpstr, "style", "application/x-gzip");
-	}
-	free(tmpstr);
-
-	return 0;
-}
-
-int32_t xar_gzip_toheap_in(xar_t x, xar_file_t f, const char *attr, void **in, size_t *inlen) {
-	void *out = NULL;
-	size_t outlen, offset = 0;
-	int r;
-	const char *opt;
-
-	opt = xar_opt_get(x, XAR_OPT_COMPRESSION);
-	if( !opt )
-		return 0;
-
-	if( strcmp(opt, XAR_OPT_VAL_GZIP) != 0 )
-		return 0;
-
-	if( !initted ) {
-		memset(&zs, 0, sizeof(zs));
-		deflateInit(&zs, Z_BEST_COMPRESSION);
-		initted = 1;
-	}
-
-	outlen = *inlen/2;
-	if(outlen == 0) outlen = 1024;
-	zs.next_in = *in;
-	zs.avail_in = *inlen;
-	zs.next_out = out;
-	zs.avail_out = 0;
-
-	do {
-		outlen *= 2;
-		out = realloc(out, outlen);
-		if( out == NULL ) abort();
-
-		zs.next_out = out + offset;
-		zs.avail_out = outlen - offset;
-
-		if( *inlen == 0 )
-			r = deflate(&zs, Z_FINISH);
-		else
-			r = deflate(&zs, Z_SYNC_FLUSH);
-		offset = outlen - zs.avail_out;
-	} while( zs.avail_in != 0 );
-
-	free(*in);
-	*in = out;
-	*inlen = offset;
-	return 0;
-}

Copied: branches/release_1_4/base/src/programs/xar/lib/zxar.c (from rev 23968, trunk/base/src/programs/xar/lib/zxar.c)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/zxar.c	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/zxar.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,186 @@
+/*
+ * Copyright (c) 2005 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of his contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 03-Apr-2005
+ * DRI: Rob Braun <bbraun at opendarwin.org>
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <zlib.h>
+#include "config.h"
+#ifndef HAVE_ASPRINTF
+#include "asprintf.h"
+#endif
+#include "xar.h"
+#include "filetree.h"
+#include "io.h"
+
+static int initted = 0;
+static z_stream zs;
+
+int xar_gzip_fromheap_done(xar_t x, xar_file_t f, const char *attr);
+
+int xar_gzip_fromheap_in(xar_t x, xar_file_t f, const char *attr, void **in, size_t *inlen) {
+	const char *opt;
+	void *out = NULL;
+	size_t outlen, offset = 0;
+	int r;
+	char *tmpstr;
+
+	asprintf(&tmpstr, "%s/encoding", attr);
+	opt = xar_attr_get(f, tmpstr, "style");
+	free(tmpstr);
+	if( !opt ) return 0;
+	if( strcmp(opt, "application/x-gzip") != 0 ) return 0;
+
+	if( !initted ) {
+		zs.zalloc = Z_NULL;
+		zs.zfree = Z_NULL;
+		zs.opaque = Z_NULL;
+
+		inflateInit(&zs);
+		initted = 1;
+	}
+
+	outlen = *inlen;
+
+	zs.next_in = *in;
+	zs.avail_in = *inlen;
+	zs.next_out = out;
+	zs.avail_out = 0;
+
+	while( zs.avail_in != 0 ) {
+		outlen = outlen * 2;
+		out = realloc(out, outlen);
+		if( out == NULL ) abort();
+
+		zs.next_out = out + offset;
+		zs.avail_out = outlen - offset;
+
+		r = inflate(&zs, Z_SYNC_FLUSH);
+		if( (r != Z_OK) && (r != Z_STREAM_END) ) {
+			xar_err_new(x);
+			xar_err_set_file(x, f);
+			xar_err_set_string(x, "Error decompressing file");
+			xar_err_callback(x, XAR_SEVERITY_FATAL, XAR_ERR_ARCHIVE_EXTRACTION);
+			return -1;
+		}
+		offset += outlen - offset - zs.avail_out;
+		if( (r == Z_STREAM_END) && (offset == 0) ) {
+			//r = inflate(&zs, Z_FINISH);
+			xar_gzip_fromheap_done(x, f, attr);
+			offset += outlen - offset - zs.avail_out;
+			break;
+		}
+	}
+
+	free(*in);
+	*in = out;
+	*inlen = offset;
+	return 0;
+}
+
+int xar_gzip_fromheap_done(xar_t x, xar_file_t f, const char *attr) {
+	initted = 0;
+	inflateEnd(&zs);
+	return 0;
+}
+int xar_gzip_toheap_done(xar_t x, xar_file_t f, const char *attr) {
+	const char *opt;
+	char *tmpstr;
+
+	opt = xar_opt_get(x, XAR_OPT_COMPRESSION);
+	if( !opt )
+		return 0;
+
+	if( strcmp(opt, XAR_OPT_VAL_GZIP) != 0 )
+		return 0;
+
+	initted = 0;
+	deflateEnd(&zs);
+
+	asprintf(&tmpstr, "%s/encoding", attr);
+	if( f ) {
+		xar_prop_set(f, tmpstr, NULL);
+		xar_attr_set(f, tmpstr, "style", "application/x-gzip");
+	}
+	free(tmpstr);
+
+	return 0;
+}
+
+int32_t xar_gzip_toheap_in(xar_t x, xar_file_t f, const char *attr, void **in, size_t *inlen) {
+	void *out = NULL;
+	size_t outlen, offset = 0;
+	int r;
+	const char *opt;
+
+	opt = xar_opt_get(x, XAR_OPT_COMPRESSION);
+	if( !opt )
+		return 0;
+
+	if( strcmp(opt, XAR_OPT_VAL_GZIP) != 0 )
+		return 0;
+
+	if( !initted ) {
+		memset(&zs, 0, sizeof(zs));
+		deflateInit(&zs, Z_BEST_COMPRESSION);
+		initted = 1;
+	}
+
+	outlen = *inlen/2;
+	if(outlen == 0) outlen = 1024;
+	zs.next_in = *in;
+	zs.avail_in = *inlen;
+	zs.next_out = out;
+	zs.avail_out = 0;
+
+	do {
+		outlen *= 2;
+		out = realloc(out, outlen);
+		if( out == NULL ) abort();
+
+		zs.next_out = out + offset;
+		zs.avail_out = outlen - offset;
+
+		if( *inlen == 0 )
+			r = deflate(&zs, Z_FINISH);
+		else
+			r = deflate(&zs, Z_SYNC_FLUSH);
+		offset = outlen - zs.avail_out;
+	} while( zs.avail_in != 0 );
+
+	free(*in);
+	*in = out;
+	*inlen = offset;
+	return 0;
+}

Deleted: branches/release_1_4/base/src/programs/xar/lib/zxar.h
===================================================================
--- trunk/base/src/programs/xar/lib/zxar.h	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/lib/zxar.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2005 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of his contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 03-Apr-2005
- * DRI: Rob Braun <bbraun at opendarwin.org>
- */
-
-#ifndef _XAR_ZLIB_H_
-#define _XAR_ZLIB_H_
-
-int xar_gzip_fromheap_in(xar_t x, xar_file_t f, const char *, void **in, size_t *inlen);
-int xar_gzip_fromheap_done(xar_t x, xar_file_t f, const char *);
-
-int32_t xar_gzip_toheap_in(xar_t x, xar_file_t f, const char *, void **in, size_t *inlen);
-int xar_gzip_toheap_done(xar_t x, xar_file_t f, const char *);
-
-#endif /* _XAR_ZLIB_H_ */

Copied: branches/release_1_4/base/src/programs/xar/lib/zxar.h (from rev 23968, trunk/base/src/programs/xar/lib/zxar.h)
===================================================================
--- branches/release_1_4/base/src/programs/xar/lib/zxar.h	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/lib/zxar.h	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2005 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of his contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 03-Apr-2005
+ * DRI: Rob Braun <bbraun at opendarwin.org>
+ */
+
+#ifndef _XAR_ZLIB_H_
+#define _XAR_ZLIB_H_
+
+int xar_gzip_fromheap_in(xar_t x, xar_file_t f, const char *, void **in, size_t *inlen);
+int xar_gzip_fromheap_done(xar_t x, xar_file_t f, const char *);
+
+int32_t xar_gzip_toheap_in(xar_t x, xar_file_t f, const char *, void **in, size_t *inlen);
+int xar_gzip_toheap_done(xar_t x, xar_file_t f, const char *);
+
+#endif /* _XAR_ZLIB_H_ */

Copied: branches/release_1_4/base/src/programs/xar/src (from rev 23968, trunk/base/src/programs/xar/src)

Deleted: branches/release_1_4/base/src/programs/xar/src/Makefile.inc.in
===================================================================
--- trunk/base/src/programs/xar/src/Makefile.inc.in	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/src/Makefile.inc.in	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,50 +0,0 @@
-#
-# Include generated dependency files.
-#
-XAR_SRCS := xar.c
-XAR_SRCS := $(patsubst %, @srcroot at src/%, $(XAR_SRCS))
--include $(XAR_SRCS:@srcroot@%.c=@objroot@%.d)
-
-src_all : @objroot at src/xar @objroot at src/ixar
-
-src_install : @objroot at src/ixar
-	@INSTALL@ -d $(DESTDIR)$(BINDIR)
-	@INSTALL@ -m 0755 $< $(DESTDIR)$(BINDIR)/xar
-	@INSTALL@ -d $(DESTDIR)$(MANDIR)/man1
-	@INSTALL@ -m 0444 @srcroot at src/xar.1 $(DESTDIR)$(MANDIR)/man1
-
-src_uninstall :
-	rm -f $(DESTDIR)/$(BINDIR)/xar
-	rm -f $(DESTDIR)/$(MANDIR)/man1/xar.1
-
-src_clean :
-	rm -f @objroot at src/xar
-	rm -f @objroot at src/ixar
-	rm -f $(XAR_SRCS:@srcroot@%.c=@objroot@%.o)
-	rm -f $(XAR_SRCS:@srcroot@%.c=@objroot@%.d)
-
-src_distclean :
-
-# xar links against librxar, so that it can be run without first installing
-# libxar.
- at objroot@src/% : @objroot at src/%.o $(LIBRXAR_S)
-	@mkdir -p $(@D)
-ifneq ($(words "" @RPATH@), 1)
-	$(CC) $(CFLAGS) -o $@ $< @RPATH@@abs_objroot at lib $(LDFLAGS) -lrxar @LIBS@
-else
-	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) -lrxar @LIBS@
-endif
-
-# ixar is the version of the xar binary that gets installed.
- at objroot@src/i% : @objroot at src/%.o $(LIBXAR_S)
-	@mkdir -p $(@D)
-ifneq ($(words "" @RPATH@), 1)
-	$(CC) $(CFLAGS) -o $@ $< @RPATH@$(LIBDIR) $(LDFLAGS) -lxar @LIBS@
-else
-	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) -lxar @LIBS@
-endif
-
- at objroot@src/%.o : @srcroot at src/%.c
-	@mkdir -p $(@D)
-	$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
-	@$(SHELL) -ec "$(CC) -MM $(CPPFLAGS) $< | sed \"s/\($(subst /,\/,$(notdir $(basename $@)))\)\.o\([ :]*\)/$(subst /,\/,$(strip $(dir $@)))\1.o \2/g\" > $(@:%.o=%.d)"

Copied: branches/release_1_4/base/src/programs/xar/src/Makefile.inc.in (from rev 23968, trunk/base/src/programs/xar/src/Makefile.inc.in)
===================================================================
--- branches/release_1_4/base/src/programs/xar/src/Makefile.inc.in	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/src/Makefile.inc.in	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,50 @@
+#
+# Include generated dependency files.
+#
+XAR_SRCS := xar.c
+XAR_SRCS := $(patsubst %, @srcroot at src/%, $(XAR_SRCS))
+-include $(XAR_SRCS:@srcroot@%.c=@objroot@%.d)
+
+src_all : @objroot at src/xar @objroot at src/ixar
+
+src_install : @objroot at src/ixar
+	@INSTALL@ -d $(DESTDIR)$(BINDIR)
+	@INSTALL@ -m 0755 $< $(DESTDIR)$(BINDIR)/xar
+	@INSTALL@ -d $(DESTDIR)$(MANDIR)/man1
+	@INSTALL@ -m 0444 @srcroot at src/xar.1 $(DESTDIR)$(MANDIR)/man1
+
+src_uninstall :
+	rm -f $(DESTDIR)/$(BINDIR)/xar
+	rm -f $(DESTDIR)/$(MANDIR)/man1/xar.1
+
+src_clean :
+	rm -f @objroot at src/xar
+	rm -f @objroot at src/ixar
+	rm -f $(XAR_SRCS:@srcroot@%.c=@objroot@%.o)
+	rm -f $(XAR_SRCS:@srcroot@%.c=@objroot@%.d)
+
+src_distclean :
+
+# xar links against librxar, so that it can be run without first installing
+# libxar.
+ at objroot@src/% : @objroot at src/%.o $(LIBRXAR_S)
+	@mkdir -p $(@D)
+ifneq ($(words "" @RPATH@), 1)
+	$(CC) $(CFLAGS) -o $@ $< @RPATH@@abs_objroot at lib $(LDFLAGS) -lrxar @LIBS@
+else
+	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) -lrxar @LIBS@
+endif
+
+# ixar is the version of the xar binary that gets installed.
+ at objroot@src/i% : @objroot at src/%.o $(LIBXAR_S)
+	@mkdir -p $(@D)
+ifneq ($(words "" @RPATH@), 1)
+	$(CC) $(CFLAGS) -o $@ $< @RPATH@$(LIBDIR) $(LDFLAGS) -lxar @LIBS@
+else
+	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) -lxar @LIBS@
+endif
+
+ at objroot@src/%.o : @srcroot at src/%.c
+	@mkdir -p $(@D)
+	$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+	@$(SHELL) -ec "$(CC) -MM $(CPPFLAGS) $< | sed \"s/\($(subst /,\/,$(notdir $(basename $@)))\)\.o\([ :]*\)/$(subst /,\/,$(strip $(dir $@)))\1.o \2/g\" > $(@:%.o=%.d)"

Deleted: branches/release_1_4/base/src/programs/xar/src/xar.1
===================================================================
--- trunk/base/src/programs/xar/src/xar.1	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/src/xar.1	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,107 +0,0 @@
-.TH XAR "1" "August 22, 2005" "version 1.4" "User Commands"
-.SH NAME
-xar \- eXtensible ARchiver
-.SH SYNOPSIS
-.B xar
-\-[\fIctx\fR][\fIv\fR] ...
-.SH DESCRIPTION
-The XAR project aims to provide an easily extensible archive format. Important
-design decisions include an easily extensible XML table of contents (TOC) for
-random access to archived files, storing the TOC at the beginning of the
-archive to allow for efficient handling of streamed archives, the ability to
-handle files of arbitrarily large sizes, the ability to choose independent
-encodings for individual files in the archive, the ability to store checksums
-for individual files in both compressed and uncompressed form, and the ability
-to query the table of content's rich meta-data.
-.SH FUNCTIONS
-.TP
-.B One of the following options must be used:
-.TP
-\-c
-Creates an archive
-.TP
-\-t
-Lists the contents of an archive
-.TP
-\-x
-Extracts an archive
-.TP
-.B NOTE: all of the above require the use of the -f option (filename) as this release of xar doesn't correctly handle pipes or sockets.
-.TP
-\-f
-The filename to use for creation, listing or extraction
-.SH OPTIONS
-.TP
-\-\-compression
-Specifies the compression type to use.
-Valid values: none, gzip, bzip2.  Default value: gzip
-.TP
-\-\-dump\-toc=<filename>
-Has xar dump the xml header into the specified file.  "-" can be specified to mean stdout.
-.TP
-\-\-dump\-header
-Has xar print out the xar binary header information to stdout.
-.TP
-\-\-list\-subdocs
-List the subdocuments in the xml header
-.TP
-\-\-toc\-cksum
-Specifies the hashing algorithm to use for xml header verification.
-Valid values: none, sha1, and md5.  Default value: sha1
-.TP
-\-l
-On archival, stay on the local device.
-.TP
-\-P
-On extract, set ownership based on uid/gid.
-.TP
-\-p
-On extract, set ownership based on symbolic names, if possible.
-.TP
-\-s <filename>
-On extract, specifies the file to extract subdocuments to.
-On archival, specifies an xml file to add as a subdocument.
-.TP
-\-v
-Verbose output
-.TP
-\-\-exclude
-Specifies a POSIX regular expression of files to exclude from adding to
-the archive during creation or from being extracted during extraction.  
-This option can be specified multiple times.
-.TP
-\-\-rsize
-Specifies a size (in bytes) for the internal libxar read buffer while performing I/O.
-.TP
-\-\-coalesce-heap
-When multiple files in the archive are identical, only store one copy of the data in the heap.  This creates smaller archives, but the archives created are not streamable.
-.TP
-\-\-link-same
-When the data section of multiple files are identical, hardlink them within the archive.
-.TP
-\-\-no-compress
-Specifies a POSIX regular expression of files to archive, but not compress.  The archived files will be copied raw into the archive.  This can be used to exclude already gzipped files from being gzipped during the archival process.
-.SH EXAMPLES
-.TP
-xar -cf sample.xar /home/uid
-Create a xar archive of all files in /home/uid
-.TP
-xar -tf sample.xar
-List the contents of the xar archive sample.xar
-.TP
-xar -xf sample.xar
-Extract the contents of sample.xar to the current working directory
-.SH BUGS
-.TP
-Doesn't currently work with pipes or streams.  Might be fixed in a future release.
-.TP
-Probably one or two more somewhere in there. If you find one please report it to http://bugzilla.opendarwin.org/
-.SH AUTHORS
-Rob Braun <bbraun AT opendarwin DOT org>
-.br
-Landon Fuller <landonf AT opendarwin DOT org>
-.br
-David Leimbach <leimy AT opendarwin DOT org>
-.br
-Kevin Van Vechten <kevin AT opendarwin DOT org>
-

Copied: branches/release_1_4/base/src/programs/xar/src/xar.1 (from rev 23968, trunk/base/src/programs/xar/src/xar.1)
===================================================================
--- branches/release_1_4/base/src/programs/xar/src/xar.1	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/src/xar.1	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,107 @@
+.TH XAR "1" "August 22, 2005" "version 1.4" "User Commands"
+.SH NAME
+xar \- eXtensible ARchiver
+.SH SYNOPSIS
+.B xar
+\-[\fIctx\fR][\fIv\fR] ...
+.SH DESCRIPTION
+The XAR project aims to provide an easily extensible archive format. Important
+design decisions include an easily extensible XML table of contents (TOC) for
+random access to archived files, storing the TOC at the beginning of the
+archive to allow for efficient handling of streamed archives, the ability to
+handle files of arbitrarily large sizes, the ability to choose independent
+encodings for individual files in the archive, the ability to store checksums
+for individual files in both compressed and uncompressed form, and the ability
+to query the table of content's rich meta-data.
+.SH FUNCTIONS
+.TP
+.B One of the following options must be used:
+.TP
+\-c
+Creates an archive
+.TP
+\-t
+Lists the contents of an archive
+.TP
+\-x
+Extracts an archive
+.TP
+.B NOTE: all of the above require the use of the -f option (filename) as this release of xar doesn't correctly handle pipes or sockets.
+.TP
+\-f
+The filename to use for creation, listing or extraction
+.SH OPTIONS
+.TP
+\-\-compression
+Specifies the compression type to use.
+Valid values: none, gzip, bzip2.  Default value: gzip
+.TP
+\-\-dump\-toc=<filename>
+Has xar dump the xml header into the specified file.  "-" can be specified to mean stdout.
+.TP
+\-\-dump\-header
+Has xar print out the xar binary header information to stdout.
+.TP
+\-\-list\-subdocs
+List the subdocuments in the xml header
+.TP
+\-\-toc\-cksum
+Specifies the hashing algorithm to use for xml header verification.
+Valid values: none, sha1, and md5.  Default value: sha1
+.TP
+\-l
+On archival, stay on the local device.
+.TP
+\-P
+On extract, set ownership based on uid/gid.
+.TP
+\-p
+On extract, set ownership based on symbolic names, if possible.
+.TP
+\-s <filename>
+On extract, specifies the file to extract subdocuments to.
+On archival, specifies an xml file to add as a subdocument.
+.TP
+\-v
+Verbose output
+.TP
+\-\-exclude
+Specifies a POSIX regular expression of files to exclude from adding to
+the archive during creation or from being extracted during extraction.  
+This option can be specified multiple times.
+.TP
+\-\-rsize
+Specifies a size (in bytes) for the internal libxar read buffer while performing I/O.
+.TP
+\-\-coalesce-heap
+When multiple files in the archive are identical, only store one copy of the data in the heap.  This creates smaller archives, but the archives created are not streamable.
+.TP
+\-\-link-same
+When the data section of multiple files are identical, hardlink them within the archive.
+.TP
+\-\-no-compress
+Specifies a POSIX regular expression of files to archive, but not compress.  The archived files will be copied raw into the archive.  This can be used to exclude already gzipped files from being gzipped during the archival process.
+.SH EXAMPLES
+.TP
+xar -cf sample.xar /home/uid
+Create a xar archive of all files in /home/uid
+.TP
+xar -tf sample.xar
+List the contents of the xar archive sample.xar
+.TP
+xar -xf sample.xar
+Extract the contents of sample.xar to the current working directory
+.SH BUGS
+.TP
+Doesn't currently work with pipes or streams.  Might be fixed in a future release.
+.TP
+Probably one or two more somewhere in there. If you find one please report it to http://bugzilla.opendarwin.org/
+.SH AUTHORS
+Rob Braun <bbraun AT opendarwin DOT org>
+.br
+Landon Fuller <landonf AT opendarwin DOT org>
+.br
+David Leimbach <leimy AT opendarwin DOT org>
+.br
+Kevin Van Vechten <kevin AT opendarwin DOT org>
+

Deleted: branches/release_1_4/base/src/programs/xar/src/xar.c
===================================================================
--- trunk/base/src/programs/xar/src/xar.c	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/src/xar.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,781 +0,0 @@
-/*
- * Copyright (c) 2005 Rob Braun
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Rob Braun nor the names of his contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * 03-Apr-2005
- * DRI: Rob Braun <bbraun at opendarwin.org>
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fts.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <inttypes.h>
-#include <netinet/in.h>
-#include <libxml/xmlreader.h>
-#include <libxml/xmlwriter.h>
-#include <libxml/xmlstring.h>
-#include <limits.h>
-#include <getopt.h>
-#include <regex.h>
-#include <errno.h>
-#include "xar.h"
-#include "config.h"
-
-#define SYMBOLIC 1
-#define NUMERIC  2
-static int Perms = 0;
-static int Local = 0;
-static char *Subdoc = NULL;
-static char *SubdocName = NULL;
-static char *Toccksum = NULL;
-static char *Compression = NULL;
-static char *Rsize = NULL;
-
-static int Err = 0;
-static int Verbose = 0;
-static int Coalesce = 0;
-static int LinkSame = 0;
-
-struct lnode {
-	char *str;
-	regex_t reg;
-	struct lnode *next;
-};
-
-struct lnode *Exclude = NULL;
-struct lnode *Exclude_Tail = NULL;
-struct lnode *NoCompress = NULL;
-struct lnode *NoCompress_Tail = NULL;
-
-static int32_t err_callback(int32_t sev, int32_t err, xar_errctx_t ctx, void *usrctx);
-
-static void print_file(xar_file_t f) {
-	if( Verbose ) {
-		char *path = xar_get_path(f);
-		printf("%s\n", path);
-		free(path);
-	}
-}
-
-static void add_subdoc(xar_t x) {
-	xar_subdoc_t s;
-	int fd;
-	unsigned char *buf;
-	unsigned int len;
-	struct stat sb;
-
-	if( SubdocName == NULL ) SubdocName = "subdoc";
-	s = xar_subdoc_new(x, (const char *)SubdocName);
-
-	fd = open(Subdoc, O_RDONLY);
-	if( fd < 0 )
-		return;
-	fstat(fd, &sb);
-	len = sb.st_size;
-	buf = malloc(len+1);
-	if( buf == NULL ) {
-		close(fd);
-		return;
-	}
-	memset(buf, 0, len+1);
-	read(fd, buf, len);
-	close(fd);
-
-	xar_subdoc_copyin(s, buf, len);
-
-
-	return;
-}
-
-static void extract_subdoc(xar_t x, const char *name) {
-	xar_subdoc_t i;
-
-	for( i = xar_subdoc_first(x); i; i = xar_subdoc_next(i) ) {
-		const char *sname = xar_subdoc_name(i);
-		unsigned char *sdoc;
-		int fd, size;
-		if( name && strcmp(name, sname) != 0 )
-			continue;
-		xar_subdoc_copyout(i, &sdoc, (unsigned int *)&size);
-		fd = open(Subdoc, O_WRONLY|O_CREAT|O_TRUNC, 0644);
-		if( fd < 0 ) return;
-		write(fd, sdoc, size);
-		close(fd);
-		free(sdoc);
-	}
-
-	return;
-}
-
-static int archive(const char *filename, int arglen, char *args[]) {
-	xar_t x;
-	FTS *fts;
-	FTSENT *ent;
-	int flags;
-	struct lnode *i;
-	const char *default_compression;
-
-	x = xar_open(filename, WRITE);
-	if( !x ) {
-		fprintf(stderr, "Error creating archive %s\n", filename);
-		exit(1);
-	}
-
-	if( Toccksum )
-		xar_opt_set(x, XAR_OPT_TOCCKSUM, Toccksum);
-
-	if( Compression )
-		xar_opt_set(x, XAR_OPT_COMPRESSION, Compression);
-
-	if( Coalesce )
-		xar_opt_set(x, XAR_OPT_COALESCE, "true");
-
-	if( LinkSame )
-		xar_opt_set(x, XAR_OPT_LINKSAME, "true");
-
-	if ( Rsize != NULL )
-		xar_opt_set(x, XAR_OPT_RSIZE, Rsize);
-
-	xar_register_errhandler(x, err_callback, NULL);
-
-	if( Subdoc )
-		add_subdoc(x);
-
-	if( Perms == SYMBOLIC ) {
-		xar_opt_set(x, XAR_OPT_OWNERSHIP, XAR_OPT_VAL_SYMBOLIC);
-	}
-	if( Perms == NUMERIC ) {
-		xar_opt_set(x, XAR_OPT_OWNERSHIP, XAR_OPT_VAL_NUMERIC);
-	}
-
-	default_compression = strdup(xar_opt_get(x, XAR_OPT_COMPRESSION));
-	if( !default_compression )
-		default_compression = strdup(XAR_OPT_VAL_GZIP);
-
-	flags = FTS_PHYSICAL|FTS_NOSTAT|FTS_NOCHDIR;
-	if( Local )
-		flags |= FTS_XDEV;
-	fts = fts_open(args, flags, NULL);
-	if( !fts ) {
-		fprintf(stderr, "Error traversing file tree\n");
-		exit(1);
-	}
-
-	while( (ent = fts_read(fts)) ) {
-		xar_file_t f;
-		int exclude_match = 1;
-		int nocompress_match = 1;
-		if( ent->fts_info == FTS_DP )
-			continue;
-
-		if( strcmp(ent->fts_path, "/") == 0 )
-			continue;
-		if( strcmp(ent->fts_path, ".") == 0 )
-			continue;
-		
-		for( i = Exclude; i; i=i->next ) {
-			exclude_match = regexec(&i->reg, ent->fts_path, 0, NULL, 0);
-			if( !exclude_match )
-				break;
-		}
-		if( !exclude_match ) {
-			if( Verbose )
-				printf("Excluding %s\n", ent->fts_path);
-			continue;
-		}
-
-		for( i = NoCompress; i; i=i->next ) {
-			nocompress_match = regexec(&i->reg, ent->fts_path, 0, NULL, 0);
-			if( !nocompress_match ) {
-				xar_opt_set(x, XAR_OPT_COMPRESSION, XAR_OPT_VAL_NONE);
-				break;
-			}
-		}
-		f = xar_add(x, ent->fts_path);
-		if( !f ) {
-			fprintf(stderr, "Error adding file %s\n", ent->fts_path);
-		} else {
-			print_file(f);
-		}
-		if( !nocompress_match )
-			xar_opt_set(x, XAR_OPT_COMPRESSION, default_compression);
-	}
-	fts_close(fts);
-	if( xar_close(x) != 0 ) {
-		fprintf(stderr, "Error creating the archive\n");
-		if( !Err )
-			Err = 42;
-	}
-
-	free((char *)default_compression);
-	for( i = Exclude; i; ) {
-		struct lnode *tmp;
-		regfree(&i->reg);
-		tmp = i;
-		i = i->next;
-		free(tmp);
-	}
-	for( i = NoCompress; i; ) {
-		struct lnode *tmp;
-		regfree(&i->reg);
-		tmp = i;
-		i = i->next;
-		free(tmp);
-	}
-
-	return Err;
-}
-
-static int extract(const char *filename, int arglen, char *args[]) {
-	xar_t x;
-	xar_iter_t i;
-	xar_file_t f;
-	int files_extracted = 0;
-
-	x = xar_open(filename, READ);
-	if( !x ) {
-		fprintf(stderr, "Error opening xar archive: %s\n", filename);
-		exit(1);
-	}
-
-	xar_register_errhandler(x, err_callback, NULL);
-
-	if( Perms == SYMBOLIC ) {
-		xar_opt_set(x, XAR_OPT_OWNERSHIP, XAR_OPT_VAL_SYMBOLIC);
-	}
-	if( Perms == NUMERIC ) {
-		xar_opt_set(x, XAR_OPT_OWNERSHIP, XAR_OPT_VAL_NUMERIC);
-	}
-	if ( Rsize != NULL ) {
-		xar_opt_set(x, XAR_OPT_RSIZE, Rsize);
-	}
-	
-	i = xar_iter_new();
-	if( !i ) {
-		fprintf(stderr, "Error creating xar iterator\n");
-		exit(1);
-	}
-
-	for(f = xar_file_first(x, i); f; f = xar_file_next(i)) {
-		int matched = 0;
-		int exclude_match = 1;
-		struct lnode *i;
-
-		char *path = xar_get_path(f);
-
-		if( args[0] ) {
-			int i;
-			for(i = 0; args[i]; i++) {
-				if( strcmp(path, args[i]) == 0 ) {
-					matched = 1;
-					break;
-				}
-			}
-		} else {
-			matched = 1;
-		}
-
-		for( i = Exclude; i; i=i->next ) {
-			exclude_match = regexec(&i->reg, path, 0, NULL, 0);
-			if( !exclude_match )
-				break;
-		}
-		if( !exclude_match ) {
-			if( Verbose )
-				printf("Excluding %s\n", path);
-			free(path);
-			continue;
-		}
-		
-		if( matched ) {
-			files_extracted++;
-			print_file(f);
-			xar_extract(x, f);
-		}
-		free(path);
-	}
-	if( args[0] && (files_extracted == 0) ) {
-		fprintf(stderr, "No files matched extraction criteria.\n");
-		Err = 3;
-	}
-
-	if( Subdoc )
-		extract_subdoc(x, NULL);
-
-	xar_iter_free(i);
-	if( xar_close(x) != 0 ) {
-		fprintf(stderr, "Error extracting the archive\n");
-		if( !Err )
-			Err = 42;
-	}
-	return Err;
-}
-
-static int list_subdocs(const char *filename) {
-	xar_t x;
-	xar_subdoc_t s;
-
-	x = xar_open(filename, READ);
-	if( !x ) {
-		fprintf(stderr, "Error opening xar archive: %s\n", filename);
-		exit(1);
-	}
-
-	for(s = xar_subdoc_first(x); s; s = xar_subdoc_next(s)) {
-		printf("%s\n", xar_subdoc_name(s));
-	}
-	xar_close(x);
-
-	return Err;
-}
-
-static int list(const char *filename, int arglen, char *args[]) {
-	xar_t x;
-	xar_iter_t i;
-	xar_file_t f;
-
-	x = xar_open(filename, READ);
-	if( !x ) {
-		fprintf(stderr, "Error opening xar archive: %s\n", filename);
-		exit(1);
-	}
-
-	i = xar_iter_new();
-	if( !i ) {
-		fprintf(stderr, "Error creating xar iterator\n");
-		exit(1);
-	}
-
-	for(f = xar_file_first(x, i); f; f = xar_file_next(i)) {
-		print_file(f);
-	}
-
-	xar_iter_free(i);
-	xar_close(x);
-
-	return Err;
-}
-
-static int dumptoc(const char *filename, const char* tocfile) {
-	xar_t x;
-	x = xar_open(filename, READ);
-	if( !x ) {
-		fprintf(stderr, "Error opening xar archive: %s\n", filename);
-		exit(1);
-	}
-
-	xar_serialize(x, tocfile);
-	xar_close(x);
-	return Err;
-}
-
-static int dump_header(const char *filename) {
-	int fd;
-	xar_header_t xh;
-
-	if(filename == NULL)
-		fd = 0;
-	else {
-		fd = open(filename, O_RDONLY);
-		if( fd < 0 ) {
-			perror("open");
-			exit(1);
-		}
-	}
-
-	if( read(fd, &xh, sizeof(xh)) < sizeof(xh) ) {
-		fprintf(stderr, "error reading header\n");
-		exit(1);
-	}
-
-	printf("magic:                  0x%x ", ntohl(xh.magic));
-	if( ntohl(xh.magic) != XAR_HEADER_MAGIC )
-		printf("(BAD)\n");
-	else
-		printf("(OK)\n");
-	printf("size:                   %d\n", ntohs(xh.size));
-	printf("version:                %d\n", ntohs(xh.version));
-	printf("Compressed TOC length:  %" PRId64 "\n", xar_ntoh64(xh.toc_length_compressed));
-	printf("Uncompressed TOC length: %" PRId64 "\n", xar_ntoh64(xh.toc_length_uncompressed));
-	printf("Checksum algorithm:     %d ", ntohl(xh.cksum_alg));
-	switch( ntohl(xh.cksum_alg) ) {
-	case XAR_CKSUM_NONE: printf("(none)\n");
-	                     break;
-	case XAR_CKSUM_SHA1: printf("(SHA1)\n");
-	                     break;
-	case XAR_CKSUM_MD5: printf("(MD5)\n");
-	                    break;
-	default: printf("(unknown)\n");
-	         break;
-	};
-
-	return 0;
-}
-
-static int32_t err_callback(int32_t sev, int32_t err, xar_errctx_t ctx, void *usrctx) {
-	xar_file_t f;
-	const char *str;
-	int e;
-
-	f = xar_err_get_file(ctx);
-	str = xar_err_get_string(ctx);
-	e = xar_err_get_errno(ctx);
-
-	switch(sev) {
-	case XAR_SEVERITY_DEBUG:
-	case XAR_SEVERITY_INFO:
-		break;
-	case XAR_SEVERITY_WARNING:
-		printf("%s\n", str);
-		break;
-	case XAR_SEVERITY_NORMAL:
-		if( (err = XAR_ERR_ARCHIVE_CREATION) && f )
-    			print_file(f);
-		break;
-	case XAR_SEVERITY_NONFATAL:
-	case XAR_SEVERITY_FATAL:
-		Err = 2;
-		printf("Error while ");
-		if( err == XAR_ERR_ARCHIVE_CREATION ) printf("creating");
-		if( err == XAR_ERR_ARCHIVE_EXTRACTION ) printf("extracting");
-		printf(" archive");
-		if( f ) {
-			const char *file = xar_get_path(f);
-			if( file ) printf(":(%s)", file);
-			free((char *)file);
-		}
-		if( str ) printf(": %s", str);
-		if( err ) printf(" (%s)", strerror(e));
-		if( sev == XAR_SEVERITY_NONFATAL ) {
-			printf(" - ignored");
-			printf("\n");
-		} else {
-			printf("\n");
-			exit(1);
-		}
-		break;
-	}
-	return 0;
-}
-
-static void usage(const char *prog) {
-	fprintf(stderr, "Usage: %s -[ctx][v] -f <archive> ...\n", prog);
-	fprintf(stderr, "\t-c               Creates an archive\n");
-	fprintf(stderr, "\t-x               Extracts an archive\n");
-	fprintf(stderr, "\t-t               Lists an archive\n");
-	fprintf(stderr, "\t-f <filename>    Specifies an archive to operate on [REQUIRED!]\n");
-	fprintf(stderr, "\t-v               Print filenames as they are archived\n");
-	fprintf(stderr, "\t-n name          Provides a name for a subdocument\n");
-	fprintf(stderr, "\t-s <filename>    On extract, specifies the file to extract\n");
-	fprintf(stderr, "\t                      subdocuments to.\n");
-	fprintf(stderr, "\t                 On archival, specifies an xml file to add\n");
-	fprintf(stderr, "\t                      as a subdocument.\n");
-	fprintf(stderr, "\t-l               On archival, stay on the local device.\n");
-	fprintf(stderr, "\t-p               On extract, set ownership based on symbolic\n");
-	fprintf(stderr, "\t                      names, if possible.\n");
-	fprintf(stderr, "\t-P               On extract, set ownership based on uid/gid.\n");
-	fprintf(stderr, "\t--toc-cksum      Specifies the hashing algorithm to use for\n");
-	fprintf(stderr, "\t                      xml header verification.\n");
-	fprintf(stderr, "\t                      Valid values: none, sha1, and md5\n");
-	fprintf(stderr, "\t                      Default: sha1\n");
-	fprintf(stderr, "\t--dump-toc=<filename> Has xar dump the xml header into the\n");
-	fprintf(stderr, "\t                      specified file.\n");
-	fprintf(stderr, "\t--dump-header    Prints out the xar binary header information\n");
-	fprintf(stderr, "\t--compression    Specifies the compression type to use.\n");
-	fprintf(stderr, "\t                      Valid values: none, gzip, bzip2\n");
-	fprintf(stderr, "\t                      Default: gzip\n");
-	fprintf(stderr, "\t--list-subdocs   List the subdocuments in the xml header\n");
-	fprintf(stderr, "\t--extract-subdoc=name Extracts the specified subdocument\n");
-	fprintf(stderr, "\t                      to a document in cwd named <name>.xml\n");
-	fprintf(stderr, "\t--exclude        POSIX regular expression of files to \n");
-	fprintf(stderr, "\t                      ignore while archiving.\n");
-	fprintf(stderr, "\t--rsize          Specifies the size of the buffer used\n");
-	fprintf(stderr, "\t                      for read IO operations in bytes.\n");
-	fprintf(stderr, "\t--coalesce-heap  When archived files are identical, only store one copy\n");
-	fprintf(stderr, "\t                      This option creates an archive which\n");
-	fprintf(stderr, "\t                      is not streamable\n");
-	fprintf(stderr, "\t--link-same      Hardlink identical files\n");
-	fprintf(stderr, "\t--no-compress    POSIX regular expression of files\n");
-	fprintf(stderr, "\t                      not to archive, but not compress.\n");
-	fprintf(stderr, "\t--version        Print xar's version number\n");
-
-	return;
-}
-
-static void print_version() {
-	printf("xar %s\n", XAR_VERSION);
-}
-
-int main(int argc, char *argv[]) {
-	char *filename = NULL;
-	char command = 0, c;
-	char **args;
-	const char *tocfile = NULL;
-	int arglen, i, err;
-	xar_t x;
-	int loptind = 0;
-	int required_dash_f = 0;  /* This release requires us to use -f */
-	struct lnode *tmp;
-	long int longtmp;
-	struct option o[] = { 
-		{"toc-cksum", 1, 0, 1},
-		{"dump-toc", 1, 0, 'd'},
-		{"compression", 1, 0, 2},
-		{"list-subdocs", 0, 0, 3},
-		{"help", 0, 0, 'h'},
-		{"version", 0, 0, 4},
-		{"dump-header", 0, 0, 5},
-		{"extract-subdoc", 1, 0, 6},
-		{"exclude", 1, 0, 7},
-		{"rsize", 1, 0, 8},
-		{"coalesce-heap", 0, 0, 9},
-		{"link-same", 0, 0, 10},
-		{"no-compress", 1, 0, 11},
-		{ 0, 0, 0, 0}
-	};
-
-	if( argc < 2 ) {
-		usage(argv[0]);
-		exit(1);
-	}
-
-	while( (c = getopt_long(argc, argv, "xcvtf:hpPln:s:d:v", o, &loptind)) != -1 ) {
-		switch(c) {
-		case  1 : if( !optarg ) {
-		          	usage(argv[0]);
-		          	exit(1);
-		          }
-		          if( (strcmp(optarg, XAR_OPT_VAL_NONE) != 0) &&
-		              (strcmp(optarg, XAR_OPT_VAL_SHA1) != 0) &&
-		              (strcmp(optarg, XAR_OPT_VAL_MD5)  != 0) ) {
-		          	usage(argv[0]);
-		          	exit(1);
-		          }
-		          Toccksum = optarg;
-		
-		          break;
-		case  2 : if( !optarg ) {
-		          	usage(argv[0]);
-		          	exit(1);
-		          }
-		          if( (strcmp(optarg, XAR_OPT_VAL_NONE) != 0) &&
-		              (strcmp(optarg, XAR_OPT_VAL_GZIP) != 0) &&
-		              (strcmp(optarg, XAR_OPT_VAL_BZIP) != 0) ) {
-		          	usage(argv[0]);
-		          	exit(1);
-		          }
-		          Compression = optarg;
-		          break;
-		case  3 : if( command && (command != 3) ) {
-		          	fprintf(stderr, "Conflicting commands specified\n");
-				exit(1);
-		          }
-			  command = 3;
-			  break;
-		case  4 : print_version();
-		          exit(0);
-		case 'd':
-			if( !optarg ) {
-				usage(argv[0]);
-				exit(1);
-			}
-			tocfile = optarg;
-			command = 'd';
-			break;
-		case  5 : command = 5;
-		          break;
-		case  6 :
-			SubdocName = optarg;
-			asprintf(&Subdoc, "%s.xml", SubdocName);
-			if( !command )
-				command = 6;
-			break;
-		case  7 :
-			tmp = malloc(sizeof(struct lnode));
-			tmp->str = optarg;
-			tmp->next = NULL;
-			err = regcomp(&tmp->reg, tmp->str, REG_NOSUB);
-			if( err ) {
-				char errstr[1024];
-				regerror(err, &tmp->reg, errstr, sizeof(errstr));
-				printf("Error with regular expression %s: %s\n", tmp->str, errstr);
-				exit(1);
-			}
-			if( Exclude == NULL ) {
-				Exclude = tmp;
-				Exclude_Tail = tmp;
-			} else {
-				Exclude_Tail->next = tmp;
-				Exclude_Tail = tmp;
-			}
-			break;
-		case  8 :
-			if ( !optarg ) {
-				usage(argv[0]);
-				exit(1);
-			}
-			longtmp = strtol(optarg, NULL, 10);
-			if( (((longtmp == LONG_MIN) || (longtmp == LONG_MAX)) && (errno == ERANGE)) || (longtmp < 1) ) {
-				fprintf(stderr, "Invalid rsize value: %s\n", optarg);
-				exit(5);
-			}
-			Rsize = optarg;
-			break;
-		case  9 : Coalesce = 1; break;
-		case 10 : LinkSame = 1; break;
-		case 11 :
-			tmp = malloc(sizeof(struct lnode));
-			tmp->str = optarg;
-			tmp->next = NULL;
-			err = regcomp(&tmp->reg, tmp->str, REG_NOSUB);
-			if( err ) {
-				char errstr[1024];
-				regerror(err, &tmp->reg, errstr, sizeof(errstr));
-				printf("Error with regular expression %s: %s\n", tmp->str, errstr);
-				exit(1);
-			}
-			if( NoCompress == NULL ) {
-				NoCompress = tmp;
-				NoCompress_Tail = tmp;
-			} else {
-				NoCompress_Tail->next = tmp;
-				NoCompress_Tail = tmp;
-			}
-			break;
-		case 'c':
-		case 'x':
-		case 't':
-			if( command && (command != 's') ) {
-				usage(argv[0]);
-				fprintf(stderr, "Conflicting command flags: %c and %c specified\n", c, command);
-				exit(1);
-			}
-			if( c == 't' )
-				Verbose++;
-			command = c;
-			break;
-		case 'f':
-		        required_dash_f = 1;
-			filename = optarg;
-			break;
-		case 'p':
-			Perms = SYMBOLIC;
-			break;
-		case 'P':
-			Perms = NUMERIC;
-			break;
-		case 'l':
-			Local = 1;
-			break;
-		case 'n':
-			SubdocName = optarg;
-			break;
-		case 's':
-			Subdoc = optarg;
-			if( !command )
-				command = 's';
-			break;
-		case 'v':
-			Verbose++;
-			break;
-		case 'h':
-		default:
-			usage(argv[0]);
-			exit(1);
-		}
-	}
-
-	if (! required_dash_f)	{
-		usage(argv[0]);
-		fprintf(stderr, "\n -f option is REQUIRED\n");
-		exit(1);
-	}
-
-	switch(command) {
-		case  5 : 
-		        return dump_header(filename);
-		case  3 : 
-			return list_subdocs(filename);
-		case 'c':
-			if( optind == argc ) {
-				usage(argv[0]);
-				fprintf(stderr, "No files to operate on.\n");
-				exit(1);
-			}
-			arglen = argc - optind;
-			args = malloc(sizeof(char*) * (arglen+1));
-			memset(args, 0, sizeof(char*) * (arglen+1));
-			for( i = 0; i < arglen; i++ )
-				args[i] = strdup(argv[optind + i]);
-
-			return archive(filename, arglen, args);
-		case 'd':
-			if( !tocfile ) {
-				usage(argv[0]);
-				exit(1);
-			}
-			return dumptoc(filename, tocfile);
-		case 'x':
-			arglen = argc - optind;
-			args = malloc(sizeof(char*) * (arglen+1));
-			for( i = 0; i < arglen; i++ )
-				args[i] = strdup(argv[optind + i]);
-			args[i] = NULL;
-			return extract(filename, arglen, args);
-		case 't':
-			arglen = argc - optind;
-			args = malloc(sizeof(char*) * (arglen+1));
-			for( i = 0; i < arglen; i++ )
-				args[i] = strdup(argv[optind + i]);
-			return list(filename, arglen, args);
-		case  6 :
-		case 's':
-			x = xar_open(filename, READ);
-			if( !x ) {
-				fprintf(stderr, "Error opening xar archive: %s\n", filename);
-				exit(1);
-			}
-			xar_register_errhandler(x, err_callback, NULL);
-			extract_subdoc(x, SubdocName);
-			xar_close(x);
-			exit(Err);
-			break;
-		default:
-			usage(argv[0]);
-			fprintf(stderr, "Unrecognized command.\n");
-			exit(1);
-	}
-
-	/* unreached */
-	exit(0);
-}

Copied: branches/release_1_4/base/src/programs/xar/src/xar.c (from rev 23968, trunk/base/src/programs/xar/src/xar.c)
===================================================================
--- branches/release_1_4/base/src/programs/xar/src/xar.c	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/src/xar.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,781 @@
+/*
+ * Copyright (c) 2005 Rob Braun
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Rob Braun nor the names of his contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * 03-Apr-2005
+ * DRI: Rob Braun <bbraun at opendarwin.org>
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fts.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <inttypes.h>
+#include <netinet/in.h>
+#include <libxml/xmlreader.h>
+#include <libxml/xmlwriter.h>
+#include <libxml/xmlstring.h>
+#include <limits.h>
+#include <getopt.h>
+#include <regex.h>
+#include <errno.h>
+#include "xar.h"
+#include "config.h"
+
+#define SYMBOLIC 1
+#define NUMERIC  2
+static int Perms = 0;
+static int Local = 0;
+static char *Subdoc = NULL;
+static char *SubdocName = NULL;
+static char *Toccksum = NULL;
+static char *Compression = NULL;
+static char *Rsize = NULL;
+
+static int Err = 0;
+static int Verbose = 0;
+static int Coalesce = 0;
+static int LinkSame = 0;
+
+struct lnode {
+	char *str;
+	regex_t reg;
+	struct lnode *next;
+};
+
+struct lnode *Exclude = NULL;
+struct lnode *Exclude_Tail = NULL;
+struct lnode *NoCompress = NULL;
+struct lnode *NoCompress_Tail = NULL;
+
+static int32_t err_callback(int32_t sev, int32_t err, xar_errctx_t ctx, void *usrctx);
+
+static void print_file(xar_file_t f) {
+	if( Verbose ) {
+		char *path = xar_get_path(f);
+		printf("%s\n", path);
+		free(path);
+	}
+}
+
+static void add_subdoc(xar_t x) {
+	xar_subdoc_t s;
+	int fd;
+	unsigned char *buf;
+	unsigned int len;
+	struct stat sb;
+
+	if( SubdocName == NULL ) SubdocName = "subdoc";
+	s = xar_subdoc_new(x, (const char *)SubdocName);
+
+	fd = open(Subdoc, O_RDONLY);
+	if( fd < 0 )
+		return;
+	fstat(fd, &sb);
+	len = sb.st_size;
+	buf = malloc(len+1);
+	if( buf == NULL ) {
+		close(fd);
+		return;
+	}
+	memset(buf, 0, len+1);
+	read(fd, buf, len);
+	close(fd);
+
+	xar_subdoc_copyin(s, buf, len);
+
+
+	return;
+}
+
+static void extract_subdoc(xar_t x, const char *name) {
+	xar_subdoc_t i;
+
+	for( i = xar_subdoc_first(x); i; i = xar_subdoc_next(i) ) {
+		const char *sname = xar_subdoc_name(i);
+		unsigned char *sdoc;
+		int fd, size;
+		if( name && strcmp(name, sname) != 0 )
+			continue;
+		xar_subdoc_copyout(i, &sdoc, (unsigned int *)&size);
+		fd = open(Subdoc, O_WRONLY|O_CREAT|O_TRUNC, 0644);
+		if( fd < 0 ) return;
+		write(fd, sdoc, size);
+		close(fd);
+		free(sdoc);
+	}
+
+	return;
+}
+
+static int archive(const char *filename, int arglen, char *args[]) {
+	xar_t x;
+	FTS *fts;
+	FTSENT *ent;
+	int flags;
+	struct lnode *i;
+	const char *default_compression;
+
+	x = xar_open(filename, WRITE);
+	if( !x ) {
+		fprintf(stderr, "Error creating archive %s\n", filename);
+		exit(1);
+	}
+
+	if( Toccksum )
+		xar_opt_set(x, XAR_OPT_TOCCKSUM, Toccksum);
+
+	if( Compression )
+		xar_opt_set(x, XAR_OPT_COMPRESSION, Compression);
+
+	if( Coalesce )
+		xar_opt_set(x, XAR_OPT_COALESCE, "true");
+
+	if( LinkSame )
+		xar_opt_set(x, XAR_OPT_LINKSAME, "true");
+
+	if ( Rsize != NULL )
+		xar_opt_set(x, XAR_OPT_RSIZE, Rsize);
+
+	xar_register_errhandler(x, err_callback, NULL);
+
+	if( Subdoc )
+		add_subdoc(x);
+
+	if( Perms == SYMBOLIC ) {
+		xar_opt_set(x, XAR_OPT_OWNERSHIP, XAR_OPT_VAL_SYMBOLIC);
+	}
+	if( Perms == NUMERIC ) {
+		xar_opt_set(x, XAR_OPT_OWNERSHIP, XAR_OPT_VAL_NUMERIC);
+	}
+
+	default_compression = strdup(xar_opt_get(x, XAR_OPT_COMPRESSION));
+	if( !default_compression )
+		default_compression = strdup(XAR_OPT_VAL_GZIP);
+
+	flags = FTS_PHYSICAL|FTS_NOSTAT|FTS_NOCHDIR;
+	if( Local )
+		flags |= FTS_XDEV;
+	fts = fts_open(args, flags, NULL);
+	if( !fts ) {
+		fprintf(stderr, "Error traversing file tree\n");
+		exit(1);
+	}
+
+	while( (ent = fts_read(fts)) ) {
+		xar_file_t f;
+		int exclude_match = 1;
+		int nocompress_match = 1;
+		if( ent->fts_info == FTS_DP )
+			continue;
+
+		if( strcmp(ent->fts_path, "/") == 0 )
+			continue;
+		if( strcmp(ent->fts_path, ".") == 0 )
+			continue;
+		
+		for( i = Exclude; i; i=i->next ) {
+			exclude_match = regexec(&i->reg, ent->fts_path, 0, NULL, 0);
+			if( !exclude_match )
+				break;
+		}
+		if( !exclude_match ) {
+			if( Verbose )
+				printf("Excluding %s\n", ent->fts_path);
+			continue;
+		}
+
+		for( i = NoCompress; i; i=i->next ) {
+			nocompress_match = regexec(&i->reg, ent->fts_path, 0, NULL, 0);
+			if( !nocompress_match ) {
+				xar_opt_set(x, XAR_OPT_COMPRESSION, XAR_OPT_VAL_NONE);
+				break;
+			}
+		}
+		f = xar_add(x, ent->fts_path);
+		if( !f ) {
+			fprintf(stderr, "Error adding file %s\n", ent->fts_path);
+		} else {
+			print_file(f);
+		}
+		if( !nocompress_match )
+			xar_opt_set(x, XAR_OPT_COMPRESSION, default_compression);
+	}
+	fts_close(fts);
+	if( xar_close(x) != 0 ) {
+		fprintf(stderr, "Error creating the archive\n");
+		if( !Err )
+			Err = 42;
+	}
+
+	free((char *)default_compression);
+	for( i = Exclude; i; ) {
+		struct lnode *tmp;
+		regfree(&i->reg);
+		tmp = i;
+		i = i->next;
+		free(tmp);
+	}
+	for( i = NoCompress; i; ) {
+		struct lnode *tmp;
+		regfree(&i->reg);
+		tmp = i;
+		i = i->next;
+		free(tmp);
+	}
+
+	return Err;
+}
+
+static int extract(const char *filename, int arglen, char *args[]) {
+	xar_t x;
+	xar_iter_t i;
+	xar_file_t f;
+	int files_extracted = 0;
+
+	x = xar_open(filename, READ);
+	if( !x ) {
+		fprintf(stderr, "Error opening xar archive: %s\n", filename);
+		exit(1);
+	}
+
+	xar_register_errhandler(x, err_callback, NULL);
+
+	if( Perms == SYMBOLIC ) {
+		xar_opt_set(x, XAR_OPT_OWNERSHIP, XAR_OPT_VAL_SYMBOLIC);
+	}
+	if( Perms == NUMERIC ) {
+		xar_opt_set(x, XAR_OPT_OWNERSHIP, XAR_OPT_VAL_NUMERIC);
+	}
+	if ( Rsize != NULL ) {
+		xar_opt_set(x, XAR_OPT_RSIZE, Rsize);
+	}
+	
+	i = xar_iter_new();
+	if( !i ) {
+		fprintf(stderr, "Error creating xar iterator\n");
+		exit(1);
+	}
+
+	for(f = xar_file_first(x, i); f; f = xar_file_next(i)) {
+		int matched = 0;
+		int exclude_match = 1;
+		struct lnode *i;
+
+		char *path = xar_get_path(f);
+
+		if( args[0] ) {
+			int i;
+			for(i = 0; args[i]; i++) {
+				if( strcmp(path, args[i]) == 0 ) {
+					matched = 1;
+					break;
+				}
+			}
+		} else {
+			matched = 1;
+		}
+
+		for( i = Exclude; i; i=i->next ) {
+			exclude_match = regexec(&i->reg, path, 0, NULL, 0);
+			if( !exclude_match )
+				break;
+		}
+		if( !exclude_match ) {
+			if( Verbose )
+				printf("Excluding %s\n", path);
+			free(path);
+			continue;
+		}
+		
+		if( matched ) {
+			files_extracted++;
+			print_file(f);
+			xar_extract(x, f);
+		}
+		free(path);
+	}
+	if( args[0] && (files_extracted == 0) ) {
+		fprintf(stderr, "No files matched extraction criteria.\n");
+		Err = 3;
+	}
+
+	if( Subdoc )
+		extract_subdoc(x, NULL);
+
+	xar_iter_free(i);
+	if( xar_close(x) != 0 ) {
+		fprintf(stderr, "Error extracting the archive\n");
+		if( !Err )
+			Err = 42;
+	}
+	return Err;
+}
+
+static int list_subdocs(const char *filename) {
+	xar_t x;
+	xar_subdoc_t s;
+
+	x = xar_open(filename, READ);
+	if( !x ) {
+		fprintf(stderr, "Error opening xar archive: %s\n", filename);
+		exit(1);
+	}
+
+	for(s = xar_subdoc_first(x); s; s = xar_subdoc_next(s)) {
+		printf("%s\n", xar_subdoc_name(s));
+	}
+	xar_close(x);
+
+	return Err;
+}
+
+static int list(const char *filename, int arglen, char *args[]) {
+	xar_t x;
+	xar_iter_t i;
+	xar_file_t f;
+
+	x = xar_open(filename, READ);
+	if( !x ) {
+		fprintf(stderr, "Error opening xar archive: %s\n", filename);
+		exit(1);
+	}
+
+	i = xar_iter_new();
+	if( !i ) {
+		fprintf(stderr, "Error creating xar iterator\n");
+		exit(1);
+	}
+
+	for(f = xar_file_first(x, i); f; f = xar_file_next(i)) {
+		print_file(f);
+	}
+
+	xar_iter_free(i);
+	xar_close(x);
+
+	return Err;
+}
+
+static int dumptoc(const char *filename, const char* tocfile) {
+	xar_t x;
+	x = xar_open(filename, READ);
+	if( !x ) {
+		fprintf(stderr, "Error opening xar archive: %s\n", filename);
+		exit(1);
+	}
+
+	xar_serialize(x, tocfile);
+	xar_close(x);
+	return Err;
+}
+
+static int dump_header(const char *filename) {
+	int fd;
+	xar_header_t xh;
+
+	if(filename == NULL)
+		fd = 0;
+	else {
+		fd = open(filename, O_RDONLY);
+		if( fd < 0 ) {
+			perror("open");
+			exit(1);
+		}
+	}
+
+	if( read(fd, &xh, sizeof(xh)) < sizeof(xh) ) {
+		fprintf(stderr, "error reading header\n");
+		exit(1);
+	}
+
+	printf("magic:                  0x%x ", ntohl(xh.magic));
+	if( ntohl(xh.magic) != XAR_HEADER_MAGIC )
+		printf("(BAD)\n");
+	else
+		printf("(OK)\n");
+	printf("size:                   %d\n", ntohs(xh.size));
+	printf("version:                %d\n", ntohs(xh.version));
+	printf("Compressed TOC length:  %" PRId64 "\n", xar_ntoh64(xh.toc_length_compressed));
+	printf("Uncompressed TOC length: %" PRId64 "\n", xar_ntoh64(xh.toc_length_uncompressed));
+	printf("Checksum algorithm:     %d ", ntohl(xh.cksum_alg));
+	switch( ntohl(xh.cksum_alg) ) {
+	case XAR_CKSUM_NONE: printf("(none)\n");
+	                     break;
+	case XAR_CKSUM_SHA1: printf("(SHA1)\n");
+	                     break;
+	case XAR_CKSUM_MD5: printf("(MD5)\n");
+	                    break;
+	default: printf("(unknown)\n");
+	         break;
+	};
+
+	return 0;
+}
+
+static int32_t err_callback(int32_t sev, int32_t err, xar_errctx_t ctx, void *usrctx) {
+	xar_file_t f;
+	const char *str;
+	int e;
+
+	f = xar_err_get_file(ctx);
+	str = xar_err_get_string(ctx);
+	e = xar_err_get_errno(ctx);
+
+	switch(sev) {
+	case XAR_SEVERITY_DEBUG:
+	case XAR_SEVERITY_INFO:
+		break;
+	case XAR_SEVERITY_WARNING:
+		printf("%s\n", str);
+		break;
+	case XAR_SEVERITY_NORMAL:
+		if( (err = XAR_ERR_ARCHIVE_CREATION) && f )
+    			print_file(f);
+		break;
+	case XAR_SEVERITY_NONFATAL:
+	case XAR_SEVERITY_FATAL:
+		Err = 2;
+		printf("Error while ");
+		if( err == XAR_ERR_ARCHIVE_CREATION ) printf("creating");
+		if( err == XAR_ERR_ARCHIVE_EXTRACTION ) printf("extracting");
+		printf(" archive");
+		if( f ) {
+			const char *file = xar_get_path(f);
+			if( file ) printf(":(%s)", file);
+			free((char *)file);
+		}
+		if( str ) printf(": %s", str);
+		if( err ) printf(" (%s)", strerror(e));
+		if( sev == XAR_SEVERITY_NONFATAL ) {
+			printf(" - ignored");
+			printf("\n");
+		} else {
+			printf("\n");
+			exit(1);
+		}
+		break;
+	}
+	return 0;
+}
+
+static void usage(const char *prog) {
+	fprintf(stderr, "Usage: %s -[ctx][v] -f <archive> ...\n", prog);
+	fprintf(stderr, "\t-c               Creates an archive\n");
+	fprintf(stderr, "\t-x               Extracts an archive\n");
+	fprintf(stderr, "\t-t               Lists an archive\n");
+	fprintf(stderr, "\t-f <filename>    Specifies an archive to operate on [REQUIRED!]\n");
+	fprintf(stderr, "\t-v               Print filenames as they are archived\n");
+	fprintf(stderr, "\t-n name          Provides a name for a subdocument\n");
+	fprintf(stderr, "\t-s <filename>    On extract, specifies the file to extract\n");
+	fprintf(stderr, "\t                      subdocuments to.\n");
+	fprintf(stderr, "\t                 On archival, specifies an xml file to add\n");
+	fprintf(stderr, "\t                      as a subdocument.\n");
+	fprintf(stderr, "\t-l               On archival, stay on the local device.\n");
+	fprintf(stderr, "\t-p               On extract, set ownership based on symbolic\n");
+	fprintf(stderr, "\t                      names, if possible.\n");
+	fprintf(stderr, "\t-P               On extract, set ownership based on uid/gid.\n");
+	fprintf(stderr, "\t--toc-cksum      Specifies the hashing algorithm to use for\n");
+	fprintf(stderr, "\t                      xml header verification.\n");
+	fprintf(stderr, "\t                      Valid values: none, sha1, and md5\n");
+	fprintf(stderr, "\t                      Default: sha1\n");
+	fprintf(stderr, "\t--dump-toc=<filename> Has xar dump the xml header into the\n");
+	fprintf(stderr, "\t                      specified file.\n");
+	fprintf(stderr, "\t--dump-header    Prints out the xar binary header information\n");
+	fprintf(stderr, "\t--compression    Specifies the compression type to use.\n");
+	fprintf(stderr, "\t                      Valid values: none, gzip, bzip2\n");
+	fprintf(stderr, "\t                      Default: gzip\n");
+	fprintf(stderr, "\t--list-subdocs   List the subdocuments in the xml header\n");
+	fprintf(stderr, "\t--extract-subdoc=name Extracts the specified subdocument\n");
+	fprintf(stderr, "\t                      to a document in cwd named <name>.xml\n");
+	fprintf(stderr, "\t--exclude        POSIX regular expression of files to \n");
+	fprintf(stderr, "\t                      ignore while archiving.\n");
+	fprintf(stderr, "\t--rsize          Specifies the size of the buffer used\n");
+	fprintf(stderr, "\t                      for read IO operations in bytes.\n");
+	fprintf(stderr, "\t--coalesce-heap  When archived files are identical, only store one copy\n");
+	fprintf(stderr, "\t                      This option creates an archive which\n");
+	fprintf(stderr, "\t                      is not streamable\n");
+	fprintf(stderr, "\t--link-same      Hardlink identical files\n");
+	fprintf(stderr, "\t--no-compress    POSIX regular expression of files\n");
+	fprintf(stderr, "\t                      not to archive, but not compress.\n");
+	fprintf(stderr, "\t--version        Print xar's version number\n");
+
+	return;
+}
+
+static void print_version() {
+	printf("xar %s\n", XAR_VERSION);
+}
+
+int main(int argc, char *argv[]) {
+	char *filename = NULL;
+	char command = 0, c;
+	char **args;
+	const char *tocfile = NULL;
+	int arglen, i, err;
+	xar_t x;
+	int loptind = 0;
+	int required_dash_f = 0;  /* This release requires us to use -f */
+	struct lnode *tmp;
+	long int longtmp;
+	struct option o[] = { 
+		{"toc-cksum", 1, 0, 1},
+		{"dump-toc", 1, 0, 'd'},
+		{"compression", 1, 0, 2},
+		{"list-subdocs", 0, 0, 3},
+		{"help", 0, 0, 'h'},
+		{"version", 0, 0, 4},
+		{"dump-header", 0, 0, 5},
+		{"extract-subdoc", 1, 0, 6},
+		{"exclude", 1, 0, 7},
+		{"rsize", 1, 0, 8},
+		{"coalesce-heap", 0, 0, 9},
+		{"link-same", 0, 0, 10},
+		{"no-compress", 1, 0, 11},
+		{ 0, 0, 0, 0}
+	};
+
+	if( argc < 2 ) {
+		usage(argv[0]);
+		exit(1);
+	}
+
+	while( (c = getopt_long(argc, argv, "xcvtf:hpPln:s:d:v", o, &loptind)) != -1 ) {
+		switch(c) {
+		case  1 : if( !optarg ) {
+		          	usage(argv[0]);
+		          	exit(1);
+		          }
+		          if( (strcmp(optarg, XAR_OPT_VAL_NONE) != 0) &&
+		              (strcmp(optarg, XAR_OPT_VAL_SHA1) != 0) &&
+		              (strcmp(optarg, XAR_OPT_VAL_MD5)  != 0) ) {
+		          	usage(argv[0]);
+		          	exit(1);
+		          }
+		          Toccksum = optarg;
+		
+		          break;
+		case  2 : if( !optarg ) {
+		          	usage(argv[0]);
+		          	exit(1);
+		          }
+		          if( (strcmp(optarg, XAR_OPT_VAL_NONE) != 0) &&
+		              (strcmp(optarg, XAR_OPT_VAL_GZIP) != 0) &&
+		              (strcmp(optarg, XAR_OPT_VAL_BZIP) != 0) ) {
+		          	usage(argv[0]);
+		          	exit(1);
+		          }
+		          Compression = optarg;
+		          break;
+		case  3 : if( command && (command != 3) ) {
+		          	fprintf(stderr, "Conflicting commands specified\n");
+				exit(1);
+		          }
+			  command = 3;
+			  break;
+		case  4 : print_version();
+		          exit(0);
+		case 'd':
+			if( !optarg ) {
+				usage(argv[0]);
+				exit(1);
+			}
+			tocfile = optarg;
+			command = 'd';
+			break;
+		case  5 : command = 5;
+		          break;
+		case  6 :
+			SubdocName = optarg;
+			asprintf(&Subdoc, "%s.xml", SubdocName);
+			if( !command )
+				command = 6;
+			break;
+		case  7 :
+			tmp = malloc(sizeof(struct lnode));
+			tmp->str = optarg;
+			tmp->next = NULL;
+			err = regcomp(&tmp->reg, tmp->str, REG_NOSUB);
+			if( err ) {
+				char errstr[1024];
+				regerror(err, &tmp->reg, errstr, sizeof(errstr));
+				printf("Error with regular expression %s: %s\n", tmp->str, errstr);
+				exit(1);
+			}
+			if( Exclude == NULL ) {
+				Exclude = tmp;
+				Exclude_Tail = tmp;
+			} else {
+				Exclude_Tail->next = tmp;
+				Exclude_Tail = tmp;
+			}
+			break;
+		case  8 :
+			if ( !optarg ) {
+				usage(argv[0]);
+				exit(1);
+			}
+			longtmp = strtol(optarg, NULL, 10);
+			if( (((longtmp == LONG_MIN) || (longtmp == LONG_MAX)) && (errno == ERANGE)) || (longtmp < 1) ) {
+				fprintf(stderr, "Invalid rsize value: %s\n", optarg);
+				exit(5);
+			}
+			Rsize = optarg;
+			break;
+		case  9 : Coalesce = 1; break;
+		case 10 : LinkSame = 1; break;
+		case 11 :
+			tmp = malloc(sizeof(struct lnode));
+			tmp->str = optarg;
+			tmp->next = NULL;
+			err = regcomp(&tmp->reg, tmp->str, REG_NOSUB);
+			if( err ) {
+				char errstr[1024];
+				regerror(err, &tmp->reg, errstr, sizeof(errstr));
+				printf("Error with regular expression %s: %s\n", tmp->str, errstr);
+				exit(1);
+			}
+			if( NoCompress == NULL ) {
+				NoCompress = tmp;
+				NoCompress_Tail = tmp;
+			} else {
+				NoCompress_Tail->next = tmp;
+				NoCompress_Tail = tmp;
+			}
+			break;
+		case 'c':
+		case 'x':
+		case 't':
+			if( command && (command != 's') ) {
+				usage(argv[0]);
+				fprintf(stderr, "Conflicting command flags: %c and %c specified\n", c, command);
+				exit(1);
+			}
+			if( c == 't' )
+				Verbose++;
+			command = c;
+			break;
+		case 'f':
+		        required_dash_f = 1;
+			filename = optarg;
+			break;
+		case 'p':
+			Perms = SYMBOLIC;
+			break;
+		case 'P':
+			Perms = NUMERIC;
+			break;
+		case 'l':
+			Local = 1;
+			break;
+		case 'n':
+			SubdocName = optarg;
+			break;
+		case 's':
+			Subdoc = optarg;
+			if( !command )
+				command = 's';
+			break;
+		case 'v':
+			Verbose++;
+			break;
+		case 'h':
+		default:
+			usage(argv[0]);
+			exit(1);
+		}
+	}
+
+	if (! required_dash_f)	{
+		usage(argv[0]);
+		fprintf(stderr, "\n -f option is REQUIRED\n");
+		exit(1);
+	}
+
+	switch(command) {
+		case  5 : 
+		        return dump_header(filename);
+		case  3 : 
+			return list_subdocs(filename);
+		case 'c':
+			if( optind == argc ) {
+				usage(argv[0]);
+				fprintf(stderr, "No files to operate on.\n");
+				exit(1);
+			}
+			arglen = argc - optind;
+			args = malloc(sizeof(char*) * (arglen+1));
+			memset(args, 0, sizeof(char*) * (arglen+1));
+			for( i = 0; i < arglen; i++ )
+				args[i] = strdup(argv[optind + i]);
+
+			return archive(filename, arglen, args);
+		case 'd':
+			if( !tocfile ) {
+				usage(argv[0]);
+				exit(1);
+			}
+			return dumptoc(filename, tocfile);
+		case 'x':
+			arglen = argc - optind;
+			args = malloc(sizeof(char*) * (arglen+1));
+			for( i = 0; i < arglen; i++ )
+				args[i] = strdup(argv[optind + i]);
+			args[i] = NULL;
+			return extract(filename, arglen, args);
+		case 't':
+			arglen = argc - optind;
+			args = malloc(sizeof(char*) * (arglen+1));
+			for( i = 0; i < arglen; i++ )
+				args[i] = strdup(argv[optind + i]);
+			return list(filename, arglen, args);
+		case  6 :
+		case 's':
+			x = xar_open(filename, READ);
+			if( !x ) {
+				fprintf(stderr, "Error opening xar archive: %s\n", filename);
+				exit(1);
+			}
+			xar_register_errhandler(x, err_callback, NULL);
+			extract_subdoc(x, SubdocName);
+			xar_close(x);
+			exit(Err);
+			break;
+		default:
+			usage(argv[0]);
+			fprintf(stderr, "Unrecognized command.\n");
+			exit(1);
+	}
+
+	/* unreached */
+	exit(0);
+}

Copied: branches/release_1_4/base/src/programs/xar/test (from rev 23968, trunk/base/src/programs/xar/test)

Deleted: branches/release_1_4/base/src/programs/xar/test/attr
===================================================================
--- trunk/base/src/programs/xar/test/attr	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/test/attr	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,108 +0,0 @@
-#!/bin/sh
-
-. functions
-
-cleanup() {
-	rm -rf h a a.xar
-}
-
-echo "Checking empty ea preservation on single empty file"
-cleanup
-mkdir h
-cd h
-touch a
-setfattr -n user.foo a
-if [ $? -ne 0 ]; then
-	echo "Error can't make user attribute on file"
-	cleanup
-	exit
-fi
-
-create_archive ../a.xar .
-cd ..
-extract_archive a.xar
-
-if [ ! -f a ]; then
-	echo "File didn't extract"
-	cleanup
-	exit 1
-fi
-
-count=`getfattr -d a | grep -c user.foo`
-if [ "$count" != "1" ]; then
-	echo "Didn't find the attribute after extraction"
-	cleanup
-	exit 1
-fi
-cleanup
-
-echo "Checking populated ea preservation on single empty file"
-cleanup
-mkdir h
-cd h
-touch a
-setfattr -n user.foo -v bar a
-if [ $? -ne 0 ]; then
-	echo "Error can't make user attribute on file"
-	cleanup
-	exit
-fi
-
-create_archive ../a.xar .
-cd ..
-extract_archive a.xar
-
-if [ ! -f a ]; then
-	echo "File didn't extract"
-	cleanup
-	exit 1
-fi
-
-count=`getfattr -d a | grep user.foo`
-if [ "$count" != "user.foo=\"bar\"" ]; then
-	echo "Didn't find the attribute after extraction"
-	#cleanup
-	exit 1
-fi
-
-cleanup
-
-echo "Checking populated ea preservation on single file with data"
-cleanup
-mkdir h
-cd h
-touch a
-echo "foo" > a
-setfattr -n user.foo -v bar a
-if [ $? -ne 0 ]; then
-	echo "Error can't make user attribute on file"
-	cleanup
-	exit
-fi
-
-create_archive ../a.xar .
-cd ..
-extract_archive a.xar
-
-if [ ! -f a ]; then
-	echo "File didn't extract"
-	cleanup
-	exit 1
-fi
-
-count=`getfattr -d a | grep user.foo`
-if [ "$count" != "user.foo=\"bar\"" ]; then
-	echo "Didn't find the attribute after extraction"
-	cleanup
-	exit 1
-fi
-
-contents=`cat a`
-if [ "$contents" != "foo" ]; then
-	echo "Contents of the file aren't the same after extraction"
-	cleanup
-	exit 1
-fi
-
-cleanup
-

Copied: branches/release_1_4/base/src/programs/xar/test/attr (from rev 23968, trunk/base/src/programs/xar/test/attr)
===================================================================
--- branches/release_1_4/base/src/programs/xar/test/attr	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/test/attr	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,108 @@
+#!/bin/sh
+
+. functions
+
+cleanup() {
+	rm -rf h a a.xar
+}
+
+echo "Checking empty ea preservation on single empty file"
+cleanup
+mkdir h
+cd h
+touch a
+setfattr -n user.foo a
+if [ $? -ne 0 ]; then
+	echo "Error can't make user attribute on file"
+	cleanup
+	exit
+fi
+
+create_archive ../a.xar .
+cd ..
+extract_archive a.xar
+
+if [ ! -f a ]; then
+	echo "File didn't extract"
+	cleanup
+	exit 1
+fi
+
+count=`getfattr -d a | grep -c user.foo`
+if [ "$count" != "1" ]; then
+	echo "Didn't find the attribute after extraction"
+	cleanup
+	exit 1
+fi
+cleanup
+
+echo "Checking populated ea preservation on single empty file"
+cleanup
+mkdir h
+cd h
+touch a
+setfattr -n user.foo -v bar a
+if [ $? -ne 0 ]; then
+	echo "Error can't make user attribute on file"
+	cleanup
+	exit
+fi
+
+create_archive ../a.xar .
+cd ..
+extract_archive a.xar
+
+if [ ! -f a ]; then
+	echo "File didn't extract"
+	cleanup
+	exit 1
+fi
+
+count=`getfattr -d a | grep user.foo`
+if [ "$count" != "user.foo=\"bar\"" ]; then
+	echo "Didn't find the attribute after extraction"
+	#cleanup
+	exit 1
+fi
+
+cleanup
+
+echo "Checking populated ea preservation on single file with data"
+cleanup
+mkdir h
+cd h
+touch a
+echo "foo" > a
+setfattr -n user.foo -v bar a
+if [ $? -ne 0 ]; then
+	echo "Error can't make user attribute on file"
+	cleanup
+	exit
+fi
+
+create_archive ../a.xar .
+cd ..
+extract_archive a.xar
+
+if [ ! -f a ]; then
+	echo "File didn't extract"
+	cleanup
+	exit 1
+fi
+
+count=`getfattr -d a | grep user.foo`
+if [ "$count" != "user.foo=\"bar\"" ]; then
+	echo "Didn't find the attribute after extraction"
+	cleanup
+	exit 1
+fi
+
+contents=`cat a`
+if [ "$contents" != "foo" ]; then
+	echo "Contents of the file aren't the same after extraction"
+	cleanup
+	exit 1
+fi
+
+cleanup
+

Deleted: branches/release_1_4/base/src/programs/xar/test/checksums
===================================================================
--- trunk/base/src/programs/xar/test/checksums	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/test/checksums	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,97 +0,0 @@
-#!/bin/sh
-
-. functions
-
-echo "Testing handling of a broken TOC with default checksum"
-rm -rf bin.xar bin
-${XAR} -cf bin.xar /bin
-if [ $? -ne 0 ]; then
-	echo "Error creating test archive"
-	exit 1
-fi
-
-hdrsize=`${XAR} --dump-header -f bin.xar | grep size | awk '{print $2}'`
-
-offset=`expr ${hdrsize} + 4`
-
-dd if=/dev/random of=bin.xar seek=${offset} bs=100 count=1 > /dev/null 2>&1
-
-${XAR} -xf bin.xar > /dev/null 2>&1
-if [ $? -eq 0 ]; then
-	echo "Didn't handle the broken toc properly"
-	exit 1
-fi
-
-if [ -d bin ]; then
-	echo "Extracted part of the broken archive.  badness."
-	exit 1
-fi
-
-echo "Testing handling of a broken TOC with MD5 checksum"
-rm -rf bin.xar bin
-${XAR} --toc-cksum=md5 -cf bin.xar /bin
-if [ $? -ne 0 ]; then
-	echo "Error creating test archive"
-	exit 1
-fi
-
-hdrsize=`${XAR} --dump-header -f bin.xar | grep size | awk '{print $2}'`
-
-offset=`expr ${hdrsize} + 4`
-
-dd if=/dev/random of=bin.xar seek=${offset} bs=100 count=1 > /dev/null 2>&1
-
-${XAR} -xf bin.xar > /dev/null 2>&1
-if [ $? -eq 0 ]; then
-	echo "Didn't handle the broken toc properly"
-	exit 1
-fi
-
-if [ -d bin ]; then
-	echo "Extracted part of the broken archive.  badness."
-	exit 1
-fi
-
-echo "Testing handling of a broken TOC with SHA1 checksum"
-rm -rf bin.xar bin
-${XAR} --toc-cksum=sha1 -cf bin.xar /bin
-if [ $? -ne 0 ]; then
-	echo "Error creating test archive"
-	exit 1
-fi
-
-hdrsize=`${XAR} --dump-header -f bin.xar | grep size | awk '{print $2}'`
-
-offset=`expr ${hdrsize} + 4`
-
-dd if=/dev/random of=bin.xar seek=${offset} bs=100 count=1 > /dev/null 2>&1
-
-${XAR} -xf bin.xar > /dev/null 2>&1
-if [ $? -eq 0 ]; then
-	echo "Didn't handle the broken toc properly"
-	exit 1
-fi
-
-if [ -d bin ]; then
-	echo "Extracted part of the broken archive.  badness."
-	exit 1
-fi
-
-rm -f bin.xar
-
-echo "Testing handling of a broken heap with defaults"
-rm -rf bin.xar bin
-create_archive bin.xar /bin
-hdrsize=`${XAR} --dump-header -f bin.xar | grep size | awk '{print $2}'`
-tocsize=`${XAR} --dump-header -f bin.xar | grep "Compressed" | awk '{print $4}'`
-offset=`expr ${hdrsize} + ${tocsize} + 20`
-dd if=/dev/random of=bin.xar seek=${offset} bs=100 count=1 > /dev/null 2>&1
-
-${XAR} -xf bin.xar > /dev/null 2>&1
-if [ $? -eq 0 ]; then
-	echo "Didn't handle the broken heap properly"
-	exit 1
-fi
-
-rm -rf bin.xar bin
-echo "Success checking checksum handling"

Copied: branches/release_1_4/base/src/programs/xar/test/checksums (from rev 23968, trunk/base/src/programs/xar/test/checksums)
===================================================================
--- branches/release_1_4/base/src/programs/xar/test/checksums	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/test/checksums	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,97 @@
+#!/bin/sh
+
+. functions
+
+echo "Testing handling of a broken TOC with default checksum"
+rm -rf bin.xar bin
+${XAR} -cf bin.xar /bin
+if [ $? -ne 0 ]; then
+	echo "Error creating test archive"
+	exit 1
+fi
+
+hdrsize=`${XAR} --dump-header -f bin.xar | grep size | awk '{print $2}'`
+
+offset=`expr ${hdrsize} + 4`
+
+dd if=/dev/random of=bin.xar seek=${offset} bs=100 count=1 > /dev/null 2>&1
+
+${XAR} -xf bin.xar > /dev/null 2>&1
+if [ $? -eq 0 ]; then
+	echo "Didn't handle the broken toc properly"
+	exit 1
+fi
+
+if [ -d bin ]; then
+	echo "Extracted part of the broken archive.  badness."
+	exit 1
+fi
+
+echo "Testing handling of a broken TOC with MD5 checksum"
+rm -rf bin.xar bin
+${XAR} --toc-cksum=md5 -cf bin.xar /bin
+if [ $? -ne 0 ]; then
+	echo "Error creating test archive"
+	exit 1
+fi
+
+hdrsize=`${XAR} --dump-header -f bin.xar | grep size | awk '{print $2}'`
+
+offset=`expr ${hdrsize} + 4`
+
+dd if=/dev/random of=bin.xar seek=${offset} bs=100 count=1 > /dev/null 2>&1
+
+${XAR} -xf bin.xar > /dev/null 2>&1
+if [ $? -eq 0 ]; then
+	echo "Didn't handle the broken toc properly"
+	exit 1
+fi
+
+if [ -d bin ]; then
+	echo "Extracted part of the broken archive.  badness."
+	exit 1
+fi
+
+echo "Testing handling of a broken TOC with SHA1 checksum"
+rm -rf bin.xar bin
+${XAR} --toc-cksum=sha1 -cf bin.xar /bin
+if [ $? -ne 0 ]; then
+	echo "Error creating test archive"
+	exit 1
+fi
+
+hdrsize=`${XAR} --dump-header -f bin.xar | grep size | awk '{print $2}'`
+
+offset=`expr ${hdrsize} + 4`
+
+dd if=/dev/random of=bin.xar seek=${offset} bs=100 count=1 > /dev/null 2>&1
+
+${XAR} -xf bin.xar > /dev/null 2>&1
+if [ $? -eq 0 ]; then
+	echo "Didn't handle the broken toc properly"
+	exit 1
+fi
+
+if [ -d bin ]; then
+	echo "Extracted part of the broken archive.  badness."
+	exit 1
+fi
+
+rm -f bin.xar
+
+echo "Testing handling of a broken heap with defaults"
+rm -rf bin.xar bin
+create_archive bin.xar /bin
+hdrsize=`${XAR} --dump-header -f bin.xar | grep size | awk '{print $2}'`
+tocsize=`${XAR} --dump-header -f bin.xar | grep "Compressed" | awk '{print $4}'`
+offset=`expr ${hdrsize} + ${tocsize} + 20`
+dd if=/dev/random of=bin.xar seek=${offset} bs=100 count=1 > /dev/null 2>&1
+
+${XAR} -xf bin.xar > /dev/null 2>&1
+if [ $? -eq 0 ]; then
+	echo "Didn't handle the broken heap properly"
+	exit 1
+fi
+
+rm -rf bin.xar bin
+echo "Success checking checksum handling"

Deleted: branches/release_1_4/base/src/programs/xar/test/compression
===================================================================
--- trunk/base/src/programs/xar/test/compression	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/test/compression	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,93 +0,0 @@
-#!/bin/sh
-
-. functions
-
-echo "Testing normal archival creation/extraction with default compression"
-rm -rf bin.xar bin
-${XAR} -cf bin.xar /bin
-if [ $? -ne 0 ]; then
-	echo "Error creating archive"
-	exit 1
-fi
-
-${XAR} -xf bin.xar
-if [ $? -ne 0 ]; then
-	echo "Error extracting archive"
-	exit 1
-fi
-
-if [ ! -e bin/sh ]; then
-	echo "Error with extracted contents"
-fi
-
-echo "Testing normal archival creation/extraction with gzip compression"
-rm -rf bin.xar bin
-${XAR} --compression=gzip -cf bin.xar /bin
-if [ $? -ne 0 ]; then
-	echo "Error creating archive"
-	exit 1
-fi
-
-${XAR} -xf bin.xar
-if [ $? -ne 0 ]; then
-	echo "Error extracting archive"
-	exit 1
-fi
-
-if [ ! -e bin/sh ]; then
-	echo "Error with extracted contents"
-fi
-
-echo "Testing normal archival creation/extraction with bzip2 compression"
-rm -rf bin.xar bin
-${XAR} --compression=bzip2 -cf bin.xar /bin
-if [ $? -ne 0 ]; then
-	echo "Error creating archive"
-	exit 1
-fi
-
-${XAR} -xf bin.xar
-if [ $? -ne 0 ]; then
-	echo "Error extracting archive"
-	exit 1
-fi
-
-if [ ! -e bin/sh ]; then
-	echo "Error with extracted contents"
-fi
-
-echo "Testing normal archival creation/extraction with no compression"
-rm -rf bin.xar bin
-${XAR} --compression=none -cf bin.xar /bin
-if [ $? -ne 0 ]; then
-	echo "Error creating archive"
-	exit 1
-fi
-
-${XAR} -xf bin.xar
-if [ $? -ne 0 ]; then
-	echo "Error extracting archive"
-	exit 1
-fi
-
-if [ ! -e bin/sh ]; then
-	echo "Error with extracted contents"
-fi
-${XAR} --compression=none -cf bin.xar /bin
-if [ $? -ne 0 ]; then
-	echo "Error creating archive"
-	exit 1
-fi
-
-${XAR} -xf bin.xar
-if [ $? -ne 0 ]; then
-	echo "Error extracting archive"
-	exit 1
-fi
-
-if [ ! -e bin/sh ]; then
-	echo "Error with extracted contents"
-fi
-
-rm -rf bin.xar bin
-echo "Success testing compression types"

Copied: branches/release_1_4/base/src/programs/xar/test/compression (from rev 23968, trunk/base/src/programs/xar/test/compression)
===================================================================
--- branches/release_1_4/base/src/programs/xar/test/compression	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/test/compression	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,93 @@
+#!/bin/sh
+
+. functions
+
+echo "Testing normal archival creation/extraction with default compression"
+rm -rf bin.xar bin
+${XAR} -cf bin.xar /bin
+if [ $? -ne 0 ]; then
+	echo "Error creating archive"
+	exit 1
+fi
+
+${XAR} -xf bin.xar
+if [ $? -ne 0 ]; then
+	echo "Error extracting archive"
+	exit 1
+fi
+
+if [ ! -e bin/sh ]; then
+	echo "Error with extracted contents"
+fi
+
+echo "Testing normal archival creation/extraction with gzip compression"
+rm -rf bin.xar bin
+${XAR} --compression=gzip -cf bin.xar /bin
+if [ $? -ne 0 ]; then
+	echo "Error creating archive"
+	exit 1
+fi
+
+${XAR} -xf bin.xar
+if [ $? -ne 0 ]; then
+	echo "Error extracting archive"
+	exit 1
+fi
+
+if [ ! -e bin/sh ]; then
+	echo "Error with extracted contents"
+fi
+
+echo "Testing normal archival creation/extraction with bzip2 compression"
+rm -rf bin.xar bin
+${XAR} --compression=bzip2 -cf bin.xar /bin
+if [ $? -ne 0 ]; then
+	echo "Error creating archive"
+	exit 1
+fi
+
+${XAR} -xf bin.xar
+if [ $? -ne 0 ]; then
+	echo "Error extracting archive"
+	exit 1
+fi
+
+if [ ! -e bin/sh ]; then
+	echo "Error with extracted contents"
+fi
+
+echo "Testing normal archival creation/extraction with no compression"
+rm -rf bin.xar bin
+${XAR} --compression=none -cf bin.xar /bin
+if [ $? -ne 0 ]; then
+	echo "Error creating archive"
+	exit 1
+fi
+
+${XAR} -xf bin.xar
+if [ $? -ne 0 ]; then
+	echo "Error extracting archive"
+	exit 1
+fi
+
+if [ ! -e bin/sh ]; then
+	echo "Error with extracted contents"
+fi
+${XAR} --compression=none -cf bin.xar /bin
+if [ $? -ne 0 ]; then
+	echo "Error creating archive"
+	exit 1
+fi
+
+${XAR} -xf bin.xar
+if [ $? -ne 0 ]; then
+	echo "Error extracting archive"
+	exit 1
+fi
+
+if [ ! -e bin/sh ]; then
+	echo "Error with extracted contents"
+fi
+
+rm -rf bin.xar bin
+echo "Success testing compression types"

Deleted: branches/release_1_4/base/src/programs/xar/test/data
===================================================================
--- trunk/base/src/programs/xar/test/data	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/test/data	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,201 +0,0 @@
-#!/bin/sh
-
-. functions
-
-cleanup() {
-	rm -rf a b h h.xar h.toc
-}
-
-echo "Testing if zero length files have data sections"
-cleanup
-mkdir h 
-touch h/a
-
-cd h
-create_archive ../h.xar .
-cd ..
-${XAR} --dump-toc=h.toc -f h.xar
-if [ $? -ne 0 ]; then
-	echo "Error dumping toc"
-	cleanup
-	exit 1
-fi
-
-offset=`xsltproc data.xsl h.toc | grep -v xml`
-if [ "$offset" != "" ]; then
-	echo "Zero length file has data section"
-	cleanup
-	exit 1
-fi
-
-extract_archive h.xar
-
-cleanup
-
-echo "Testing zero length files with gzip compression"
-cleanup
-mkdir h 
-touch h/a
-
-cd h
-${XAR} --compression=gzip -cf ../h.xar .
-if [ $? -ne 0 ]; then
-	echo "Error creating archive"
-	exit 1
-fi
-cd ..
-${XAR} --dump-toc=h.toc -f h.xar
-if [ $? -ne 0 ]; then
-	echo "Error dumping toc"
-	cleanup
-	exit 1
-fi
-
-offset=`xsltproc data.xsl h.toc | grep -v xml`
-if [ "$offset" != "" ]; then
-	echo "Zero length file has data section"
-	cleanup
-	exit 1
-fi
-
-extract_archive h.xar
-cleanup
-
-echo "Testing zero length files with bzip2 compression"
-cleanup
-mkdir h 
-touch h/a
-
-cd h
-${XAR} --compression=bzip2 -cf ../h.xar .
-if [ $? -ne 0 ]; then
-	echo "Error creating archive"
-	exit 1
-fi
-cd ..
-${XAR} --dump-toc=h.toc -f h.xar
-if [ $? -ne 0 ]; then
-	echo "Error dumping toc"
-	cleanup
-	exit 1
-fi
-
-offset=`xsltproc data.xsl h.toc | grep -v xml`
-if [ "$offset" != "" ]; then
-	echo "Zero length file has data section"
-	cleanup
-	exit 1
-fi
-
-extract_archive h.xar
-cleanup
-
-echo "Testing zero length files with bzip2 compression"
-cleanup
-mkdir h 
-touch h/a
-
-cd h
-${XAR} --compression=none -cf ../h.xar .
-if [ $? -ne 0 ]; then
-	echo "Error creating archive"
-	exit 1
-fi
-cd ..
-${XAR} --dump-toc=h.toc -f h.xar
-if [ $? -ne 0 ]; then
-	echo "Error dumping toc"
-	cleanup
-	exit 1
-fi
-
-offset=`xsltproc data.xsl h.toc | grep -v xml`
-if [ "$offset" != "" ]; then
-	echo "Zero length file has data section"
-	cleanup
-	exit 1
-fi
-
-extract_archive h.xar
-cleanup
-
-echo "Testing mixed zero length/populated files with gzip compression"
-cleanup
-mkdir h 
-touch h/a
-echo "foo" > h/b
-
-cd h
-${XAR} --compression=gzip -cf ../h.xar .
-if [ $? -ne 0 ]; then
-	echo "Error creating archive"
-	exit 1
-fi
-cd ..
-extract_archive h.xar
-contents=`cat a`
-if [ ! -z "$contents" ]; then
-	echo "File isn't zero length after extraction"
-	exit 1
-fi
-contents=`cat b`
-if [ "$contents" != "foo" ]; then
-	echo "Contents of populated file not the same after extraction"
-	exit 1
-fi
-cleanup
-
-echo "Testing mixed zero length/populated files with bzip2 compression"
-cleanup
-mkdir h 
-touch h/a
-echo "foo" > h/b
-
-cd h
-${XAR} --compression=bzip2 -cf ../h.xar .
-if [ $? -ne 0 ]; then
-	echo "Error creating archive"
-	exit 1
-fi
-cd ..
-
-extract_archive h.xar
-contents=`cat a`
-if [ ! -z "$contents" ]; then
-	echo "File isn't zero length after extraction"
-	exit 1
-fi
-contents=`cat b`
-if [ "$contents" != "foo" ]; then
-	echo "Contents of populated file not the same after extraction"
-	exit 1
-fi
-cleanup
-
-echo "Testing mixed zero length/populated files with no compression"
-cleanup
-mkdir h 
-touch h/a
-echo "foo" > h/b
-
-cd h
-${XAR} --compression=none -cf ../h.xar .
-if [ $? -ne 0 ]; then
-	echo "Error creating archive"
-	exit 1
-fi
-cd ..
-
-extract_archive h.xar
-contents=`cat a`
-if [ ! -z "$contents" ]; then
-	echo "File isn't zero length after extraction"
-	exit 1
-fi
-contents=`cat b`
-if [ "$contents" != "foo" ]; then
-	echo "Contents of populated file not the same after extraction"
-	exit 1
-fi
-
-cleanup

Copied: branches/release_1_4/base/src/programs/xar/test/data (from rev 23968, trunk/base/src/programs/xar/test/data)
===================================================================
--- branches/release_1_4/base/src/programs/xar/test/data	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/test/data	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,201 @@
+#!/bin/sh
+
+. functions
+
+cleanup() {
+	rm -rf a b h h.xar h.toc
+}
+
+echo "Testing if zero length files have data sections"
+cleanup
+mkdir h 
+touch h/a
+
+cd h
+create_archive ../h.xar .
+cd ..
+${XAR} --dump-toc=h.toc -f h.xar
+if [ $? -ne 0 ]; then
+	echo "Error dumping toc"
+	cleanup
+	exit 1
+fi
+
+offset=`xsltproc data.xsl h.toc | grep -v xml`
+if [ "$offset" != "" ]; then
+	echo "Zero length file has data section"
+	cleanup
+	exit 1
+fi
+
+extract_archive h.xar
+
+cleanup
+
+echo "Testing zero length files with gzip compression"
+cleanup
+mkdir h 
+touch h/a
+
+cd h
+${XAR} --compression=gzip -cf ../h.xar .
+if [ $? -ne 0 ]; then
+	echo "Error creating archive"
+	exit 1
+fi
+cd ..
+${XAR} --dump-toc=h.toc -f h.xar
+if [ $? -ne 0 ]; then
+	echo "Error dumping toc"
+	cleanup
+	exit 1
+fi
+
+offset=`xsltproc data.xsl h.toc | grep -v xml`
+if [ "$offset" != "" ]; then
+	echo "Zero length file has data section"
+	cleanup
+	exit 1
+fi
+
+extract_archive h.xar
+cleanup
+
+echo "Testing zero length files with bzip2 compression"
+cleanup
+mkdir h 
+touch h/a
+
+cd h
+${XAR} --compression=bzip2 -cf ../h.xar .
+if [ $? -ne 0 ]; then
+	echo "Error creating archive"
+	exit 1
+fi
+cd ..
+${XAR} --dump-toc=h.toc -f h.xar
+if [ $? -ne 0 ]; then
+	echo "Error dumping toc"
+	cleanup
+	exit 1
+fi
+
+offset=`xsltproc data.xsl h.toc | grep -v xml`
+if [ "$offset" != "" ]; then
+	echo "Zero length file has data section"
+	cleanup
+	exit 1
+fi
+
+extract_archive h.xar
+cleanup
+
+echo "Testing zero length files with bzip2 compression"
+cleanup
+mkdir h 
+touch h/a
+
+cd h
+${XAR} --compression=none -cf ../h.xar .
+if [ $? -ne 0 ]; then
+	echo "Error creating archive"
+	exit 1
+fi
+cd ..
+${XAR} --dump-toc=h.toc -f h.xar
+if [ $? -ne 0 ]; then
+	echo "Error dumping toc"
+	cleanup
+	exit 1
+fi
+
+offset=`xsltproc data.xsl h.toc | grep -v xml`
+if [ "$offset" != "" ]; then
+	echo "Zero length file has data section"
+	cleanup
+	exit 1
+fi
+
+extract_archive h.xar
+cleanup
+
+echo "Testing mixed zero length/populated files with gzip compression"
+cleanup
+mkdir h 
+touch h/a
+echo "foo" > h/b
+
+cd h
+${XAR} --compression=gzip -cf ../h.xar .
+if [ $? -ne 0 ]; then
+	echo "Error creating archive"
+	exit 1
+fi
+cd ..
+extract_archive h.xar
+contents=`cat a`
+if [ ! -z "$contents" ]; then
+	echo "File isn't zero length after extraction"
+	exit 1
+fi
+contents=`cat b`
+if [ "$contents" != "foo" ]; then
+	echo "Contents of populated file not the same after extraction"
+	exit 1
+fi
+cleanup
+
+echo "Testing mixed zero length/populated files with bzip2 compression"
+cleanup
+mkdir h 
+touch h/a
+echo "foo" > h/b
+
+cd h
+${XAR} --compression=bzip2 -cf ../h.xar .
+if [ $? -ne 0 ]; then
+	echo "Error creating archive"
+	exit 1
+fi
+cd ..
+
+extract_archive h.xar
+contents=`cat a`
+if [ ! -z "$contents" ]; then
+	echo "File isn't zero length after extraction"
+	exit 1
+fi
+contents=`cat b`
+if [ "$contents" != "foo" ]; then
+	echo "Contents of populated file not the same after extraction"
+	exit 1
+fi
+cleanup
+
+echo "Testing mixed zero length/populated files with no compression"
+cleanup
+mkdir h 
+touch h/a
+echo "foo" > h/b
+
+cd h
+${XAR} --compression=none -cf ../h.xar .
+if [ $? -ne 0 ]; then
+	echo "Error creating archive"
+	exit 1
+fi
+cd ..
+
+extract_archive h.xar
+contents=`cat a`
+if [ ! -z "$contents" ]; then
+	echo "File isn't zero length after extraction"
+	exit 1
+fi
+contents=`cat b`
+if [ "$contents" != "foo" ]; then
+	echo "Contents of populated file not the same after extraction"
+	exit 1
+fi
+
+cleanup

Deleted: branches/release_1_4/base/src/programs/xar/test/data.xsl
===================================================================
--- trunk/base/src/programs/xar/test/data.xsl	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/test/data.xsl	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0"
-xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-<xsl:template match="/">
-<xsl:value-of select="xar/toc/file/data/offset"/>
-</xsl:template>
-</xsl:stylesheet>

Copied: branches/release_1_4/base/src/programs/xar/test/data.xsl (from rev 23968, trunk/base/src/programs/xar/test/data.xsl)
===================================================================
--- branches/release_1_4/base/src/programs/xar/test/data.xsl	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/test/data.xsl	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:template match="/">
+<xsl:value-of select="xar/toc/file/data/offset"/>
+</xsl:template>
+</xsl:stylesheet>

Deleted: branches/release_1_4/base/src/programs/xar/test/functions
===================================================================
--- trunk/base/src/programs/xar/test/functions	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/test/functions	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,50 +0,0 @@
-XAR="xar"
-
-# Create an archive.
-# 1st arg: the archive to create
-# 2nd arg: the file to add to the archive
-create_archive() {
-	${XAR} -cf $1 $2
-	if [ $? -ne 0 ]; then
-		echo "Error creating archive"
-		exit 1
-	fi
-}
-
-# Extract an archive.  Exit on failure
-# 1st argument: archive to extract
-# 2nd argument (optional): file to extract from archive
-extract_archive() {
-	${XAR} -xf $1 $2
-	if [ $? -ne 0 ]; then
-		echo "Error extracting archive"
-		exit 1
-	fi
-}
-
-# Check if 2 files are linked.  Exit on failure
-# 1st and 2nd argument: files to see if they are the same
-check_hardlink() {
-	local a=$1
-	local b=$2
-
-	local inode1 inode2
-
-	if [ ! -f "${a}" ]; then
-		echo "Didn't extract file from archive 1"
-		exit 1
-	fi
-	
-	if [ ! -f "${b}" ]; then
-		echo "Didn't extract file from archive 1"
-		exit 1
-	fi
-	
-	inode1=`ls -i "${a}" | awk '{print $1}'`
-	inode2=`ls -i "${b}" | awk '{print $1}'`
-	
-	if [ "$inode1" != "$inode2" ]; then
-		echo "Inodes of extracted hardlinks not the same"
-		exit1
-	fi
-}

Copied: branches/release_1_4/base/src/programs/xar/test/functions (from rev 23968, trunk/base/src/programs/xar/test/functions)
===================================================================
--- branches/release_1_4/base/src/programs/xar/test/functions	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/test/functions	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,50 @@
+XAR="xar"
+
+# Create an archive.
+# 1st arg: the archive to create
+# 2nd arg: the file to add to the archive
+create_archive() {
+	${XAR} -cf $1 $2
+	if [ $? -ne 0 ]; then
+		echo "Error creating archive"
+		exit 1
+	fi
+}
+
+# Extract an archive.  Exit on failure
+# 1st argument: archive to extract
+# 2nd argument (optional): file to extract from archive
+extract_archive() {
+	${XAR} -xf $1 $2
+	if [ $? -ne 0 ]; then
+		echo "Error extracting archive"
+		exit 1
+	fi
+}
+
+# Check if 2 files are linked.  Exit on failure
+# 1st and 2nd argument: files to see if they are the same
+check_hardlink() {
+	local a=$1
+	local b=$2
+
+	local inode1 inode2
+
+	if [ ! -f "${a}" ]; then
+		echo "Didn't extract file from archive 1"
+		exit 1
+	fi
+	
+	if [ ! -f "${b}" ]; then
+		echo "Didn't extract file from archive 1"
+		exit 1
+	fi
+	
+	inode1=`ls -i "${a}" | awk '{print $1}'`
+	inode2=`ls -i "${b}" | awk '{print $1}'`
+	
+	if [ "$inode1" != "$inode2" ]; then
+		echo "Inodes of extracted hardlinks not the same"
+		exit1
+	fi
+}

Deleted: branches/release_1_4/base/src/programs/xar/test/hardlink
===================================================================
--- trunk/base/src/programs/xar/test/hardlink	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/test/hardlink	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,47 +0,0 @@
-#!/bin/bash
-
-. functions
-
-echo "Checking hardlinks in a directory"
-
-rm -rf h h1 h.xar
-mkdir h h1
-touch h/a
-ln h/a h/b
-
-create_archive h.xar h
-
-cd h1
-extract_archive ../h.xar
-check_hardlink "h/a" "h/b"
-cd ..
-rm -rf h h1 h.xar
-
-echo "Checking hardlinks in ."
-mkdir -p h h1
-cd h
-touch a
-ln a b
-create_archive ../h.xar .
-cd ../h1
-extract_archive ../h.xar
-check_hardlink "a" "b"
-cd ..
-rm -rf h h1 h.xar
-
-echo "Checking link extraction (no original)"
-rm -rf h h1 h.xar
-mkdir h h1
-touch h/a
-ln h/a h/b
-create_archive h.xar h
-cd h1
-extract_archive ../h.xar
-if [ ! -f h/b ]; then
-	echo "Error extracting link"
-	exit 1;
-fi
-cd ..
-rm -rf h h1 h.xar
-
-echo "Hardlink success"

Copied: branches/release_1_4/base/src/programs/xar/test/hardlink (from rev 23968, trunk/base/src/programs/xar/test/hardlink)
===================================================================
--- branches/release_1_4/base/src/programs/xar/test/hardlink	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/test/hardlink	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+. functions
+
+echo "Checking hardlinks in a directory"
+
+rm -rf h h1 h.xar
+mkdir h h1
+touch h/a
+ln h/a h/b
+
+create_archive h.xar h
+
+cd h1
+extract_archive ../h.xar
+check_hardlink "h/a" "h/b"
+cd ..
+rm -rf h h1 h.xar
+
+echo "Checking hardlinks in ."
+mkdir -p h h1
+cd h
+touch a
+ln a b
+create_archive ../h.xar .
+cd ../h1
+extract_archive ../h.xar
+check_hardlink "a" "b"
+cd ..
+rm -rf h h1 h.xar
+
+echo "Checking link extraction (no original)"
+rm -rf h h1 h.xar
+mkdir h h1
+touch h/a
+ln h/a h/b
+create_archive h.xar h
+cd h1
+extract_archive ../h.xar
+if [ ! -f h/b ]; then
+	echo "Error extracting link"
+	exit 1;
+fi
+cd ..
+rm -rf h h1 h.xar
+
+echo "Hardlink success"

Deleted: branches/release_1_4/base/src/programs/xar/test/heap
===================================================================
--- trunk/base/src/programs/xar/test/heap	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/test/heap	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,97 +0,0 @@
-#!/bin/sh
-
-. functions
-
-cleanup() {
-	rm -rf h h1 h.xar h.toc h.out
-}
-
-echo "Checking normal heap archiving"
-cleanup
-mkdir -p h h1
-cp /bin/ls h
-cp h/ls h/foo
-
-cd h
-create_archive ../h.xar .
-cd ..
-${XAR} --dump-toc=h.toc -f h.xar
-cd h1
-extract_archive ../h.xar
-cd ..
-xsltproc heap1.xsl h.toc > h.out
-if [ $? -ne 0 ]; then
-	echo "Error processing toc"
-	cleanup
-	exit 1
-fi
-
-offset1=`head -1 h.out | awk '{print $2}'`
-offset2=`tail -1 h.out | awk '{print $2}'`
-if [ $offset1 -ge $offset2 ]; then
-	echo "Offset of first file is greater than or equal to offset of the first file"
-	cleanup
-	exit 1
-fi
-cleanup
-
-
-echo "Checking --coalesce-heap heap archiving"
-mkdir -p h h1
-cp /bin/ls h
-cp h/ls h/foo
-
-cd h
-${XAR} --coalesce-heap -cf ../h.xar .
-if [ $? -ne 0 ]; then
-	echo "Error creating archive"
-	cleanup
-	exit 1
-fi
-cd ..
-${XAR} --dump-toc=h.toc -f h.xar
-cd h1
-extract_archive ../h.xar
-cd ..
-xsltproc heap1.xsl h.toc > h.out
-if [ $? -ne 0 ]; then
-	echo "Error processing toc"
-	cleanup
-	exit 1
-fi
-
-offset1=`head -1 h.out | awk '{print $2}'`
-offset2=`tail -1 h.out | awk '{print $2}'`
-if [ $offset1 -ne $offset2 ]; then
-	echo "Offset of the files differ"
-	cleanup
-	exit 1
-fi
-cleanup
-
-
-echo "Checking --link-same heap archiving"
-mkdir -p h h1
-cp /bin/ls h
-cp h/ls h/foo
-
-cd h
-${XAR} --link-same -cf ../h.xar .
-if [ $? -ne 0 ]; then
-	echo "Error creating archive"
-	cleanup
-	exit 1
-fi
-cd ..
-${XAR} --dump-toc=h.toc -f h.xar
-cd h1
-extract_archive ../h.xar
-cd ..
-inode1=`ls -i h1/ls | awk '{print $1}'`
-inode2=`ls -i h1/foo | awk '{print $1}'`
-if [ $inode1 -ne $inode2 ]; then
-	echo "Inodes of extracted files don't match"
-	cleanup
-	exit 1
-fi
-cleanup

Copied: branches/release_1_4/base/src/programs/xar/test/heap (from rev 23968, trunk/base/src/programs/xar/test/heap)
===================================================================
--- branches/release_1_4/base/src/programs/xar/test/heap	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/test/heap	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,97 @@
+#!/bin/sh
+
+. functions
+
+cleanup() {
+	rm -rf h h1 h.xar h.toc h.out
+}
+
+echo "Checking normal heap archiving"
+cleanup
+mkdir -p h h1
+cp /bin/ls h
+cp h/ls h/foo
+
+cd h
+create_archive ../h.xar .
+cd ..
+${XAR} --dump-toc=h.toc -f h.xar
+cd h1
+extract_archive ../h.xar
+cd ..
+xsltproc heap1.xsl h.toc > h.out
+if [ $? -ne 0 ]; then
+	echo "Error processing toc"
+	cleanup
+	exit 1
+fi
+
+offset1=`head -1 h.out | awk '{print $2}'`
+offset2=`tail -1 h.out | awk '{print $2}'`
+if [ $offset1 -ge $offset2 ]; then
+	echo "Offset of first file is greater than or equal to offset of the first file"
+	cleanup
+	exit 1
+fi
+cleanup
+
+
+echo "Checking --coalesce-heap heap archiving"
+mkdir -p h h1
+cp /bin/ls h
+cp h/ls h/foo
+
+cd h
+${XAR} --coalesce-heap -cf ../h.xar .
+if [ $? -ne 0 ]; then
+	echo "Error creating archive"
+	cleanup
+	exit 1
+fi
+cd ..
+${XAR} --dump-toc=h.toc -f h.xar
+cd h1
+extract_archive ../h.xar
+cd ..
+xsltproc heap1.xsl h.toc > h.out
+if [ $? -ne 0 ]; then
+	echo "Error processing toc"
+	cleanup
+	exit 1
+fi
+
+offset1=`head -1 h.out | awk '{print $2}'`
+offset2=`tail -1 h.out | awk '{print $2}'`
+if [ $offset1 -ne $offset2 ]; then
+	echo "Offset of the files differ"
+	cleanup
+	exit 1
+fi
+cleanup
+
+
+echo "Checking --link-same heap archiving"
+mkdir -p h h1
+cp /bin/ls h
+cp h/ls h/foo
+
+cd h
+${XAR} --link-same -cf ../h.xar .
+if [ $? -ne 0 ]; then
+	echo "Error creating archive"
+	cleanup
+	exit 1
+fi
+cd ..
+${XAR} --dump-toc=h.toc -f h.xar
+cd h1
+extract_archive ../h.xar
+cd ..
+inode1=`ls -i h1/ls | awk '{print $1}'`
+inode2=`ls -i h1/foo | awk '{print $1}'`
+if [ $inode1 -ne $inode2 ]; then
+	echo "Inodes of extracted files don't match"
+	cleanup
+	exit 1
+fi
+cleanup

Deleted: branches/release_1_4/base/src/programs/xar/test/heap1.xsl
===================================================================
--- trunk/base/src/programs/xar/test/heap1.xsl	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/test/heap1.xsl	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0"
-xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<xsl:output method="text"/>
-	<xsl:template match="/">
-		<xsl:apply-templates select="xar/toc/file"/>
-	</xsl:template>
-
-	<xsl:template match="file">
-		<xsl:value-of select="name"/>
-		<xsl:text disable-output-escaping="yes">&#032;</xsl:text>
-		<xsl:value-of select="data/offset"/>
-		<xsl:text disable-output-escaping="yes">&#010;</xsl:text>
-	</xsl:template>
-</xsl:stylesheet>

Copied: branches/release_1_4/base/src/programs/xar/test/heap1.xsl (from rev 23968, trunk/base/src/programs/xar/test/heap1.xsl)
===================================================================
--- branches/release_1_4/base/src/programs/xar/test/heap1.xsl	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/test/heap1.xsl	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="text"/>
+	<xsl:template match="/">
+		<xsl:apply-templates select="xar/toc/file"/>
+	</xsl:template>
+
+	<xsl:template match="file">
+		<xsl:value-of select="name"/>
+		<xsl:text disable-output-escaping="yes">&#032;</xsl:text>
+		<xsl:value-of select="data/offset"/>
+		<xsl:text disable-output-escaping="yes">&#010;</xsl:text>
+	</xsl:template>
+</xsl:stylesheet>

Deleted: branches/release_1_4/base/src/programs/xar/test/validate.c
===================================================================
--- trunk/base/src/programs/xar/test/validate.c	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/test/validate.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,159 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <inttypes.h>
-#include <netinet/in.h>
-#include <limits.h>
-#include <getopt.h>
-#include <regex.h>
-#include <errno.h>
-#include <openssl/evp.h>
-#include <xar/xar.h>
-
-off_t HeapOff = 0;
-
-static char* xar_format_md5(const unsigned char* m) {
-        char* result = NULL;
-        asprintf(&result,
-                "%02x%02x%02x%02x"
-                "%02x%02x%02x%02x"
-                "%02x%02x%02x%02x"
-                "%02x%02x%02x%02x",
-                m[0], m[1], m[2], m[3],
-                m[4], m[5], m[6], m[7],
-                m[8], m[9], m[10], m[11],
-                m[12], m[13], m[14], m[15]);
-        return result;
-}
-
-void heap_check(int fd, const char *name, const char *prop, off_t offset, off_t length, const char *csum) {
-	char *buf;
-	EVP_MD_CTX ctx;
-	const EVP_MD *md;
-	unsigned char md5str[EVP_MAX_MD_SIZE];
-	unsigned int len;
-	ssize_t r;
-	char *formattedmd5;
-
-	fprintf(stderr, "Heap checking %s %s at offset: %" PRIu64 "\n", name, prop, HeapOff+offset);
-	OpenSSL_add_all_digests();
-	md = EVP_get_digestbyname("md5");
-	if( md == NULL ) {
-		fprintf(stderr, "No md5 digest in openssl\n");
-		exit(1);
-	}
-	EVP_DigestInit(&ctx, md);
-
-	buf = malloc(length);
-	if( !buf ) {
-		fprintf(stderr, "Error allocating buffer\n");
-		exit(1);
-	}
-
-	if( lseek(fd, HeapOff+offset, SEEK_SET) < 0 ) {
-		perror("lseek");
-		fprintf(stderr, "Error seeking in the heap to offet: %" PRIu64 "\n", HeapOff+offset);
-		exit(1);
-	}
-
-	r = read(fd, buf, length);
-	if( r != length ) {
-		fprintf(stderr, "Error reading from the heap\n");
-		exit(1);
-	}
-	EVP_DigestUpdate(&ctx, buf, length);
-	EVP_DigestFinal(&ctx, md5str, &len);
-
-	formattedmd5 = xar_format_md5(md5str);
-	if( strcmp(formattedmd5, csum) != 0 ) {
-		fprintf(stderr, "%s %s checksum does not match\n", name, prop);
-	}
-	free(formattedmd5);
-	free(buf);
-}
-
-void prop_check(int fd, xar_t x, xar_file_t f) {
-	xar_iter_t i;
-	const char *key, *value;
-	const char *name = NULL;
-	char *tmp;
-	off_t offset = 0, length = 0;
-	const char *origcsum = NULL;
-	
-	i = xar_iter_new(x);
-	if( !i ) {
-		fprintf(stderr, "Error creating new prop iter\n");
-		exit(1);
-	}
-
-	xar_prop_get(f, "name", &name);
-
-	for( key = xar_prop_first(f, i); key; key = xar_prop_next(i) ) {
-		asprintf(&tmp, "%s/offset", key);
-		if( xar_prop_get(f, tmp, &value) == 0 ) {
-			offset = strtoll(value, NULL, 10);
-		}
-		free(tmp);
-		asprintf(&tmp, "%s/length", key);
-		if( xar_prop_get(f, tmp, &value) == 0 ) {
-			length = strtoll(value, NULL, 10);
-		}
-		free(tmp);
-		asprintf(&tmp, "%s/archived-checksum", key);
-		if( xar_prop_get(f, tmp, &value) == 0 ) {
-			origcsum = value;
-		}
-		free(tmp);
-
-		if( offset && length && origcsum ) {
-			heap_check(fd, name, key, offset, length, origcsum);
-			offset = 0;
-			length = 0;
-			origcsum = NULL;
-		}
-	}
-
-}
-
-int main(int argc, char *argv[]) {
-	char *file = argv[1];
-	xar_t x;
-	xar_iter_t ifile, iprop, iattr;
-	xar_file_t f;
-	const char *key;
-	int fd;
-	off_t off;
-	xar_header_t hdr;
-	
-	x = xar_open(file, READ);
-	if( !x ) {
-		fprintf(stderr, "Error opening archive\n");
-		exit(1);
-	}
-
-	fd = open(file, O_RDONLY);
-	if( fd < 0 ) {
-		fprintf(stderr, "Error opening archive\n");
-		exit(1);
-	}
-
-	read(fd, &hdr, sizeof(hdr));
-	hdr.size = htons(hdr.size);
-	hdr.toc_length_compressed = xar_ntoh64(hdr.toc_length_compressed);
-	HeapOff = hdr.size + hdr.toc_length_compressed;
-
-	ifile = xar_iter_new();
-	if( !ifile ) {
-		fprintf(stderr, "Error creating file iterator");
-		exit(1);
-	}
-
-	for(f = xar_file_first(x, ifile); f; f = xar_file_next(ifile)) {
-		prop_check(fd, x, f);
-	}
-	
-}

Copied: branches/release_1_4/base/src/programs/xar/test/validate.c (from rev 23968, trunk/base/src/programs/xar/test/validate.c)
===================================================================
--- branches/release_1_4/base/src/programs/xar/test/validate.c	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/test/validate.c	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,159 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <inttypes.h>
+#include <netinet/in.h>
+#include <limits.h>
+#include <getopt.h>
+#include <regex.h>
+#include <errno.h>
+#include <openssl/evp.h>
+#include <xar/xar.h>
+
+off_t HeapOff = 0;
+
+static char* xar_format_md5(const unsigned char* m) {
+        char* result = NULL;
+        asprintf(&result,
+                "%02x%02x%02x%02x"
+                "%02x%02x%02x%02x"
+                "%02x%02x%02x%02x"
+                "%02x%02x%02x%02x",
+                m[0], m[1], m[2], m[3],
+                m[4], m[5], m[6], m[7],
+                m[8], m[9], m[10], m[11],
+                m[12], m[13], m[14], m[15]);
+        return result;
+}
+
+void heap_check(int fd, const char *name, const char *prop, off_t offset, off_t length, const char *csum) {
+	char *buf;
+	EVP_MD_CTX ctx;
+	const EVP_MD *md;
+	unsigned char md5str[EVP_MAX_MD_SIZE];
+	unsigned int len;
+	ssize_t r;
+	char *formattedmd5;
+
+	fprintf(stderr, "Heap checking %s %s at offset: %" PRIu64 "\n", name, prop, HeapOff+offset);
+	OpenSSL_add_all_digests();
+	md = EVP_get_digestbyname("md5");
+	if( md == NULL ) {
+		fprintf(stderr, "No md5 digest in openssl\n");
+		exit(1);
+	}
+	EVP_DigestInit(&ctx, md);
+
+	buf = malloc(length);
+	if( !buf ) {
+		fprintf(stderr, "Error allocating buffer\n");
+		exit(1);
+	}
+
+	if( lseek(fd, HeapOff+offset, SEEK_SET) < 0 ) {
+		perror("lseek");
+		fprintf(stderr, "Error seeking in the heap to offet: %" PRIu64 "\n", HeapOff+offset);
+		exit(1);
+	}
+
+	r = read(fd, buf, length);
+	if( r != length ) {
+		fprintf(stderr, "Error reading from the heap\n");
+		exit(1);
+	}
+	EVP_DigestUpdate(&ctx, buf, length);
+	EVP_DigestFinal(&ctx, md5str, &len);
+
+	formattedmd5 = xar_format_md5(md5str);
+	if( strcmp(formattedmd5, csum) != 0 ) {
+		fprintf(stderr, "%s %s checksum does not match\n", name, prop);
+	}
+	free(formattedmd5);
+	free(buf);
+}
+
+void prop_check(int fd, xar_t x, xar_file_t f) {
+	xar_iter_t i;
+	const char *key, *value;
+	const char *name = NULL;
+	char *tmp;
+	off_t offset = 0, length = 0;
+	const char *origcsum = NULL;
+	
+	i = xar_iter_new(x);
+	if( !i ) {
+		fprintf(stderr, "Error creating new prop iter\n");
+		exit(1);
+	}
+
+	xar_prop_get(f, "name", &name);
+
+	for( key = xar_prop_first(f, i); key; key = xar_prop_next(i) ) {
+		asprintf(&tmp, "%s/offset", key);
+		if( xar_prop_get(f, tmp, &value) == 0 ) {
+			offset = strtoll(value, NULL, 10);
+		}
+		free(tmp);
+		asprintf(&tmp, "%s/length", key);
+		if( xar_prop_get(f, tmp, &value) == 0 ) {
+			length = strtoll(value, NULL, 10);
+		}
+		free(tmp);
+		asprintf(&tmp, "%s/archived-checksum", key);
+		if( xar_prop_get(f, tmp, &value) == 0 ) {
+			origcsum = value;
+		}
+		free(tmp);
+
+		if( offset && length && origcsum ) {
+			heap_check(fd, name, key, offset, length, origcsum);
+			offset = 0;
+			length = 0;
+			origcsum = NULL;
+		}
+	}
+
+}
+
+int main(int argc, char *argv[]) {
+	char *file = argv[1];
+	xar_t x;
+	xar_iter_t ifile, iprop, iattr;
+	xar_file_t f;
+	const char *key;
+	int fd;
+	off_t off;
+	xar_header_t hdr;
+	
+	x = xar_open(file, READ);
+	if( !x ) {
+		fprintf(stderr, "Error opening archive\n");
+		exit(1);
+	}
+
+	fd = open(file, O_RDONLY);
+	if( fd < 0 ) {
+		fprintf(stderr, "Error opening archive\n");
+		exit(1);
+	}
+
+	read(fd, &hdr, sizeof(hdr));
+	hdr.size = htons(hdr.size);
+	hdr.toc_length_compressed = xar_ntoh64(hdr.toc_length_compressed);
+	HeapOff = hdr.size + hdr.toc_length_compressed;
+
+	ifile = xar_iter_new();
+	if( !ifile ) {
+		fprintf(stderr, "Error creating file iterator");
+		exit(1);
+	}
+
+	for(f = xar_file_first(x, ifile); f; f = xar_file_next(ifile)) {
+		prop_check(fd, x, f);
+	}
+	
+}

Deleted: branches/release_1_4/base/src/programs/xar/xar.spec
===================================================================
--- trunk/base/src/programs/xar/xar.spec	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/src/programs/xar/xar.spec	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,77 +0,0 @@
-Name: xar
-Epoch: 0
-Version: 1.4
-Release: 1
-Summary: The XAR project aims to provide an easily extensible archive format.
-Group: Applications/Archivers
-License: BSD
-URL: http://www.opendarwin.org/projects/%{name}/
-Source: http://www.opendarwin.org/projects/%{name}/%{name}-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{epoch}-%{version}-%{release}-root
-BuildRequires: libxml2-devel >= 2.6.11
-BuildRequires: openssl-devel
-BuildRequires: bzip2-libs
-BuildRequires: zlib
-Requires: bzip2-libs
-Requires: libxml2-devel >= 2.6.11
-Requires: openssl-devel
-
-%description
-The XAR project aims to provide an easily extensible archive format. Important
-design decisions include an easily extensible XML table of contents for random
-access to archived files, storing the toc at the beginning of the archive to
-allow for efficient handling of streamed archives, the ability to handle files
-of arbitrarily large sizes, the ability to choose independent encodings for
-individual files in the archive, the ability to store checksums for individual
-files in both compressed and uncompressed form, and the ability to query the
-table of content's rich meta-data.
-
-%package devel
-Summary: Libraries and header files required for xar.
-Group: Development/Libraries
-Provides: lib%{name}.so
-Requires: %{name} = %{epoch}:%{version}-%{release}
-
-%description devel
-Libraries and header files required for xar.
-
-%prep
-%setup -q -n %{name}-%{version}
-
-%build
-%configure
-%{__make}
-
-%install
-%{__rm} -rf $RPM_BUILD_ROOT
-%makeinstall
-
-%clean
-%{__rm} -rf $RPM_BUILD_ROOT
-
-%files
-%defattr(-,root,root,-)
-%doc LICENSE TODO
-%{_bindir}/%{name}
-
-%files devel
-%{_includedir}/%{name}/%{name}.h
-%{_libdir}/lib%{name}.so
-%{_libdir}/lib%{name}.1.so
-
-%changelog
-* Thu Feb 23 2005 Rob Braun <bbraun at opendarwin.org> - 0:1.2-1
-- 1.4
-* Mon Oct 24 2005 Rob Braun <bbraun at opendarwin.org> - 0:1.2-1
-- 1.3
-* Wed Sep 21 2005 Jason Corley <jason.corley at gmail.com> - 0:1.1-1
-- 1.1
-- correct library version
-- add specific version to libxml requirements
-
-* Fri Sep 09 2005 Jason Corley <jason.corley at gmail.com> - 0:1.0-1
-- 1.0
-
-* Sat Apr 23 2005 Jason Corley <jason.corley at gmail.com> - 0:0.0.0-0.20050423.0
-- Initial RPM release.
-

Copied: branches/release_1_4/base/src/programs/xar/xar.spec (from rev 23968, trunk/base/src/programs/xar/xar.spec)
===================================================================
--- branches/release_1_4/base/src/programs/xar/xar.spec	                        (rev 0)
+++ branches/release_1_4/base/src/programs/xar/xar.spec	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,77 @@
+Name: xar
+Epoch: 0
+Version: 1.4
+Release: 1
+Summary: The XAR project aims to provide an easily extensible archive format.
+Group: Applications/Archivers
+License: BSD
+URL: http://www.opendarwin.org/projects/%{name}/
+Source: http://www.opendarwin.org/projects/%{name}/%{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{epoch}-%{version}-%{release}-root
+BuildRequires: libxml2-devel >= 2.6.11
+BuildRequires: openssl-devel
+BuildRequires: bzip2-libs
+BuildRequires: zlib
+Requires: bzip2-libs
+Requires: libxml2-devel >= 2.6.11
+Requires: openssl-devel
+
+%description
+The XAR project aims to provide an easily extensible archive format. Important
+design decisions include an easily extensible XML table of contents for random
+access to archived files, storing the toc at the beginning of the archive to
+allow for efficient handling of streamed archives, the ability to handle files
+of arbitrarily large sizes, the ability to choose independent encodings for
+individual files in the archive, the ability to store checksums for individual
+files in both compressed and uncompressed form, and the ability to query the
+table of content's rich meta-data.
+
+%package devel
+Summary: Libraries and header files required for xar.
+Group: Development/Libraries
+Provides: lib%{name}.so
+Requires: %{name} = %{epoch}:%{version}-%{release}
+
+%description devel
+Libraries and header files required for xar.
+
+%prep
+%setup -q -n %{name}-%{version}
+
+%build
+%configure
+%{__make}
+
+%install
+%{__rm} -rf $RPM_BUILD_ROOT
+%makeinstall
+
+%clean
+%{__rm} -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,-)
+%doc LICENSE TODO
+%{_bindir}/%{name}
+
+%files devel
+%{_includedir}/%{name}/%{name}.h
+%{_libdir}/lib%{name}.so
+%{_libdir}/lib%{name}.1.so
+
+%changelog
+* Thu Feb 23 2005 Rob Braun <bbraun at opendarwin.org> - 0:1.2-1
+- 1.4
+* Mon Oct 24 2005 Rob Braun <bbraun at opendarwin.org> - 0:1.2-1
+- 1.3
+* Wed Sep 21 2005 Jason Corley <jason.corley at gmail.com> - 0:1.1-1
+- 1.1
+- correct library version
+- add specific version to libxml requirements
+
+* Fri Sep 09 2005 Jason Corley <jason.corley at gmail.com> - 0:1.0-1
+- 1.0
+
+* Sat Apr 23 2005 Jason Corley <jason.corley at gmail.com> - 0:0.0.0-0.20050423.0
+- Initial RPM release.
+

Modified: branches/release_1_4/base/tests/Makefile
===================================================================
--- branches/release_1_4/base/tests/Makefile	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/Makefile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,29 +1,40 @@
 include ../Mk/dports.autoconf.mk
 
-TESTS?=checksums-1 cvs-and-patchsites envvariables site-tags trace xcodeversion
+TESTS?=checksums-1 cvs-and-patchsites envvariables site-tags trace universal universal-2 xcodeversion dependencies-c
 
-.PHONY: test clean
+.PHONY: test clean PortIndex
 
 all:
 
-/tmp/darwinports-tests/opt/local/etc/ports/sources.conf: sources.conf
+/tmp/macports-tests/opt/local/etc/ports/sources.conf: sources.conf
 	@echo setting up test installation
-	rm -rf /tmp/darwinports-tests/
-	mkdir -p /tmp/darwinports-tests/opt/local/etc/ports/
-	mkdir -p /tmp/darwinports-tests/opt/local/share/
-	mkdir -p /tmp/darwinports-tests/opt/local/var/db/dports/receipts/
-	ln -s $(datadir)/darwinports /tmp/darwinports-tests/opt/local/share/
-	cp sources.conf /tmp/darwinports-tests/opt/local/etc/ports/
+	rm -rf /tmp/macports-tests/
+	mkdir -p /tmp/macports-tests/dports
+	mkdir -p /tmp/macports-tests/opt/local/etc/ports/
+	mkdir -p /tmp/macports-tests/opt/local/share/
+	mkdir -p /tmp/macports-tests/opt/local/var/db/dports/receipts/
+	mkdir -p /tmp/macports-tests/opt/local/var/db/dports/build/
+	ln -s $(datadir)/darwinports /tmp/macports-tests/opt/local/share/
+	ln -s $(PWD)/test /tmp/macports-tests/dports/
+	cp sources.conf /tmp/macports-tests/opt/local/etc/ports/
 
+/tmp/macports-tests/dports/PortIndex: /tmp/macports-tests/opt/local/etc/ports/sources.conf PortIndex
+	cp PortIndex /tmp/macports-tests/dports/PortIndex
+
+PortIndex:
+	portindex
+
 clean:
-	rm -rf /tmp/darwinports-tests/
+	rm -rf /tmp/macports-tests/
+	rm -f PortIndex
 
 $(bindir)/port:
-	@echo "Please install DarwinPorts before running these tests"
+	@echo "Please install macports before running these tests"
 	@exit 1
 	
-test: clean /tmp/darwinports-tests/opt/local/etc/ports/sources.conf
-	@for subdir in $(TESTS); do\
+test: clean /tmp/macports-tests/dports/PortIndex /tmp/macports-tests/opt/local/etc/ports/sources.conf
+	@for testname in $(TESTS); do\
+	    subdir=test/$$testname; \
 		echo ===\> test ${DIRPRFX}$$subdir; \
 		if [ -e ${DIRPRFX}$$subdir/Makefile ]; then \
 			( cd $$subdir && \
@@ -42,7 +53,8 @@
 			fi) \
 		fi || exit 1; \
 	done
-	@rm -rf /tmp/darwinports-tests/
+	@rm -rf /tmp/macports-tests/
+	@rm -f PortIndex
 
 install:
 

Modified: branches/release_1_4/base/tests/sources.conf
===================================================================
--- branches/release_1_4/base/tests/sources.conf	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/sources.conf	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,7 +1,3 @@
 # To enable your local ports repository, uncomment and customize the
 # following line to point at your local dports directory
-# Example: file:///Users/landonf/misc/darwinports/dports
-#
-# To get darwinports from the opendarwin rsync server use:
-# rsync://rsync.opendarwin.org/dpupdate/dports
-rsync://rsync.opendarwin.org/dpupdate/dports
+file:///tmp/macports-tests/dports

Copied: branches/release_1_4/base/tests/test (from rev 23968, trunk/base/tests/test)

Copied: branches/release_1_4/base/tests/test/checksums-1 (from rev 23968, trunk/base/tests/test/checksums-1)


Property changes on: branches/release_1_4/base/tests/test/checksums-1
___________________________________________________________________
Name: svn:ignore
   + output


Deleted: branches/release_1_4/base/tests/test/checksums-1/Portfile
===================================================================
--- trunk/base/tests/test/checksums-1/Portfile	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test/checksums-1/Portfile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,35 +0,0 @@
-# $Id$
-
-PortSystem 1.0
-name		checksum
-version		1
-categories	test
-maintainers	opendarwin.org at darkart.com
-description	Test port for checksum functionalities
-homepage	http://www.macports.org/
-platforms	darwin
-
-long_description ${description}
-
-master_sites	file:///dev/null
-
-fetch {
-	system "mkdir -p $distpath"
-	system "cat /dev/null > $distpath/$distname.tar.gz"
-}
-
-checksums \
-	md5 d41d8cd98f00b204e9800998ecf8427e \
-	sha1 da39a3ee5e6b4b0d3255bfef95601890afd80709 \
-	rmd160 9c1185a5c5e9fc54612808977ee8f548b2258d31
-
-extract		{}
-configure	{}
-build		{}
-destroot	{
-	system "touch ${destroot}${prefix}/lib/${name}"
-}
-
-test {
-	# test is actually running checksum target
-}
\ No newline at end of file

Copied: branches/release_1_4/base/tests/test/checksums-1/Portfile (from rev 23968, trunk/base/tests/test/checksums-1/Portfile)
===================================================================
--- branches/release_1_4/base/tests/test/checksums-1/Portfile	                        (rev 0)
+++ branches/release_1_4/base/tests/test/checksums-1/Portfile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,35 @@
+# $Id$
+
+PortSystem 1.0
+name		checksum
+version		1
+categories	test
+maintainers	opendarwin.org at darkart.com
+description	Test port for checksum functionalities
+homepage	http://www.macports.org/
+platforms	darwin
+
+long_description ${description}
+
+master_sites	file:///dev/null
+
+fetch {
+	system "mkdir -p $distpath"
+	system "cat /dev/null > $distpath/$distname.tar.gz"
+}
+
+checksums \
+	md5 d41d8cd98f00b204e9800998ecf8427e \
+	sha1 da39a3ee5e6b4b0d3255bfef95601890afd80709 \
+	rmd160 9c1185a5c5e9fc54612808977ee8f548b2258d31
+
+extract		{}
+configure	{}
+build		{}
+destroot	{
+	system "touch ${destroot}${prefix}/lib/${name}"
+}
+
+test {
+	# test is actually running checksum target
+}
\ No newline at end of file

Deleted: branches/release_1_4/base/tests/test/checksums-1/master
===================================================================
--- trunk/base/tests/test/checksums-1/master	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test/checksums-1/master	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,6 +0,0 @@
---->  Fetching checksum
---->  Verifying checksum(s) for checksum
---->  Extracting checksum
---->  Configuring checksum
---->  Building checksum with target all
---->  Testing checksum

Copied: branches/release_1_4/base/tests/test/checksums-1/master (from rev 23968, trunk/base/tests/test/checksums-1/master)
===================================================================
--- branches/release_1_4/base/tests/test/checksums-1/master	                        (rev 0)
+++ branches/release_1_4/base/tests/test/checksums-1/master	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,6 @@
+--->  Fetching checksum
+--->  Verifying checksum(s) for checksum
+--->  Extracting checksum
+--->  Configuring checksum
+--->  Building checksum with target all
+--->  Testing checksum

Copied: branches/release_1_4/base/tests/test/cvs-and-patchsites (from rev 23968, trunk/base/tests/test/cvs-and-patchsites)


Property changes on: branches/release_1_4/base/tests/test/cvs-and-patchsites
___________________________________________________________________
Name: svn:ignore
   + output


Deleted: branches/release_1_4/base/tests/test/cvs-and-patchsites/Portfile
===================================================================
--- trunk/base/tests/test/cvs-and-patchsites/Portfile	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test/cvs-and-patchsites/Portfile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,35 +0,0 @@
-# $Id$
-
-PortSystem 1.0
-name		cvs-and-patchsites
-version		1
-categories	test
-maintainers	pguyot at kallisys.net
-description	Test port for cvs+distant patchfiles functionalities
-homepage	http://www.macports.org/
-platforms	darwin
-
-long_description ${description}
-
-fetch.type          cvs
-cvs.root            :pserver:anonymous at cvs.mutt.org:/home/roessler/cvs
-cvs.module          mutt
-cvs.password        anonymous
-worksrcdir          mutt
-
-patch_sites      http://home.uchicago.edu/~dgc/sw/mutt/
-patchfiles       patch-1.5.14.dgc.xlabel_ext.9
-checksums        patch-1.5.14.dgc.xlabel_ext.9 md5 c5badc733020187b6677f31b343195e8
-
-# disable the patch phase in case the cvs code gets out of sync with the patch.
-patch		{}
-extract		{}
-configure	{}
-build		{}
-destroot	{
-	system "touch ${destroot}${prefix}/lib/${name}"
-}
-
-test {
-	# test is actually running the fetch target
-}

Copied: branches/release_1_4/base/tests/test/cvs-and-patchsites/Portfile (from rev 23968, trunk/base/tests/test/cvs-and-patchsites/Portfile)
===================================================================
--- branches/release_1_4/base/tests/test/cvs-and-patchsites/Portfile	                        (rev 0)
+++ branches/release_1_4/base/tests/test/cvs-and-patchsites/Portfile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,35 @@
+# $Id$
+
+PortSystem 1.0
+name		cvs-and-patchsites
+version		1
+categories	test
+maintainers	pguyot at kallisys.net
+description	Test port for cvs+distant patchfiles functionalities
+homepage	http://www.macports.org/
+platforms	darwin
+
+long_description ${description}
+
+fetch.type          cvs
+cvs.root            :pserver:anonymous at cvs.mutt.org:/home/roessler/cvs
+cvs.module          mutt
+cvs.password        anonymous
+worksrcdir          mutt
+
+patch_sites      http://home.uchicago.edu/~dgc/sw/mutt/
+patchfiles       patch-1.5.14.dgc.xlabel_ext.9
+checksums        patch-1.5.14.dgc.xlabel_ext.9 md5 c5badc733020187b6677f31b343195e8
+
+# disable the patch phase in case the cvs code gets out of sync with the patch.
+patch		{}
+extract		{}
+configure	{}
+build		{}
+destroot	{
+	system "touch ${destroot}${prefix}/lib/${name}"
+}
+
+test {
+	# test is actually running the fetch target
+}

Deleted: branches/release_1_4/base/tests/test/cvs-and-patchsites/master
===================================================================
--- trunk/base/tests/test/cvs-and-patchsites/master	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test/cvs-and-patchsites/master	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,7 +0,0 @@
---->  Fetching cvs-and-patchsites
---->  Attempting to fetch patch-1.5.14.dgc.xlabel_ext.9 from http://home.uchicago.edu/~dgc/sw/mutt/
---->  Verifying checksum(s) for cvs-and-patchsites
---->  Extracting cvs-and-patchsites
---->  Configuring cvs-and-patchsites
---->  Building cvs-and-patchsites with target all
---->  Testing cvs-and-patchsites

Copied: branches/release_1_4/base/tests/test/cvs-and-patchsites/master (from rev 23968, trunk/base/tests/test/cvs-and-patchsites/master)
===================================================================
--- branches/release_1_4/base/tests/test/cvs-and-patchsites/master	                        (rev 0)
+++ branches/release_1_4/base/tests/test/cvs-and-patchsites/master	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,7 @@
+--->  Fetching cvs-and-patchsites
+--->  Attempting to fetch patch-1.5.14.dgc.xlabel_ext.9 from http://home.uchicago.edu/~dgc/sw/mutt/
+--->  Verifying checksum(s) for cvs-and-patchsites
+--->  Extracting cvs-and-patchsites
+--->  Configuring cvs-and-patchsites
+--->  Building cvs-and-patchsites with target all
+--->  Testing cvs-and-patchsites

Copied: branches/release_1_4/base/tests/test/dependencies-a (from rev 23968, trunk/base/tests/test/dependencies-a)


Property changes on: branches/release_1_4/base/tests/test/dependencies-a
___________________________________________________________________
Name: svn:ignore
   + output


Deleted: branches/release_1_4/base/tests/test/dependencies-a/Portfile
===================================================================
--- trunk/base/tests/test/dependencies-a/Portfile	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test/dependencies-a/Portfile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,31 +0,0 @@
-# $Id$
-
-PortSystem 1.0
-name		dependencies-a
-version		1
-categories	test
-maintainers	pguyot at kallisys.net
-description	Test port for dependencies
-homepage	http://www.macports.org/
-platforms	darwin
-
-long_description ${description}
-
-fetch		{}
-checksum	{}
-extract		{}
-configure	{}
-build		{}
-destroot	{
-	system "touch ${destroot}${prefix}/lib/${name}"
-}
-
-default_variants	+i_want_b
-
-variant i_want_b {
-	depends_lib-append	port:dependencies-b
-}
-
-test {
-# testing consists in processing dependencies
-}

Copied: branches/release_1_4/base/tests/test/dependencies-a/Portfile (from rev 23968, trunk/base/tests/test/dependencies-a/Portfile)
===================================================================
--- branches/release_1_4/base/tests/test/dependencies-a/Portfile	                        (rev 0)
+++ branches/release_1_4/base/tests/test/dependencies-a/Portfile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,31 @@
+# $Id$
+
+PortSystem 1.0
+name		dependencies-a
+version		1
+categories	test
+maintainers	pguyot at kallisys.net
+description	Test port for dependencies
+homepage	http://www.macports.org/
+platforms	darwin
+
+long_description ${description}
+
+fetch		{}
+checksum	{}
+extract		{}
+configure	{}
+build		{}
+destroot	{
+	system "touch ${destroot}${prefix}/lib/${name}"
+}
+
+default_variants	+i_want_b
+
+variant i_want_b {
+	depends_lib-append	port:dependencies-b
+}
+
+test {
+# testing consists in processing dependencies
+}

Copied: branches/release_1_4/base/tests/test/dependencies-b (from rev 23968, trunk/base/tests/test/dependencies-b)


Property changes on: branches/release_1_4/base/tests/test/dependencies-b
___________________________________________________________________
Name: svn:ignore
   + output


Deleted: branches/release_1_4/base/tests/test/dependencies-b/Portfile
===================================================================
--- trunk/base/tests/test/dependencies-b/Portfile	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test/dependencies-b/Portfile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,25 +0,0 @@
-# $Id$
-
-PortSystem 1.0
-name		dependencies-b
-version		1
-categories	test
-maintainers	pguyot at kallisys.net
-description	Test port for dependencies
-homepage	http://www.macports.org/
-platforms	darwin
-
-long_description ${description}
-
-fetch		{}
-checksum	{}
-extract		{}
-configure	{}
-build		{}
-destroot	{
-	system "touch ${destroot}${prefix}/lib/${name}"
-}
-
-test {
-# testing consists in processing dependencies
-}

Copied: branches/release_1_4/base/tests/test/dependencies-b/Portfile (from rev 23968, trunk/base/tests/test/dependencies-b/Portfile)
===================================================================
--- branches/release_1_4/base/tests/test/dependencies-b/Portfile	                        (rev 0)
+++ branches/release_1_4/base/tests/test/dependencies-b/Portfile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,25 @@
+# $Id$
+
+PortSystem 1.0
+name		dependencies-b
+version		1
+categories	test
+maintainers	pguyot at kallisys.net
+description	Test port for dependencies
+homepage	http://www.macports.org/
+platforms	darwin
+
+long_description ${description}
+
+fetch		{}
+checksum	{}
+extract		{}
+configure	{}
+build		{}
+destroot	{
+	system "touch ${destroot}${prefix}/lib/${name}"
+}
+
+test {
+# testing consists in processing dependencies
+}

Copied: branches/release_1_4/base/tests/test/dependencies-c (from rev 23968, trunk/base/tests/test/dependencies-c)


Property changes on: branches/release_1_4/base/tests/test/dependencies-c
___________________________________________________________________
Name: svn:ignore
   + output


Deleted: branches/release_1_4/base/tests/test/dependencies-c/Portfile
===================================================================
--- trunk/base/tests/test/dependencies-c/Portfile	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test/dependencies-c/Portfile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,31 +0,0 @@
-# $Id$
-
-PortSystem 1.0
-name		dependencies-c
-version		1
-categories	test
-maintainers	pguyot at kallisys.net
-description	Test port for dependencies
-homepage	http://www.macports.org/
-platforms	darwin
-
-long_description ${description}
-
-fetch		{}
-checksum	{}
-extract		{}
-configure	{}
-build		{}
-destroot	{
-	system "touch ${destroot}${prefix}/lib/${name}"
-}
-
-default_variants	+i_want_a
-
-variant i_want_a {
-	depends_lib-append	port:dependencies-a
-}
-
-test {
-# testing consists in processing dependencies
-}

Copied: branches/release_1_4/base/tests/test/dependencies-c/Portfile (from rev 23968, trunk/base/tests/test/dependencies-c/Portfile)
===================================================================
--- branches/release_1_4/base/tests/test/dependencies-c/Portfile	                        (rev 0)
+++ branches/release_1_4/base/tests/test/dependencies-c/Portfile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,31 @@
+# $Id$
+
+PortSystem 1.0
+name		dependencies-c
+version		1
+categories	test
+maintainers	pguyot at kallisys.net
+description	Test port for dependencies
+homepage	http://www.macports.org/
+platforms	darwin
+
+long_description ${description}
+
+fetch		{}
+checksum	{}
+extract		{}
+configure	{}
+build		{}
+destroot	{
+	system "touch ${destroot}${prefix}/lib/${name}"
+}
+
+default_variants	+i_want_a
+
+variant i_want_a {
+	depends_lib-append	port:dependencies-a
+}
+
+test {
+# testing consists in processing dependencies
+}

Deleted: branches/release_1_4/base/tests/test/dependencies-c/master
===================================================================
--- trunk/base/tests/test/dependencies-c/master	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test/dependencies-c/master	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,24 +0,0 @@
---->  Fetching dependencies-b
---->  Verifying checksum(s) for dependencies-b
---->  Extracting dependencies-b
---->  Configuring dependencies-b
---->  Building dependencies-b with target all
---->  Staging dependencies-b into destroot
---->  Installing dependencies-b 1_0
---->  Activating dependencies-b 1_0
---->  Cleaning dependencies-b
---->  Fetching dependencies-a
---->  Verifying checksum(s) for dependencies-a
---->  Extracting dependencies-a
---->  Configuring dependencies-a
---->  Building dependencies-a with target all
---->  Staging dependencies-a into destroot
---->  Installing dependencies-a 1_0+i_want_b
---->  Activating dependencies-a 1_0+i_want_b
---->  Cleaning dependencies-a
---->  Fetching dependencies-c
---->  Verifying checksum(s) for dependencies-c
---->  Extracting dependencies-c
---->  Configuring dependencies-c
---->  Building dependencies-c with target all
---->  Testing dependencies-c

Copied: branches/release_1_4/base/tests/test/dependencies-c/master (from rev 23968, trunk/base/tests/test/dependencies-c/master)
===================================================================
--- branches/release_1_4/base/tests/test/dependencies-c/master	                        (rev 0)
+++ branches/release_1_4/base/tests/test/dependencies-c/master	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,24 @@
+--->  Fetching dependencies-b
+--->  Verifying checksum(s) for dependencies-b
+--->  Extracting dependencies-b
+--->  Configuring dependencies-b
+--->  Building dependencies-b with target all
+--->  Staging dependencies-b into destroot
+--->  Installing dependencies-b 1_0
+--->  Activating dependencies-b 1_0
+--->  Cleaning dependencies-b
+--->  Fetching dependencies-a
+--->  Verifying checksum(s) for dependencies-a
+--->  Extracting dependencies-a
+--->  Configuring dependencies-a
+--->  Building dependencies-a with target all
+--->  Staging dependencies-a into destroot
+--->  Installing dependencies-a 1_0+i_want_b
+--->  Activating dependencies-a 1_0+i_want_b
+--->  Cleaning dependencies-a
+--->  Fetching dependencies-c
+--->  Verifying checksum(s) for dependencies-c
+--->  Extracting dependencies-c
+--->  Configuring dependencies-c
+--->  Building dependencies-c with target all
+--->  Testing dependencies-c

Copied: branches/release_1_4/base/tests/test/envvariables (from rev 23968, trunk/base/tests/test/envvariables)


Property changes on: branches/release_1_4/base/tests/test/envvariables
___________________________________________________________________
Name: svn:ignore
   + output


Deleted: branches/release_1_4/base/tests/test/envvariables/Makefile
===================================================================
--- trunk/base/tests/test/envvariables/Makefile	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test/envvariables/Makefile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,18 +0,0 @@
-include ../../../Mk/dports.autoconf.mk
-
-.PHONY: test
-
-$(bindir)/port:
-	@echo "Please install MacPorts before running this test"
-	@exit 1
-	
-test:
-	@PORTSRC=$(PORTSRC) $(bindir)/port clean > /dev/null
-	@sh -c "export ENVA=A ; export ENVB=B; \
-		export PORTSRC=$(PORTSRC); $(bindir)/port -t test" > output 2>&1 || (cat output; exit 1)
-	@diff output master 2>&1 | tee difference
-	@if [ -s difference ]; then \
-		exit 1; \
-	else \
-		rm -f difference; \
-	fi

Copied: branches/release_1_4/base/tests/test/envvariables/Makefile (from rev 23968, trunk/base/tests/test/envvariables/Makefile)
===================================================================
--- branches/release_1_4/base/tests/test/envvariables/Makefile	                        (rev 0)
+++ branches/release_1_4/base/tests/test/envvariables/Makefile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,18 @@
+include ../../../Mk/dports.autoconf.mk
+
+.PHONY: test
+
+$(bindir)/port:
+	@echo "Please install MacPorts before running this test"
+	@exit 1
+	
+test:
+	@PORTSRC=$(PORTSRC) $(bindir)/port clean > /dev/null
+	@sh -c "export ENVA=A ; export ENVB=B; \
+		export PORTSRC=$(PORTSRC); $(bindir)/port -t test" > output 2>&1 || (cat output; exit 1)
+	@diff output master 2>&1 | tee difference
+	@if [ -s difference ]; then \
+		exit 1; \
+	else \
+		rm -f difference; \
+	fi

Deleted: branches/release_1_4/base/tests/test/envvariables/Portfile
===================================================================
--- trunk/base/tests/test/envvariables/Portfile	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test/envvariables/Portfile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,26 +0,0 @@
-# $Id$
-
-PortSystem 1.0
-name		envvariables
-version		1
-categories	test
-maintainers	pguyot at kallisys.net
-description	Test port for env variables
-homepage	http://www.macports.org/
-platforms	darwin
-
-long_description ${description}
-
-fetch		{}
-checksum	{}
-extract		{}
-configure	{}
-build		{}
-destroot	{
-	system "touch ${destroot}${prefix}/lib/${name}"
-}
-
-test {
-	puts $env(ENVA)
-	puts $env(ENVB)
-}

Copied: branches/release_1_4/base/tests/test/envvariables/Portfile (from rev 23968, trunk/base/tests/test/envvariables/Portfile)
===================================================================
--- branches/release_1_4/base/tests/test/envvariables/Portfile	                        (rev 0)
+++ branches/release_1_4/base/tests/test/envvariables/Portfile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,26 @@
+# $Id$
+
+PortSystem 1.0
+name		envvariables
+version		1
+categories	test
+maintainers	pguyot at kallisys.net
+description	Test port for env variables
+homepage	http://www.macports.org/
+platforms	darwin
+
+long_description ${description}
+
+fetch		{}
+checksum	{}
+extract		{}
+configure	{}
+build		{}
+destroot	{
+	system "touch ${destroot}${prefix}/lib/${name}"
+}
+
+test {
+	puts $env(ENVA)
+	puts $env(ENVB)
+}

Deleted: branches/release_1_4/base/tests/test/envvariables/master
===================================================================
--- trunk/base/tests/test/envvariables/master	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test/envvariables/master	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,8 +0,0 @@
---->  Fetching envvariables
---->  Verifying checksum(s) for envvariables
---->  Extracting envvariables
---->  Configuring envvariables
---->  Building envvariables with target all
---->  Testing envvariables
-A
-B

Copied: branches/release_1_4/base/tests/test/envvariables/master (from rev 23968, trunk/base/tests/test/envvariables/master)
===================================================================
--- branches/release_1_4/base/tests/test/envvariables/master	                        (rev 0)
+++ branches/release_1_4/base/tests/test/envvariables/master	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,8 @@
+--->  Fetching envvariables
+--->  Verifying checksum(s) for envvariables
+--->  Extracting envvariables
+--->  Configuring envvariables
+--->  Building envvariables with target all
+--->  Testing envvariables
+A
+B

Copied: branches/release_1_4/base/tests/test/site-tags (from rev 23968, trunk/base/tests/test/site-tags)


Property changes on: branches/release_1_4/base/tests/test/site-tags
___________________________________________________________________
Name: svn:ignore
   + output


Deleted: branches/release_1_4/base/tests/test/site-tags/Portfile
===================================================================
--- trunk/base/tests/test/site-tags/Portfile	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test/site-tags/Portfile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,37 +0,0 @@
-# $Id$
-
-PortSystem 1.0
-name		site-tags
-version		1
-categories	test
-maintainers	pguyot at kallisys.net
-description	Test port for site:tags functionalities
-homepage	http://www.macports.org/
-platforms	darwin
-
-long_description ${description}
-
-master_sites	http://www.douglas.stebila.ca/code/vim/app/:app_aqua \
-				http://www.douglas.stebila.ca/code/vim/doc/:doc_aqua
-distfiles		app-bm.tar.gz:app_aqua \
-				doc.tar.gz:doc_aqua 
-
-checksums		app-bm.tar.gz \
-					md5 418b9e615a34ae5aad918f5c5a694a44 \
-					sha1 e8f8939b16665394686284681036e71fb2d3974d \
-					rmd160 756bca16c69bb3b051c581d671e824ca1495a05b \
-				doc.tar.gz \
-					md5 692f7874fc617162d0fe110daf39a98a \
-					sha1 51d62b8ab344eaf9c1e95d6563766b2453c27e99 \
-					rmd160 3cbae7e39e8c78eca03a0db709cf520003896a12
-
-extract		{}
-configure	{}
-build		{}
-destroot	{
-	system "touch ${destroot}${prefix}/lib/${name}"
-}
-
-test {
-	# test is actually running the fetch target
-}
\ No newline at end of file

Copied: branches/release_1_4/base/tests/test/site-tags/Portfile (from rev 23968, trunk/base/tests/test/site-tags/Portfile)
===================================================================
--- branches/release_1_4/base/tests/test/site-tags/Portfile	                        (rev 0)
+++ branches/release_1_4/base/tests/test/site-tags/Portfile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,37 @@
+# $Id$
+
+PortSystem 1.0
+name		site-tags
+version		1
+categories	test
+maintainers	pguyot at kallisys.net
+description	Test port for site:tags functionalities
+homepage	http://www.macports.org/
+platforms	darwin
+
+long_description ${description}
+
+master_sites	http://www.douglas.stebila.ca/code/vim/app/:app_aqua \
+				http://www.douglas.stebila.ca/code/vim/doc/:doc_aqua
+distfiles		app-bm.tar.gz:app_aqua \
+				doc.tar.gz:doc_aqua 
+
+checksums		app-bm.tar.gz \
+					md5 418b9e615a34ae5aad918f5c5a694a44 \
+					sha1 e8f8939b16665394686284681036e71fb2d3974d \
+					rmd160 756bca16c69bb3b051c581d671e824ca1495a05b \
+				doc.tar.gz \
+					md5 692f7874fc617162d0fe110daf39a98a \
+					sha1 51d62b8ab344eaf9c1e95d6563766b2453c27e99 \
+					rmd160 3cbae7e39e8c78eca03a0db709cf520003896a12
+
+extract		{}
+configure	{}
+build		{}
+destroot	{
+	system "touch ${destroot}${prefix}/lib/${name}"
+}
+
+test {
+	# test is actually running the fetch target
+}
\ No newline at end of file

Deleted: branches/release_1_4/base/tests/test/site-tags/master
===================================================================
--- trunk/base/tests/test/site-tags/master	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test/site-tags/master	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,8 +0,0 @@
---->  Fetching site-tags
---->  Attempting to fetch app-bm.tar.gz from http://www.douglas.stebila.ca/code/vim/app/
---->  Attempting to fetch doc.tar.gz from http://www.douglas.stebila.ca/code/vim/doc/
---->  Verifying checksum(s) for site-tags
---->  Extracting site-tags
---->  Configuring site-tags
---->  Building site-tags with target all
---->  Testing site-tags

Copied: branches/release_1_4/base/tests/test/site-tags/master (from rev 23968, trunk/base/tests/test/site-tags/master)
===================================================================
--- branches/release_1_4/base/tests/test/site-tags/master	                        (rev 0)
+++ branches/release_1_4/base/tests/test/site-tags/master	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,8 @@
+--->  Fetching site-tags
+--->  Attempting to fetch app-bm.tar.gz from http://www.douglas.stebila.ca/code/vim/app/
+--->  Attempting to fetch doc.tar.gz from http://www.douglas.stebila.ca/code/vim/doc/
+--->  Verifying checksum(s) for site-tags
+--->  Extracting site-tags
+--->  Configuring site-tags
+--->  Building site-tags with target all
+--->  Testing site-tags

Copied: branches/release_1_4/base/tests/test/trace (from rev 23968, trunk/base/tests/test/trace)


Property changes on: branches/release_1_4/base/tests/test/trace
___________________________________________________________________
Name: svn:ignore
   + output


Deleted: branches/release_1_4/base/tests/test/trace/Makefile
===================================================================
--- trunk/base/tests/test/trace/Makefile	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test/trace/Makefile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,33 +0,0 @@
-include ../../../Mk/dports.autoconf.mk
-
-.PHONY: test
-
-$(bindir)/port:
-	@echo "Please install MacPorts before running this test"
-	@exit 1
-	
-test:
-	@PORTSRC=$(PORTSRC) $(bindir)/port clean > /dev/null
-	@touch delete-trace
-	@touch rename-trace
-	@mkdir -p rmdir-trace
-	@rm -f create-trace
-	@rm -f create-trace-modenv
-	@rm -rf mkdir-trace
-	@rm -f /tmp/hello-trace
-	@PORTSRC=$(PORTSRC) $(bindir)/port -t test > output 2>&1 || (cat output; exit 1)
-	@rm -f delete-trace
-	@rm -f rename-trace
-	@rm -f rename-new-trace
-	@rm -f create-trace
-	@rm -f create-trace-modenv
-	@rm -rf mkdir-trace
-	@rm -rf rmdir-trace
-	@rm -f /tmp/hello-trace
-	@sed -e "s|${PWD}|PWD|g" < output > output.sed
-	@diff output.sed master 2>&1 | tee difference
-	@if [ -s difference ]; then \
-		exit 1; \
-	else \
-		rm -f difference output.sed; \
-	fi
\ No newline at end of file

Copied: branches/release_1_4/base/tests/test/trace/Makefile (from rev 23968, trunk/base/tests/test/trace/Makefile)
===================================================================
--- branches/release_1_4/base/tests/test/trace/Makefile	                        (rev 0)
+++ branches/release_1_4/base/tests/test/trace/Makefile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,33 @@
+include ../../../Mk/dports.autoconf.mk
+
+.PHONY: test
+
+$(bindir)/port:
+	@echo "Please install MacPorts before running this test"
+	@exit 1
+	
+test:
+	@PORTSRC=$(PORTSRC) $(bindir)/port clean > /dev/null
+	@touch delete-trace
+	@touch rename-trace
+	@mkdir -p rmdir-trace
+	@rm -f create-trace
+	@rm -f create-trace-modenv
+	@rm -rf mkdir-trace
+	@rm -f /tmp/hello-trace
+	@PORTSRC=$(PORTSRC) $(bindir)/port -t test > output 2>&1 || (cat output; exit 1)
+	@rm -f delete-trace
+	@rm -f rename-trace
+	@rm -f rename-new-trace
+	@rm -f create-trace
+	@rm -f create-trace-modenv
+	@rm -rf mkdir-trace
+	@rm -rf rmdir-trace
+	@rm -f /tmp/hello-trace
+	@sed -e "s|${PWD}|PWD|g" < output > output.sed
+	@diff output.sed master 2>&1 | tee difference
+	@if [ -s difference ]; then \
+		exit 1; \
+	else \
+		rm -f difference output.sed; \
+	fi
\ No newline at end of file

Deleted: branches/release_1_4/base/tests/test/trace/Portfile
===================================================================
--- trunk/base/tests/test/trace/Portfile	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test/trace/Portfile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,33 +0,0 @@
-# $Id$
-
-PortSystem 1.0
-name		trace
-version		1
-categories	test
-maintainers	pguyot at kallisys.net
-description	Test port for -t
-homepage	http://www.macports.org/
-platforms	darwin
-
-long_description ${description}
-
-fetch		{}
-checksum	{}
-extract		{}
-configure	{}
-build		{}
-destroot	{
-	system "touch ${destroot}${prefix}/lib/${name}"
-}
-
-test {
-	catch {system "touch create-trace"}
-	catch {system "rm delete-trace"}
-	system "touch /tmp/hello-trace"
-	system "rm /tmp/hello-trace"
-	catch {system "mkdir mkdir-trace"}
-	catch {system "rmdir rmdir-trace"}
-	catch {system "mv rename-trace rename-new-trace"}
-	catch {system "DYLD_INSERT_LIBRARIES= touch create-trace-modenv"}
-	system "mkdir -p /usr/bin"
-}

Copied: branches/release_1_4/base/tests/test/trace/Portfile (from rev 23968, trunk/base/tests/test/trace/Portfile)
===================================================================
--- branches/release_1_4/base/tests/test/trace/Portfile	                        (rev 0)
+++ branches/release_1_4/base/tests/test/trace/Portfile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,33 @@
+# $Id$
+
+PortSystem 1.0
+name		trace
+version		1
+categories	test
+maintainers	pguyot at kallisys.net
+description	Test port for -t
+homepage	http://www.macports.org/
+platforms	darwin
+
+long_description ${description}
+
+fetch		{}
+checksum	{}
+extract		{}
+configure	{}
+build		{}
+destroot	{
+	system "touch ${destroot}${prefix}/lib/${name}"
+}
+
+test {
+	catch {system "touch create-trace"}
+	catch {system "rm delete-trace"}
+	system "touch /tmp/hello-trace"
+	system "rm /tmp/hello-trace"
+	catch {system "mkdir mkdir-trace"}
+	catch {system "rmdir rmdir-trace"}
+	catch {system "mv rename-trace rename-new-trace"}
+	catch {system "DYLD_INSERT_LIBRARIES= touch create-trace-modenv"}
+	system "mkdir -p /usr/bin"
+}

Deleted: branches/release_1_4/base/tests/test/trace/master
===================================================================
--- trunk/base/tests/test/trace/master	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test/trace/master	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,12 +0,0 @@
---->  Fetching trace
---->  Verifying checksum(s) for trace
---->  Extracting trace
---->  Configuring trace
---->  Building trace with target all
---->  Testing trace
-Warning: A creation/deletion/modification was attempted outside sandbox: PWD/create-trace
-Warning: A creation/deletion/modification was attempted outside sandbox: PWD/create-trace-modenv
-Warning: A creation/deletion/modification was attempted outside sandbox: PWD/delete-trace
-Warning: A creation/deletion/modification was attempted outside sandbox: PWD/mkdir-trace
-Warning: A creation/deletion/modification was attempted outside sandbox: PWD/rename-trace
-Warning: A creation/deletion/modification was attempted outside sandbox: PWD/rmdir-trace

Copied: branches/release_1_4/base/tests/test/trace/master (from rev 23968, trunk/base/tests/test/trace/master)
===================================================================
--- branches/release_1_4/base/tests/test/trace/master	                        (rev 0)
+++ branches/release_1_4/base/tests/test/trace/master	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,12 @@
+--->  Fetching trace
+--->  Verifying checksum(s) for trace
+--->  Extracting trace
+--->  Configuring trace
+--->  Building trace with target all
+--->  Testing trace
+Warning: A creation/deletion/modification was attempted outside sandbox: PWD/create-trace
+Warning: A creation/deletion/modification was attempted outside sandbox: PWD/create-trace-modenv
+Warning: A creation/deletion/modification was attempted outside sandbox: PWD/delete-trace
+Warning: A creation/deletion/modification was attempted outside sandbox: PWD/mkdir-trace
+Warning: A creation/deletion/modification was attempted outside sandbox: PWD/rename-trace
+Warning: A creation/deletion/modification was attempted outside sandbox: PWD/rmdir-trace

Copied: branches/release_1_4/base/tests/test/universal (from rev 23968, trunk/base/tests/test/universal)

Deleted: branches/release_1_4/base/tests/test/universal/Makefile
===================================================================
--- trunk/base/tests/test/universal/Makefile	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test/universal/Makefile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,17 +0,0 @@
-include ../../../Mk/dports.autoconf.mk
-
-.PHONY: test
-
-$(bindir)/port:
-	@echo "Please install MacPorts before running this test"
-	@exit 1
-	
-test:
-	@PORTSRC=$(PORTSRC) $(bindir)/port clean > /dev/null
-	@sh -c "export PORTSRC=$(PORTSRC); $(bindir)/port info" > output 2>&1 || (cat output; exit 1)
-	@diff output master 2>&1 | tee difference
-	@if [ -s difference ]; then \
-		exit 1; \
-	else \
-		rm -f difference; \
-	fi

Copied: branches/release_1_4/base/tests/test/universal/Makefile (from rev 23968, trunk/base/tests/test/universal/Makefile)
===================================================================
--- branches/release_1_4/base/tests/test/universal/Makefile	                        (rev 0)
+++ branches/release_1_4/base/tests/test/universal/Makefile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,17 @@
+include ../../../Mk/dports.autoconf.mk
+
+.PHONY: test
+
+$(bindir)/port:
+	@echo "Please install MacPorts before running this test"
+	@exit 1
+	
+test:
+	@PORTSRC=$(PORTSRC) $(bindir)/port clean > /dev/null
+	@sh -c "export PORTSRC=$(PORTSRC); $(bindir)/port info" > output 2>&1 || (cat output; exit 1)
+	@diff output master 2>&1 | tee difference
+	@if [ -s difference ]; then \
+		exit 1; \
+	else \
+		rm -f difference; \
+	fi

Deleted: branches/release_1_4/base/tests/test/universal/Portfile
===================================================================
--- trunk/base/tests/test/universal/Portfile	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test/universal/Portfile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,25 +0,0 @@
-# $Id$
-
-PortSystem 1.0
-name		universal
-version		1
-categories	test
-maintainers	pguyot at kallisys.net
-description	Test port for universal variant
-homepage	http://www.macports.org/
-platforms	darwin
-
-long_description ${description}
-
-fetch		{}
-checksum	{}
-extract		{}
-configure	{}
-build		{}
-destroot	{
-	system "touch ${destroot}${prefix}/lib/${name}"
-}
-
-test		{}
-
-default_variants +universal

Copied: branches/release_1_4/base/tests/test/universal/Portfile (from rev 23968, trunk/base/tests/test/universal/Portfile)
===================================================================
--- branches/release_1_4/base/tests/test/universal/Portfile	                        (rev 0)
+++ branches/release_1_4/base/tests/test/universal/Portfile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,25 @@
+# $Id$
+
+PortSystem 1.0
+name		universal
+version		1
+categories	test
+maintainers	pguyot at kallisys.net
+description	Test port for universal variant
+homepage	http://www.macports.org/
+platforms	darwin
+
+long_description ${description}
+
+fetch		{}
+checksum	{}
+extract		{}
+configure	{}
+build		{}
+destroot	{
+	system "touch ${destroot}${prefix}/lib/${name}"
+}
+
+test		{}
+
+default_variants +universal

Deleted: branches/release_1_4/base/tests/test/universal/master
===================================================================
--- trunk/base/tests/test/universal/master	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test/universal/master	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,7 +0,0 @@
-universal 1, test/universal (Variants: universal)
-http://www.macports.org/
-
-{Test port for universal variant}
-
-Platforms: darwin
-Maintainers: pguyot at kallisys.net

Copied: branches/release_1_4/base/tests/test/universal/master (from rev 23968, trunk/base/tests/test/universal/master)
===================================================================
--- branches/release_1_4/base/tests/test/universal/master	                        (rev 0)
+++ branches/release_1_4/base/tests/test/universal/master	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,7 @@
+universal 1, test/universal (Variants: universal)
+http://www.macports.org/
+
+{Test port for universal variant}
+
+Platforms: darwin
+Maintainers: pguyot at kallisys.net

Copied: branches/release_1_4/base/tests/test/universal-2 (from rev 23968, trunk/base/tests/test/universal-2)

Deleted: branches/release_1_4/base/tests/test/universal-2/Makefile
===================================================================
--- trunk/base/tests/test/universal-2/Makefile	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test/universal-2/Makefile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,17 +0,0 @@
-include ../../../Mk/dports.autoconf.mk
-
-.PHONY: test
-
-$(bindir)/port:
-	@echo "Please install MacPorts before running this test"
-	@exit 1
-	
-test:
-	@PORTSRC=$(PORTSRC) $(bindir)/port clean > /dev/null
-	@sh -c "export PORTSRC=$(PORTSRC); $(bindir)/port info" > output 2>&1 || (cat output; exit 1)
-	@diff output master 2>&1 | tee difference
-	@if [ -s difference ]; then \
-		exit 1; \
-	else \
-		rm -f difference; \
-	fi

Copied: branches/release_1_4/base/tests/test/universal-2/Makefile (from rev 23968, trunk/base/tests/test/universal-2/Makefile)
===================================================================
--- branches/release_1_4/base/tests/test/universal-2/Makefile	                        (rev 0)
+++ branches/release_1_4/base/tests/test/universal-2/Makefile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,17 @@
+include ../../../Mk/dports.autoconf.mk
+
+.PHONY: test
+
+$(bindir)/port:
+	@echo "Please install MacPorts before running this test"
+	@exit 1
+	
+test:
+	@PORTSRC=$(PORTSRC) $(bindir)/port clean > /dev/null
+	@sh -c "export PORTSRC=$(PORTSRC); $(bindir)/port info" > output 2>&1 || (cat output; exit 1)
+	@diff output master 2>&1 | tee difference
+	@if [ -s difference ]; then \
+		exit 1; \
+	else \
+		rm -f difference; \
+	fi

Deleted: branches/release_1_4/base/tests/test/universal-2/Portfile
===================================================================
--- trunk/base/tests/test/universal-2/Portfile	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test/universal-2/Portfile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,25 +0,0 @@
-# $Id$
-
-PortSystem 1.0
-name		universal-2
-version		1
-categories	test
-maintainers	pguyot at kallisys.net
-description	Test port for universal variant
-homepage	http://www.macports.org/
-platforms	darwin
-
-long_description ${description}
-
-fetch		{}
-checksum	{}
-extract		{}
-configure	{}
-build		{}
-destroot	{
-	system "touch ${destroot}${prefix}/lib/${name}"
-}
-
-test		{}
-
-universal_variant	no

Copied: branches/release_1_4/base/tests/test/universal-2/Portfile (from rev 23968, trunk/base/tests/test/universal-2/Portfile)
===================================================================
--- branches/release_1_4/base/tests/test/universal-2/Portfile	                        (rev 0)
+++ branches/release_1_4/base/tests/test/universal-2/Portfile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,25 @@
+# $Id$
+
+PortSystem 1.0
+name		universal-2
+version		1
+categories	test
+maintainers	pguyot at kallisys.net
+description	Test port for universal variant
+homepage	http://www.macports.org/
+platforms	darwin
+
+long_description ${description}
+
+fetch		{}
+checksum	{}
+extract		{}
+configure	{}
+build		{}
+destroot	{
+	system "touch ${destroot}${prefix}/lib/${name}"
+}
+
+test		{}
+
+universal_variant	no

Deleted: branches/release_1_4/base/tests/test/universal-2/master
===================================================================
--- trunk/base/tests/test/universal-2/master	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test/universal-2/master	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,7 +0,0 @@
-universal-2 1, test/universal-2
-http://www.macports.org/
-
-{Test port for universal variant}
-
-Platforms: darwin
-Maintainers: pguyot at kallisys.net

Copied: branches/release_1_4/base/tests/test/universal-2/master (from rev 23968, trunk/base/tests/test/universal-2/master)
===================================================================
--- branches/release_1_4/base/tests/test/universal-2/master	                        (rev 0)
+++ branches/release_1_4/base/tests/test/universal-2/master	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,7 @@
+universal-2 1, test/universal-2
+http://www.macports.org/
+
+{Test port for universal variant}
+
+Platforms: darwin
+Maintainers: pguyot at kallisys.net

Copied: branches/release_1_4/base/tests/test/xcodeversion (from rev 23968, trunk/base/tests/test/xcodeversion)


Property changes on: branches/release_1_4/base/tests/test/xcodeversion
___________________________________________________________________
Name: svn:ignore
   + output


Deleted: branches/release_1_4/base/tests/test/xcodeversion/Portfile
===================================================================
--- trunk/base/tests/test/xcodeversion/Portfile	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test/xcodeversion/Portfile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,26 +0,0 @@
-# $Id$
-
-PortSystem 1.0
-name		xcodeversion
-version		1
-categories	test
-maintainers	pguyot at kallisys.net
-description	Test port for \$xcodeversion
-homepage	http://www.macports.org/
-platforms	darwin
-
-long_description ${description}
-
-fetch		{}
-checksum	{}
-extract		{}
-configure	{}
-build		{}
-destroot	{
-	system "touch ${destroot}${prefix}/lib/${name}"
-}
-
-test {
-	ui_msg "xcodeversion = $xcodeversion"
-	ui_msg "xcodebuildcmd = $xcodebuildcmd"
-}

Copied: branches/release_1_4/base/tests/test/xcodeversion/Portfile (from rev 23968, trunk/base/tests/test/xcodeversion/Portfile)
===================================================================
--- branches/release_1_4/base/tests/test/xcodeversion/Portfile	                        (rev 0)
+++ branches/release_1_4/base/tests/test/xcodeversion/Portfile	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,26 @@
+# $Id$
+
+PortSystem 1.0
+name		xcodeversion
+version		1
+categories	test
+maintainers	pguyot at kallisys.net
+description	Test port for \$xcodeversion
+homepage	http://www.macports.org/
+platforms	darwin
+
+long_description ${description}
+
+fetch		{}
+checksum	{}
+extract		{}
+configure	{}
+build		{}
+destroot	{
+	system "touch ${destroot}${prefix}/lib/${name}"
+}
+
+test {
+	ui_msg "xcodeversion = $xcodeversion"
+	ui_msg "xcodebuildcmd = $xcodebuildcmd"
+}

Deleted: branches/release_1_4/base/tests/test/xcodeversion/master
===================================================================
--- trunk/base/tests/test/xcodeversion/master	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test/xcodeversion/master	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,8 +0,0 @@
---->  Fetching xcodeversion
---->  Verifying checksum(s) for xcodeversion
---->  Extracting xcodeversion
---->  Configuring xcodeversion
---->  Building xcodeversion with target all
---->  Testing xcodeversion
-xcodeversion = 2.1
-xcodebuildcmd = xcodebuild

Copied: branches/release_1_4/base/tests/test/xcodeversion/master (from rev 23968, trunk/base/tests/test/xcodeversion/master)
===================================================================
--- branches/release_1_4/base/tests/test/xcodeversion/master	                        (rev 0)
+++ branches/release_1_4/base/tests/test/xcodeversion/master	2007-04-14 03:46:37 UTC (rev 23969)
@@ -0,0 +1,8 @@
+--->  Fetching xcodeversion
+--->  Verifying checksum(s) for xcodeversion
+--->  Extracting xcodeversion
+--->  Configuring xcodeversion
+--->  Building xcodeversion with target all
+--->  Testing xcodeversion
+xcodeversion = 2.1
+xcodebuildcmd = xcodebuild

Modified: branches/release_1_4/base/tests/test-ports.conf
===================================================================
--- branches/release_1_4/base/tests/test-ports.conf	2007-04-14 03:34:33 UTC (rev 23968)
+++ branches/release_1_4/base/tests/test-ports.conf	2007-04-14 03:46:37 UTC (rev 23969)
@@ -1,8 +1,8 @@
 # Set the directory in which to install ports
-prefix			/tmp/darwinports-tests/opt/local
+prefix			/tmp/macports-tests/opt/local
 
 # Where to store ports specific database files
-portdbpath		/tmp/darwinports-tests/opt/local/var/db/dports
+portdbpath		/tmp/macports-tests/opt/local/var/db/dports
 
 # Type of storage to use for the port registry information, "flat" or "sqlite"
 # NOTE: sqlite not yet supported.
@@ -12,19 +12,19 @@
 portinstalltype		image
 
 # Directory containing the X11 installation.
-x11prefix		/tmp/darwinports-tests/usr/X11R6
+x11prefix		/tmp/macports-tests/usr/X11R6
 
 # Where to find the sources list.
-sources_conf		/tmp/darwinports-tests/opt/local/etc/ports/sources.conf
+sources_conf		/tmp/macports-tests/opt/local/etc/ports/sources.conf
 
 # Where to find global variants definition file (optional)
 #variants_conf		/opt/local/etc/ports/variants.conf
 
 # Create and use binary archive packages for installation/reinstallation ease
-portarchivemode		yes
+portarchivemode		no
 
 # Where to store/retrieve ports binary archive files
-portarchivepath		/tmp/darwinports-tests/opt/local/var/db/dports/packages
+portarchivepath		/tmp/macports-tests/opt/local/var/db/dports/packages
 
 # Type of binary archive packages to create when using archive mode
 #

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070413/dabddd4a/attachment.html


More information about the macports-changes mailing list